Module 5 - Setting the Configuration
Initializations
Section titled “Initializations”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:
-
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.
- The
-
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.
- The
-
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.
- The
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.
How to generate solana keypair?
Section titled “How to generate solana keypair?”To generate your Solana keypair, first install Solana tool suite using Solana CLI.
sh -c "$(curl -sSfL https://release.anza.xyz/stable/install)"
Now, to check your solana keypair details, run the below command
solana config get
You should see output like the following:
Config File: /Users/test/.config/solana/cli/config.ymlRPC URL: https://api.mainnet-beta.solana.comWebSocket URL: wss://api.mainnet-beta.solana.com/ (computed)Keypair Path: /Users/test/.config/solana/id.jsonCommitment: confirmed