-
Notifications
You must be signed in to change notification settings - Fork 24
Add support for flashblocks number contract builder tx #256
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
184d0ce
to
b56aedf
Compare
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), | ||
) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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, | |
) |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
c461c24
to
6c8681d
Compare
1660386
to
665a76c
Compare
Co-authored-by: Solar Mithril <[email protected]>
Co-authored-by: Solar Mithril <[email protected]>
Co-authored-by: Solar Mithril <[email protected]>
b05cd8d
to
fc58c48
Compare
📝 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:
make lint
make test