Run Romulus example
Romulus transactions involve multiple Ethereum-like rollup transactions and Solana transactions bundled within a single Solana transaction. This structure allows for cross-chain atomic transactions.
Run Romulus example using
Methods used
We explain the methods used in rome-sdk/examples/romulus.rs below.
Main methods
The Rome struct will be used to compose transactions. Initialize it with your configuration:
Create a Romulus transaction and then compose it using the Rome transaction structure. Specify the Ethereum rollup transactions, Solana instructions, and signers needed for the Solana instructions:
Send the transaction to the Solana network:
Helper methods
Create Solana wallet using
Create Solana transfer instruction using
Create Solana transaction signers using
Example Results
Solana Transaction
The Solana block explorer shows the Solana transaction below (link here). This transaction contains three relevant instructions all executed atomically within this single Solana transaction.
Instruction 3 logs show transfer from wallet ae600d1f94680ef43ab12f8d618f8aafc208fe25 to wallet b94f5374fce5edbc8e2a8697c15331677e6ebf0b for chain 200003.
Instruction 4 logs show transfer from wallet ae600d1f94680ef43ab12f8d618f8aafc208fe25 to wallet b94f5374fce5edbc8e2a8697c15331677e6ebf0b for chain 200004.
Instruction 5 shows SOL transfer from one Solana wallet to another.
Rollup Transactions
The Rollup block explorers show these rollup transactions for chains 200003 and 200004 from wallet ae600d1f94680ef43ab12f8d618f8aafc208fe25 to b94f5374fce5edbc8e2a8697c15331677e6ebf0b.
Last updated