@keep-network/tbtc-v2-optimism v1.0.2
:toc: macro
= Threshold cross-chain - Optimism
This package brings Bitcoin to Ethereum L2 Optimism. For more details please see link:https://github.com/keep-network/tbtc-v2/blob/main/docs/rfc/rfc-8.adoc[RFC 8: Cross-chain Tokenized Threshold BTC]
== How it works?
+----------------------------+ +---------------------------------------------------------------------------+
| Ethereum | | Optimism |
| | | |
| +----------------------+ | | +----------------------+ +-------------------------+ +--------------+ |
| | Wormhole TokenBridge |--|---------|--| Wormhole TokenBridge |--| OptimismWormholeGateway |--| OptimismTBTC | |
| +----------------------+ | | +----------------------+ +-------------------------+ +--------------+ |
| | | |
+----------------------------+ +---------------------------------------------------------------------------+
OptimismTBTC
canonical tBTC token on Optimism with a minting authority delegated toOptimismWormholeGateway
.OptimismWormholeGateway
is a smart contract wrapping and unwrapping Wormhole-specific tBTC representation into the canonicalOptimismTBTC
token.
=== Updating Wormhole Gateway mapping
The deployment scripts are responsible for managing updates of the tBTC gateway
addresses across various chains. These addresses are stored in the external/
directory for a specific network, such as optimismGoerli/ArbitrumWormholeGateway.json.
It is important to note that these addresses should remain constant for the
mainnet network. However, there may be instances where a new version of a
cross-chain module is deployed to the testing network, which would require a
manual update of the corresponding address.
=== Deploy contracts
To deploy all contracts on the given network, please run:
yarn deploy --network <network>
Supported networks:
hardhat
- for local developmentoptimismGoerli
- L2 testing networkoptimism
- L2 mainnet
Currently, this module does not deploy any contracts on L1. All the existing
Wormhole contract addresses that are used in this module are stored under
external/<network>
dir.
If contracts haven't been built yet or changes occurred, deploy
task will build
the contracts before running the deployment script. This command produces
an export.json
file containing contract deployment info. Note that for the
chains other than hardhat
the following environment variables are needed:
L2_CHAIN_API_URL
- URL to access blockchain services, e.g.https://opt-goerli.g.alchemy.com/v2/<alchemy_api_key>
L2_ACCOUNTS_PRIVATE_KEYS
- Private keys for the deployer and council<0xOwnerPrivKey,0xCouncilPrivKey>
OPTIMISM_ETHERSCAN_API_KEY
- Optimism Etherscan API key
3 months ago
3 months ago
7 months ago
1 year ago
12 months ago
1 year ago
1 year ago