Documentation
¶
Index ¶
Constants ¶
const ( Latest BlockNumber = -1 Earliest = -2 Pending = -3 )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Address ¶
type Address [20]byte
Address is an Ethereum address
func HexToAddress ¶
HexToAddress converts an hex string value to an address object
func (Address) MarshalText ¶
MarshalText implements the marshal interface
func (*Address) UnmarshalText ¶
UnmarshalText implements the unmarshal interface
type Block ¶
type Block struct {
Number uint64
Hash Hash
ParentHash Hash
Sha3Uncles Hash
TransactionsRoot Hash
StateRoot Hash
ReceiptsRoot Hash
Miner Address
Difficulty *big.Int
ExtraData []byte
GasLimit uint64
GasUsed uint64
Timestamp uint64
Transactions []*Transaction
TransactionsHashes []Hash
Uncles []Hash
}
func (*Block) MarshalJSON ¶
MarshalJSON implements the marshal interface
func (*Block) UnmarshalJSON ¶
UnmarshalJSON implements the unmarshal interface
type BlockNumber ¶
type BlockNumber int
func EncodeBlock ¶
func EncodeBlock(block ...BlockNumber) BlockNumber
func (BlockNumber) String ¶
func (b BlockNumber) String() string
type CallMsg ¶
func (*CallMsg) MarshalJSON ¶
MarshalJSON implements the Marshal interface.
type Hash ¶
type Hash [32]byte
Hash is an Ethereum hash
func (Hash) MarshalText ¶
MarshalText implements the marshal interface
func (*Hash) UnmarshalText ¶
UnmarshalText implements the unmarshal interface
type Log ¶
type Log struct {
Removed bool
LogIndex uint64
TransactionIndex uint64
TransactionHash Hash
BlockHash Hash
BlockNumber uint64
Address Address
Topics []Hash
Data []byte
}
func (*Log) MarshalJSON ¶
MarshalJSON implements the marshal interface
func (*Log) UnmarshalJSON ¶
UnmarshalJSON implements the unmarshal interface
type LogFilter ¶
type LogFilter struct {
Address []Address
Topics []*Hash
BlockHash *Hash
From *BlockNumber
To *BlockNumber
}
func (*LogFilter) MarshalJSON ¶
MarshalJSON implements the Marshal interface.
func (*LogFilter) SetFromUint64 ¶
func (*LogFilter) SetTo ¶
func (l *LogFilter) SetTo(b BlockNumber)
func (*LogFilter) SetToUint64 ¶
type Receipt ¶
type Receipt struct {
TransactionHash Hash
TransactionIndex uint64
ContractAddress Address
BlockHash Hash
From Address
BlockNumber uint64
Status uint64
GasUsed uint64
CumulativeGasUsed uint64
LogsBloom []byte
Logs []*Log
}
func (*Receipt) UnmarshalJSON ¶
UnmarshalJSON implements the unmarshal interface
type Transaction ¶
type Transaction struct {
Hash Hash
From Address
To string
Input []byte
GasPrice uint64
Gas uint64
Value *big.Int
/*Exta*/
BlockHash Hash
BlockNumber uint64
Nonce uint64
TransactionIndex uint64
}
func (*Transaction) MarshalJSON ¶
func (t *Transaction) MarshalJSON() ([]byte, error)
MarshalJSON implements the Marshal interface.
func (*Transaction) UnmarshalJSON ¶
func (t *Transaction) UnmarshalJSON(buf []byte) error
UnmarshalJSON implements the unmarshal interface