Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/rarimo/solana-bridge-program
- Owner: rarimo
- License: mit
- Created: 2023-10-05T09:42:22.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2023-11-23T13:18:04.000Z (about 1 year ago)
- Last Synced: 2024-07-30T20:16:38.841Z (6 months ago)
- Topics: cross-chain-bridge, rust, solana
- Language: Rust
- Homepage:
- Size: 7.09 MB
- Stars: 5
- Watchers: 4
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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
```