modulepackage
0.0.0-20220111065144-59845285a03b
Repository: https://github.com/axengine/ethcli.git
Documentation: pkg.go.dev
# README
ethcli
使用类ethereum的 golang client(sdk),包括以下功能:
- 包装go-ethereum ethclient.Client,提供内置的web3 JSON RPC方法
- 封装离线签名交易接口(
BuildTx
、SignTx
、SendTx
),封装高级别的SendMondoTx
接口 - 封装ORC20/ERC20接口
- 封装ORC721/ERC721接口,封装自定义ORC721/ERC721
mint
接口 - 提供地址生成
GenKey
、校验ValidAddress
、资产精度转换方法ToWei
,ToEther
,十六进制数据转换HexToBytes
BytesToHex
BytesToHexWith0x
方法
方法的使用参考test文件。
数据差异
- 无叔块
- Mondo只有statedb,和区块数据
- 无receipts tree,交易回执hash与交易hash相同
- 区块hash:区块浏览器中区块hash无0x前缀
ORC721 相关方法说明
- 实现
openzeppelin-contract/contracts/token/ERC721
和openzeppelin-contract/contracts/token/ERC721/extensions
相关接口 - 实现自定义
uint256 mint(address to)
和uint256 mint(address to,string memory _tokenURI)
接口 string tokenURI(uint256 tokenId)
方法由ERC721URIStorage
和ERC721Metadata
共用,mint返回的tokenId只能通过hash查询交易结果,从交易事件中获取
# Packages
No description provided by the author
# Functions
No description provided by the author
No description provided by the author
GenKey 本地生成mondo链格式的账户 返回:公钥,地址,私钥,mondo采用压缩公钥.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author