Skip to content

Chainbridge by ChainSafe - Connecting Ethereum and Moonbeam

ChainSafe Banner

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 - Kovan/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 0x638285E837Db7124FF0947251c6f20ceEb2645DF
ERC20 Handler 0x623b114e13bdef428f34fa3a76E3BbA580Fd5bb3
ERC721 Handler 0xa60e3a1ef9EbD7b607cbE0cAcC1E3A9B5a6f10c4
ERC20S Token 0xFCefBC458DA5b11a10422C0703bea1D154887D76
ERC721M Token (mintable on Moonbase Alpha) 0x13a4DFdA8B3f0509D340f6034Cd9106cf2DB6BAa

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.