These steps assume creating a bridge between NEAR Testnet and a Calimero shard, but in reality it can be any chain to any chain.
- Deploy light client contract on Testnet
- Deploy prover contract on Testnet
- Start relayer from Calimero to Testnet (keep it running at all times)
- Deploy light client contract on Calimero
- Deploy prover contract on Calimero
- Start relayer from Testnet to Calimero (keep it running at all times)
Deploy the Connectors
Again, here we assume the source chain to be the NEAR Testnet, and destination chain to be a Calimero shard
- Deploy ft_connector_source on Testnet
- Deploy ft_connector_destination on Calimero
- Call set_locker on ft_connector_source & ft_connector_destination (we’ll provide you with the commands)
- Start bridge service and keep it running
Prerequisite for transferring tokens from source chain to destination chain, is that the fungible token on source chain is registered with the ft_connector_source contract account id. Most of the fungible tokens require to call near_deposit before ever interacting with that specific fungible token. This step is called registering the account with the ft contract. (NOTE: This is not always the case - for example USN does not require this step).
Once the ft_connector_source is registered with the fungible token, anyone can start transferring tokens from source to destination chain and withdraw the tokens back from the destination chain to source chain. All the steps that are happening when initiating a transfer to either side are described under Fungible token connector section.