How to run Ika localnet

How to run Ika localnet

As the doc don't really speak about localnet, here is the correct way to run it

Install Rust

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

Setup Sui CLI

Install Sui | Sui Documentation
Install the Sui framework and its required prerequisites on your system.

Clone Ika repo

git clone https://github.com/dwallet-labs/ika.git
cd ika

Build Ika smart contract with Sui cli

without this step you will hand up having error if you follow the ika official docs

cd contracts && for d in dwallet_utils ika_common ika_dwallet_2pc_mpc ika_system ika ika_common; do (cd "$d" && sui move build); done

Start the Sui Localnet

RUST_LOG="off,sui_node=info" sui start --with-faucet --force-regenesis --epoch-duration-ms 1000000000000000

Start the Ika Localnet

cargo run --bin ika --release --no-default-features -- start

Get Ika package / object Id

cat ~/.ika/ika_config/network.yaml| grep _id

You are good to go now !