-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathcallAnalyzer.js
14 lines (8 loc) · 1.56 KB
/
callAnalyzer.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
const abi = require("./build/contracts/PaymentChannels.json").abi;
const txDecoder = require("ethereum-tx-decoder");
const fnDecoder = new txDecoder.FunctionDecoder(abi);
const tx =
"0xf90273048504a817c800836691b794b1ebaddf5710d42e5c575aec68396cd1a4b04ce4884563918244f40000b902040cb8aa7c00000000000000000000000025e27882eeb2159ad3164ed2622241740dfe0528000000000000000000000000a09bd41a9f1d469fca7b3f82a579b855dd6b279d00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004563918244f40000000000000000000000000000000000000000000000000000000000000000002c0000000000000000000000000000000000000000000000000000000000001388000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000001800000000000000000000000000000000000000000000000000000000000000041f63d4c394313b16e7170d3b1c9239b6b28e20b3664aedb054e27ee8d03ccbe755e018edb3ec41d93f5c14363352ac90420635f9c2c1876d1719418cbf907eec21c00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004110d34d547738357dd475f7662aef6df5b1d144c830f63a714a2ba86ac12468b37edf825c3be73d33ba3b26fa4ce48967b19dcfbb4b072b446710e832736085e01b0000000000000000000000000000000000000000000000000000000000000025a03a6e652016524925d783398627f9c2ba53657dc7c4ffb07068c50a3e3f7c394ba0046baf4a1fa1405f6b1d38af561c78f2d5ba08df90c47eb604dd824017d4c3d8";
const decodedTx = txDecoder.decodeTx(tx);
console.log(decodedTx, decodedTx.value.toString());
console.log(fnDecoder.decodeFn(decodedTx.data));