Archives: Docs

Docs

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 »

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 »

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 »

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 »

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 »

Scroll to Top