Prerequisites

Node v18+

You'll need to have Node.js version 18 or higher installed to follow this tutorial. Download link: Node v18+

Wallet funds

To deploy smart contracts to the blockchain, you’ll need to pay a gas fee, which requires holding the network’s native token β€” ICBX in the case of the ICB Network.

In this tutorial, we’ll be deploying the contract either to the ICB Mainnet or the ICB Testnet.

  • If you're using the mainnet, you’ll need to fund your wallet with ICBX tokens. These can be purchased from supported exchanges β€” visit the ICB Network page on CoinMarketCap to view available options.

  • If you’re deploying to the ICB Testnet, no real funds are needed. A faucet for acquiring free testnet tokens (ICBT) will be made available soon, enabling developers to test and experiment without any cost.

Make sure your wallet is properly funded depending on which network you plan to deploy to before continuing with the tutorial.

Before you can view your ICBX or ICBT balances in your wallet, you’ll need to add the ICB Network to your wallet by following the steps in the How to Connect with ICB Network section.

Additionally, make sure you're using a compatible wallet β€” refer to the Wallets section for supported options like MetaMask, Rabby, or Coinbase Wallet.

Before you can start deploying smart contracts to the ICB Network, you need to prepare your development environment by setting up a new Node.js project.

To initialize a Node.js project, run the following command:

npm init --y

Next, you’ll need to install Hardhat and set up a new project using it. To get started with Hardhat, run the following command to install it:

npm install --save-dev hardhat

To initialize a new Hardhat project, use the following command:

npx hardhat init

Choose "Create a TypeScript project" and press Enter to confirm the current directory as the project root.

When prompted, select "y" to add a .gitignore file and to load the sample project.

The setup process will take a few moments to complete.

Last updated