Skip to main content
This guide explains how a rollup can prepare for and integrate Initia’s VIP.

Prerequisites

1

Deploy Your Rollup and Install Minitiad CLI

First, launch your rollup. For local deployments, you can use the Weave CLI to launch a rollup.Once your rollup is running, fetch the rollup’s version by running the following command:
The output will be in the format below. The version field is the rollup’s version.
Next, install the minitiad CLI that matches the rollup’s version.
2

Create an operator and VIP contract deployer account

Next, create a VIP operator account and a VIP contract deployer account to deploy the VIP scoring contract.
  • The VIP operator account will receive the VIP operator rewards
  • The VIP contract deployer account will handle the deployment of the VIP scoring contract.
If you have an existing account for these roles, use the --recover option to recover it with a BIP39 mnemonic phrase. If you do not have a mnemonic phrase, create a new account without this option.
Alternatively, if you want to use a Ledger hardware wallet, you can use the --ledger option to create an account that uses Ledger for signing transactions.
3

Deploy the VIP Scoring Contract

In this step, you will deploy the VIP scoring contract that tracks addresses and scores. To do so, follow the steps based on your rollup’s VM.The VIP scoring contract must specify the stage at which the rollup participates in VIP when deployed. To retrieve the current VIP stage, select the example for your network and run the curl request or the TypeScript example. Both query the VIP module store on L1 and return the current stage information.
curl
initia.js
Clone the vip-score-evm repository.
Compile the VIPScore.sol contract. If you do not have Foundry installed, follow the Foundry installation instructions.
Deploy the contract. Before running the script, set these environment variables:
  • JSON_RPC_URL: your rollup’s RPC endpoint
  • PRIVATE_KEY: the VIP contract deployer key
  • INIT_STAGE: the starting VIP stage number
To get INIT_STAGE, you can check the current VIP stage by using the curl request or the TypeScript example provided in the previous note.
Save the deployed contract address. You will need it for the VIP whitelist proposal.
4

Register the Rollup in the Initia Registry

Clone the Initia Registry repository.
Then, add your rollup information to the registry repo before submitting a pull request. For detailed instructions, see the Initia Registry page.
5

Whitelist VIP Proposal

Draft a forum post with the whitelist template. Include your operator address, scoring policy, and VIP score contract address. See the Whitelisting Rollup for VIP guide for the full procedure. This proposal is required only for mainnet rollups. For testnet deployments, contact the Initia team directly.
6

Operate the VIP Scoring Contract

Each VIP stage follows the same sequence of steps. Use the methods below to update scores and finalize each stage.
ActionMethodDescription
Update scoresupdateScores(stage, addrs[], amounts[])Update the scores for a list of addresses in the specified stage
Finalize stagefinalizeStage(uint64 stage)Finalize the given stage, preventing further changes and prepares the contract for the next stage
This code snippet shows how to use the viem library to interact with the VIP scoring contract:
vip-score-evm-tutorial.ts
To get the EVM chain ID, call the eth_chainId JSON-RPC method. For example, using curl: