npx hardhat
. Select Create a JavaScript project and agree to install the sample project’s dependencies. This will create a sample project directory with a smart contract draft.
contracts
directory. In the directory, create your Dutch auction smart contract: DutchAuction.sol
.
onlyOne
mapping to ensure that each address can only own one NFT from your collection.price()
uses block.timestamp
to calculate the price of an NFT each time the safeMint
function is called.RPC_URL
— your Cronos node HTTPS endpoint deployed with Chainstack. See also View node access and credentials.PRIVATE_KEY
— the private key of your MetaMask wallet that has a sufficient amount of TCRO. See also the Cronos faucet.API_KEY
— a Cronos API key to verify the deployed smart contract using the Cronoscan and Etherscan plugins. Create an API key in the Cronos blockchain explorer.dotenv
— library to import your sensitive data from the environment file securelyCronos_testnet
— the testnet to deploy the contract tourl
— your Cronos node HTTPS endpoint imported from the environment fileaccounts
— your MetaMask wallet private key imported from the environment fileetherscan
— your Cronos API key imported from the environment file to verify your contractDeployDutch.js
file.
DeployDutch.js
file to add the basic deployment script of Hardhat: