For the complete documentation index, see llms.txt. This page is also available as Markdown.

Deploy smart contract on Kaia

This guide covers adding the network to a browser wallet, then deploying a simple contract using Foundry and Hardhat — pick whichever you prefer on Kaia.

Kaia is EVM-compatible, so contracts deploy with standard Ethereum tooling such as Foundry, Hardhat, and Remix. This guide covers adding Kaia to a wallet and deploying a first contract with Foundry and Hardhat through a GetBlock endpoint. Kaia contracts are verified either through Sourcify or through the KaiaScan verification API.

Prerequisites

  • A wallet holding KAIA for gas (see Add Network to Your Wallet below)

  • A GetBlock access token from the GetBlock dashboard, used as <ACCESS-TOKEN> in the endpoint https://shared.eu-central-1.getblock.io/<ACCESS-TOKEN>/

  • Node.js version 20 or later, for Hardhat

  • A funded deployer address, on Kairos Testnet for testing (see Testnet Faucets)

Network Details

Property
Kaia Mainnet
Kairos Testnet

Chain ID

8217 (0x2019)

1001 (0x3e9)

RPC URL

https://shared.eu-central-1.getblock.io/<ACCESS-TOKEN>/

https://shared.eu-central-1.getblock.io/<ACCESS-TOKEN>/

Currency Symbol

KAIA

KAIA

Kaia is not pre-configured in MetaMask by default, and is well supported by the Kaia Wallet extension. To use MetaMask, add Kaia manually or through an add-network button before it appears in the wallet.

Add Network to Your Wallet

1

Open your wallet

Open the Kaia Wallet extension, or MetaMask.

2

Open the network dropdown

Click the network dropdown at the top of the wallet.

3

Add a network manually

Click Add network, then Add a network manually.

4

Enter network details

Enter the network details from the Prerequisites section above.

5

Save and switch networks

Save and switch to the newly added network.

Deploy with Foundry

1

Install Foundry

2

Create a project

3

Create a contract

Create src/HelloKaia.sol:

4

Deploy

5

Verify with Sourcify

Foundry has native Sourcify support. Verify the deployed contract against Sourcify:

Deploy with Hardhat

1

Create a project

Select a JavaScript project when prompted.

2

Configure networks and verification

KaiaScan exposes an Etherscan-compatible verification endpoint, configured as a custom chain. The API key value is not used and can be any placeholder.

3

Create a contract

Create contracts/HelloKaia.sol:

4

Compile and Deploy

Create scripts/deploy.js:

Then compile and deploy:

5

Verify on KaiaScan

On success, the output links to the verified contract on KaiaScan.

Testnet Faucets

Kairos Testnet

  • Kaia Faucet — dispenses Kairos test KAIA to a connected wallet (verify)

Last updated

Was this helpful?