/near-dapp

Primary LanguageTypeScriptGNU General Public License v3.0GPL-3.0

NEAR Dapp Template

Prerequisites

You need to have the Node.js and Rust programming languages installed.

Install the WASM target for Rust:

rustup target add wasm32-unknown-unknown

You will also probably want:

Setup

  1. Build the smart contract

    cargo build --target wasm32-unknown-unknown --release

    or (if you installed cargo-make)

    cargo make build
  2. Deploy the smart contract

    near dev-deploy --wasmFile target/wasm32-unknown-unknown/release/contract.wasm

    or (if you installed cargo-make)

    cargo make dev-deploy

    Be sure to remember the contract account ID!

  3. Start the frontend

    cd frontend
    npm install
    CONTRACT_ID=<contract-id> npm run dev

    Where <contract-id> is the contract account ID from step 2.