Skip to content

[pallet-revive] Make Runtime call dispatchable as eth transaction #8883

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 11 commits into from
Jun 21, 2025

Conversation

pgherveou
Copy link
Contributor

@pgherveou pgherveou commented Jun 17, 2025

Make RuntimeCall dispatchable as eth transaction.

By sending a transaction to 0x6d6f646c70792f70616464720000000000000000, using the encoded runtime call as input, the call will be executed by the origin indicated by the Ethereum signature (0xEE account_id).

see paritytech/foundry-polkadot#130

e.g sending a remark_with_event

cast wallet import dev-account --private-key 5fb92d6e98884f76de468fa3f6278f8807c48bebc13595d45af5bdc4da702133
cast send --account dev-account 0x6d6f646c70792f70616464720000000000000000 0x0007143132333435

also merged in #8901 and #8920

@pgherveou pgherveou marked this pull request as draft June 17, 2025 14:41
@pgherveou pgherveou marked this pull request as ready for review June 17, 2025 20:06
@pgherveou
Copy link
Contributor Author

/cmd prdoc --audience runtime_dev --bump patch

@pgherveou pgherveou added the T7-smart_contracts This PR/Issue is related to smart contracts. label Jun 17, 2025
@pgherveou pgherveou requested review from smiasojed and athei June 18, 2025 11:48
storage_deposit_limit,
data,
if dest == RUNTIME_PALLETS_ADDR {
let call = CallOf::<Self::Config>::decode(&mut &data[..]).map_err(|_| {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needs a decode_with_max_depth or something. You need to check where it is decoded elsewhere.

Copy link
Contributor Author

@pgherveou pgherveou Jun 18, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

- Use the extension_weight of the eth transact, not the transformed one
in both the dry-run and Checkable trait
@pgherveou pgherveou requested a review from athei June 20, 2025 11:21
@paritytech-workflow-stopper
Copy link

All GitHub workflows were cancelled due to failure one of the required jobs.
Failed workflow url: https://github.com/paritytech/polkadot-sdk/actions/runs/15777695066
Failed job name: test-linux-stable

Copy link
Member

@athei athei left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

using the encoded runtime call as input, the call will be executed by this given origin.

Meaning: Given the origin indicated by the Ethereum signature (0xEE account_id).

@pgherveou pgherveou enabled auto-merge June 20, 2025 14:26
@pgherveou pgherveou added this pull request to the merge queue Jun 21, 2025
Merged via the queue into master with commit 41160dc Jun 21, 2025
243 of 244 checks passed
@pgherveou pgherveou deleted the pg/call-as-eth-tx branch June 21, 2025 10:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T7-smart_contracts This PR/Issue is related to smart contracts.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants