Skip to content

Commit

Permalink
Add EVMEntryViaWasmdPrecompile flag (#530)
Browse files Browse the repository at this point in the history
## Describe your changes and provide context
Add new flag for EVM

## Testing performed to validate your change
  • Loading branch information
codchen authored Jul 30, 2024
1 parent 2d2472d commit 138647d
Showing 1 changed file with 15 additions and 5 deletions.
20 changes: 15 additions & 5 deletions types/context.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
}
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 138647d

Please sign in to comment.