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

Fix foreign assets migration #3190

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open

Conversation

RomarQ
Copy link
Contributor

@RomarQ RomarQ commented Feb 14, 2025

What does it do?

Fixes the foreign assets migration.

What is being fixed?

  • When migrating approvals, some calls require calling the contract with the approval owner (a smart-contract in this case) origin, which is not allowed, only EOA can perform external calls. In the case of this migration this must be allowed.

  • The mint fails because in some situations, the target address is the burn address (0x0000...). In this scenarios, the migration should skip the minting.

  • The gas limit provided when creating the erc-20 was not big enough.

@RomarQ RomarQ self-assigned this Feb 14, 2025
@RomarQ RomarQ added 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 not-breaking Does not need to be mentioned in breaking changes labels Feb 14, 2025
Copy link
Contributor

github-actions bot commented Feb 14, 2025

WASM runtime size check:

Compared to target branch

Moonbase runtime: 2420 KB (+4 KB) 🚨

Moonbeam runtime: 2400 KB (-8 KB) ✅

Moonriver runtime: 2400 KB (+16 KB) ⚠️

Compared to latest release (runtime-3500)

Moonbase runtime: 2420 KB (+468 KB compared to latest release) 🚨

Moonbeam runtime: 2400 KB (+464 KB compared to latest release) ⚠️

Moonriver runtime: 2400 KB (+464 KB compared to latest release) ⚠️

@RomarQ RomarQ marked this pull request as ready for review February 14, 2025 15:32
Copy link
Contributor

github-actions bot commented Feb 14, 2025

Coverage Report

@@                         Coverage Diff                         @@
##           master   rq/fix-foreign-assets-migration      +/-   ##
===================================================================
- Coverage   74.52%                            74.48%   -0.04%     
  Files         380                               380              
+ Lines       96102                             96168      +66     
===================================================================
+ Hits        71611                             71626      +15     
+ Misses      24491                             24542      +51     
Files Changed Coverage
/pallets/moonbeam-foreign-assets/src/evm.rs 64.33% (-9.69%) 🔽
/pallets/moonbeam-lazy-migrations/src/foreign_asset.rs 95.03% (-3.57%) 🔽

Coverage generated Fri Feb 14 17:50:49 UTC 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 not-breaking Does not need to be mentioned in breaking changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant