Skip to content

Add Avalanche hardening migration functions#6

Draft
telome wants to merge 24 commits into
devfrom
avax-mig
Draft

Add Avalanche hardening migration functions#6
telome wants to merge 24 commits into
devfrom
avax-mig

Conversation

@telome

@telome telome commented Jun 23, 2026

Copy link
Copy Markdown

No description provided.

Comment thread deploy/LZAvaxMigrationInit.sol Outdated
Comment on lines +127 to +130
require(ccip.hasRole(MESSAGE_LIB_ROLE, sendLib), "LZAvaxMigrationInit/ccip-sendlib-missing-role");
require(ccip.hasRole(ALLOWLIST, govSender), "LZAvaxMigrationInit/ccip-gov-sender-not-allowlisted");
require(ccip.allowlistSize() == 1, "LZAvaxMigrationInit/ccip-allowlist-not-singleton");
require(ccip.hasRole(DEFAULT_ADMIN_ROLE, pProxy), "LZAvaxMigrationInit/ccip-admin-not-handed-off");

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

There is some chance these checks will be executed unnecessarily in case the avalanche migration comes after the integration of some new L2, for which these sanity checks would normally already have been run (though in theory the new L2 might not have CCIP support). We could wrap them under some boolean param check, or under a check that e.g. chainlog.getAddress("USDS_OFT") == OLD_L1_USDS_OFT, but I'm currently choosing to just re-execute the checks for now, for simplicity. The same goes for some of the global sanity checks done in LZInit.activateOft.

@telome telome requested review from oldchili and sunbreak1211 June 23, 2026 17:10
Comment thread deploy/LZAvaxMigrationInit.sol Outdated
Comment thread deploy/LZAvaxMigrationInit.sol
Comment thread deploy/LZAvaxMigrationInit.sol Outdated
Comment thread deploy/LZAvaxMigrationInit.sol Outdated
Comment thread deploy/LZAvaxMigrationInit.sol
Comment thread deploy/LZAvaxMigrationInit.sol Outdated
Comment thread deploy/LZAvaxMigrationInit.sol
Comment thread test/LZAvaxMigrationInit.t.sol
Comment thread test/LZAvaxMigrationInit.t.sol Outdated
Comment thread test/LZAvaxMigrationInit.t.sol Outdated
Comment thread test/LZAvaxMigrationInit.t.sol Outdated
Comment thread test/LZAvaxMigrationInit.t.sol Outdated
Comment thread test/LZAvaxMigrationInit.t.sol Outdated
Comment thread test/LZAvaxMigrationInit.t.sol Outdated
Comment thread test/LZAvaxMigrationInit.t.sol Outdated
@oldchili

Copy link
Copy Markdown
Contributor

So far all looks good to me.
Might iterate more on the test code.

Comment thread test/LZAvaxMigrationInit.t.sol Outdated
Comment thread deploy/LZAvaxMigrationInit.sol
Comment thread deploy/LZAvaxMigrationL2Spell.sol Outdated
Comment thread deploy/LZAvaxMigrationInit.sol
Comment thread deploy/LZAvaxMigrationInit.sol Outdated
Comment thread test/LZAvaxMigrationInit.t.sol Outdated
Comment thread test/LZAvaxMigrationInit.t.sol Outdated
Comment thread test/LZAvaxMigrationInit.t.sol
Comment thread test/LZAvaxMigrationInit.t.sol Outdated
Co-authored-by: sunbreak1211 <129470872+sunbreak1211@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants