Socket
Socket
Sign inDemoInstall

ethereum-input-data-decoder

Package Overview
Dependencies
46
Maintainers
1
Versions
34
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.0.2 to 0.0.3

example/bundle.js

2

index.js

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

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

@@ -31,0 +31,0 @@

{
"name": "ethereum-input-data-decoder",
"version": "0.0.2",
"version": "0.0.3",
"description": "Ethereum smart contract transaction input data decoder",
"main": "index.js",
"scripts": {
"test": "tape ./test/index.js"
"test": "tape ./test/index.js",
"client": "browserify ./example/main.js -o ./example/bundle.js"
},

@@ -9,0 +10,0 @@ "repository": {

@@ -7,2 +7,6 @@ # Ethereum input data decoder

## Demo
[https://lab.miguelmota.com/ethereum-input-data-decoder](https://lab.miguelmota.com/ethereum-input-data-decoder)
## Install

@@ -62,2 +66,11 @@

Example using input response from [web3.getTransaction](https://github.com/ethereum/wiki/wiki/JavaScript-API#web3ethgettransaction):
```javascript
web3.eth.getTransaction(txHash, (error, txResult) => {
const result = decoder.decodeData(txResult.input);
console.log(result);
});
```
## Test

@@ -64,0 +77,0 @@

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc