Setup Ika Localnet
Prerequisites
Before setting up the Ika localnet, ensure you have the following software installed on your system:
🦀 Rust
Install GuideThe programming language and toolchain required to build Ika
Quick install
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh🔧 Sui CLI
Sui DocumentationThe command-line interface for interacting with Sui blockchain
Recommended for macOS and Linux users
brew install suiClone the Ika Repository
First, you need to clone the Ika repository to your local machine. This will download all the necessary source code and configuration files.
Start the Sui Localnet
The Ika localnet depends on a running Sui localnet instance. This command starts a local Sui blockchain with a faucet for testing purposes.
Parameters explained:
--with-faucet: Enables the faucet service for obtaining test tokens--force-regenesis: Forces a new genesis block creation--epoch-duration-ms 1000000000000000: Sets a very long epoch duration for testing
Start the Ika Localnet
Once the Sui localnet is running, you can start the Ika localnet in a separate terminal. This will launch the Ika node that connects to the Sui localnet.
Parameters explained:
--bin ika: Specifies which binary to run from the workspace (the main Ika node executable)--release: Builds and runs the binary with optimizations enabled for better performance--no-default-features: Disables default Cargo features to run only the core functionality needed for localnet, for example removes min 16 cpu cores requirementstart: Command passed to the Ika binary to initialize and start the local node