Samples of contracts repository.
- Auction
- AuctionNFTBase (or use AuctionNFTBaseUpgradeable for upgradeable contract)
Refer addresses.json for contracts' addresses
- Deploy an auction smart contract
- Deploy an NFT smart contract with setting an auction smart contract as a minter
- Use or inherit
AuctionNFTBase
for NFT contract
- Build a metadata server that returns NFT's metadata
- Create an auction web app to show NFTs and let users bid
- Create an auction
- Users bid
- Auction finishes when time comes
- Owner settles auction to transfer NFT and ETH
See Auction Contract Specification for speficiations and description of auction contract
Name | Used for |
---|---|
TypeScript | Test for solidity smart contract, script, tools |
solc | solidity commandline compiler for compiling solidity code, running test, etc |
Hardhat | Test for solidity smart contract, script, tools (Overview of Hardhat) |
โ ๏ธ Installyarn
if you have not installed. (Reference)
yarn
yarn test
Copy .env.example
to .env
and fill in fields
- (Reccomended) deployment with
auto-deploy
configuration for an NFT auction contract, verify etherscan and write addresses to theaddresses.json
.auto-deploy
sets gas info automatically. Deployment withoutauto-deploy
requires to configure gas info manually.
yarn task:deploy-and-configure --network [network] --auto-deploy
# ex.) for goerli
yarn task:deploy-and-configure --network goerli --auto-deploy
- deployment with manual configuration for an NFT auction contract, verify etherscan and write addresses to the
addresses.json
.
yarn task:deploy-and-configure --network [network]
# ex.) for goerli
yarn task:deploy-and-configure --network goerli
Use Remix to deploy.
In case you only want to verify a contract for block explorer.
yarn task:verify --contract [path:contractName] [contractAddress] --network [network]
# ex.) contract on goerli
yarn task:verify --contract contracts/proxies/AuctionProxy.sol:AuctionProxy 0xF99a8b2DF498bc3ea2044f1943C210A4fd946b2E --network goerli
This smart contract follows various gas optimization methods. Some of the methods can be found here.