base

package
v1.5.2 Latest Latest
Warning

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

Go to latest
Published: May 30, 2022 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Ctx    sdk.Context
	Keeper *Keeper
}

Config tx's needed ctx and keeper

type Keeper

type Keeper = keeper.Keeper

Keeper alias of keeper.Keeper, to solve import circle. also evm.Keeper is alias keeper.Keeper

type Result

type Result struct {
	ExecResult     *types.ExecutionResult
	ResultData     *types.ResultData
	InnerTxs       interface{}
	Erc20Contracts interface{}
}

Result evm execute result

type Tx

type Tx struct {
	Ctx    sdk.Context
	Keeper *Keeper

	StateTransition types.StateTransition
}

Tx evm tx

func NewTx

func NewTx(config Config) *Tx

func (*Tx) AnalyzeStart

func (tx *Tx) AnalyzeStart(tag string)

func (*Tx) AnalyzeStop

func (tx *Tx) AnalyzeStop(tag string)

func (*Tx) Commit

func (tx *Tx) Commit(msg *types.MsgEthereumTx, result *Result)

Commit check Tx do not need

func (*Tx) DecorateResult

func (tx *Tx) DecorateResult(inResult *Result, inErr error) (result *sdk.Result, err error)

DecorateResult TraceTxLog situation Decorate the result it was replaced to trace logs when trace tx even if err != nil

func (*Tx) EmitEvent

func (tx *Tx) EmitEvent(msg *types.MsgEthereumTx, result *Result)

func (*Tx) FinalizeWatcher

func (tx *Tx) FinalizeWatcher(account authexported.Account, err error)

FinalizeWatcher check Tx do not need this

func (*Tx) GetChainConfig

func (tx *Tx) GetChainConfig() (types.ChainConfig, bool)

GetChainConfig get chain config, the chain config may cached

func (*Tx) GetSenderAccount

func (tx *Tx) GetSenderAccount() authexported.Account

GetSenderAccount check Tx do not need this

func (*Tx) Prepare

func (tx *Tx) Prepare(msg *types.MsgEthereumTx) (err error)

Prepare convert msg to state transition

func (*Tx) RefundFeesWatcher

func (tx *Tx) RefundFeesWatcher(account authexported.Account, coins sdk.Coins, price *big.Int)

RefundFeesWatcher refund the watcher, check Tx do not save state so. skip

func (*Tx) ResetWatcher

func (tx *Tx) ResetWatcher(account authexported.Account)

ResetWatcher check Tx do not need this

func (*Tx) SaveTx

func (tx *Tx) SaveTx(msg *types.MsgEthereumTx)

SaveTx check Tx do not transition state db

func (*Tx) Transition

func (tx *Tx) Transition(config types.ChainConfig) (result Result, err error)

Transition execute evm tx

Jump to

Keyboard shortcuts

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