Skip to content

Conversation

avalonche
Copy link
Contributor

📝 Summary

Integrates with the flashblocks number contract

💡 Motivation and Context

Allow contracts onchain to fill orders based on the flashblock number. Also improves observability of when each Flashblock starts.


✅ I have completed the following steps:

  • Run make lint
  • Run make test
  • Added tests (if applicable)

@avalonche avalonche force-pushed the flashblocks-number-builder-tx branch 2 times, most recently from 184d0ce to b56aedf Compare September 11, 2025 17:57
Comment on lines +99 to +117
if let Some(flashblocks_number_contract_address) =
self.0.specific.flashblocks_number_contract_address
{
self.spawn_payload_builder_service(
ctx,
pool,
FlashblocksNumberBuilderTx::new(
signer,
flashblocks_number_contract_address,
flashtestations_builder_tx,
),
)
} else {
self.spawn_payload_builder_service(
ctx,
pool,
FlashblocksBuilderTx::new(signer, flashtestations_builder_tx),
)
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
if let Some(flashblocks_number_contract_address) =
self.0.specific.flashblocks_number_contract_address
{
self.spawn_payload_builder_service(
ctx,
pool,
FlashblocksNumberBuilderTx::new(
signer,
flashblocks_number_contract_address,
flashtestations_builder_tx,
),
)
} else {
self.spawn_payload_builder_service(
ctx,
pool,
FlashblocksBuilderTx::new(signer, flashtestations_builder_tx),
)
}
let builder_tx = if let Some(flashblocks_number_contract_address) = self.0.specific.flashblocks_number_contract_address {
FlashblocksNumberBuilderTx::new(
signer,
flashblocks_number_contract_address,
flashtestations_builder_tx,
)
} else {
FlashblocksBuilderTx::new(signer, flashtestations_builder_tx)
};
self.spawn_payload_builder_service(
ctx,
pool,
builder_tx,
)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

does this work? I think it'll cause complier errors

Copy link
Contributor

Choose a reason for hiding this comment

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

ah no due to the use of generics. like i mentioned on the other PR would be good to refactor this into an enum

Base automatically changed from builder-tx to main September 17, 2025 17:21
@avalonche avalonche force-pushed the flashblocks-number-builder-tx branch 2 times, most recently from 1660386 to 665a76c Compare September 17, 2025 21:49
@avalonche avalonche force-pushed the flashblocks-number-builder-tx branch from b05cd8d to fc58c48 Compare September 18, 2025 19:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants