Documentation
¶
Index ¶
- func BuildDynamicFeeTx(chainId *big.Int, nonce uint64, baseFee, priorityFee *big.Int, gas uint64, ...) *types.Transaction
- func BuildLegacyTx(nonce uint64, gasPrice *big.Int, gas uint64, to *common.Address, ...) *types.Transaction
- func BytesToHex(bz []byte) string
- func BytesToHexWith0x(bz []byte) string
- func ERC20Allowance(ctx context.Context, cli *ethclient.Client, token, owner, spender string, ...) (*big.Int, error)
- func ERC20Approve(ctx context.Context, cli *ethclient.Client, token, key, spender, value string) (string, error)
- func ERC20ApproveData(spender, value string) ([]byte, error)
- func ERC20BalanceOf(ctx context.Context, cli *ethclient.Client, token string, address string, ...) (*big.Int, error)
- func ERC20Burn(ctx context.Context, cli *ethclient.Client, token, key, value string) (string, error)
- func ERC20BurnData(value string) ([]byte, error)
- func ERC20BurnFrom(ctx context.Context, cli *ethclient.Client, token, key, owner, value string) (string, error)
- func ERC20BurnFromData(owner, value string) ([]byte, error)
- func ERC20Decimals(ctx context.Context, cli *ethclient.Client, token string, blockNumber *big.Int) (uint8, error)
- func ERC20Mint(ctx context.Context, cli *ethclient.Client, token, key, to, value string) (string, error)
- func ERC20MintData(to, value string) ([]byte, error)
- func ERC20Name(ctx context.Context, cli *ethclient.Client, token string, blockNumber *big.Int) (string, error)
- func ERC20Symbol(ctx context.Context, cli *ethclient.Client, token string, blockNumber *big.Int) (string, error)
- func ERC20TotalSupply(ctx context.Context, cli *ethclient.Client, token string, blockNumber *big.Int) (*big.Int, error)
- func ERC20Transfer(ctx context.Context, cli *ethclient.Client, token, key, to, value string) (string, error)
- func ERC20TransferData(to, value string) ([]byte, error)
- func ERC20TransferFrom(ctx context.Context, cli *ethclient.Client, token, key, from, to, value string) (string, error)
- func ERC20TransferFromData(from, to, value string) ([]byte, error)
- func ERC721Approve(ctx context.Context, cli *ethclient.Client, token string, key, to string, ...) (string, error)
- func ERC721ApproveData(to string, tokenId *big.Int) ([]byte, error)
- func ERC721BalanceOf(ctx context.Context, cli *ethclient.Client, token string, owner string, ...) (*big.Int, error)
- func ERC721Burn(ctx context.Context, cli *ethclient.Client, token string, key string, ...) (string, error)
- func ERC721BurnData(tokenId *big.Int) ([]byte, error)
- func ERC721Exists(ctx context.Context, cli *ethclient.Client, token string, tokenId *big.Int, ...) (bool, error)
- func ERC721GetApproved(ctx context.Context, cli *ethclient.Client, token string, tokenId *big.Int, ...) (string, error)
- func ERC721IsApprovedForAll(ctx context.Context, cli *ethclient.Client, token string, ...) (bool, error)
- func ERC721Mint(ctx context.Context, cli *ethclient.Client, token string, key string, ...) (string, error)
- func ERC721MintData(to string) ([]byte, error)
- func ERC721MintWithTokenIdAndURI(ctx context.Context, cli *ethclient.Client, token string, key string, ...) (string, error)
- func ERC721MintWithTokenIdAndURIData(to string, tokenId *big.Int, uri string) ([]byte, error)
- func ERC721MintWithTokenURI(ctx context.Context, cli *ethclient.Client, token string, key string, ...) (string, error)
- func ERC721MintWithTokenURIData(to string, uri string) ([]byte, error)
- func ERC721Name(ctx context.Context, cli *ethclient.Client, token string, blockNumber *big.Int) (string, error)
- func ERC721OwnerOf(ctx context.Context, cli *ethclient.Client, token string, tokenId *big.Int, ...) (string, error)
- func ERC721Pause(ctx context.Context, cli *ethclient.Client, token string, key string) (string, error)
- func ERC721PauseData() ([]byte, error)
- func ERC721Paused(ctx context.Context, cli *ethclient.Client, token string, blockNumber *big.Int) (bool, error)
- func ERC721SafeTransferFrom(ctx context.Context, cli *ethclient.Client, token string, key, from, to string, ...) (string, error)
- func ERC721SafeTransferFromData(from, to string, tokenId *big.Int) ([]byte, error)
- func ERC721SafeTransferFromWithData(ctx context.Context, cli *ethclient.Client, token string, key, from, to string, ...) (string, error)
- func ERC721SafeTransferFromWithDataData(from, to string, tokenId *big.Int, calldata []byte) ([]byte, error)
- func ERC721SetApprovalForAll(ctx context.Context, cli *ethclient.Client, token string, key, operator string, ...) (string, error)
- func ERC721SetApprovalForAllData(operator string, approved bool) ([]byte, error)
- func ERC721SupportsInterface(ctx context.Context, cli *ethclient.Client, token string, blockNumber *big.Int) (bool, error)
- func ERC721Symbol(ctx context.Context, cli *ethclient.Client, token string, blockNumber *big.Int) (string, error)
- func ERC721TokenByIndex(ctx context.Context, cli *ethclient.Client, token string, index *big.Int, ...) (*big.Int, error)
- func ERC721TokenOfOwnerByIndex(ctx context.Context, cli *ethclient.Client, token string, owner string, ...) (*big.Int, error)
- func ERC721TokenURI(ctx context.Context, cli *ethclient.Client, token string, tokenId *big.Int, ...) (string, error)
- func ERC721TotalSupply(ctx context.Context, cli *ethclient.Client, token string, blockNumber *big.Int) (*big.Int, error)
- func ERC721TransferFrom(ctx context.Context, cli *ethclient.Client, token string, key, from, to string, ...) (string, error)
- func ERC721TransferFromData(from, to string, tokenId *big.Int) ([]byte, error)
- func ERC721Unpause(ctx context.Context, cli *ethclient.Client, token string, key string) (string, error)
- func ERC721UnpauseData() ([]byte, error)
- func ERC1155BalanceOf(ctx context.Context, cli *ethclient.Client, token string, owner string, ...) (*big.Int, error)
- func ERC1155BalanceOfBatch(ctx context.Context, cli *ethclient.Client, token string, owners []string, ...) ([]*big.Int, error)
- func ERC1155Burn(ctx context.Context, cli *ethclient.Client, key string, token string, ...) (string, error)
- func ERC1155BurnBatch(ctx context.Context, cli *ethclient.Client, key string, token string, ...) (string, error)
- func ERC1155BurnBatchData(from string, ids []*big.Int, amounts []*big.Int) ([]byte, error)
- func ERC1155BurnData(from string, id *big.Int, amount *big.Int) ([]byte, error)
- func ERC1155IsApprovedForAll(ctx context.Context, cli *ethclient.Client, token string, owner string, ...) (bool, error)
- func ERC1155Mint(ctx context.Context, cli *ethclient.Client, key string, token string, ...) (string, error)
- func ERC1155MintBatch(ctx context.Context, cli *ethclient.Client, key string, token string, ...) (string, error)
- func ERC1155MintBatchData(to string, ids []*big.Int, amounts []*big.Int, data []byte) ([]byte, error)
- func ERC1155MintData(to string, id *big.Int, amount *big.Int, data []byte) ([]byte, error)
- func ERC1155SafeBatchTransferFrom(ctx context.Context, cli *ethclient.Client, key string, token string, ...) (string, error)
- func ERC1155SafeBatchTransferFromData(from, to string, ids []*big.Int, amounts []*big.Int, data []byte) ([]byte, error)
- func ERC1155SafeTransferFrom(ctx context.Context, cli *ethclient.Client, key string, token string, ...) (string, error)
- func ERC1155SafeTransferFromData(from, to string, id *big.Int, amount *big.Int, data []byte) ([]byte, error)
- func ERC1155SetApprovalForAll(ctx context.Context, cli *ethclient.Client, key string, token string, ...) (string, error)
- func ERC1155SetApprovalForAllData(operator string, approved bool) ([]byte, error)
- func ERC1155SupportsInterface(ctx context.Context, cli *ethclient.Client, token string, interfaceId [4]byte, ...) (bool, error)
- func ERC1155Uri(ctx context.Context, cli *ethclient.Client, token string, tokenId *big.Int, ...) (string, error)
- func GenKey() (string, string, string, error)
- func HashToAddress(hx common.Hash) common.Address
- func HashToBigInt(hx common.Hash) *big.Int
- func HexToBytes(str string) []byte
- func SendDynamicFeeTx(ctx context.Context, cli *ethclient.Client, key string, to *string, ...) (string, error)
- func SendLegacyTx(ctx context.Context, cli *ethclient.Client, key string, to *string, ...) (string, error)
- func SendTx(ctx context.Context, cli *ethclient.Client, signedTx *types.Transaction) error
- func SignTx(tx *types.Transaction, chainId *big.Int, key *ecdsa.PrivateKey) (*types.Transaction, error)
- func ToEther(v *big.Int) *big.Int
- func ToWei(v *big.Int) *big.Int
- func ValidAddress(address string) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildDynamicFeeTx ¶
func BuildDynamicFeeTx(chainId *big.Int, nonce uint64, baseFee, priorityFee *big.Int, gas uint64, to *common.Address, value *big.Int, data []byte) *types.Transaction
BuildDynamicFeeTx build DynamicFee transaction
func BuildLegacyTx ¶
func BuildLegacyTx(nonce uint64, gasPrice *big.Int, gas uint64, to *common.Address, value *big.Int, data []byte) *types.Transaction
BuildLegacyTx build Legacy transaction
func BytesToHex ¶
func BytesToHexWith0x ¶
func ERC20Allowance ¶
func ERC20Approve ¶
func ERC20ApproveData ¶
func ERC20BalanceOf ¶
func ERC20BurnData ¶
func ERC20BurnFrom ¶
func ERC20BurnFromData ¶
func ERC20Decimals ¶
func ERC20MintData ¶
func ERC20Symbol ¶
func ERC20TotalSupply ¶
func ERC20Transfer ¶
func ERC20TransferData ¶
func ERC20TransferFrom ¶
func ERC20TransferFromData ¶
func ERC721Approve ¶
func ERC721BalanceOf ¶
func ERC721Burn ¶
func ERC721Exists ¶
func ERC721GetApproved ¶
func ERC721IsApprovedForAll ¶
func ERC721Mint ¶
func ERC721MintData ¶
func ERC721MintWithTokenURI ¶
func ERC721Name ¶
func ERC721OwnerOf ¶
func ERC721Pause ¶
func ERC721PauseData ¶
func ERC721Paused ¶
func ERC721SafeTransferFrom ¶
func ERC721SetApprovalForAll ¶
func ERC721SupportsInterface ¶
func ERC721Symbol ¶
func ERC721TokenByIndex ¶
func ERC721TokenURI ¶
func ERC721TokenURI(ctx context.Context, cli *ethclient.Client, token string, tokenId *big.Int, blockNumber *big.Int) (string, error)
ERC721TokenURI for ERC721Metadata && ERC721URIStorage
func ERC721TotalSupply ¶
func ERC721TransferFrom ¶
func ERC721TransferFromData ¶
func ERC721Unpause ¶
func ERC721UnpauseData ¶
func ERC1155BalanceOf ¶
func ERC1155BalanceOfBatch ¶
func ERC1155Burn ¶
func ERC1155BurnBatch ¶
func ERC1155BurnBatchData ¶
func ERC1155BurnData ¶
func ERC1155IsApprovedForAll ¶
func ERC1155Mint ¶
func ERC1155MintBatch ¶
func ERC1155MintBatchData ¶
func ERC1155MintData ¶
func ERC1155SafeTransferFrom ¶
func ERC1155Uri ¶
func HexToBytes ¶
func SendDynamicFeeTx ¶
func SendDynamicFeeTx(ctx context.Context, cli *ethclient.Client, key string, to *string, amount string, payload string) (string, error)
SendDynamicFeeTx High-level Send DynamicFee Transaction
func SendLegacyTx ¶
func SendLegacyTx(ctx context.Context, cli *ethclient.Client, key string, to *string, amount string, payload string, gasPrice string, gasLimit uint64) (string, error)
SendLegacyTx High-level Send Legacy Transaction
func SignTx ¶
func SignTx(tx *types.Transaction, chainId *big.Int, key *ecdsa.PrivateKey) (*types.Transaction, error)
SignTx signs a transaction with the given private key.
func ValidAddress ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.