feat: add evm call wrapper extrinsic to dispatcher pallet - #1067
Merged
Conversation
|
Crate versions that have not been updated:
Crate versions that have been updated:
Runtime version has not been increased. |
mrq1911
requested changes
May 2, 2025
F3Joule
marked this pull request as ready for review
May 19, 2025 14:33
enthusiastmartin
requested changes
May 26, 2025
Member
|
build is failiing, some tests, so i guess it still needs some work |
mrq1911
requested changes
Jun 30, 2025
mrq1911
left a comment
Member
There was a problem hiding this comment.
ensure that evm wallet can dispatch this as well unlike regular evm::call
enthusiastmartin
approved these changes
Jul 22, 2025
Remain pallet_dispatcher weights
mrq1911
reviewed
Aug 13, 2025
| fn try_address_origin(address: &sp_core::H160, origin: OuterOrigin) -> Result<AccountId32, OuterOrigin> { | ||
| origin.into().and_then(|o| match o { | ||
| RawOrigin::Signed(who) | ||
| if who == M::into_account_id(*address) || AsRef::<[u8; 32]>::as_ref(&who)[0..20] == address[0..20] => |
Member
There was a problem hiding this comment.
potencially only truncated_account_id(address) would be needed here, bound accounts should be already covered
Member
There was a problem hiding this comment.
also would be nice to have some test for this case
mrq1911
approved these changes
Aug 13, 2025
|
Quick benchmark at commit 25d0583 has been executed successfully. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
This PR introduces a new extrinsic in
pallet_dispatcherto wrap a single EVM call. This is done in order to determine whether the EVM call exits successfully or either has a faulty exit status. This extrinsic is mostly going to be used in batch calls to revert state correctly (in case ofbatchAll); that's because EVM calls don’t fail when reverted, but return success withExitStatus::RevertRelated Issue
Fixes #974
Motivation and Context
How Has This Been Tested?
Checklist: