Documentation ¶
Index ¶
- func Keccak256(data ...[]byte) []byte
- func PersonalEcRecover(data []byte, sig []byte) (string, error)
- func SigToPub(hash, sig []byte) (*ecdsa.PublicKey, error)
- type Block
- type BlockChain
- type Ethereum
- 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
- type EthereumTransaction
- 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
- 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
- type ReceiptLog
- 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
- type TransactionReceipt
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Block ¶
type Block interface { Number() uint64 Timestamp() uint64 GetTransactions() []Transaction Hash() string ParentHash() string }
type BlockChain ¶
type BlockChain interface { GetTokenBalance(tokenAddress, address string) decimal.Decimal GetTokenAllowance(tokenAddress, proxyAddress, address string) decimal.Decimal GetBlockNumber() (uint64, error) GetBlockByNumber(blockNumber uint64) (Block, error) GetTransaction(ID string) (Transaction, error) GetTransactionReceipt(ID string) (TransactionReceipt, error) GetTransactionAndReceipt(ID string) (Transaction, TransactionReceipt, error) }
type Ethereum ¶
type Ethereum struct {
// contains filtered or unexported fields
}
func (*Ethereum) EnableDebug ¶
func (*Ethereum) GetBlockByNumber ¶
func (*Ethereum) GetBlockNumber ¶
func (*Ethereum) GetTokenAllowance ¶
func (*Ethereum) GetTokenBalance ¶
func (*Ethereum) GetTransaction ¶
func (e *Ethereum) GetTransaction(ID string) (Transaction, error)
func (*Ethereum) GetTransactionAndReceipt ¶
func (e *Ethereum) GetTransactionAndReceipt(ID string) (Transaction, TransactionReceipt, error)
func (*Ethereum) GetTransactionCount ¶
func (*Ethereum) GetTransactionReceipt ¶
func (e *Ethereum) GetTransactionReceipt(ID string) (TransactionReceipt, error)
type EthereumBlock ¶
func (*EthereumBlock) GetTransactions ¶
func (block *EthereumBlock) GetTransactions() []Transaction
func (*EthereumBlock) Hash ¶
func (block *EthereumBlock) Hash() string
func (*EthereumBlock) Number ¶
func (block *EthereumBlock) Number() uint64
func (*EthereumBlock) ParentHash ¶
func (block *EthereumBlock) ParentHash() string
func (*EthereumBlock) Timestamp ¶
func (block *EthereumBlock) Timestamp() uint64
type EthereumTransaction ¶
type EthereumTransaction struct {
*ethrpc.Transaction
}
func (*EthereumTransaction) GetBlockHash ¶
func (t *EthereumTransaction) GetBlockHash() string
func (*EthereumTransaction) GetBlockNumber ¶
func (t *EthereumTransaction) GetBlockNumber() uint64
func (*EthereumTransaction) GetFrom ¶
func (t *EthereumTransaction) GetFrom() string
func (*EthereumTransaction) GetGas ¶
func (t *EthereumTransaction) GetGas() int
func (*EthereumTransaction) GetGasPrice ¶
func (t *EthereumTransaction) GetGasPrice() big.Int
func (*EthereumTransaction) GetHash ¶
func (t *EthereumTransaction) GetHash() string
func (*EthereumTransaction) GetTo ¶
func (t *EthereumTransaction) GetTo() string
func (*EthereumTransaction) GetValue ¶
func (t *EthereumTransaction) GetValue() big.Int
type EthereumTransactionReceipt ¶
type EthereumTransactionReceipt struct {
*ethrpc.TransactionReceipt
}
func (*EthereumTransactionReceipt) GetBlockHash ¶
func (r *EthereumTransactionReceipt) GetBlockHash() string
func (*EthereumTransactionReceipt) GetBlockNumber ¶
func (r *EthereumTransactionReceipt) GetBlockNumber() uint64
func (*EthereumTransactionReceipt) GetLogs ¶
func (r *EthereumTransactionReceipt) GetLogs() (rst []IReceiptLog)
func (*EthereumTransactionReceipt) GetResult ¶
func (r *EthereumTransactionReceipt) GetResult() bool
func (*EthereumTransactionReceipt) GetTxHash ¶
func (r *EthereumTransactionReceipt) GetTxHash() string
func (*EthereumTransactionReceipt) GetTxIndex ¶
func (r *EthereumTransactionReceipt) GetTxIndex() int
type IReceiptLog ¶
type ReceiptLog ¶
func (ReceiptLog) GetAddress ¶
func (log ReceiptLog) GetAddress() string
func (ReceiptLog) GetBlockHash ¶
func (log ReceiptLog) GetBlockHash() string
func (ReceiptLog) GetBlockNum ¶
func (log ReceiptLog) GetBlockNum() int
func (ReceiptLog) GetData ¶
func (log ReceiptLog) GetData() string
func (ReceiptLog) GetLogIndex ¶
func (log ReceiptLog) GetLogIndex() int
func (ReceiptLog) GetRemoved ¶
func (log ReceiptLog) GetRemoved() bool
func (ReceiptLog) GetTopics ¶
func (log ReceiptLog) GetTopics() []string
func (ReceiptLog) GetTransactionHash ¶
func (log ReceiptLog) GetTransactionHash() string
func (ReceiptLog) GetTransactionIndex ¶
func (log ReceiptLog) GetTransactionIndex() int
type Transaction ¶
type TransactionReceipt ¶
Click to show internal directories.
Click to hide internal directories.