Archives: Docs

Docs

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 »

Set up Rust, get a NEAR testnet account, NEAR CLI, and get a basic smart contract skeleton ready

Login with NEARGetting started In this tutorial we’ll get a testnet account, use NEAR CLI RS to add a key to our computer’s file system, and set up the basic skeleton of a Rust smart contract. Setting up Rust You may have found the online Rust Book, which is a great resource for getting started …

Set up Rust, get a NEAR testnet account, NEAR CLI, and get a basic smart contract skeleton ready Read More »

Updating the Frontend

Login with NEARNow we’ve updated the contract to include an NFT as a reward and changed the contract such that it accepts bids in fungible tokens, we need to update the frontend accordingly. Getting the data from the contract Now we have a function to output the whole contract state we will call this function …

Updating the Frontend Read More »

Auction factory

Login with NEARSince an auction contract hosts a single auction, each time you would like to host a new auction you will need to deploy a new contract. Rather than finding the compiled WASM file, creating a new account, deploying the contract, and then initializing it each time, you can use a factory contract to …

Auction factory Read More »

Winning an NFT

Login with NEARNo one will enter an auction if there’s nothing to win, so let’s add a prize. Why not an NFT? NFTs are uniquely identifiable, easily swappable and their logic comes from an external contract so the prize will exist without the auction contract. Let’s get to work! Listing the NFT When we create …

Winning an NFT Read More »

Bidding with FTs

Login with NEARTo further develop this contract we will introduce another primitive: fungible tokens. Instead of placing bids in $NEAR tokens, they will be placed in FTs. This may be useful if, for example, an auctioneer wants to keep the bid amounts constant in terms of dollars as an auction is carried out, so bids …

Bidding with FTs Read More »

Scroll to Top