🚨 Shai-Hulud Strikes Again:834 Packages Compromised.Technical Analysis →
Socket
Book a DemoInstallSign in
Socket

@keep-network/tbtc-v2-optimism

Package Overview
Dependencies
Maintainers
6
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@keep-network/tbtc-v2-optimism

tBTC v2 on Optimism

npmnpm
Version
1.0.0
Version published
Weekly downloads
1
-66.67%
Maintainers
6
Weekly downloads
 
Created
Source

: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 to OptimismWormholeGateway.
  • OptimismWormholeGateway is a smart contract wrapping and unwrapping Wormhole-specific tBTC representation into the canonical OptimismTBTC token.

=== Deploy contracts

To deploy all contracts on the given network, please run:

yarn deploy --network <network>

Supported networks:

  • hardhat - for local development
  • optimismGoerli - L2 testing network
  • optimism - 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

FAQs

Package last updated on 13 Apr 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts