Skip to content

A starting point to write, build and test JavaScript smart contract

Notifications You must be signed in to change notification settings

near/near-sdk-js-template-project

Repository files navigation

NEAR-SDK-JS template project

This is a template project. It implements a counter. You can copy this folder to start writing your first contract.

Build the contract

npm i
npm run build

Run tests on local node

npm run test:template

Run tests on testnet

save

echo "your testnet master account wallet" >> .near-credentials/workspaces/testnet/'$TESTNET_MASTER_ACCOUNT_ID'.json
TESTNET_MASTER_ACCOUNT_ID='your master account id' npm run test:testnetdeploy

current master account run by ci on testnet is templateprojectmaster.testnet

in gitlab ci, the testnet master account's secret is reserved on git secrets: https://docs.github.com/en/actions/security-guides/using-secrets-in-github-actions

testnet deploy use near-cli

This test script will create accounts with faucet to deploy and call contract

  • run test shell
npm run test:clidevdeploy

About

A starting point to write, build and test JavaScript smart contract

Resources

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published