Documentation ¶
Index ¶
- type Options
- type Service
- func (s *Service) GetAccountBalance(address string) (*big.Int, error)
- func (s *Service) GetGasPrice() *big.Int
- func (s *Service) GetLatestBlockNumber() (*big.Int, error)
- func (s *Service) GetPublicAddressFromPrivateKey(priv *ecdsa.PrivateKey) (common.Address, error)
- func (s *Service) GetTokenBalance(_tokenAddress string, _accountAddress string) (*big.Int, error)
- func (s *Service) GetTokenDecimals(tokenAddress string) (*big.Int, error)
- func (s *Service) SendTx(tx *types.Transaction) error
- func (s *Service) SignTx(nonce uint64, _toAddress string, amount *big.Int, gasLimit uint64, ...) (*types.Transaction, error)
- func (s *Service) TransferEth(privateKey string, _toAddress string, amount *big.Int) (*types.Transaction, error)
- func (s *Service) TransferTokens(auth bind.TransactOpts, _tokenAddress string, _toAddress string, ...) (*types.Transaction, error)
- func (s *Service) TransferTokensTxData(_toAddress string, amount *big.Int) ([]byte, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Service ¶
Service service
func (*Service) GetAccountBalance ¶
GetAccountBalance get account balance
func (*Service) GetGasPrice ¶
GetGasPrice gets clamped gas price
func (*Service) GetLatestBlockNumber ¶
GetLatestBlockNumber get the latest block number
func (*Service) GetPublicAddressFromPrivateKey ¶
GetPublicAddressFromPrivateKey returns public address from private key
func (*Service) GetTokenBalance ¶
GetTokenBalance get token balance
func (*Service) GetTokenDecimals ¶
GetTokenDecimals get token decimals
func (*Service) SendTx ¶
func (s *Service) SendTx(tx *types.Transaction) error
SendTx send a transaction to the network
func (*Service) SignTx ¶
func (s *Service) SignTx(nonce uint64, _toAddress string, amount *big.Int, gasLimit uint64, gasPrice *big.Int, data []byte, privateKey string) (*types.Transaction, error)
SignTx sign a transaction with a private key
func (*Service) TransferEth ¶
func (s *Service) TransferEth(privateKey string, _toAddress string, amount *big.Int) (*types.Transaction, error)
TransferEth transfer ETH to an address
func (*Service) TransferTokens ¶
func (s *Service) TransferTokens(auth bind.TransactOpts, _tokenAddress string, _toAddress string, amount *big.Int) (*types.Transaction, error)
TransferTokens transfer tokens to an address
Click to show internal directories.
Click to hide internal directories.