ethereum

package
v0.0.0-...-8700dda Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 24, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildErc20Data

func BuildErc20Data(toAddress common.Address, amount *big.Int) ([]byte, error)

构建ERC-20的交易数据

func BuildErc721Data

func BuildErc721Data(fromAddress, toAddress common.Address, tokenID *big.Int) ([]byte, error)

BuildErc721Data 构建 ERC-721 合约的 safeTransferFrom 交易数据

func CreateAddress

func CreateAddress(ctx context.Context) (*types.EthAddress, error)

CreateAddress 直接生成新的钱包

func CreateAddressByPrivateKey

func CreateAddressByPrivateKey(ctx context.Context, privateKey *ecdsa.PrivateKey) (*types.EthAddress, error)

CreateAddressByPrivateKey 通过私钥生成地址信息

func GetAddressByPublicKey

func GetAddressByPublicKey(ctx context.Context, publicKey string) (string, error)

GetAddressByPublicKey 将公钥转换为地址信息

func OfflineSignTx

func OfflineSignTx(feeTx *types.DynamicFeeTx, privateKeyStr string, chainId *big.Int) (string, error)

使用EIP1559的方式实现交易

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL