ICE Blockchain
Search…
⌃K

Running ICE blockchain locally

This article covers the procedures required to set up a development node for testing locally.
Developers looking to build smart contracts on ICE blockchain can run ICE blockchain locally, inspect the blockchain state, and test their code. Following are the steps to setup development node locally.

Install Rust

If this is the first time you are installing Rust, run the following command.
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
If you already have rust installed, please run the following command to update to the latest version
rustup update

Configure your Rust environment

$rustup update 1.58
$rustup default 1.58
$rustup toolchain add nightly-2022-01-16
$rustup target add wasm32-unknown-unknown --toolchain nightly-2022-01-16
Depending on the OS, Wasm toolchain might require manual installation.
E.g. on macOS (Big Sur v11.6), Wasm is added using following command
rustup target add wasm32-unknown-unknown --toolchain nightly-x86_64-apple-darwin

Clone ICE node

The ice-substrate repo's main branch contains the latest ICE code
git clone https://github.com/web3labs/ice-substrate.git

Build the development node

cargo build --release

Run the local development node

./target/release/ice-node --dev
Once your node is running you should be able to see output similar to this on your terminal

Connecting to Polkadot.js

Now you can use polkadot explorer to communicate with the node. The websocket and RPC url for the locally running node are
  • WS - ws://127.0.0.1:9944
  • HTTP - http://127.0.0.1:9933
NOTE: More about using polkadot explorer is here

Configuring Metamask

Once the node is started and running , you can configure your metamask to the test node to start deploying smart contracts and building dapps on test node.
Configure network in your metamask according to following settings:
  • Network Name: Ice local node
  • RPC URL: http://127.0.0.1:9933
  • ChainID: 552
  • Symbol (Optional):ICZ
NOTE: More about configuring metamask is here
Now you will be able to make RPC calls to the local ICE node, deploy Solidity smart contracts, interact with the smart contracts.