Skip to content

Upgrade Gateway#1707

Merged
yrong merged 9 commits intomainfrom
ron/upgrade-gateway-202602-on-sepolia
Feb 27, 2026
Merged

Upgrade Gateway#1707
yrong merged 9 commits intomainfrom
ron/upgrade-gateway-202602-on-sepolia

Conversation

@yrong
Copy link
Contributor

@yrong yrong commented Feb 10, 2026

Upgrade on Sepolia

  • Gateway contract address: 0xEC6d80D1e444C304d684aCc6285C8F823fdD7344
  • Gateway contract codehash: 0xc2e4fc80a3888aa6c64a5e1b5f9878f3c0bd7d6c5ed0e03069c02de1a870e639

https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fwestend-rpc.polkadot.io#/extrinsics/decode/0x630004000100a90f040c2f00000602070008d6e82982ee3600dc5300ec6d80d1e444c304d684acc6285c8f823fdd7344c2e4fc80a3888aa6c64a5e1b5f9878f3c0bd7d6c5ed0e03069c02de1a870e639002000

Upgrade on Mainnet

  • Gateway contract address and codehash:
  • BeefyClient contract address:

@codecov
Copy link

codecov bot commented Feb 10, 2026

Codecov Report

❌ Patch coverage is 0% with 6 lines in your changes missing coverage. Please review.
✅ Project coverage is 78.70%. Comparing base (7ec4f8d) to head (d288098).
⚠️ Report is 18 commits behind head on main.

Files with missing lines Patch % Lines
contracts/src/upgrade/Gateway202602.sepolia.sol 0.00% 3 Missing ⚠️
contracts/src/upgrade/Gateway202602.sol 0.00% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1707      +/-   ##
==========================================
- Coverage   81.58%   78.70%   -2.89%     
==========================================
  Files          22       24       +2     
  Lines         994     1000       +6     
  Branches      184      186       +2     
==========================================
- Hits          811      787      -24     
- Misses        166      187      +21     
- Partials       17       26       +9     
Flag Coverage Δ
solidity 78.70% <0.00%> (-2.89%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@yrong yrong marked this pull request as ready for review February 12, 2026 06:48
@yrong yrong changed the title Upgrade Gateway contract on Sepolia Upgrade Gateway contract Feb 12, 2026
@yrong yrong changed the title Upgrade Gateway contract Upgrade Gateway Feb 12, 2026
@claravanstaden
Copy link
Contributor

I changed the contract addresses on Westend-Sepolia to add #1709:

Gateway contract address: 0x6FF6bFd4cf0b2FE390513f5e20F372dbA86168b2
Gateway contract codehash: 0x8efb7d0c04a19b4ba96459708a2c08c9781da02f307d4989d618d859c5c5bacf
Beefy: 0x2Bc7eC7fe8EC8BDDE511003F4fe82Bc86b69894a

https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fwestend-rpc.polkadot.io#/extrinsics/decode/0x1500630004000100a90f040c2f00000602070008d6e82982ee3600dc53004e9dec85eb9bbfe58de4034887e19f452ef8aed0d262c392ee1c615c8388f3d09121bc2aa25b70fded8a0f4d10b9d516d886f955002000

Copy link
Collaborator

Choose a reason for hiding this comment

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

Is it possible to rename this to a more generic Gateway202602.sol? There's nothing specific about Sepolia in this contract. I'd also like to use it for the mainnet deployment.

Also can you confirm whether we need any special initializer config for mainnet?

Copy link
Contributor Author

@yrong yrong Feb 25, 2026

Choose a reason for hiding this comment

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

470d1f8

I’ve added a separate configuration for mainnet and would prefer to keep the existing Westend deployment (already executed) unchanged.

can you confirm whether we need any special initializer config for mainnet?

No, this only updates BeefyClient for Fiat–Shamir and includes an internal processing revamp in v2_submit to make dry runs easier. No migration is required.

}
}

function mainnetConfig() internal pure returns (Config memory config) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Would appreciate if you can refresh the init config for the mainnet deployment. Then I can deploy tomorrow morning.

Copy link
Contributor Author

@yrong yrong Feb 25, 2026

Choose a reason for hiding this comment

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

Updated configuration is available here: 494b908

By the way, we already have a script to fetch the latest BEEFY checkpoint. Alternatively, you can simply run:

➜  contracts ./scripts/beefy-checkpoint.js                                

to fetch the latest checkpoint for the deployment.

gatewayLogic = new GatewaySepolia202602(address(beefyClient), address(executor));
}

console.log("Gateway contract address: %s", address(gatewayLogic));
Copy link
Collaborator

Choose a reason for hiding this comment

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

Should also log the NODE_ENV. And come to think about it, can we rename NODE_ENV to STAGE? This isn't a js app.

Copy link
Contributor Author

@yrong yrong Feb 25, 2026

Choose a reason for hiding this comment

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

Makes sense, but I prefer SNOWBRIDGE_DEPLOY_STAGE over STAGE, since STAGE is a bit too generic and could potentially conflict with existing environment variables.

470d1f8#diff-9eea76d09975284c56e96f0effa9e2302b231b3bf561bacb7880930c66d1d620

@yrong yrong force-pushed the ron/upgrade-gateway-202602-on-sepolia branch from d8c43db to 72f7a35 Compare February 25, 2026 03:34
Comment on lines +26 to +28
// Todo: Update Beefy client address on Polkadot mainnet with the correct one before deploying.
address beefyClient = 0x1817874feAb3ce053d0F40AbC23870DB35C2AFfc;
gatewayLogic = new Gateway202602(address(beefyClient), address(executor));
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@vgeddes Just a reminder to update the BeefyClient address here before deploying the new Gateway contract.

Copy link
Contributor Author

@yrong yrong Feb 25, 2026

Choose a reason for hiding this comment

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

By the way, please also check whether #1726 can be merged or included in the deployment.

@yrong yrong requested a review from vgeddes February 25, 2026 12:24
@yrong yrong merged commit 3b8e534 into main Feb 27, 2026
2 checks passed
@yrong yrong deleted the ron/upgrade-gateway-202602-on-sepolia branch February 27, 2026 09:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants