Prerequisites

  • Node.js v20+
  • A wallet with CTM for gas fees
This guide targets Hardhat 2. The hh2 npm tags install Hardhat 2 and @nomicfoundation/hardhat-toolbox 6.x, which includes hardhat-ethers and hardhat-verify. The untagged hardhat package now installs Hardhat 3, which uses an ESM config and a different setup, so the steps below do not apply to it.

Step 1: Create a Project

Select “Create a JavaScript project” when prompted.

Step 2: Configure c8ntinuum Network

Update hardhat.config.js:

Step 3: Write Your Contract

Step 4: Write Deploy Script

Step 5: Deploy

Step 6: Verify (Optional)

See Verify with Hardhat for contract verification.