-
Notifications
You must be signed in to change notification settings - Fork 35
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
Adding Base module for canonical TBTC #673
Conversation
Most of the files were copied from the Optimism module and adjusted for the Base chain, ie. ids and addresses. There is one change that had to be added which is a custom network for hardhat etherscan plugin. Base is not supported by this plugin by default and a custom network configuration had to be added.
cross-chain/base/deploy_l2/13_update_with_arbitrum_in_wormhole_gateway_mapping.ts
Outdated
Show resolved
Hide resolved
cross-chain/base/deploy_l2/14_update_with_polygon_in_wormhole_gateway_mapping.ts
Outdated
Show resolved
Hide resolved
cross-chain/base/deploy_l2/15_update_with_optimism_in_wormhole_gateway_mapping.ts
Outdated
Show resolved
Hide resolved
cross-chain/base/deploy_l2/22_transfer_base_wormhole_gateway_ownership.ts
Show resolved
Hide resolved
The implementation contract was failing basescan verification unless the constructor params were empty.
We don't use this script currently so there is no need to push it.
Most of the transactions pass without gasPrice parameter. We need to set it in case we have problems.
This is address of the wrapped tBTC token on Base mainnet chain. tBTC token attestation on Ethereum: https://etherscan.io/tx/0x2df8d53251aff96b6341f3fffda03b46ff04c35edb8dff496962da73d19c04c7 Wrapped tBTC token creation on Base: https://basescan.org/tx/0x82af9e68b6be7db6b89cfb6e09368f524e04a317c938e367047f6467484e47a3
The Gnosis Safe wallet was set up on Base by the Threshold Council under https://app.safe.global/settings/setup?safe=base:0x518385dd31289F1000fE6382b0C65df4d1Cd3bfC
const { execute } = deployments | ||
const { deployer } = await getNamedAccounts() | ||
|
||
// See https://docs.wormhole.com/wormhole/reference/environments/evm#base |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NB: This link does not work. I think the proper one now is https://docs.wormhole.com/wormhole/blockchain-environments/evm#base
@@ -0,0 +1,3 @@ | |||
{ | |||
"address": "0x9EE95E6Bd1B3C5740F105d6fb06b8BDeF64Eec70" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NB: I could not double-check this address as I don't know where it comes from. Keep this in mind during deployment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, this was confirmed by @dimpar on Discord. The address comes from the wrapped tBTC token registration on Base (tx: https://basescan.org/tx/0x82af9e68b6be7db6b89cfb6e09368f524e04a317c938e367047f6467484e47a3).
Part of #542
This PR is a continuation of tBTC expansion to L2s - BASE chain. Code was largely copied from the existing cross-chain/* modules with some naming modifications, addresses and chain ids. It creates a new cross-chain/base module to bring tBTC to BASE with the help of Wormhole. Here's a diagram to illustrate the flow
Wormhole TokenBridge
on Ethereum - holds allTBTC
bridged to BASE. This is an external contract created by the Wormhole team.Wormhole TokenBridge
on BASE - mints Wormhole wrappedTBTC
ie.wormholeTBTC
. This is an external contract created by the Wormhole team.BaseWormholeGateway
on BASE - acts as a vending machine that wraps and unwrapswormholeTBTC
to the canonicaltBTC
token on BASE. This is an upgradable Gateway behind OZ transparent proxy. The Threshold team creates it.BaseTBTC
canonicaltBTC
token on BASE. It is upgradable behind OZ transparent proxy. The Threshold team creates it.All the ownership of Threshold-created contracts is transferred to the Threshold governance including a proxy admin ownership.
A couple of things to pay closer attention at:
external/
dir30
23 - Arbitrum
,24 - Optimism
,5 - Polygon
84531
and8453
Deploy on BASE testnet / mainnet
Create a
.envrc
file and include the following:where
network
can be:baseGeorli
// testnetbase
// mainnetUseful links:
https://docs.base.org/network-information/
https://docs.wormhole.com/wormhole/supported-environments/evm#base
TODO:
BaseWormholeTBTC.json
underexternal/base
andwith a newly registered token.external/goerliBase