Versions in this module Expand all Collapse all v1 v1.1.11 Sep 13, 2020 Changes in this version + func Keccak256(data ...[]byte) []byte + func PersonalEcRecover(data []byte, sig []byte) (string, error) + func SigToPub(hash, sig []byte) (*ecdsa.PublicKey, error) + type Block interface + GetTransactions func() []Transaction + Hash func() string + Number func() uint64 + ParentHash func() string + Timestamp func() uint64 + type BlockChain interface + GetBlockByNumber func(blockNumber uint64) (Block, error) + GetBlockNumber func() (uint64, error) + GetTokenAllowance func(tokenAddress, proxyAddress, address string) decimal.Decimal + GetTokenBalance func(tokenAddress, address string) decimal.Decimal + GetTransaction func(ID string) (Transaction, error) + GetTransactionAndReceipt func(ID string) (Transaction, TransactionReceipt, error) + GetTransactionReceipt func(ID string) (TransactionReceipt, error) + type Ethereum struct + func (e *Ethereum) EnableDebug(b bool) + func (e *Ethereum) GetBlockByNumber(number uint64) (Block, error) + func (e *Ethereum) GetBlockNumber() (uint64, error) + func (e *Ethereum) GetTokenAllowance(tokenAddress, proxyAddress, address string) decimal.Decimal + func (e *Ethereum) GetTokenBalance(tokenAddress, address string) decimal.Decimal + func (e *Ethereum) GetTransaction(ID string) (Transaction, error) + func (e *Ethereum) GetTransactionAndReceipt(ID string) (Transaction, TransactionReceipt, error) + func (e *Ethereum) GetTransactionCount(address string) (int, error) + func (e *Ethereum) GetTransactionReceipt(ID string) (TransactionReceipt, error) + type EthereumBlock struct + func (block *EthereumBlock) GetTransactions() []Transaction + func (block *EthereumBlock) Hash() string + func (block *EthereumBlock) Number() uint64 + func (block *EthereumBlock) ParentHash() string + func (block *EthereumBlock) Timestamp() uint64 + type EthereumTransaction struct + func (t *EthereumTransaction) GetBlockHash() string + func (t *EthereumTransaction) GetBlockNumber() uint64 + func (t *EthereumTransaction) GetFrom() string + func (t *EthereumTransaction) GetGas() int + func (t *EthereumTransaction) GetGasPrice() big.Int + func (t *EthereumTransaction) GetHash() string + func (t *EthereumTransaction) GetTo() string + func (t *EthereumTransaction) GetValue() big.Int + type EthereumTransactionReceipt struct + func (r *EthereumTransactionReceipt) GetBlockHash() string + func (r *EthereumTransactionReceipt) GetBlockNumber() uint64 + func (r *EthereumTransactionReceipt) GetLogs() (rst []IReceiptLog) + func (r *EthereumTransactionReceipt) GetResult() bool + func (r *EthereumTransactionReceipt) GetTxHash() string + func (r *EthereumTransactionReceipt) GetTxIndex() int + type IReceiptLog interface + GetAddress func() string + GetBlockHash func() string + GetBlockNum func() int + GetData func() string + GetLogIndex func() int + GetRemoved func() bool + GetTopics func() []string + GetTransactionHash func() string + GetTransactionIndex func() int + type ReceiptLog struct + func (log ReceiptLog) GetAddress() string + func (log ReceiptLog) GetBlockHash() string + func (log ReceiptLog) GetBlockNum() int + func (log ReceiptLog) GetData() string + func (log ReceiptLog) GetLogIndex() int + func (log ReceiptLog) GetRemoved() bool + func (log ReceiptLog) GetTopics() []string + func (log ReceiptLog) GetTransactionHash() string + func (log ReceiptLog) GetTransactionIndex() int + type Transaction interface + GetBlockHash func() string + GetBlockNumber func() uint64 + GetFrom func() string + GetGas func() int + GetGasPrice func() big.Int + GetHash func() string + GetTo func() string + GetValue func() big.Int + type TransactionReceipt interface + GetBlockHash func() string + GetBlockNumber func() uint64 + GetLogs func() []IReceiptLog + GetResult func() bool + GetTxHash func() string + GetTxIndex func() int