Bridge smart contracts that allow users to move states between Ethereum and Taraxa chains.
Generated Foundry smart contract specs are available at: https://taraxa-project.github.io/bridge/index.html
At the end of June 2024, the bridge was deployed on the official Taraxa testnet and serves as an active avenue to bridge tokens from ETH Holes to TARA and vice versa.
You can find out more about the deployment details in the TESTNET.md file.
- DEPLOY.md - Deployment addresses
- FLOWS.md - Description of main flows
- INTEGRATION.md - Integration manual
- BridgeBase.sol
- EthBridge.sol
- TaraBridge.sol
- TokenConnectorLogic.sol
- NativeConnector.sol
- ERC20LockingConnector.sol
- ERC20MintingConnector.sol
There are main contracts on both chains that are finalizing states(changes list) and applies state changes from the other chain. Changes are verified against the Bridge Root that is requested from the light clients and is verified against the other chain consensus.
Ethereum light client is deployed on Taraxa side and it is accepting Ethereum block headers and verifying them against the Ethereum consensus. So after the finalization of Ethereum header we can take state root from it and verify Bridge Root against it.
Taraxa light client will verify Taraxa Pillar blocks that are special type of blocks for this purpose. Pillar block will have Bridge Root in it, so we can directly use Bridge Root from it.
Connectors are contracts that are deployed on both chains and they are:
- Finalizing state to transfer it to another chain.
- Applies changes from the other chain.
Interface could be found at IBridgeConnector.sol
Examples of connectors:
The root Makefile contains a few useful commands that are used for development and testing.
make test
The scripts folder contains a few useful scripts that are used for development, deployment, contract registration and testing.