Overview
This comprehensive tutorial guides you through building a full-featured auction dApp. You’ll learn:- Creating smart contracts with state management
- Writing and running tests
- Deploying contracts to testnet
- Building a React frontend
- Querying historical data with indexers
- Integrating NFTs and FTs
- Using factory patterns
GitHub Repository
View the complete auction example
What you’ll build
A complete auction platform where users can:- Create auctions for items or NFTs
- Place bids using NEAR or FT tokens
- Automatically transfer assets to winners
- View auction history and past bids
Prerequisites
Development environment
Development environment
- Rust
- JavaScript
NEAR account
NEAR account
Create a testnet account:
Tutorial series
Follow these tutorials in order to build the complete application:Part 1: Smart contracts
Basic auction contract
Create the core auction contract with bidding functionalityView tutorial
Testing
Write comprehensive tests using NEAR WorkspacesView tutorial
Deployment
Deploy to testnet and lock the contractView deployment guide
Part 2: Frontend
React setup
Create a React app and integrate NEAR walletView tutorial
Contract integration
Connect frontend to smart contractView integration guide
Indexing historical data
Use indexers to show auction historyView indexing guide
Part 3: Advanced features
NFT auctions
Add support for auctioning NFTsView NFT guide
FT bidding
Allow bids in fungible tokensView FT guide
Factory pattern
Deploy multiple auction contractsView factory guide
Contract structure
Here’s the core auction contract:Frontend integration
Connect to the contract from React:Key concepts learned
By completing this tutorial, you’ll master:State management
Storing and updating contract state efficiently
Payable functions
Accepting and handling NEAR token deposits
Cross-contract calls
Interacting with NFT and FT contracts
Frontend integration
Building React apps connected to NEAR
Testing
Comprehensive contract testing strategies
Indexing
Querying historical blockchain data
Next steps
Start the tutorial
Begin building the auction dApp
NFT tutorial
Learn to build NFT contracts
FT tutorial
Master fungible token contracts
More examples
Explore other NEAR examples