This smart contract saves and records the status messages of NEAR accounts that call it.
Windows users: please visit the Windows-specific README file.
Ensure near-cli
is installed by running:
near --version
If needed, install near-cli
:
npm install near-cli -g
Ensure Rust
is installed by running:
rustc --version
If needed, install Rust
:
curl https://sh.rustup.rs -sSf | sh
Install dependencies
npm install
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
) - Run the local development server:
yarn && yarn dev
(see package.json for a full list of scripts you can run with yarn) Now you'll have a local development environment backed by the NEAR TestNet! Running yarn dev will tell you the URL you can visit in your browser to see the app.
To make the build process compatible with multiple operating systems, the build process exists as a script in package.json
.
There are a number of special flags used to compile the smart contract into the wasm file.
Run this command to build and place the wasm file in the res
directory:
npm run build
Note: Instead of npm
, users of yarn may run:
yarn build
If you encounter an error similar to:
note: the
wasm32-unknown-unknown
target may not be installed
Then run:
rustup target add wasm32-unknown-unknown
To test run:
cargo test --package status-message -- --nocapture