Skip to content

rarimo/solana-bridge-program

Repository files navigation

Rarimo Solana Bridge programs

License: MIT

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

Usage flow

The deposit implies the one transaction with two instructions:

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.

Build

npm run build:bridge
npm run build:commission
npm run build:upgrade

Deploy

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

Releases

No releases published

Packages

No packages published

Languages