Chainbridge by ChainSafe - Connecting Ethereum and Moonbeam¶
Disclaimer: Projects themselves entirely manage the content in this guide. Moonbeam is a permissionless network. Any project can deploy its contracts to Moonbeam.
Introduction¶
ChainBridge is a modular, multi-directional bridge to interact with multiple networks, either EVM or Substrated-based chains. ChainBridge's implementation in Moonbeam is focused on connecting it to Ethereum using both EVM implementations.
At a high-level, ChainBridge is a message-passing protocol. A set of relayers are constantly looking for events, in either side of the bridge, which trigger a set of actions. Once a triggering event is noted, a set of relayers vote to execute the instructions (included in the event) in the chain on the other side of the bridge.
For example, the bridge can be used to transfer ERC-20 or ERC-721 natively. A set of handler contracts are pre-configured to handle both token standards. At its core, the token transfer mechanism works with a lock-mint, burn-unlock mechanism. First tokens are locked in the source chain, and an event is emitted, which is listened to by the relayers. Then, they vote and (if approved) execute the mint function, giving the same amount of tokens locked in the target chain to the corresponding address.
You can read more about ChainBridge (and ChainSafe) in the following links:
You can contact the team via the following communication channels:
Moonbase Alpha Implementation¶
ChainBridge is currently connecting the Moonbase Alpha TestNet with both Kovan and Rinkeby Ethereum's TestNets. You can find a detailed tutorial on how to use the bridge in this site.
Moonbase Alpha - Rinkeby¶
You can find all the contract's addresses that are relevant for the Moonbase Alpha - Kovan/Rinkeby bridge in the following table:
Contract | Address |
---|---|
Bridge | 0x747e8C91C8661704b1c33b0365A89f7e988E1de3 |
ERC20 Handler | 0xDC826cF5AD261FcD1D1dC404648B4D596Df88C8C |
ERC721 Handler | 0xa6DCb79BC155f732C0761eFCEd656927FFA97E9E |
ERC20S Token | 0x019F59AFbB89f0d395F905F7Ca0A48485619bcA5 |
ERC721M Token (mintable on Moonbase Alpha) | 0xAC86f2e7C7C2e360eD0541fFDbb68710596E11B5 |
All of the above addresses are valid on both Kovan and Rinkeby. You will be able to specify which network to transfer the tokens to when interacting with the Bridge contract.
Moonbase Alpha ChainBridge UI¶
If you want to play around with transferring ERC20S tokens from Moonbase Alpha to Kovan or Rinkeby without having to set up the contracts in Remix, you can checkout the Moonbase Alpha ChainBridge UI.