Archives: Docs

Docs

There are several Actions an account can do, including sending the winner of the crossword puzzle NEAR using the Transfer Action

Login with NEARActions (including sending NEAR) We’re going to introduce a new Action: Transfer. In this chapter, we’d like the first person to solve the crossword puzzle to earn some prize money, sent in NEAR. Art by qiqi04.near We’ve already used Actions in the previous chapter, when we deployed and initialized the contract, which used …

There are several Actions an account can do, including sending the winner of the crossword puzzle NEAR using the Transfer Action Read More »

How to think about structs and enums when writing a Rust smart contract on NEAR

Login with NEARStructs and enums Overview Structs If you’re not familiar with Rust, it may be confusing that there are no classes or inheritance like other programming languages. We’ll be exploring how to use structs, which are someone similar to classes, but perhaps simpler. Remember that there will be only one struct that gets the …

How to think about structs and enums when writing a Rust smart contract on NEAR Read More »

Store multiple crossword puzzles using a specialized collection in NEAR called a LookupMap

Login with NEARUsing collections As mentioned in the previous chapter, the online Rust Book is a great reference for folks getting started with Rust, but there are concepts that differ when we’re dealing with the blockchain. One of these differences is the use of collections. The reference-level documentation of the Rust SDK explains this concept …

Store multiple crossword puzzles using a specialized collection in NEAR called a LookupMap Read More »

Add a simple frontend to the crossword puzzle that checks the solution’s hash

Login with NEARAdd a simple frontend This will be the final section in this chapter, where we’ll add a simple frontend using React and near-api-js to communicate with the smart contract. Dynamic duo of NEAR as the backend and React as a frontend.Art by dakila.near There will be three main files we’ll be working with: …

Add a simple frontend to the crossword puzzle that checks the solution’s hash Read More »

Scroll to Top