This repo contains the code for building an auction house smart contract system from scratch using Solidity and Hardhat. It is intended as a learning resource rather than production-ready code.
In this tutorial, we will:
- Set up a Hardhat development environment for compiling, testing, and deploying Solidity contracts
- Implement core auction house functionality like creating auctions, placing bids, ending auctions, and transferring NFTs
- Write tests to ensure proper operation of the contracts
- Deploy the contracts on mumbai network using Hardhat
- Interact with the deployed contracts from a basic frontend
To follow along with the tutorial:
- Install dependencies:
npm install
- Compile contracts:
npx hardhat compile
- Run contract tests:
npx hardhat test
- Deploy on pacific sepolia testnet:
npx hardhat run scripts/deploy.ts --network pacific-sepolia
See the source code files and inline comments for explanations of the key concepts and steps.
This code is for educational purposes only and not audited for security. Do not use this on mainnet or with real funds.