Skip to main content
TLDR:
  • This tutorial shows how to create and deploy a Dutch auction NFT contract on Cronos Mainnet using Hardhat.
  • The price starts high and lowers at fixed intervals; buyers can mint an NFT once the price is acceptable.
  • You’ll set up Hardhat, code and compile the contract, then verify and interact with it using the Cronos Explorer.
  • Because this deploys to Cronos Mainnet, deployment and minting spend real CRO — fund your wallet with a small amount to start.

Main article

A Dutch auction is a type of an auction in which the initial price of an NFT starts at its ceiling and lowers by a small amount at set intervals. Buyers make bids at reduced prices until the end of an auction. A Dutch auction continues until either all assets are sold out or the auction time ends. The objective of this tutorial is to familiarize you with the Cronos network, Hardhat, and Dutch auction smart contracts. In the end of the tutorial, you will be able to create a simple Dutch auction smart contract to help you sell your NFTs to the highest bidder. Specifically, in this tutorial, you will:
  • Create a Dutch auction smart contract.
  • Deploy and verify the contract on Cronos Mainnet through a node deployed with Chainstack.
  • Interact with the deployed contract.

Prerequisites

Overview

To get from zero to deploying your own Dutch auction smart contract on Cronos Mainnet, do the following:
  1. With Chainstack, create a .
  2. With Chainstack, join Cronos Mainnet.
  3. With Chainstack, access your Cronos node endpoint.
  4. With Hardhat, set up your development environment.
  5. With Hardhat, create and compile your Dutch auction contract.
  6. With MetaMask, fund your wallet with CRO to cover deployment and minting gas.
  7. With Hardhat, deploy your Dutch auction contract.
  8. With the Cronos Explorer, interact with your Dutch auction contract.

Step-by-step

Create a public chain project

See Create a project.

Join Cronos Mainnet

See Join a public network.

Get your Cronos node endpoint

See View node access and credentials.

Install Hardhat

See Hardhat documentation.

Initialize a Hardhat project

In your project directory, run 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.

Install additional dependencies

To complete the project, we need to install several additional dependencies. The OpenZeppelin Contract library allows you to inherit smart contracts. To install it, run:
The dotenv library allows you to export and keep sensitive data securely. To install it, run:
Contract verification uses @nomicfoundation/hardhat-verify, which is already bundled in the @nomicfoundation/hardhat-toolbox the sample project installed — no separate verification plugin is needed. You point it at the Cronos Explorer in the Hardhat config below. You need to create an environment file to store your sensitive data with the project. To create it, in your project directory, run:

Create and compile the contract

  1. Navigate to your previously created project directory and go to the contracts directory. In the directory, create your Dutch auction smart contract: DutchAuction.sol.
    The contract implementation is the following:
    • The price of an NFT starts at 10 ether and decreases to 5 ether over 500 minutes. A maximum of 100 NFTs can be minted.
    • The contract uses the onlyOne mapping to ensure that each address can only own one NFT from your collection.
    • The contract sets the values of the start and end price, which cannot be changed later on.
    • The function price() uses block.timestamp to calculate the price of an NFT each time the safeMint function is called.
    • If all the required conditions are satisfied, the wallet address gets an NFT minted.
  2. To compile the contract, in your project directory, run:

Fund your account

To deploy your smart contract on Cronos Mainnet, the deploying wallet needs CRO to cover gas. Fund it with a small amount of CRO from an exchange or an existing wallet.

Set up the environment and configuration files

  1. In your project directory, navigate to a previously created environment file and edit it to add the following data: Example of the environment file data:
  2. In your project directory, navigate to the Hardhat configuration file and replace the current data with the following data:
    where
    • dotenv — library to import your sensitive data from the environment file securely
    • cronos — the Cronos Mainnet network to deploy the contract to
    • url — your Cronos node HTTPS endpoint imported from the environment file
    • accounts — your MetaMask wallet private key imported from the environment file
    • etherscan — Cronos Explorer verification settings: your API key plus the customChains entry that points hardhat-verify at the Cronos Explorer

Deploy the Dutch auction contract

  1. In your project directory, navigate to the scripts directory and create the DeployDutch.js file.
  2. Edit the DeployDutch.js file to add the basic deployment script of Hardhat:
  3. In your project directory, run the following script:
    The contract will deploy and the terminal will return the contract address. Use this address to verify and interact with your contract.

Verify your contract on Cronos Mainnet

Once your contract is deployed, verify it on Cronos Mainnet. In your terminal, run:
where CONTRACT_ADDRESS your contract address returned at the previous step

Interact with the contract

Now that your contract is verified, the Cronos Explorer is effectively a front-end instance for your contract.

Conclusion

This tutorial guided you through the basics of using Hardhat to deploy a Dutch auction smart contract to Cronos Mainnet, and verify it against the Cronos Explorer with hardhat-verify. Because this deploys to Cronos Mainnet, every deployment and mint spends real CRO — keep amounts small while you experiment.

About the author

Priyank Gupta

Priyank Gupta Developer Advocate @ Chainstack
BUIDLs on Ethereum, zkEVMs, and The Graph protocol
Part-time Rust aficionado
Last modified on July 7, 2026