Versions in this module Expand all Collapse all v0 v0.0.2 Dec 21, 2022 v0.0.1 Dec 21, 2022 Changes in this version + const AddressLength + const BloomByteLength + const HashLength + const IstanbulExtraVanity + 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 CalcMaxFaultyNodes(s Validators) int + func CalculateHeaderHash(h *Header) ([]byte, error) + 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 PutIbftExtraValidators(h *Header, validators []Address) + func UnmarshalRlp(obj unmarshalRLPFunc, input []byte) error + type Address [AddressLength]byte + func BytesToAddress(b []byte) Address + func StringToAddress(str string) Address + func (a *Address) Scan(src interface{}) error + func (a *Address) UnmarshalGraphQL(input interface{}) error + func (a *Address) UnmarshalText(input []byte) error + func (a Address) Bytes() []byte + func (a Address) ImplementsGraphQLType(name string) bool + func (a Address) MarshalText() ([]byte, error) + func (a Address) Ptr() *Address + func (a Address) String() string + func (a Address) Value() (driver.Value, error) + type Block struct + Header *Header + Transactions []*Transaction + Uncles []*Header + func (b *Block) Body() *Body + func (b *Block) Compare(other pq.Item) int + 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) UnmarshalRLPFrom(p *fastrlp.Parser, v *fastrlp.Value) 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) Scan(src interface{}) error + func (b *Bloom) UnmarshalText(input []byte) error + func (b Bloom) MarshalText() ([]byte, error) + func (b Bloom) String() string + func (b Bloom) Value() (driver.Value, error) + type Body struct + Transactions []*Transaction + Uncles []*Header + func (b *Body) MarshalRLPTo(dst []byte) []byte + func (b *Body) MarshalRLPWith(ar *fastrlp.Arena) *fastrlp.Value + func (b *Body) UnmarshalRLP(input []byte) error + func (b *Body) UnmarshalRLPFrom(p *fastrlp.Parser, v *fastrlp.Value) error + type Hash [HashLength]byte + func BytesToHash(b []byte) Hash + func StringToHash(str string) Hash + func (h *Hash) Scan(src interface{}) error + func (h *Hash) UnmarshalGraphQL(input interface{}) error + func (h *Hash) UnmarshalText(input []byte) error + func (h Hash) Bytes() []byte + func (h Hash) ImplementsGraphQLType(name string) bool + func (h Hash) MarshalText() ([]byte, error) + func (h Hash) String() string + func (h Hash) Value() (driver.Value, error) + type Header struct + Difficulty uint64 + ExtraData []byte + GasLimit uint64 + GasUsed uint64 + Hash Hash + LogsBloom Bloom + Miner Address + 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) 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 + func (h *Header) UnmarshalRLPFrom(p *fastrlp.Parser, v *fastrlp.Value) error + type IstanbulExtra struct + CommittedSeal [][]byte + Seal []byte + Validators []Address + func GetIbftExtra(h *Header) (*IstanbulExtra, error) + func (i *IstanbulExtra) MarshalRLPTo(dst []byte) []byte + func (i *IstanbulExtra) MarshalRLPWith(ar *fastrlp.Arena) *fastrlp.Value + func (i *IstanbulExtra) UnmarshalRLP(input []byte) error + func (i *IstanbulExtra) UnmarshalRLPFrom(p *fastrlp.Parser, v *fastrlp.Value) error + type Log struct + Address Address + Data []byte + Topics []Hash + func (l *Log) MarshalRLPWith(a *fastrlp.Arena) *fastrlp.Value + func (l *Log) UnmarshalRLPFrom(p *fastrlp.Parser, v *fastrlp.Value) error + type Nonce [8]byte + func (n *Nonce) Scan(src interface{}) error + func (n Nonce) MarshalText() ([]byte, error) + func (n Nonce) String() string + func (n Nonce) Value() (driver.Value, error) + type PoolTxByNonce []*Transaction + func (s PoolTxByNonce) Len() int + func (s PoolTxByNonce) Less(i, j int) bool + func (s PoolTxByNonce) Swap(i, j int) + 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 + TxHash Hash + 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) MarshalStoreRLPWith(a *fastrlp.Arena) *fastrlp.Value + func (r *Receipt) SetContractAddress(contractAddress Address) + func (r *Receipt) SetStatus(s ReceiptStatus) + func (r *Receipt) UnmarshalRLP(input []byte) error + func (r *Receipt) UnmarshalRLPFrom(p *fastrlp.Parser, v *fastrlp.Value) error + func (r *Receipt) UnmarshalStoreRLP(input []byte) error + func (r *Receipt) UnmarshalStoreRLPFrom(p *fastrlp.Parser, v *fastrlp.Value) error + type ReceiptStatus uint64 + const ReceiptFailed + const ReceiptSuccess + type Receipts []*Receipt + func (r *Receipts) MarshalRLPWith(a *fastrlp.Arena) *fastrlp.Value + func (r *Receipts) MarshalStoreRLPWith(a *fastrlp.Arena) *fastrlp.Value + func (r *Receipts) UnmarshalRLP(input []byte) error + func (r *Receipts) UnmarshalRLPFrom(p *fastrlp.Parser, v *fastrlp.Value) error + func (r *Receipts) UnmarshalStoreRLP(input []byte) error + func (r *Receipts) UnmarshalStoreRLPFrom(p *fastrlp.Parser, v *fastrlp.Value) error + func (r Receipts) MarshalRLPTo(dst []byte) []byte + func (r Receipts) MarshalStoreRLPTo(dst []byte) []byte + type Snapshot struct + Hash string + Number uint64 + Set Validators + Votes []*Vote + func (s *Snapshot) Marshal() ([]byte, error) + func (s *Snapshot) Unmarshal(input []byte) error + type Transaction struct + From Address + Gas uint64 + GasPrice *big.Int + Input []byte + Nonce uint64 + R *big.Int + ReceivedTime time.Time + S *big.Int + To *Address + V *big.Int + Value *big.Int + func (t *Transaction) Copy() *Transaction + func (t *Transaction) Cost() *big.Int + func (t *Transaction) ExceedsBlockGasLimit(blockGasLimit uint64) bool + func (t *Transaction) Hash() Hash + 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) MarshalStoreRLPWith(a *fastrlp.Arena) *fastrlp.Value + func (t *Transaction) Size() uint64 + func (t *Transaction) UnmarshalRLP(input []byte) error + func (t *Transaction) UnmarshalRLPFrom(p *fastrlp.Parser, v *fastrlp.Value) error + func (t *Transaction) UnmarshalStoreRLP(input []byte) error + func (t *Transaction) UnmarshalStoreRLPFrom(p *fastrlp.Parser, v *fastrlp.Value) error + type TransactionsByPriceAndNonce struct + func NewTransactionsByPriceAndNonce(txs map[Address][]*Transaction) *TransactionsByPriceAndNonce + func (t *TransactionsByPriceAndNonce) Peek() *Transaction + func (t *TransactionsByPriceAndNonce) Pop() + func (t *TransactionsByPriceAndNonce) Shift() + type TxByPriceAndTime []*Transaction + func (s *TxByPriceAndTime) Pop() interface{} + func (s *TxByPriceAndTime) Push(x interface{}) + func (s TxByPriceAndTime) Len() int + func (s TxByPriceAndTime) Less(i, j int) bool + func (s TxByPriceAndTime) Swap(i, j int) + type Validators []Address + func (v *Validators) Add(addr Address) + func (v *Validators) CalcProposer(round uint64, lastProposer Address) Address + func (v *Validators) Del(addr Address) + func (v *Validators) Equal(vv *Validators) bool + func (v *Validators) Includes(addr Address) bool + func (v *Validators) Index(addr Address) int + func (v *Validators) Len() int + type Vote struct + Address Address + Authorize bool + Validator Address + func (v *Vote) Copy() *Vote + func (v *Vote) Equal(vv *Vote) bool