Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/rarimo/solana-bridge-program

Rarimo bridge program on Solana
https://github.com/rarimo/solana-bridge-program

cross-chain-bridge rust solana

Last synced: 3 months ago
JSON representation

Rarimo bridge program on Solana

Awesome Lists containing this project

README

        

# Rarimo Solana Bridge programs

[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

That repository stores all contracts related to the Rarimo bridge on Solana.

Currently, they are described in the following sub-crates:

- [Bridge](./bridge/program) - Rarimo Bridge program
- [Commission](./commission/program) - Rarimo Bridge commission program.
- [Lib](./lib) - Rarimo bridge library

## Usage flow

The deposit implies the one transaction with two instructions:
- Charge commission instruction to the [commission program](./commission/program).
- Deposit (native/ft/nft) instruction to the [bridge program](./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.

## Build

```shell
npm run build:bridge
npm run build:commission
npm run build:upgrade
```

## Deploy
```shell
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
```