Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions bin/roundtrip.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ async fn main() -> eyre::Result<()> {
let provider = connect_provider(signer.clone(), config.ru_rpc_url.clone()).await?;
info!(signer_address = %signer.address(), "Connected to Signer and Provider");

// create an example order swapping 1 rollup USDC for 1 host USDC
// create an example order
let example_order = get_example_order(&config, signer.address(), args.rollup);

// sign & send the order to the transaction cache
Expand All @@ -53,7 +53,7 @@ async fn main() -> eyre::Result<()> {

// fill the order from the transaction cache
fill_orders(&signed, signer, provider, config).await?;
info!("Order filled successfully");
info!("Bundle sent to tx cache successfully; wait for bundle to mine.");

Ok(())
}
Expand Down Expand Up @@ -101,7 +101,10 @@ async fn send_order(
let send_order = SendOrder::new(signer.clone(), config.constants.clone())?;

// sign the order, return it back for comparison
let signed = order.sign(signer).await?;
let signed = order
.with_chain(config.constants.system())
.sign(signer)
.await?;

// send the signed order to the transaction cache
send_order.send_order(signed.clone()).await?;
Expand Down
7 changes: 5 additions & 2 deletions bin/submit_order.rs
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,10 @@ async fn send_order(
let send_order = SendOrder::new(signer.clone(), config.constants.clone())?;

// sign the order, return it back for comparison
let signed = order.sign(signer).await?;
let signed = order
.with_chain(config.constants.system())
.sign(signer)
.await?;
Comment on lines +106 to +109
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i'm a bit confused about this. if there's no chain id set, shouldn't signing the order outright fail? how was this working before?

Copy link
Contributor Author

@anna-carroll anna-carroll Oct 27, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it wasn't working. it got broken when SDK got updated to a later version, maybe #19? the code compiled without it but was running the script tested?


tracing::Span::current().record("signed_order_signature", signed.order_hash().to_string());
debug!(?signed, "Signed order contents");
Expand Down Expand Up @@ -139,7 +142,7 @@ async fn fill_orders(
// fill each individually
filler.fill_individually(orders.as_slice()).await?;

info!("Order filled successfully");
info!("Bundle sent to tx cache successfully; wait for bundle to mine.");

Ok(())
}
4 changes: 4 additions & 0 deletions src/filler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,10 @@ where

// encode it
let encoded = filled.encoded_2718();
info!(
tx_hash = filled.hash().to_string(),
"Rollup transaction signed and encoded"
);

// add to array
encoded_txs.push(Bytes::from(encoded));
Expand Down
Loading