To Share and +4 nLEARNs

Please complete the following as soon as possible  It is essential for the success of this program to coordinate our activities and this will help us do just that.


1. Please join us on a dedicated Telegram Group
– Join LNC Official Telegram group to get P2P help and get tips with NEAR

2. Follow Learn NEAR on Twitter

3. Create a testnet account  – YourName.testnet –

4.  Add our Telegram bot to monitor your accounts:

Install required tools

NOTE: This process is for Unix-like system, e.g. Linux or Mac OS. Windows installation process is different and covered in

Install Rustup:

curl --proto '=https' --tlsv1.2 -sSf | sh
source ~/.cargo/env

Add wasm target to your toolchain:

rustup target add wasm32-unknown-unknown

Install near-cli

See near-cli installation docs

Install git

See installation guide from github.

Prepare workshop repo and verify tools installation

Clone the workshop repository

git clone
cd workshop

It should clone the repository to a local folder workshop.

Compile the contract


If you have successfully installed Rust and wasm32 target, then ./ should compile the contract into res/berry_bot.wasm.

   Compiling autocfg v1.0.0
   Compiling proc-macro2 v1.0.9
   Compiling unicode-xid v0.2.0
   Compiling near-vm-logic v2.0.0
   Compiling near-sdk v2.0.0
   Compiling berry-bot v0.1.0 (workshop)
    Finished release [optimized] target(s) in 43.13s

You can check that the contract is present in res/berry_bot.wasm

test res/berry_bot.wasm && echo "OK" || echo "BAD :("

I hope you see OK

Setup NEAR account

Register a new account on testnet.

You can create a new account using NEAR Testnet Wallet It’ll create a new account for you on the NEAR Testnet. The full account ID will be something like alice.testnet

As a Security Method for this workshop I’d recommend to use either Recovery Phrase or Email Recovery.

Authorize your account with near-cli

To allow using your account with near-cli you need to login from the terminal.

near login

This should open a new browser tab in the NEAR Testnet web-wallet and ask you give full access to your account. It’s fine to do, since we’re talking about Testnet account. You’ll need access from command line and near-cli for this workshop.

Once you authorized it in the browser, the command line should automatically succeed.

You should see something like this in the console:

Logged in as [ alice.testnet ] with public key [ ed25519:HP3oxy... ] successfully

Store your account ID into local variable

To help with this workshop let’s store your account ID into ACCOUNT_ID variable in bash. Replace <YOUR_ACCOUNT_ID> with your actual account ID that you created in the wallet, e.g. alice.testnet.



Let’s verify that you’ve successfully created the account and added it to near-cli.

Run the following:

near call --accountId=$ACCOUNT_ID workshop.testnet hello

If it succeeded then you’ve successfully completed your account setup. You should see something like this:

Scheduling a call: workshop.testnet.hello()
Receipt: 5rKUqv4t9JVQryvyfrgrFr8R48iV4sFX7nD56KUv6Vhb
	Log [workshop.testnet]: Hello, test-12331.testnet!
Transaction Id 8D2L4AdhbZ3CqWXMpRURsyqUTNJaBJDcFQsN4W8vU4y7
To see the transaction in the transaction explorer, please open this url in your browser
'Hello, test-12331.testnet!'


Generate comment with AI 2 nL
Scroll to Top