This repository includes NFT implementations in Rust and AssemblyScript for NEP#4
- Prerequisites:
If you are using Gitpod, you can skip this section! Your environment is already set up 🎉
- Make sure Rust is installed per the prerequisites in
near-sdk-rs
- Make sure you have Node.js ≥ 12 installed (https://nodejs.org), then use it to install yarn:
npm install --global yarn
(or justnpm i -g yarn
) - Install dependencies:
yarn install
(or justyarn
)
- Explore this contract
The source for this contract is in contract/src/lib.rs
. It provides methods to manage access to tokens, transfer tokens, check access, and get token owner. The same file contains the unit tests for the contract as well.
- Building this contract
To build the rust version of the contract:
npm run build:rs
- Running the tests To run the unit tests, run this command:
npm run test:unit:rs
Using Gitpod? You can skip these setup steps!
To run this project locally:
- Prerequisites: Make sure you have Node.js ≥ 12 installed (https://nodejs.org), then use it to install yarn:
npm install --global yarn
(or justnpm i -g yarn
) - Install dependencies:
yarn install
(or justyarn
)
Now you can run all the AssemblyScript-related scripts listed in package.json
! Scripts you might want to start with:
yarn test:unit:as
: Runs all AssemblyScript tests with filenames ending inunit.spec
yarn build:as
: Compiles the AssemblyScript contracts to Wasm binaries
By using Gitpod in this project, you agree to opt-in to basic, anonymous analytics. No personal information is transmitted. Instead, these usage statistics aid in discovering potential bugs and user flow information.