Versions in this module Expand all Collapse all v0 v0.0.1 May 23, 2023 Changes in this version + const AddressLength + const BloomByteLength + const HashLength + const RLPSingleByteUpperLimit + const SignatureSize + var EmptyRootHash = StringToHash("0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421") + var EmptyUncleHash = StringToHash("0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347") + var HeaderHash func(h *Header) Hash + var ZeroAddress = Address + var ZeroHash = Hash + func AddressToString(address Address) string + func EncodeBigInt(b *big.Int) *string + func EncodeBytes(b []byte) *string + func EncodeUint64(b uint64) *string + func MarshalRLPTo(obj marshalRLPFunc, dst []byte) []byte + func ParseBytes(val *string) ([]byte, error) + func ParseInt64orHex(val *string) (int64, error) + func ParseUint256orHex(val *string) (*big.Int, error) + func ParseUint64orHex(val *string) (uint64, error) + func StringToBytes(str string) []byte + func UnmarshalRlp(obj unmarshalRLPFunc, input []byte) error + type Address [AddressLength]byte + func BytesToAddress(b []byte) Address + func StringToAddress(str string) Address + func (a *Address) UnmarshalText(input []byte) error + func (a Address) Bytes() []byte + func (a Address) MarshalText() ([]byte, error) + func (a Address) Ptr() *Address + func (a Address) String() string + type Block struct + Header *Header + Transactions []*Transaction + Uncles []*Header + func (b *Block) Body() *Body + func (b *Block) Hash() Hash + func (b *Block) MarshalRLP() []byte + func (b *Block) MarshalRLPTo(dst []byte) []byte + func (b *Block) MarshalRLPWith(ar *fastrlp.Arena) *fastrlp.Value + func (b *Block) Number() uint64 + func (b *Block) ParentHash() Hash + func (b *Block) Size() uint64 + func (b *Block) String() string + func (b *Block) UnmarshalRLP(input []byte) error + func (b *Block) WithSeal(header *Header) *Block + type Bloom [BloomByteLength]byte + func CreateBloom(receipts []*Receipt) (b Bloom) + func (b *Bloom) IsLogInBloom(log *Log) bool + func (b *Bloom) UnmarshalText(input []byte) error + func (b Bloom) MarshalText() ([]byte, error) + func (b Bloom) String() string + type Body struct + Transactions []*Transaction + Uncles []*Header + func (b *Body) MarshalRLPTo(dst []byte) []byte + func (b *Body) UnmarshalRLP(input []byte) error + type FullBlock struct + Block *Block + Receipts []*Receipt + type Hash [HashLength]byte + func BytesToHash(b []byte) Hash + func StringToHash(str string) Hash + func (h *Hash) UnmarshalText(input []byte) error + func (h Hash) Bytes() []byte + func (h Hash) MarshalText() ([]byte, error) + func (h Hash) String() string + type Header struct + Difficulty uint64 + ExtraData []byte + GasLimit uint64 + GasUsed uint64 + Hash Hash + LogsBloom Bloom + Miner []byte + MixHash Hash + Nonce Nonce + Number uint64 + ParentHash Hash + ReceiptsRoot Hash + Sha3Uncles Hash + StateRoot Hash + Timestamp uint64 + TxRoot Hash + func (h *Header) ComputeHash() *Header + func (h *Header) Copy() *Header + func (h *Header) Equal(hh *Header) bool + func (h *Header) HasBody() bool + func (h *Header) HasReceipts() bool + func (h *Header) IsGenesis() bool + func (h *Header) MarshalRLP() []byte + func (h *Header) MarshalRLPTo(dst []byte) []byte + func (h *Header) MarshalRLPWith(arena *fastrlp.Arena) *fastrlp.Value + func (h *Header) SetNonce(i uint64) + func (h *Header) UnmarshalRLP(input []byte) error + type Log struct + Address Address + Data []byte + Topics []Hash + func (l *Log) MarshalRLPWith(a *fastrlp.Arena) *fastrlp.Value + type Nonce [8]byte + func (n Nonce) MarshalText() ([]byte, error) + func (n Nonce) String() string + type Proof struct + Data []Hash + Metadata map[string]interface{} + type RLPMarshaler interface + MarshalRLPTo func(dst []byte) []byte + type RLPStoreMarshaler interface + MarshalStoreRLPTo func(dst []byte) []byte + type RLPStoreUnmarshaler interface + UnmarshalStoreRLP func(input []byte) error + type RLPUnmarshaler interface + UnmarshalRLP func(input []byte) error + type Receipt struct + ContractAddress *Address + CumulativeGasUsed uint64 + GasUsed uint64 + Logs []*Log + LogsBloom Bloom + Root Hash + Status *ReceiptStatus + TransactionType TxType + TxHash Hash + func (r *Receipt) IsLegacyTx() bool + func (r *Receipt) MarshalLogsWith(a *fastrlp.Arena) *fastrlp.Value + func (r *Receipt) MarshalRLP() []byte + func (r *Receipt) MarshalRLPTo(dst []byte) []byte + func (r *Receipt) MarshalRLPWith(a *fastrlp.Arena) *fastrlp.Value + func (r *Receipt) MarshalStoreRLPTo(dst []byte) []byte + func (r *Receipt) SetContractAddress(contractAddress Address) + func (r *Receipt) SetStatus(s ReceiptStatus) + func (r *Receipt) UnmarshalRLP(input []byte) error + func (r *Receipt) UnmarshalStoreRLP(input []byte) error + type ReceiptStatus uint64 + const ReceiptFailed + const ReceiptSuccess + type Receipts []*Receipt + func (r *Receipts) MarshalRLPWith(a *fastrlp.Arena) *fastrlp.Value + func (r *Receipts) UnmarshalRLP(input []byte) error + func (r *Receipts) UnmarshalStoreRLP(input []byte) error + func (r Receipts) MarshalRLPTo(dst []byte) []byte + func (r Receipts) MarshalStoreRLPTo(dst []byte) []byte + type Transaction struct + From Address + Gas uint64 + GasPrice *big.Int + Hash Hash + Input []byte + Nonce uint64 + R *big.Int + S *big.Int + To *Address + Type TxType + V *big.Int + Value *big.Int + func (t *Transaction) ComputeHash() *Transaction + func (t *Transaction) Copy() *Transaction + func (t *Transaction) Cost() *big.Int + func (t *Transaction) ExceedsBlockGasLimit(blockGasLimit uint64) bool + func (t *Transaction) IsContractCreation() bool + func (t *Transaction) IsUnderpriced(priceLimit uint64) bool + func (t *Transaction) MarshalRLP() []byte + func (t *Transaction) MarshalRLPTo(dst []byte) []byte + func (t *Transaction) MarshalRLPWith(arena *fastrlp.Arena) *fastrlp.Value + func (t *Transaction) MarshalStoreRLPTo(dst []byte) []byte + func (t *Transaction) Size() uint64 + func (t *Transaction) UnmarshalRLP(input []byte) error + func (t *Transaction) UnmarshalStoreRLP(input []byte) error + type TxType byte + const LegacyTx + const StateTransactionGasLimit + const StateTx + func (t TxType) String() (s string)