Socket
Socket
Sign inDemoInstall

ethereumjs-abi

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ethereumjs-abi - npm Package Compare versions

Comparing version 0.6.0 to 0.6.1

5

lib/index.js

@@ -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 @@

2

package.json
{
"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 () {

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