Versions in this module Expand all Collapse all v0 v0.2.0 Apr 27, 2024 Changes in this version + func GetAddressFromPrivateKey(privateKey *secp256k1.PrivateKey) string v0.1.0 Apr 27, 2024 Changes in this version + var Erc20ABI = Erc20MetaData.ABI + var Erc20MetaData = &bind.MetaData + type Account struct + func NewAccountFromMnemonic(mnemonic string, password string, index int64) (*Account, error) + func NewAccountFromSeed(seed []byte, index int64) (*Account, error) + func (Self *Account) Chain() common.Chain + func (Self *Account) GetAddress() (string, error) + func (Self *Account) GetPrivateKey() (*secp256k1.PrivateKey, error) + type ChainClient struct + func NewChainClient(nodes map[string]int, currencies map[string]Currency) *ChainClient + func (Self *ChainClient) Chain() common.Chain + func (Self *ChainClient) GetBalance(address string, currency string, args any) (float64, error) + func (Self *ChainClient) GetCurrentHeight() (uint64, error) + func (Self *ChainClient) GetTransaction(txHash string) (*common.Transaction, error) + func (Self *ChainClient) Transfer(privateKey *ecdsa.PrivateKey, to string, currency string, value float64, ...) (string, error) + type Currency struct + Contract string + Decimals int + type Erc20 struct + func NewErc20(address common.Address, backend bind.ContractBackend) (*Erc20, error) + type Erc20Approval struct + Owner common.Address + Raw types.Log + Spender common.Address + Value *big.Int + type Erc20ApprovalIterator struct + Event *Erc20Approval + func (it *Erc20ApprovalIterator) Close() error + func (it *Erc20ApprovalIterator) Error() error + func (it *Erc20ApprovalIterator) Next() bool + type Erc20Caller struct + func NewErc20Caller(address common.Address, caller bind.ContractCaller) (*Erc20Caller, error) + func (_Erc20 *Erc20Caller) Allowance(opts *bind.CallOpts, _owner common.Address, _spender common.Address) (*big.Int, error) + func (_Erc20 *Erc20Caller) BalanceOf(opts *bind.CallOpts, _owner common.Address) (*big.Int, error) + func (_Erc20 *Erc20Caller) Decimals(opts *bind.CallOpts) (uint8, error) + func (_Erc20 *Erc20Caller) Name(opts *bind.CallOpts) (string, error) + func (_Erc20 *Erc20Caller) Symbol(opts *bind.CallOpts) (string, error) + func (_Erc20 *Erc20Caller) TotalSupply(opts *bind.CallOpts) (*big.Int, error) + type Erc20CallerRaw struct + Contract *Erc20Caller + func (_Erc20 *Erc20CallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, ...) error + type Erc20CallerSession struct + CallOpts bind.CallOpts + Contract *Erc20Caller + func (_Erc20 *Erc20CallerSession) Allowance(_owner common.Address, _spender common.Address) (*big.Int, error) + func (_Erc20 *Erc20CallerSession) BalanceOf(_owner common.Address) (*big.Int, error) + func (_Erc20 *Erc20CallerSession) Decimals() (uint8, error) + func (_Erc20 *Erc20CallerSession) Name() (string, error) + func (_Erc20 *Erc20CallerSession) Symbol() (string, error) + func (_Erc20 *Erc20CallerSession) TotalSupply() (*big.Int, error) + type Erc20Filterer struct + func NewErc20Filterer(address common.Address, filterer bind.ContractFilterer) (*Erc20Filterer, error) + func (_Erc20 *Erc20Filterer) FilterApproval(opts *bind.FilterOpts, owner []common.Address, spender []common.Address) (*Erc20ApprovalIterator, error) + func (_Erc20 *Erc20Filterer) FilterTransfer(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*Erc20TransferIterator, error) + func (_Erc20 *Erc20Filterer) ParseApproval(log types.Log) (*Erc20Approval, error) + func (_Erc20 *Erc20Filterer) ParseTransfer(log types.Log) (*Erc20Transfer, error) + func (_Erc20 *Erc20Filterer) WatchApproval(opts *bind.WatchOpts, sink chan<- *Erc20Approval, owner []common.Address, ...) (event.Subscription, error) + func (_Erc20 *Erc20Filterer) WatchTransfer(opts *bind.WatchOpts, sink chan<- *Erc20Transfer, from []common.Address, ...) (event.Subscription, error) + type Erc20Raw struct + Contract *Erc20 + func (_Erc20 *Erc20Raw) Call(opts *bind.CallOpts, result *[]interface{}, method string, ...) error + func (_Erc20 *Erc20Raw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) + func (_Erc20 *Erc20Raw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) + type Erc20Session struct + CallOpts bind.CallOpts + Contract *Erc20 + TransactOpts bind.TransactOpts + func (_Erc20 *Erc20Session) Allowance(_owner common.Address, _spender common.Address) (*big.Int, error) + func (_Erc20 *Erc20Session) Approve(_spender common.Address, _value *big.Int) (*types.Transaction, error) + func (_Erc20 *Erc20Session) BalanceOf(_owner common.Address) (*big.Int, error) + func (_Erc20 *Erc20Session) Decimals() (uint8, error) + func (_Erc20 *Erc20Session) Fallback(calldata []byte) (*types.Transaction, error) + func (_Erc20 *Erc20Session) Name() (string, error) + func (_Erc20 *Erc20Session) Symbol() (string, error) + func (_Erc20 *Erc20Session) TotalSupply() (*big.Int, error) + func (_Erc20 *Erc20Session) Transfer(_to common.Address, _value *big.Int) (*types.Transaction, error) + func (_Erc20 *Erc20Session) TransferFrom(_from common.Address, _to common.Address, _value *big.Int) (*types.Transaction, error) + type Erc20Transactor struct + func NewErc20Transactor(address common.Address, transactor bind.ContractTransactor) (*Erc20Transactor, error) + func (_Erc20 *Erc20Transactor) Approve(opts *bind.TransactOpts, _spender common.Address, _value *big.Int) (*types.Transaction, error) + func (_Erc20 *Erc20Transactor) Fallback(opts *bind.TransactOpts, calldata []byte) (*types.Transaction, error) + func (_Erc20 *Erc20Transactor) Transfer(opts *bind.TransactOpts, _to common.Address, _value *big.Int) (*types.Transaction, error) + func (_Erc20 *Erc20Transactor) TransferFrom(opts *bind.TransactOpts, _from common.Address, _to common.Address, ...) (*types.Transaction, error) + type Erc20TransactorRaw struct + Contract *Erc20Transactor + func (_Erc20 *Erc20TransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) + func (_Erc20 *Erc20TransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) + type Erc20TransactorSession struct + Contract *Erc20Transactor + TransactOpts bind.TransactOpts + func (_Erc20 *Erc20TransactorSession) Approve(_spender common.Address, _value *big.Int) (*types.Transaction, error) + func (_Erc20 *Erc20TransactorSession) Fallback(calldata []byte) (*types.Transaction, error) + func (_Erc20 *Erc20TransactorSession) Transfer(_to common.Address, _value *big.Int) (*types.Transaction, error) + func (_Erc20 *Erc20TransactorSession) TransferFrom(_from common.Address, _to common.Address, _value *big.Int) (*types.Transaction, error) + type Erc20Transfer struct + From common.Address + Raw types.Log + To common.Address + Value *big.Int + type Erc20TransferIterator struct + Event *Erc20Transfer + func (it *Erc20TransferIterator) Close() error + func (it *Erc20TransferIterator) Error() error + func (it *Erc20TransferIterator) Next() bool + type GetBalanceParameter struct + type TransferParameter struct