allow transfer if call is restricted #2553
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Currently in the mono antehandler during the message validation, we check that the CREATE or CALL OP codes are restricted, and the validation fails in case it is.
With the addition of the permissioned evm, the signer of the transaction can be whitelisted an allowed the operation. In the first implementation, the check for a whitelisted address was performed during execution. With this approach we add the check for whitelist address in the antehandler. This requires a small refactor to check the permissions after the msg signature (since we need to know who sends the message)
On base denom transfers
If we restrict the CALL opcode, even the aevmos coin transfer will be restricted. So only cosmos txns will be available, and this is not very useful.
To allow base denom transfers we add the check txdata is empty, to verify that is not a contract call. But this does not cover the case of
deposit
orfallback
. So to prevent this, we simply block all transactions which recipient is a contract.Closes: EVM-148
Author Checklist
All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.
I have...
Reviewers Checklist
All items are required.
Please add a note if the item is not applicable
and please add your handle next to the items reviewed
if you only reviewed selected items.
I have...
Unreleased
section inCHANGELOG.md