txs

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: May 23, 2022 License: Apache-2.0 Imports: 10 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

	// ResetWatcher when panic reset watcher
	ResetWatcher(account authexported.Account)

	// RefundFeesWatcher fix account balance in watcher with refund fees
	RefundFeesWatcher(account authexported.Account, coins sdk.Coins, price *big.Int)

	// 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(account authexported.Account, err error)

	// AnalyzeStart start record tag
	AnalyzeStart(tag string)

	// AnalyzeStop stop record tag
	AnalyzeStop(tag string)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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