🩶Ritual

Update your system:

sudo apt update && sudo apt upgrade -y

Install needed tools:

sudo apt -qy install curl git jq lz4 build-essential screen

Install docker & docker compose:

sudo apt install docker.io
sudo curl -L "https://github.com/docker/compose/releases/download/v2.24.5/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose

Clone repository:

# Clone locally:
git clone https://github.com/ritual-net/infernet-container-starter

# Navigate to the repository
cd infernet-container-starter

Run the hello-world container:

We will use a screen to ensure it always runs.

screen -S ritual
project=hello-world make deploy-container

Detach from the screen: Ctrl + A, then press D

Register wallet:

Go on basescan and enter our coordinator address: 0x8d871ef2826ac9001fb2e33fdd6379b6aabf449c

Then, go to Contract > Write Contract And click Connect to Web3 & connect your wallet to basescan.

Next, go to registerNode enter your own wallet's address and click Write . Ensure that the transaction sent from your wallet succeeds.

Wait an hour, and activate your node: in the same basescan page, go to activateNode and click Write . Ensure that the tx succeeds, and that your node is activated.

Reconfigure the files:

Change config.json :

nano ~/infernet-container-starter/deploy/config.json
  • change coordinator_address to 0x8d871ef2826ac9001fb2e33fdd6379b6aabf449c

  • change private_key to your wallet's private key.

Change Makefile :

nano ~/infernet-container-starter/projects/hello-world/contracts/Makefile

Change Deploy.s.sol:

nano ~/infernet-container-starter/projects/hello-world/contracts/script/Deploy.s.sol
  • change coordinator_addressto 0x8D871Ef2826ac9001fB2e33fDD6379b6aaBF449c

Update containers:

docker restart anvil-node
docker restart hello-world
docker restart deploy-node-1
docker restart deploy-fluentbit-1
docker restart deploy-redis-1

Deploy contracts:

make deploy-contracts project=hello-world
  • Look at the logs here, and save what address was your SaysGM/SaysHello deployed to:

Then go to CallContract.s.sol and change the SaysGM address to the one you got above:

nano ~/infernet-container-starter/projects/hello-world/contracts/script/CallContract.s.sol

Then you can call your contract with the same command:

make call-contract project=hello-worldinfernet

Do not forget to periodically check the logs:

docker logs <CONTAINER ID>
screen -r ritual

Last updated