Skip to content
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

Make pallet xcm precompile compatible with evm native foreign assets #3135

Closed
wants to merge 3 commits into from

Conversation

RomarQ
Copy link
Contributor

@RomarQ RomarQ commented Jan 17, 2025

What does it do?

The changes included in this pull request pallet xcm precompile to be called for evm native foreign assets.

* add tests for native fee payment

* fix sudo

* add tests for transferAssetsUsingTypeAndThen()

* fix test name

* try using evm foreign assets in pallet-xcm precompile

* fix: pallet-xcm-precompile shall allow subcalls

* increase recursion_limit to 1 in pallet-xcm-precompile

* fix formatting

* test(): correctly check balance of evm native assets

* fix tests

* clean code

* refactor test

---------

Co-authored-by: Rodrigo Quelhas <[email protected]>
Co-authored-by: Rodrigo Quelhas <[email protected]>
Co-authored-by: Gonza Montiel <[email protected]>
@RomarQ RomarQ self-assigned this Jan 17, 2025
@RomarQ RomarQ added B7-runtimenoteworthy Changes should be noted in any runtime-upgrade release notes breaking Needs to be mentioned in breaking changes labels Jan 17, 2025
@RomarQ RomarQ changed the title Make pallet xcm precompile work with evm native foreign assets Make pallet xcm precompile compatible with evm native foreign assets Jan 17, 2025
Copy link
Contributor

github-actions bot commented Jan 17, 2025

WASM runtime size check:

Compared to target branch

Moonbase runtime: 2260 KB (no changes) ✅

Moonbeam runtime: 2244 KB (no changes) ✅

Moonriver runtime: 2244 KB (no changes) ✅

Compared to latest release (runtime-3400)

Moonbase runtime: 2260 KB (+232 KB compared to latest release) ⚠️

Moonbeam runtime: 2244 KB (+232 KB compared to latest release) ⚠️

Moonriver runtime: 2244 KB (+232 KB compared to latest release) ⚠️

Copy link
Contributor

github-actions bot commented Jan 17, 2025

Coverage Report

@@                             Coverage Diff                             @@
##           perm-runtime-3401   rq/fix-pallet-xcm-precompile      +/-   ##
===========================================================================
+ Coverage              74.47%                         74.58%   +0.11%     
- Files                    377                            375       -2     
- Lines                  95720                          95682      -38     
===========================================================================
+ Hits                   71283                          71359      +76     
- Misses                 24437                          24323     -114     
Files Changed Coverage
/node/cli/src/command.rs 16.86% (-0.06%) 🔽
/node/service/src/lib.rs 62.26% (-0.02%) 🔽
/node/service/src/rpc.rs 85.00% (+0.05%) 🔼
/pallets/moonbeam-lazy-migrations/src/lib.rs 80.65% (+1.30%) 🔼
/pallets/moonbeam-lazy-migrations/src/tests.rs 98.15% (+0.34%) 🔼
/pallets/parachain-staking/src/lib.rs 91.79% (-0.16%) 🔽
/pallets/parachain-staking/src/mock.rs 97.70% (-0.06%) 🔽
/pallets/parachain-staking/src/tests.rs 90.85% (-0.04%) 🔽
/pallets/parachain-staking/src/weights.rs 38.35% (-1.92%) 🔽
/precompiles/identity/src/lib.rs 90.22% (+0.02%) 🔼
/runtime/moonbase/src/lib.rs 52.85% (+2.51%) 🔼
/runtime/moonbase/src/weights/pallet_parachain_staking.rs 19.45% (-2.50%) 🔽
/runtime/moonbase/tests/common/mod.rs 97.07% (-0.03%) 🔽
/runtime/moonbase/tests/integration_test.rs 99.38% (-0.01%) 🔽
/runtime/moonbeam/src/lib.rs 47.11% (+2.70%) 🔼
/runtime/moonbeam/src/weights/pallet_assets.rs 8.88% (+0.25%) 🔼
/runtime/moonbeam/src/weights/pallet_parachain_staking.rs 19.36% (-2.49%) 🔽
/runtime/moonbeam/tests/common/mod.rs 94.74% (-0.06%) 🔽
/runtime/moonbeam/tests/integration_test.rs 99.38% (-0.01%) 🔽
/runtime/moonriver/src/lib.rs 47.34% (+2.71%) 🔼
/runtime/moonriver/src/weights/pallet_assets.rs 8.88% (+0.25%) 🔼
/runtime/moonriver/src/weights/pallet_parachain_staking.rs 19.36% (-2.49%) 🔽
/runtime/moonriver/tests/common/mod.rs 94.85% (-0.06%) 🔽
/runtime/moonriver/tests/integration_test.rs 99.36% (-0.01%) 🔽

Coverage generated Fri Jan 17 13:58:06 UTC 2025

@RomarQ RomarQ added the D3-trivial PR contains trivial changes in a runtime directory that do not require an audit label Jan 17, 2025
@RomarQ RomarQ added not-breaking Does not need to be mentioned in breaking changes and removed breaking Needs to be mentioned in breaking changes labels Jan 17, 2025
@RomarQ RomarQ marked this pull request as ready for review January 17, 2025 13:51
@RomarQ RomarQ closed this Jan 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
B7-runtimenoteworthy Changes should be noted in any runtime-upgrade release notes D3-trivial PR contains trivial changes in a runtime directory that do not require an audit evm-native-foreign-assets not-breaking Does not need to be mentioned in breaking changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants