oracle

package
v0.0.0-...-8a657e3 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2024 License: GPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InputHash

func InputHash() common.Hash

func Output

func Output(output common.Hash, receipts common.Hash)

func PrefetchAccount

func PrefetchAccount(blockNumber *big.Int, addr common.Address, postProcess func(map[common.Hash][]byte))

func PrefetchBlock

func PrefetchBlock(blockNumber *big.Int, startBlock bool, hasher types.TrieHasher)

func PrefetchCode

func PrefetchCode(blockNumber *big.Int, addrHash common.Hash)

func PrefetchStorage

func PrefetchStorage(blockNumber *big.Int, addr common.Address, skey common.Hash, postProcess func(map[common.Hash][]byte))

func Preimage

func Preimage(hash common.Hash) []byte

func Preimages

func Preimages() map[common.Hash][]byte

func SetNodeUrl

func SetNodeUrl(newNodeUrl string)

func SetRoot

func SetRoot(newRoot string)

Types

type Account

type Account struct {
	Nonce    uint64
	Balance  *big.Int
	Root     common.Hash // merkle root of the storage trie
	CodeHash []byte
}

Account is the Ethereum consensus representation of accounts. These objects are stored in the main account trie.

type AccountResult

type AccountResult struct {
	Address      common.Address  `json:"address"`
	AccountProof []string        `json:"accountProof"`
	Balance      *hexutil.Big    `json:"balance"`
	CodeHash     common.Hash     `json:"codeHash"`
	Nonce        hexutil.Uint64  `json:"nonce"`
	StorageHash  common.Hash     `json:"storageHash"`
	StorageProof []StorageResult `json:"storageProof"`
}

Result structs for GetProof

type Header struct {
	ParentHash  *common.Hash      `json:"parentHash"       gencodec:"required"`
	UncleHash   *common.Hash      `json:"sha3Uncles"       gencodec:"required"`
	Coinbase    *common.Address   `json:"miner"            gencodec:"required"`
	Root        *common.Hash      `json:"stateRoot"        gencodec:"required"`
	TxHash      *common.Hash      `json:"transactionsRoot" gencodec:"required"`
	ReceiptHash *common.Hash      `json:"receiptsRoot"     gencodec:"required"`
	Bloom       *types.Bloom      `json:"logsBloom"        gencodec:"required"`
	Difficulty  *hexutil.Big      `json:"difficulty"       gencodec:"required"`
	Number      *hexutil.Big      `json:"number"           gencodec:"required"`
	GasLimit    *hexutil.Uint64   `json:"gasLimit"         gencodec:"required"`
	GasUsed     *hexutil.Uint64   `json:"gasUsed"          gencodec:"required"`
	Time        *hexutil.Uint64   `json:"timestamp"        gencodec:"required"`
	Extra       *hexutil.Bytes    `json:"extraData"        gencodec:"required"`
	MixDigest   *common.Hash      `json:"mixHash"`
	Nonce       *types.BlockNonce `json:"nonce"`
	BaseFee     *hexutil.Big      `json:"baseFeePerGas" rlp:"optional"`
	// transactions
	Transactions []SendTxArgs `json:"transactions"`
}

func (*Header) ToHeader

func (dec *Header) ToHeader() types.Header

type PreimageKeyValueWriter

type PreimageKeyValueWriter struct{}

PreimageKeyValueWriter wraps the Put method of a backing data store.

func (PreimageKeyValueWriter) Delete

func (kw PreimageKeyValueWriter) Delete(key []byte) error

Delete removes the key from the key-value data store.

func (PreimageKeyValueWriter) Put

func (kw PreimageKeyValueWriter) Put(key []byte, value []byte) error

Put inserts the given value into the key-value data store.

type SendTxArgs

type SendTxArgs struct {
	From                 common.MixedcaseAddress  `json:"from"`
	To                   *common.MixedcaseAddress `json:"to"`
	Gas                  hexutil.Uint64           `json:"gas"`
	GasPrice             *hexutil.Big             `json:"gasPrice"`
	MaxFeePerGas         *hexutil.Big             `json:"maxFeePerGas"`
	MaxPriorityFeePerGas *hexutil.Big             `json:"maxPriorityFeePerGas"`
	Value                hexutil.Big              `json:"value"`
	Nonce                hexutil.Uint64           `json:"nonce"`

	// We accept "data" and "input" for backwards-compatibility reasons.
	// "input" is the newer name and should be preferred by clients.
	// Issue detail: https://github.com/lightlink-network/minigeth/issues/15628
	Data  *hexutil.Bytes `json:"data"`
	Input *hexutil.Bytes `json:"input,omitempty"`

	// For non-legacy transactions
	AccessList *types.AccessList `json:"accessList,omitempty"`
	ChainID    *hexutil.Big      `json:"chainId,omitempty"`

	// Signature values
	V *hexutil.Big `json:"v" gencodec:"required"`
	R *hexutil.Big `json:"r" gencodec:"required"`
	S *hexutil.Big `json:"s" gencodec:"required"`
}

SendTxArgs represents the arguments to submit a transaction This struct is identical to ethapi.TransactionArgs, except for the usage of common.MixedcaseAddress in From and To

func (*SendTxArgs) ToTransaction

func (args *SendTxArgs) ToTransaction() *types.Transaction

ToTransaction converts the arguments to a transaction.

type StorageResult

type StorageResult struct {
	Key   string       `json:"key"`
	Value *hexutil.Big `json:"value"`
	Proof []string     `json:"proof"`
}

Jump to

Keyboard shortcuts

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