txs

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewFactory

func NewFactory(config base.Config) *factory

func TransitionEvmTx

func TransitionEvmTx(tx Tx, msg *types.MsgEthereumTx) (result *sdk.Result, err error)

TransitionEvmTx execute evm transition template

Types

type Tx

type Tx interface {
	// Prepare convert msg to tx
	Prepare(msg *types.MsgEthereumTx) (err error)

	// SaveTx since the txCount is used by the stateDB, and a simulated tx is run only on the node it's submitted to,
	// then this will cause the txCount/stateDB of the node that ran the simulated tx to be different with the
	// other nodes, causing a consensus error
	SaveTx(msg *types.MsgEthereumTx)

	// GetChainConfig get chain config(the chain config may cached)
	GetChainConfig() (types.ChainConfig, bool)

	// GetSenderAccount get sender account
	GetSenderAccount() authexported.Account

	// Transition execute evm tx
	Transition(config types.ChainConfig) (result base.Result, err error)

	// DecorateResult some case(trace tx log) will modify the inResult to log and swallow inErr
	DecorateResult(inResult *base.Result, inErr error) (result *sdk.Result, err error)

	// Commit save the inner tx and contracts
	Commit(msg *types.MsgEthereumTx, result *base.Result)

	// EmitEvent emit event
	EmitEvent(msg *types.MsgEthereumTx, result *base.Result)

	// FinalizeWatcher after execute evm tx run here
	FinalizeWatcher(msg *types.MsgEthereumTx, err error, panic bool)

	// AnalyzeStart start record tag
	AnalyzeStart(tag string)

	// AnalyzeStop stop record tag
	AnalyzeStop(tag string)

	// Dispose release the resources of the tx, should be called after the tx is unused
	Dispose()
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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