Deploy Your First Contract

This guide walks through deploying a smart contract to Igra using Hardhat or Foundry. Both work out of the box with no modifications.

Prerequisites

  • Node.js 18+ (for Hardhat) or Foundry installed

  • Testnet iKAS in your wallet (get some here)

  • Private key for deployment


Option 1: Hardhat

Setup

mkdir igra-demo && cd igra-demo
npm init -y
npm install --save-dev hardhat @nomicfoundation/hardhat-toolbox
npx hardhat init

Select "Create a JavaScript project" when prompted.

Configure Network

Edit hardhat.config.js:

Write Contract

Create contracts/HelloIgra.sol:

Deploy Script

Create scripts/deploy.js:

Deploy

Output:

Verify Contract

Add to hardhat.config.js for verification:


Option 2: Foundry

Setup

Configure Network

Create or edit foundry.toml:

Write Contract

Create src/HelloIgra.sol:

Deploy

Output:

Verify Contract


Interact with Your Contract

Using Hardhat Console

Using Cast (Foundry)


Things to Note

Fast confirmations: Transactions confirm in under 1 second. You will see your deployment almost instantly.

Low fees: Gas costs are minimal. The base fee is 1 wei.

Standard EVM: Any Solidity or Vyper contract that works on Ethereum will work on Igra without changes.

Transaction size: Keep deployment bytecode under 21 KB. Large contracts may need to be split.


Next Steps

Last updated