Step 1: Clone the Template
Step 2: Set Your Token Name and Symbol
Opensrc/lib.rs and find the token constants near the top:
TOKEN_NAME and TOKEN_SYMBOL to your token’s values. Leave TOKEN_DECIMALS at 18 unless you have a specific reason to change it.
You do not need to write the NEP-20 logic yourself. The template already implements
transfer, approve, transferFrom, balanceOf, allowance, mint, and all standard events.Step 3: Build
target/wasm32-unknown-unknown/release/my_nexus_contract.wasm
Step 4: Test Locally
TestEnv — no network required.
Step 5: Deploy with TypeScript
Install the SDK:deploy.ts):
init_token can only be called once — it reverts if called again. Call it immediately after deployment in the same script.Step 6: Interact with Your Token
NEP-20 Function Reference
Contract Template
Full template with NEP-20, build scripts, and tests
NEP-20 Standard
Full NEP-20 specification and ABI reference