New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

augur-abi

Package Overview
Dependencies
Maintainers
1
Versions
50
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

augur-abi - npm Package Compare versions

Comparing version 0.3.3 to 0.3.4

32

index.js

@@ -100,18 +100,21 @@ /**

for (var i = 0; i < bytearray.length; ++i) {
tmp += bytearray[i].slice(2);
if (bytearray[i] !== undefined && bytearray[i] !== null) {
if (bytearray[i].constructor === String) {
tmp += this.strip_0x(bytearray[i]);
} else if (bytearray[i].constructor === Number) {
tmp += bytearray[i].toString(16);
} else if (Buffer.isBuffer(bytearray[i])) {
tmp += bytearray[i].toString("hex");
}
}
}
bytearray = tmp;
} else if (Buffer.isBuffer(bytearray)) {
bytearray = bytearray.toString("hex");
}
bytearray = this.strip_0x(bytearray);
return this.remove_trailing_zeros(
this.abi.rawDecode(
["string"],
new Buffer(
"0000000000000000000000000000000000000000000000000000000000000020"+
this.pad_left((this.chunk(bytearray.length)*32).toString(16))+
this.pad_right(bytearray),
"hex")
)[0], true);
if (bytearray.constructor === String) {
bytearray = this.strip_0x(bytearray);
}
if (!Buffer.isBuffer(bytearray)) {
bytearray = new Buffer(bytearray, "hex");
}
return bytearray.toString("utf8");
},

@@ -122,7 +125,6 @@

return this.prefix_hex(this.pad_right(new Buffer(s, "utf8").toString("hex")));
// return this.prefix_hex(ethabi.rawEncode(["string"], [s]).slice(64).toString("hex"));
},
int256_to_short_string: function (n) {
return this.bytes_to_utf16(this.remove_trailing_zeros(n));
return new Buffer(this.strip_0x(this.remove_trailing_zeros(n)), "hex").toString("utf8");
},

@@ -129,0 +131,0 @@

{
"name": "augur-abi",
"version": "0.3.3",
"version": "0.3.4",
"description": "Contract ABI serialization",

@@ -27,3 +27,3 @@ "main": "index.js",

"bignumber.js": "^2.0.7",
"ethereumjs-abi": "tinybike/ethereumjs-abi",
"ethereumjs-abi": "ethereumjs/ethereumjs-abi",
"js-sha3": "^0.3.1"

@@ -30,0 +30,0 @@ },

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc