Skip to content

Module 5 - Setting the Configuration

This part helps in setting the SDK configuration information about Solana, Rollups, and Payers.

Update the rome-sdk/example.config.json to specify:

{
"rpc_url": " https://rome.testnet.romeprotocol.xyz",
"commitment": "confirmed",
"rollups": {
"200018": "RD2Gg7Lcnv62XmRHAzxh6fQQfMRzHtN5LeKPVBhYU5S"
},
"payers": [
{
"payer_keypair": "/Users/username/.config/solana/id.json",
"number_holders": 64
}
]
}

Let’s break down each configuration field in detail:

  1. RPC URL Configuration:

    • The rpc_url field points to Rome’s Testnet Solana node at “https://rome.testnet.romeprotocol.xyz”.
    • This endpoint allows your application to interact with Rome’s Solana testnet infrastructure.
    • It’s used for submitting transactions and querying the network state.
  2. Rollups Configuration:

    • The rollups field contains a mapping of Chain IDs to their corresponding Solana Program IDs.
    • Each Chain ID (like 200002, 200003, etc.) represents a specific rollup network.
    • The Solana Program ID (“RD2Gg7Lcnv62XmRHAzxh6fQQfMRzHtN5LeKPVBhYU5S”) is currently the same for all rollups.
    • Chain ID 200001 is reserved for Rome EVM.
    • You must specify all rollups you plan to interact with in your application.
  3. Payer Configuration:

    • The payers section is crucial for transaction execution:
      • payer_keypair: Path to your Solana wallet’s keypair file. (e.g., “/Users/username/.config/solana/id.json”)
      • number_holders: Determines parallel transaction capacity. (e.g., 64)
    • The payer account needs sufficient SOL balance as it will:
      • Pay for transaction execution fees on Solana.
      • Cover account creation costs.
      • Fund any necessary program interactions.
    • Higher number_holders allows more concurrent transactions but requires more SOL balance.

Note: Make sure to keep your payer keypair secure and never commit it to version control. It’s recommended to maintain separate keypairs for development and production environments.

To generate your Solana keypair, first install Solana tool suite using Solana CLI.

Terminal window
sh -c "$(curl -sSfL https://release.anza.xyz/stable/install)"

Now, to check your solana keypair details, run the below command

Terminal window
solana config get

You should see output like the following:

Config File: /Users/test/.config/solana/cli/config.yml
RPC URL: https://api.mainnet-beta.solana.com
WebSocket URL: wss://api.mainnet-beta.solana.com/ (computed)
Keypair Path: /Users/test/.config/solana/id.json
Commitment: confirmed