ethereum-input-data-decoder
Advanced tools
Comparing version 0.0.2 to 0.0.3
@@ -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 @@ |
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 2 instances 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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
616086
15
18290
83
8