Fully-tested, lightweight Ethereum ABI encoder/decoder (ethereumjs-abi comes to 500k+ in browserify)
Currently supports:
- all
uint
/int
types string
bytes
bool
To do:
- Fixed-size arrays
- Dynamic arrays of all types
const abi = require("ethereum-abi");
- Get a method signature
abi.methodID("test", [ "uint" ]);
- Encode arguments
abi.rawEncode([ "uint", "int32" ], [ 12, 300 ]);
- Decode arguments
abi.rawDecode([ "int64" ], Buffer.from("ffffffffffffffffffffffffffffffffffffffffffffffffffffb29c26f344fe", "hex"));