This mono repo contains the source code for the smart contracts of Ref Finance on NEAR.
Contract | Reference | Description |
---|---|---|
test-token | - | Test token contract |
ref-exchange | docs | Main exchange contract, that allows to deposit and withdraw tokens, exchange them via various pools |
- Install
rustup
via https://rustup.rs/ - Run the following:
rustup default stable
rustup target add wasm32-unknown-unknown
Contracts have unit tests and also integration tests using NEAR Simulation framework. All together can be run:
cd ref-exchange
cargo test --all
You can build release version by running next scripts inside each contract folder:
cd ref-exchange
./build.sh
To deploy to TestNet, you can use next command:
near dev-deploy
This will output on the contract ID it deployed.