statefull

package
v0.0.0-...-11d2657 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2023 License: GPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ApplyBorMessage

func ApplyBorMessage(vmenv vm.EVM, msg Callmsg) (*core.ExecutionResult, error)

func ApplyMessage

func ApplyMessage(
	_ context.Context,
	msg Callmsg,
	state *state.StateDB,
	header *types.Header,
	chainConfig *params.ChainConfig,
	chainContext core.ChainContext,
) (uint64, error)

apply message

Types

type Callmsg

type Callmsg struct {
	ethereum.CallMsg
}

callmsg implements core.Message to allow passing it as a transaction simulator.

func GetSystemMessage

func GetSystemMessage(toAddress common.Address, data []byte) Callmsg

get system message

func (Callmsg) CheckNonce

func (m Callmsg) CheckNonce() bool

func (Callmsg) Data

func (m Callmsg) Data() []byte

func (Callmsg) From

func (m Callmsg) From() common.Address

func (Callmsg) Gas

func (m Callmsg) Gas() uint64

func (Callmsg) GasPrice

func (m Callmsg) GasPrice() *big.Int

func (Callmsg) Nonce

func (m Callmsg) Nonce() uint64

func (Callmsg) To

func (m Callmsg) To() *common.Address

func (Callmsg) Value

func (m Callmsg) Value() *big.Int

type ChainContext

type ChainContext struct {
	Chain consensus.ChainHeaderReader
	Bor   consensus.Engine
}

func (ChainContext) Engine

func (c ChainContext) Engine() consensus.Engine

func (ChainContext) GetHeader

func (c ChainContext) GetHeader(hash common.Hash, number uint64) *types.Header

Jump to

Keyboard shortcuts

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