ethereumjs-abi
Advanced tools
Comparing version
@@ -363,2 +363,3 @@ const utils = require('ethereumjs-util') | ||
cur = data.slice(offset, offset + (count * 32)) | ||
offset += (count - 1) * 32 | ||
} | ||
@@ -365,0 +366,0 @@ } |
{ | ||
"name": "ethereumjs-abi", | ||
"version": "0.6.3", | ||
"version": "0.6.4", | ||
"description": "Decoder and encoder for the Ethereum ABI", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -291,2 +291,13 @@ var assert = require('assert') | ||
describe('decoding (uint[2], uint)', function () { | ||
it('should work', function () { | ||
var a = abi.rawDecode([ 'uint[2]', 'uint' ], new Buffer('0000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000005c0000000000000000000000000000000000000000000000000000000000000003', 'hex')) | ||
assert.equal(a.length, 2) | ||
assert.equal(a[0].length, 2) | ||
assert.equal(a[0][0].toString(10), 1) | ||
assert.equal(a[0][1].toString(10), 92) | ||
assert.equal(a[1].toString(10), 3) | ||
}) | ||
}) | ||
/* FIXME: should check that the whole input buffer was consumed | ||
@@ -293,0 +304,0 @@ describe('decoding uint[2] with [1,2,3]', function () { |
51359
1.14%1051
1.06%