Skip to content

Latest commit

 

History

History
77 lines (55 loc) · 1.94 KB

README.md

File metadata and controls

77 lines (55 loc) · 1.94 KB

Status Message

Open in Gitpod

This smart contract saves and records the status messages of NEAR accounts that call it.

Windows users: please visit the Windows-specific README file.

Prerequisites

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

Quick Start

To run this project locally:

  1. Prerequisites: Make sure you have Node.js ≥ 12 installed (https://nodejs.org), then use it to install yarn: npm install --global yarn (or just npm i -g yarn)
  2. 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.

Building this contract

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

Important

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

Testing

To test run:

cargo test --package status-message -- --nocapture