That repository stores all contracts related to the Rarimo bridge on Solana.
Currently, they are described in the following sub-crates:
- Bridge - Rarimo Bridge program
- Commission - Rarimo Bridge commission program.
- Lib - Rarimo bridge library
The deposit implies the one transaction with two instructions:
- Charge commission instruction to the commission program.
- Deposit (native/ft/nft) instruction to the bridge program.
Note, that commission program should be the same that is defined in bridge admin, and the bridge admin should be the same that Rarimo system uses. Otherwise, you can loose your tokens.
The withdrawal implies the one transaction with withdraw (native/ft/nft) instruction. It is required to provide the correct signature for the requested withdrawal token data. That signature should be generated by Rarimo system and can be fetched from Rarimo core.
npm run build:bridge
npm run build:commission
npm run build:upgrade
solana program deploy --program-id ./dist/program/bridge-keypair.json ./dist/program/bridge.so
solana program deploy --program-id ./dist/program/commission-keypair.json ./dist/program/commission.so
solana program deploy --program-id ./dist/program/upgrade-keypair.json ./dist/program/upgrade.so