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

Add Sepolia support for Polygon cross-chain #751

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

michalinacienciala
Copy link
Contributor

@michalinacienciala michalinacienciala commented Nov 22, 2023

The Goerli testnet currently used by Threshold/Keep for development purposes is planned to become deprecated with the end of year 2023. The testnet that was created to replace it is called
Holešky, however it will take some time until it gets integrated with by some of the projects we rely on. As a solution, we decided to switch first to another testnet that is currently live - Sepolia. This testnet's EOL is planned for 2026, which gives us plenty of time to move to Holešky before Sepolia gets deprecated. Until Görli is not dead we want to support both testnets.

The Goerli -> Sepolia migration means that also L2 testnet based on Goerli (Mumbai) needs to be migrated to Sepolia-based chain (Amoy). In this PR we're adjusting the config used to deploy testnet contracts in the @keep-network/tbtc-v2-polygon project. After the update, both deploy to mumbai and amoy networks will be supported (we may remove mumbai support once we're sure the amoy deployment works as expected).

TODO

Ref: threshold-network/solidity-contracts#150

The Goerli testnet currently used by Threshold/Keep for development purposes is
planned to become deprecated with the end of year 2023. The testnet that was
created to replace it is called
[Holešky](https://github.com/eth-clients/holesky), however it will take some
time until it gets integrated with by some of the projects we rely on.
As a solution, we decided to switch first to another testnet that is currently
live - Sepolia. This testnet's EOL is planned for 2026, which gives us plenty of
time to move to Holešky before Sepolia gets deprecated.
Until Görli is not dead we want to support both testnets.

The Goerli -> Sepolia migration means that also L2 testnet basing on Goerli
(Mumbai) needs to be migrated to Sepolia-based chain. At the moment the new
testnet isn't yet announced, so deployment of our contract is yet not possible.
But we're already starting to add changes that prepare us for the moment when it
will be supported.
Once new testnet is live and WOrmhole support is confirmed, we'll need to verify
if `wormholeChainID` we use in the config is correct for the testnet. We'll also
need to update the missing Hardhat configuration (TODOs) and add the
`export-artifacts:sepolia` spript to `package.json`.
It was unclear which testnet will replace the Mumbai testnet after the
deprecation of the underlying Goerli testnet. Now we know the new L2 testnet on
Polygon will be called `amoy` and will use the `80002` chain id. We can update
our config accordingly.
Read more:
maticnetwork/heimdall#1096
maticnetwork/bor#1072
Adding Sepolia-related contracts needed for deployment on `amoy` network:
* `external/baseSepolia/BaseTokenBridge.json` - address taken from
  https://docs.wormhole.com/wormhole/blockchain-environments/evm#testnet-contracts-base-sepolia-84532
* `external/amoy/SolanaWormholeGateway.json` - used the same value as in `mumbai`
* `external/sepolia/TokenBridge.json` - address taken from
  https://docs.wormhole.com/wormhole/blockchain-environments/evm#testnet-contracts-sepolia-11155111

NOT included in this commit (but needed for the deployment):
* `external/amoy/PolygonWormholeTBTC.json` - in order to get the address we need
  to perform attestation of the Ethereum Sepolia TBTC token on Amoy (but atm
  Amoy is not available on the list of target networks on
  https://wormhole-foundation.github.io/example-token-bridge-ui/#/register)
* `external/amoy/PolygonTokenBridge.json` - address needs to be taken from
  https://docs.wormhole.com/wormhole/blockchain-environments/evm once Wormhole
  adds a support for Amoy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:shipit: deployment Deployments and CI workflows
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant