https://github.com/circlefin/stablecoin-near
Repository for Circle stablecoins on NEAR
https://github.com/circlefin/stablecoin-near
Last synced: over 1 year ago
JSON representation
Repository for Circle stablecoins on NEAR
- Host: GitHub
- URL: https://github.com/circlefin/stablecoin-near
- Owner: circlefin
- License: apache-2.0
- Created: 2023-10-30T12:28:58.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2024-03-08T23:51:11.000Z (over 2 years ago)
- Last Synced: 2025-03-28T03:51:09.618Z (over 1 year ago)
- Language: Rust
- Homepage:
- Size: 426 KB
- Stars: 3
- Watchers: 8
- Forks: 3
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Security: SECURITY.md
Awesome Lists containing this project
README
# Circle stablecoins on NEAR
Implementation of a Circle stablecoin on NEAR following [near-contract-standards](https://github.com/near/near-sdk-rs/tree/master/near-contract-standards).
### Rust v1.70.0 incompatibility issues
As of Rust v1.70.0, `.wasm` targets by default enable opcodes (specifically `sign-ext`, due to [an update to LLVM](https://releases.rs/docs/1.70.0/#internal-changes)) that are currently not supported by the NearVM. NEAR has an [open issue](https://github.com/near/nearcore/issues/8358#issuecomment-1383247423) to figure out how to work with this.
They suggest using a flag from `wasm-opt` to disable sign extensions.
We have decided to use Rust v1.69.0 for now.
### Install Rust v1.69.0 for development
```
$ curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- --default-toolchain=1.69.0 -y
```
or
```
$ brew install rustup
$ rustup install 1.69.0
```
### Set Rust v1.69.0 as default
```
$ rustup default 1.69.0
```
### Testing
```
$ cargo test
```
If your `integration_test.rs` is failing, ensure you are on Rust v1.69.0. Once you have done so, clean your project with `make clean` before re-running `make` and then `cargo test`.
### Build for deploying on-chain
```
$ make
```
Build code for production using local Rust installation (if no local Rust installation is found, Rust docker container will be used). The output file is `target/wasm32-unknown-unknown/release/fiat_token.wasm`.
```
$ make clean
```
Remove compiled artifacts.
### Add to PATH
```
$ source $HOME/.cargo/env
```