知乎專欄 | 多維度架構 | | | 微信號 netkiller-ebook | | | QQ群:128659835 請註明“讀者” |
ABI-encoded 實際上就是構造方法變數數據
var abi = require('ethereumjs-abi') var parameterTypes = ["address", "uint256", "bool"]; var parameterValues = ["0x1234567812345678", "0x314159268", true]; var encoded = abi.rawEncode(parameterTypes, parameterValues); console.log(encoded.toString('hex'));
在綫生成工具 https://abi.sonnguyen.ws/, https://abi.hashex.org/
還有一種方法可以找到 ABI 數據 https://etherscan.io/tx/0xc53f52b287ec1c71e9d203dd08cc68035ef40bf5155f8b0711da227c01d84d70 查看 Input Data: 0029之後所有的數據就是 ABI