moonbeam-foundation / moonbeam

An Ethereum-compatible smart contract parachain on Polkadot
https://moonbeam.network
GNU General Public License v3.0
920 stars 337 forks source link

Foreign Assets Migration #3020

Open ahmadkaouk opened 1 month ago

ahmadkaouk commented 1 month ago

What does it do?

This PR is a follow up of #2869 , it manage the migration of existing foreign assets to the new design. The PR introduces four extrinsics in pallet-moonbeam-lazy-migration to handle the migration of a foreign asset.

start_foreign_asset_migration

migrate_foreign_asset_balances

migrate_foreign_asset_approvals

finish_foreign_asset_migration

What important points reviewers should know?

Is there something left for follow-up PRs?

What alternative implementations were considered?

Are there relevant PRs or issues in other repositories (Substrate, Polkadot, Frontier, Cumulus)?

What value does it bring to the blockchain users?

github-actions[bot] commented 14 hours ago

WASM runtime size check:

Compared to target branch

Moonbase runtime: 2256 KB (no changes) ✅

Moonbeam runtime: 2236 KB (no changes) ✅

Moonriver runtime: 2236 KB (no changes) ✅

Compared to latest release (runtime-3300)

Moonbase runtime: 2256 KB (+228 KB compared to latest release) ⚠️

Moonbeam runtime: 2236 KB (+240 KB compared to latest release) ⚠️

Moonriver runtime: 2236 KB (+244 KB compared to latest release) ⚠️

github-actions[bot] commented 12 hours ago

Coverage Report

@@                        Coverage Diff                         @@
##           master   ahmad-foreign-assets-migration      +/-   ##
==================================================================
- Coverage   74.70%                           74.57%   -0.13%     
+ Files         369                              375       +6     
+ Lines       94308                            95532    +1224     
==================================================================
+ Hits        70445                            71239     +794     
+ Misses      23863                            24293     +430     
Files Changed Coverage
/pallets/moonbeam-foreign-assets/src/evm.rs 74.02% (+3.24%) 🔼
/pallets/moonbeam-foreign-assets/src/lib.rs 72.61% (+2.21%) 🔼
/pallets/moonbeam-lazy-migrations/src/lib.rs 80.17% (-1.87%) 🔽
/pallets/moonbeam-lazy-migrations/src/mock.rs 67.86% (-7.90%) 🔽
/pallets/moonbeam-lazy-migrations/src/tests.rs 97.96% (-1.31%) 🔽

Coverage generated Fri Nov 29 13:57:30 UTC 2024