"0xa9059cbb"余额查询:balanceOf(address)编码为:web3.sha3("balanceOf(address)").substring(0,10) -> "0x70a08231"transfer(address,_以太坊智能合约各方法对应的签名编码">
当前位置:   article > 正文

以太坊智能合约各方法对应的签名编码

以太坊智能合约各方法对应的签名编码

erc20智能合约常见方法对应的签名编码:

  1. 常见例如交易:transfer(address,uint256)

编码为:

web3.sha3("transfer(address,uint256)").substring(0,10)  -> "0xa9059cbb"
  • 1
  1. 余额查询:balanceOf(address)

编码为:

web3.sha3("balanceOf(address)").substring(0,10)  -> "0x70a08231"
  • 1
  • transfer(address,uint256): 0xa9059cbb
  • balanceOf(address):0x70a08231
  • decimals():0x313ce567
  • allowance(address,address): 0xdd62ed3e
  • symbol():0x95d89b41
  • totalSupply():0x18160ddd
  • name():0x06fdde03
  • approve(address,uint256):0x095ea7b3
  • transferFrom(address,address,uint256): 0x23b872dd
声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/Gausst松鼠会/article/detail/141803
推荐阅读
相关标签
  

闽ICP备14008679号