Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ref-finance/ref-contracts
Smart contracts for Ref Finance
https://github.com/ref-finance/ref-contracts
Last synced: about 2 months ago
JSON representation
Smart contracts for Ref Finance
- Host: GitHub
- URL: https://github.com/ref-finance/ref-contracts
- Owner: ref-finance
- License: mit
- Created: 2021-02-21T08:36:21.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2024-10-29T09:32:25.000Z (2 months ago)
- Last Synced: 2024-10-29T11:43:56.374Z (2 months ago)
- Language: Rust
- Size: 16.3 MB
- Stars: 99
- Watchers: 16
- Forks: 55
- Open Issues: 26
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-near - Ref Finance
README
# Ref Finance Contracts
This mono repo contains the source code for the smart contracts of Ref Finance on [NEAR](https://near.org).
## Contracts
| Contract | Reference | Description |
| - | - | - |
| [test-token](test-token/src/lib.rs) | - | Test token contract |
| [ref-exchange](ref-exchange/src/lib.rs) | [docs](https://ref-finance.gitbook.io/ref-finance/smart-contracts/ref-exchange) | Main exchange contract, that allows to deposit and withdraw tokens, exchange them via various pools |## Development
1. Install `rustup` via https://rustup.rs/
2. Run the following:```
rustup default stable
rustup target add wasm32-unknown-unknown
```### Testing
Contracts have unit tests and also integration tests using NEAR Simulation framework. All together can be run:
```
cd ref-exchange
cargo test --all
```### Compiling
You can build release version by running next scripts inside each contract folder:
```
cd ref-exchange
./build.sh
```### Deploying to TestNet
To deploy to TestNet, you can use next command:
```
near dev-deploy
```This will output on the contract ID it deployed.