Docs Category: auction

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 »

Creating a Frontend

Login with NEARNow that we have successfully created a contract, it’s time to build a frontend to provide a user-friendly interface for interacting with it. Up until now, we have been using the CLI to send transactions and view the contract’s state. However, frontends offer a more intuitive way for end users to interact with …

Creating a Frontend Read More »

Indexing Historical Data

Login with NEARIn our frontend, we can easily display the previous bid since it’s stored in the contract’s state. However, we’re unable to see previous bids to the auction. An indexer is used to fetch historical data from the blockchain and store it in a database. Since indexers can take a while to set up …

Indexing Historical Data Read More »

Scroll to Top