A simple counter smart contract on NEAR
$ cargo test -- --nocapture
$ rustup target add wasm32-unknown-unknown
$ cargo build --target wasm32-unknown-unknown --release
$ near login
$ near deploy --wasmFile target/wasm32-unknown-unknown/release/counter.wasm --accountId YOUR_ACCOUNT_HERE
Get counter number
$ near view YOUR_ACCOUNT_HERE get_num --accountId YOUR_ACCOUNT_HERE
Counter increment
$ near call YOUR_ACCOUNT_HERE increment --accountId YOUR_ACCOUNT_HERE
Counter decrement
$ near call YOUR_ACCOUNT_HERE decrement --accountId YOUR_ACCOUNT_HERE
Counter reset
$ near call YOUR_ACCOUNT_HERE reset --accountId YOUR_ACCOUNT_HERE