Prerequisites
- Node.js v18+
- A wallet with CTM for gas fees
Step 1: Create a Project
Step 2: Configure c8ntinuum Network
Updatehardhat.config.js:
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Step-by-step guide to deploying a smart contract on c8ntinuum using Hardhat.
mkdir my-project && cd my-project
npx hardhat init
hardhat.config.js:
require("@nomicfoundation/hardhat-toolbox");
module.exports = {
solidity: "0.8.20",
networks: {
continuum: {
url: "https://public-evm-rpc.c8ntinuum.com",
chainId: 8,
accounts: [process.env.PRIVATE_KEY],
},
},
};
// contracts/Counter.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;
contract Counter {
uint256 public number;
function setNumber(uint256 newNumber) public {
number = newNumber;
}
function increment() public {
number++;
}
}
// scripts/deploy.js
const hre = require("hardhat");
async function main() {
const Counter = await hre.ethers.getContractFactory("Counter");
const counter = await Counter.deploy();
await counter.waitForDeployment();
console.log("Counter deployed to:", await counter.getAddress());
}
main().catch(console.error);
PRIVATE_KEY=your_key npx hardhat run scripts/deploy.js --network continuum