Run Rhea Example
Rhea enables fair sequencing of rollup transactions. Rhea transaction encapsulates a single Ethereum-like rollup transaction within a Solana transaction.
Run Rhea example using:
Ensure the from address (0xae600d1f94680ef43ab12f8d618f8aafc208fe25) has sufficient funds, otherwise airdrop to from address.
Methods Used
We explain the methods used in rome-sdk/examples/rhea.rs below.
Main Methods
The Rome struct will be used to compose transactions. Initialize it with your configuration:
Create a RheaTx transaction and then compose it using the Rome transaction structure:
Send the transaction to the Solana network:
Helper Methods
To enable tracing and logging for easier debugging, initialize a tracing subscriber using:
Log relevant information using:
Create Ethereum wallet using:
Construct a transfer transaction using:
The steps involved in transaction construction are:
Retrieve to and from addresses
Obtain the nonce
Create a transaction request (using ethers library)
Estimate gas fees
Sign the transaction
Example Results
Solana Transaction
Rollup Transaction
The Rollup block explorer shows this rollup transaction for chain 200004 from wallet ae600d1f94680ef43ab12f8d618f8aafc208fe25 to b94f5374fce5edbc8e2a8697c15331677e6ebf0b.
Last updated
Was this helpful?