Skip to content

Fully-tested, lightweight Ethereum ABI encoder/decoder

License

Notifications You must be signed in to change notification settings

montyanderson/ethereum-abi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ethereum-abi

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

Usage

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"));

Releases

No releases published

Packages

No packages published