These steps assume creating a bridge between NEAR Testnet and a Calimero shard manually.
- Deploy and init the light client contract on NEAR Testnet
- Deploy and init the prover contract on NEAR Testnet
- Start relayer from Calimero to NEAR Testnet (keep it running at all times)
- Deploy and init the light client contract on Calimero
- Deploy and init the prover contract on Calimero
- Start relayer from NEAR Testnet to Calimero (keep it running at all times)
Steps (1-3) and (4-6) can be completed in parallel
Deploy the Connectors
Here are the steps for creating the FT connecters, but similary an NFT and a cross shard call connectors would be created
- Deploy and init ft_connector on NEAR Testnet
- Deploy and init ft_connector on Calimero
- Call set_locker on ft_connector on NEAR Testnet and call it on Calimero as well
- 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 contract account id. Most of the fungible tokens require to call storage_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 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.