4byte 中文文档教程
4byte
通过哈希的 4 个字节查找以太坊函数签名
Install
npm install 4byte
Getting started
const fourByte = require('4byte')
const signatures = fourByte('0x51c6590a')
console.log(signatures) // ['addLiquidity(uint256)']
CLI
安装:
npm install -g 4byte
查找函数签名:
$ 4byte 0xa9059cbb
transfer(bytes4[9],bytes5[6],int48[11])
many_msg_babbage(bytes1)
transfer(address,uint256)
$ 4byte 0xa9059cbb --format=json
[
"transfer(bytes4[9],bytes5[6],int48[11])",
"many_msg_babbage(bytes1)",
"transfer(address,uint256)"
]
Test
npm test
License
4byte
Look up an Ethereum function signature by the 4 bytes of its hash
Install
npm install 4byte
Getting started
const fourByte = require('4byte')
const signatures = fourByte('0x51c6590a')
console.log(signatures) // ['addLiquidity(uint256)']
CLI
Install:
npm install -g 4byte
Look up a function signature:
$ 4byte 0xa9059cbb
transfer(bytes4[9],bytes5[6],int48[11])
many_msg_babbage(bytes1)
transfer(address,uint256)
$ 4byte 0xa9059cbb --format=json
[
"transfer(bytes4[9],bytes5[6],int48[11])",
"many_msg_babbage(bytes1)",
"transfer(address,uint256)"
]
Test
npm test