ethereumjs-abi
Advanced tools
Comparing version 0.6.0 to 0.6.1
@@ -317,2 +317,7 @@ const utils = require('ethereumjs-util') | ||
cur = data.slice(dataOffset) | ||
} else if (type.match(/\w+\[\d+\]/)) { | ||
var count = parseTypeArray(type) | ||
if (count > 1) { | ||
cur = data.slice(offset, offset + (count * 32)) | ||
} | ||
} | ||
@@ -319,0 +324,0 @@ |
{ | ||
"name": "ethereumjs-abi", | ||
"version": "0.6.0", | ||
"version": "0.6.1", | ||
"description": "Decoder and encoder for the Ethereum ABI", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -280,2 +280,13 @@ var assert = require('assert') | ||
describe('decoding fixed-array', function () { | ||
it('uint[3]', function () { | ||
var a = abi.rawDecode([ 'uint[3]' ], new Buffer('000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000003', 'hex')) | ||
assert.equal(a.length, 1) | ||
assert.equal(a[0].length, 3) | ||
assert.equal(a[0][0].toString(10), 1) | ||
assert.equal(a[0][1].toString(10), 2) | ||
assert.equal(a[0][2].toString(10), 3) | ||
}) | ||
}) | ||
/* FIXME: should check that the whole input buffer was consumed | ||
@@ -282,0 +293,0 @@ describe('decoding uint[2] with [1,2,3]', function () { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
45896
934