diff --git a/types/context.go b/types/context.go index 7cf4b2a59..173f5014b 100644 --- a/types/context.go +++ b/types/context.go @@ -53,11 +53,12 @@ type Context struct { txMsgAccessOps map[int][]acltypes.AccessOperation // EVM properties - evm bool // EVM transaction flag - evmNonce uint64 // EVM Transaction nonce - evmSenderAddress string // EVM Sender address - evmTxHash string // EVM TX hash - evmVmError string // EVM VM error during execution + evm bool // EVM transaction flag + evmNonce uint64 // EVM Transaction nonce + evmSenderAddress string // EVM Sender address + evmTxHash string // EVM TX hash + evmVmError string // EVM VM error during execution + evmEntryViaWasmdPrecompile bool // EVM is entered via wasmd precompile directly msgValidator *acltypes.MsgValidator messageIndex int // Used to track current message being processed @@ -162,6 +163,10 @@ func (c Context) EVMVMError() string { return c.evmVmError } +func (c Context) EVMEntryViaWasmdPrecompile() bool { + return c.evmEntryViaWasmdPrecompile +} + func (c Context) PendingTxChecker() abci.PendingTxChecker { return c.pendingTxChecker } @@ -443,6 +448,11 @@ func (c Context) WithEVMVMError(vmError string) Context { return c } +func (c Context) WithEVMEntryViaWasmdPrecompile(e bool) Context { + c.evmEntryViaWasmdPrecompile = e + return c +} + func (c Context) WithPendingTxChecker(checker abci.PendingTxChecker) Context { c.pendingTxChecker = checker return c