Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ethereum-input-data-decoder

Package Overview
Dependencies
Maintainers
1
Versions
34
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ethereum-input-data-decoder - npm Package Compare versions

Comparing version 0.1.2 to 0.1.3

10

dist/index.js

@@ -89,3 +89,3 @@ 'use strict';

var dataBuf = Buffer.from(data.replace(/^0x/, ''), 'hex');
var methodId = dataBuf.subarray(0, 4).toString('hex');
var methodId = toHexString(dataBuf.subarray(0, 4));
var inputsBuf = dataBuf.subarray(4);

@@ -99,3 +99,3 @@

}) : [];
var hash = ethabi.methodID(name, types).toString('hex');
var hash = toHexString(ethabi.methodID(name, types));

@@ -167,2 +167,8 @@ if (hash === methodId) {

function toHexString(byteArray) {
return Array.from(byteArray, function (byte) {
return ('0' + (byte & 0xFF).toString(16)).slice(-2);
}).join('');
}
module.exports = InputDataDecoder;

@@ -76,3 +76,3 @@ const fs = require('fs')

const dataBuf = Buffer.from(data.replace(/^0x/, ''), 'hex')
const methodId = dataBuf.subarray(0, 4).toString('hex')
const methodId = toHexString(dataBuf.subarray(0, 4))
var inputsBuf = dataBuf.subarray(4)

@@ -84,3 +84,3 @@

const types = obj.inputs ? obj.inputs.map(x => x.type) : []
const hash = ethabi.methodID(name, types).toString('hex')
const hash = toHexString(ethabi.methodID(name, types))

@@ -149,2 +149,8 @@ if (hash === methodId) {

function toHexString (byteArray) {
return Array.from(byteArray, function (byte) {
return ('0' + (byte & 0xFF).toString(16)).slice(-2)
}).join('')
}
module.exports = InputDataDecoder

2

package.json
{
"name": "ethereum-input-data-decoder",
"version": "0.1.2",
"version": "0.1.3",
"description": "Ethereum smart contract transaction input data decoder",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

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