Versions in this module Expand all Collapse all v0 v0.0.1 Jun 25, 2024 Changes in this version + const AccessListTxType + const BlobTxType + const BloomBitLength + const BloomByteLength + const DynamicFeeTxType + const LegacyTxType + const ReceiptStatusFailed + const ReceiptStatusSuccessful + var EmptyCodeHash = crypto.Keccak256Hash(nil) + var EmptyExtDataHash = rlpHash([]byte(nil)) + var EmptyReceiptsHash = common.HexToHash("56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421") + var EmptyRootHash = common.HexToHash("56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421") + var EmptyTxsHash = common.HexToHash("56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421") + var EmptyUncleHash = rlpHash([]*Header(nil)) + var ErrGasFeeCapTooLow = errors.New("fee cap less than base fee") + var ErrInvalidChainId = errors.New("invalid chain id for signer") + var ErrInvalidSig = errors.New("invalid transaction v, r, s values") + var ErrInvalidTxType = errors.New("transaction type not valid in this context") + var ErrTxTypeNotSupported = errors.New("transaction type not supported") + var ErrUnexpectedProtection = errors.New("transaction type does not supported EIP-155 protected signatures") + func Bloom9(data []byte) []byte + func BloomLookup(bin Bloom, topic bytesBacked) bool + func CalcExtDataHash(extdata []byte) common.Hash + func CalcUncleHash(uncles []*Header) common.Hash + func DeriveSha(list DerivableList, hasher TrieHasher) common.Hash + func HashDifference(a, b []common.Hash) []common.Hash + func LogsBloom(logs []*Log) []byte + func Sender(signer Signer, tx *Transaction) (common.Address, error) + type AccessList []AccessTuple + func (al AccessList) StorageKeys() int + type AccessListTx struct + AccessList AccessList + ChainID *big.Int + Data []byte + Gas uint64 + GasPrice *big.Int + Nonce uint64 + R *big.Int + S *big.Int + To *common.Address + V *big.Int + Value *big.Int + type AccessTuple struct + Address common.Address + StorageKeys []common.Hash + func (a *AccessTuple) UnmarshalJSON(input []byte) error + func (a AccessTuple) MarshalJSON() ([]byte, error) + type BlobTx struct + AccessList AccessList + BlobFeeCap *uint256.Int + BlobHashes []common.Hash + ChainID *uint256.Int + Data []byte + Gas uint64 + GasFeeCap *uint256.Int + GasTipCap *uint256.Int + Nonce uint64 + R *uint256.Int + S *uint256.Int + To *common.Address + V *uint256.Int + Value *uint256.Int + type Block struct + func NewBlock(header *Header, txs []*Transaction, uncles []*Header, receipts []*Receipt, ...) *Block + func NewBlockWithHeader(header *Header) *Block + func (b *Block) BaseFee() *big.Int + func (b *Block) BlockGasCost() *big.Int + func (b *Block) Bloom() Bloom + func (b *Block) Body() *Body + func (b *Block) Coinbase() common.Address + func (b *Block) DecodeRLP(s *rlp.Stream) error + func (b *Block) Difficulty() *big.Int + func (b *Block) EncodeRLP(w io.Writer) error + func (b *Block) ExtData() []byte + func (b *Block) ExtDataGasUsed() *big.Int + func (b *Block) Extra() []byte + func (b *Block) GasLimit() uint64 + func (b *Block) GasUsed() uint64 + func (b *Block) Hash() common.Hash + func (b *Block) Header() *Header + func (b *Block) MixDigest() common.Hash + func (b *Block) Nonce() uint64 + func (b *Block) Number() *big.Int + func (b *Block) NumberU64() uint64 + func (b *Block) OrionNodeFee() *big.Int + func (b *Block) ParentHash() common.Hash + func (b *Block) ReceiptHash() common.Hash + func (b *Block) Root() common.Hash + func (b *Block) SetOrionNodeFee(f *big.Int) + func (b *Block) SetTotalAtomicFee(f *big.Int) + func (b *Block) SetTotalBaseFee(f *big.Int) + func (b *Block) SetTotalPriorityFee(f *big.Int) + func (b *Block) SetVersion(ver uint32) + func (b *Block) Size() uint64 + func (b *Block) Time() uint64 + func (b *Block) Timestamp() uint64 + func (b *Block) TotalAtomicFee() *big.Int + func (b *Block) TotalBaseFee() *big.Int + func (b *Block) TotalPriorityFee() *big.Int + func (b *Block) Transaction(hash common.Hash) *Transaction + func (b *Block) Transactions() Transactions + func (b *Block) TxHash() common.Hash + func (b *Block) UncleHash() common.Hash + func (b *Block) Uncles() []*Header + func (b *Block) UndistributedReward() *big.Int + func (b *Block) Version() uint32 + func (b *Block) WithBody(transactions []*Transaction, uncles []*Header, version uint32, extdata *[]byte) *Block + func (b *Block) WithSeal(header *Header) *Block + type BlockNonce [8]byte + func EncodeNonce(i uint64) BlockNonce + func (n *BlockNonce) UnmarshalText(input []byte) error + func (n BlockNonce) MarshalText() ([]byte, error) + func (n BlockNonce) Uint64() uint64 + type Blocks []*Block + type Bloom [BloomByteLength]byte + func BytesToBloom(b []byte) Bloom + func CreateBloom(receipts Receipts) Bloom + func (b *Bloom) Add(d []byte) + func (b *Bloom) SetBytes(d []byte) + func (b *Bloom) UnmarshalText(input []byte) error + func (b Bloom) Big() *big.Int + func (b Bloom) Bytes() []byte + func (b Bloom) MarshalText() ([]byte, error) + func (b Bloom) Test(topic []byte) bool + type Body struct + ExtData *[]byte + Transactions []*Transaction + Uncles []*Header + Version uint32 + type DerivableList interface + EncodeIndex func(int, *bytes.Buffer) + Len func() int + type DynamicFeeTx struct + AccessList AccessList + ChainID *big.Int + Data []byte + Gas uint64 + GasFeeCap *big.Int + GasTipCap *big.Int + Nonce uint64 + R *big.Int + S *big.Int + To *common.Address + V *big.Int + Value *big.Int + type EIP155Signer struct + func NewEIP155Signer(chainId *big.Int) EIP155Signer + func (s EIP155Signer) ChainID() *big.Int + func (s EIP155Signer) Equal(s2 Signer) bool + func (s EIP155Signer) Hash(tx *Transaction) common.Hash + func (s EIP155Signer) Sender(tx *Transaction) (common.Address, error) + func (s EIP155Signer) SignatureValues(tx *Transaction, sig []byte) (R, S, V *big.Int, err error) + type FrontierSigner struct + func (fs FrontierSigner) Hash(tx *Transaction) common.Hash + func (fs FrontierSigner) Sender(tx *Transaction) (common.Address, error) + func (fs FrontierSigner) SignatureValues(tx *Transaction, sig []byte) (r, s, v *big.Int, err error) + func (s FrontierSigner) ChainID() *big.Int + func (s FrontierSigner) Equal(s2 Signer) bool + type Header struct + BaseFee *big.Int + BlockGasCost *big.Int + Bloom Bloom + Coinbase common.Address + Difficulty *big.Int + ExcessDataGas *big.Int + ExtDataGasUsed *big.Int + ExtDataHash common.Hash + Extra []byte + GasLimit uint64 + GasUsed uint64 + MixDigest common.Hash + Nonce BlockNonce + Number *big.Int + ParentHash common.Hash + ReceiptHash common.Hash + Root common.Hash + Time uint64 + TxHash common.Hash + UncleHash common.Hash + UndistributedReward *big.Int + func CopyHeader(h *Header) *Header + func (h *Header) EmptyBody() bool + func (h *Header) EmptyReceipts() bool + func (h *Header) Hash() common.Hash + func (h *Header) Size() common.StorageSize + func (h *Header) UnmarshalJSON(input []byte) error + func (h Header) MarshalJSON() ([]byte, error) + func (obj *Header) EncodeRLP(_w io.Writer) error + type HomesteadSigner struct + func (hs HomesteadSigner) Sender(tx *Transaction) (common.Address, error) + func (hs HomesteadSigner) SignatureValues(tx *Transaction, sig []byte) (r, s, v *big.Int, err error) + func (s HomesteadSigner) ChainID() *big.Int + func (s HomesteadSigner) Equal(s2 Signer) bool + type LegacyTx struct + Data []byte + Gas uint64 + GasPrice *big.Int + Nonce uint64 + R *big.Int + S *big.Int + To *common.Address + V *big.Int + Value *big.Int + type Log struct + Address common.Address + BlockHash common.Hash + BlockNumber uint64 + Data []byte + Index uint + Removed bool + Topics []common.Hash + TxHash common.Hash + TxIndex uint + func FlattenLogs(list [][]*Log) []*Log + func (l *Log) DecodeRLP(s *rlp.Stream) error + func (l *Log) EncodeRLP(w io.Writer) error + func (l *Log) UnmarshalJSON(input []byte) error + func (l Log) MarshalJSON() ([]byte, error) + type Receipt struct + BlockHash common.Hash + BlockNumber *big.Int + Bloom Bloom + ContractAddress common.Address + CumulativeGasUsed uint64 + EffectiveGasPrice *big.Int + GasUsed uint64 + Logs []*Log + PostState []byte + Status uint64 + TransactionIndex uint + TxHash common.Hash + Type uint8 + func NewReceipt(root []byte, failed bool, cumulativeGasUsed uint64) *Receipt + func (r *Receipt) DecodeRLP(s *rlp.Stream) error + func (r *Receipt) EncodeRLP(w io.Writer) error + func (r *Receipt) MarshalBinary() ([]byte, error) + func (r *Receipt) Size() common.StorageSize + func (r *Receipt) UnmarshalBinary(b []byte) error + func (r *Receipt) UnmarshalJSON(input []byte) error + func (r Receipt) MarshalJSON() ([]byte, error) + type ReceiptForStorage Receipt + func (r *ReceiptForStorage) DecodeRLP(s *rlp.Stream) error + func (r *ReceiptForStorage) EncodeRLP(_w io.Writer) error + type Receipts []*Receipt + func (rs Receipts) DeriveFields(config *params.ChainConfig, hash common.Hash, number uint64, time uint64, ...) error + func (rs Receipts) EncodeIndex(i int, w *bytes.Buffer) + func (rs Receipts) Len() int + type Signer interface + ChainID func() *big.Int + Equal func(Signer) bool + Hash func(tx *Transaction) common.Hash + Sender func(tx *Transaction) (common.Address, error) + SignatureValues func(tx *Transaction, sig []byte) (r, s, v *big.Int, err error) + func LatestSigner(config *params.ChainConfig) Signer + func LatestSignerForChainID(chainID *big.Int) Signer + func MakeSigner(config *params.ChainConfig, blockNumber *big.Int, blockTime uint64) Signer + func NewCancunSigner(chainId *big.Int) Signer + func NewEIP2930Signer(chainId *big.Int) Signer + func NewLondonSigner(chainId *big.Int) Signer + type StateAccount struct + Balance *big.Int + CodeHash []byte + IsMultiCoin bool + Nonce uint64 + Root common.Hash + func (obj *StateAccount) EncodeRLP(_w io.Writer) error + type Transaction struct + func MustSignNewTx(prv *ecdsa.PrivateKey, s Signer, txdata TxData) *Transaction + func NewContractCreation(nonce uint64, amount *big.Int, gasLimit uint64, gasPrice *big.Int, data []byte) *Transaction + func NewTransaction(nonce uint64, to common.Address, amount *big.Int, gasLimit uint64, ...) *Transaction + func NewTx(inner TxData) *Transaction + func SignNewTx(prv *ecdsa.PrivateKey, s Signer, txdata TxData) (*Transaction, error) + func SignTx(tx *Transaction, s Signer, prv *ecdsa.PrivateKey) (*Transaction, error) + func (tx *Transaction) AccessList() AccessList + func (tx *Transaction) BlobGas() uint64 + func (tx *Transaction) BlobGasFeeCap() *big.Int + func (tx *Transaction) BlobGasFeeCapCmp(other *Transaction) int + func (tx *Transaction) BlobGasFeeCapIntCmp(other *big.Int) int + func (tx *Transaction) BlobHashes() []common.Hash + func (tx *Transaction) ChainId() *big.Int + func (tx *Transaction) Cost() *big.Int + func (tx *Transaction) Data() []byte + func (tx *Transaction) DecodeRLP(s *rlp.Stream) error + func (tx *Transaction) EffectiveGasTip(baseFee *big.Int) (*big.Int, error) + func (tx *Transaction) EffectiveGasTipCmp(other *Transaction, baseFee *big.Int) int + func (tx *Transaction) EffectiveGasTipIntCmp(other *big.Int, baseFee *big.Int) int + func (tx *Transaction) EffectiveGasTipValue(baseFee *big.Int) *big.Int + func (tx *Transaction) EncodeRLP(w io.Writer) error + func (tx *Transaction) FirstSeen() time.Time + func (tx *Transaction) Gas() uint64 + func (tx *Transaction) GasFeeCap() *big.Int + func (tx *Transaction) GasFeeCapCmp(other *Transaction) int + func (tx *Transaction) GasFeeCapIntCmp(other *big.Int) int + func (tx *Transaction) GasPrice() *big.Int + func (tx *Transaction) GasTipCap() *big.Int + func (tx *Transaction) GasTipCapCmp(other *Transaction) int + func (tx *Transaction) GasTipCapIntCmp(other *big.Int) int + func (tx *Transaction) Hash() common.Hash + func (tx *Transaction) MarshalBinary() ([]byte, error) + func (tx *Transaction) MarshalJSON() ([]byte, error) + func (tx *Transaction) Nonce() uint64 + func (tx *Transaction) Protected() bool + func (tx *Transaction) RawSignatureValues() (v, r, s *big.Int) + func (tx *Transaction) SetFirstSeen(t time.Time) + func (tx *Transaction) Size() uint64 + func (tx *Transaction) To() *common.Address + func (tx *Transaction) Type() uint8 + func (tx *Transaction) UnmarshalBinary(b []byte) error + func (tx *Transaction) UnmarshalJSON(input []byte) error + func (tx *Transaction) Value() *big.Int + func (tx *Transaction) WithSignature(signer Signer, sig []byte) (*Transaction, error) + type Transactions []*Transaction + func TxDifference(a, b Transactions) Transactions + func (s Transactions) EncodeIndex(i int, w *bytes.Buffer) + func (s Transactions) Len() int + type TransactionsByPriceAndNonce struct + func NewTransactionsByPriceAndNonce(signer Signer, txs map[common.Address]Transactions, baseFee *big.Int) *TransactionsByPriceAndNonce + func (t *TransactionsByPriceAndNonce) Peek() *Transaction + func (t *TransactionsByPriceAndNonce) Pop() + func (t *TransactionsByPriceAndNonce) Shift() + type TrieHasher interface + Hash func() common.Hash + Reset func() + Update func([]byte, []byte) error + type TxByNonce Transactions + func (s TxByNonce) Len() int + func (s TxByNonce) Less(i, j int) bool + func (s TxByNonce) Swap(i, j int) + type TxByPriceAndTime []*TxWithMinerFee + 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 TxData interface + type TxWithMinerFee struct + Tx *Transaction + func NewTxWithMinerFee(tx *Transaction, baseFee *big.Int) (*TxWithMinerFee, error)