Skip to content
Retr0 Academy
NEAR Smart Contracts

Course · Intermediate

NEAR Smart Contracts

This is the core contract-development course. You install cargo-near and near-cli-rs, write and unit-test a near-sdk contract, store data in near_sdk::store collections, make asynchronous cross-contract calls with promises and callbacks, issue function-call keys safely, and deploy to NEAR testnet.

0 of 6 lessons complete

What you will build

A small greeting (or similar) contract you test locally, then deploy to a faucet-funded testnet account and call with near-cli-rs.

Prerequisites

  • Web3 Fundamentals, especially accounts, gas, and what a smart contract is.
  • Comfortable reading a little Rust or JavaScript. You can follow the Rust examples even if you write JS contracts later.

Lessons

  1. 01Setup and ToolingInstall Rust, the Wasm target, cargo-near, and near-cli-rs, then build a contract without touching testnet yet.1 min
  2. 02Writing and Testing a ContractBuild a small greeting contract in near-sdk-rs or near-sdk-js, then test it locally before you touch testnet.2 min
  3. 03Storage and CollectionsWhen to use native Rust collections versus near_sdk::store (IterableMap, LookupMap, Vector), and why every collection needs a unique prefix.2 min
  4. 04Promises and CallbacksSchedule a cross-contract call with Promise, attach gas, and handle the result in a private callback.1 min
  5. 05Access Keys and Function-Call KeysFull-access keys versus function-call keys: allowances, receiver_id, method names, and when a dApp should add a limited key.4 min
  6. 06Deploying to TestnetCreate a faucet-funded testnet account, build Wasm, deploy, and call view and change methods with near-cli-rs.2 min
Take the NEAR Smart Contracts quiz