Run Remus example

Remus transactions involve multiple Ethereum-like rollup transactions bundled within a single Solana transaction. This structure allows for cross-rollup atomic transactions.

Run Remus example using

cargo run --example remus

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