Run Remus Example
How to run the Remus transaction example, including helper methods and expected output.
Remus transactions involve multiple EVM L2 transactions bundled within a single Solana transaction.
This functionality enables atomic transactions across L2s.
Fund Necessary Wallets
Ensure the from address (0xae600d1f94680ef43ab12f8d618f8aafc208fe25
) has sufficient funds on both Rome Devnet Esquiline (Chain ID 121212
) and Rome Devnet Subura (Chain ID 121213
).
Otherwise, use the instructions linked here to fund this wallet on both networks.
Run Remus Example
RUST_LOG=info cargo run --example remus
Example Output
INFO remus: https://explorer.solana.com/tx/5iAoQ4pc4ydAyf3yaSAELcF971sDojLw7pCKw2VxHdikA6FnXFtEihXptDQS9KHhUc5ETuR5kSZNYtGKHCnMpzRT?cluster=devnet
The results show two L2 transactions executed atomically within a single Solana transaction.
Solana Transaction
The Solana Devnet block explorer shows the Remus Solana transaction below. It contains two instructions executed atomically within a single Solana transaction.
Instruction 3 logs show transfer from wallet
ae600d1f94680ef43ab12f8d618f8aafc208fe25
to walletb94f5374fce5edbc8e2a8697c15331677e6ebf0b
on the Rome Esquiline chain.Instruction 4 logs show transfer from wallet
ae600d1f94680ef43ab12f8d618f8aafc208fe25
to walletb94f5374fce5edbc8e2a8697c15331677e6ebf0b
on the Rome Subura chain.

L2 Transactions
Rome Esquiline block explorer shows the corresponding L2 transaction below between the same wallets from ae600d1f94680ef43ab12f8d618f8aafc208fe25
to b94f5374fce5edbc8e2a8697c15331677e6ebf0b
.

Rome Subura block explorer shows the corresponding L2 transaction below between the same wallets from ae600d1f94680ef43ab12f8d618f8aafc208fe25
to b94f5374fce5edbc8e2a8697c15331677e6ebf0b
.

Explanation of Methods Used
We explain the methods used in rome-sdk/examples/remus.rs below.
Main Methods
The Rome struct will be used to compose transactions. Initialize it with your configuration:
let config = RomeConfig::load_json(common::CONFIG_PATH.parse()?).await?;
let rome = Rome::new_with_config(config).await?;
Create a RemusTx transaction and then compose it using the Rome transaction structure:
let remus_tx = RemusTx::new(txs);
let mut rome_tx = rome.compose_cross_rollup_tx(remus_tx).await?;
Send the transaction to the Solana network:
let signature = rome.send_and_confirm(&mut *rome_tx).await?;
Helper Methods
The helper methods are same as in the Rhea example.
Last updated
Was this helpful?