encoding

package
v0.3.1-0...-ee1233d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 15, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CACHE_NOTHING     = iota
	CACHE_SIGNAL_ROOT = iota
	CACHE_STATE_ROOT  = iota
	CACHE_BOTH        = iota
)

Variables

This section is empty.

Functions

func EncodeHopProofs

func EncodeHopProofs(hopProofs []HopProof) ([]byte, error)

func EncodeStorageProof

func EncodeStorageProof(accountProof [][]byte, storageProof [][]byte) ([]byte, error)

Types

type BlockHeader

type BlockHeader struct {
	ParentHash       [32]byte       `abi:"parentHash"`
	OmmersHash       [32]byte       `abi:"ommersHash"`
	Beneficiary      common.Address `abi:"beneficiary"`
	StateRoot        [32]byte       `abi:"stateRoot"`
	TransactionsRoot [32]byte       `abi:"transactionsRoot"`
	ReceiptsRoot     [32]byte       `abi:"receiptsRoot"`
	LogsBloom        [8][32]byte    `abi:"logsBloom"`
	Difficulty       *big.Int       `abi:"difficulty"`
	Height           *big.Int       `abi:"height"`
	GasLimit         uint64         `abi:"gasLimit"`
	GasUsed          uint64         `abi:"gasUsed"`
	Timestamp        uint64         `abi:"timestamp"`
	ExtraData        []byte         `abi:"extraData"`
	MixHash          [32]byte       `abi:"mixHash"`
	Nonce            uint64         `abi:"nonce"`
	BaseFeePerGas    *big.Int       `abi:"baseFeePerGas"`
	WithdrawalsRoot  [32]byte       `abi:"withdrawalsRoot"`
}

func BlockToBlockHeader

func BlockToBlockHeader(block *types.Block) BlockHeader

type CacheOption

type CacheOption uint8

type HopProof

type HopProof struct {
	ChainID      uint64   `abi:"chainId"`
	BlockID      uint64   `abi:"blockId"`
	RootHash     [32]byte `abi:"rootHash"`
	CacheOption  uint8    `abi:"cacheOption"`
	AccountProof [][]byte `abi:"accountProof"`
	StorageProof [][]byte `abi:"storageProof"`
}

type Proof

type Proof struct {
	AccountProof []byte `abi:"accountProof"`
	StorageProof []byte `abi:"storageProof"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL