-
Notifications
You must be signed in to change notification settings - Fork 151
Migrate autopilot to alloy #3972
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
Conversation
jmg-duarte
left a comment
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.
TokenAddress is ok, BlockId -> BlockNumber are not the same so I'm curious to know your reasoning
| &self, | ||
| prospective_solver: eth::Address, | ||
| block: BlockId, | ||
| block: BlockNumber, |
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.
These are not the same
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.
BlockNumber is arguably more correct, though. Also the existing code converted a specific block number to the block id so the new code is still functionally equivalent.
BlockNumber -> BlockId
|
Changed BlockNumber -> BlockId as per the comments. Not yet convinced to change TokenAddress to just Address. |
Description
Migrates most of the autopilot crate to alloy. The only leftover is the
src/database/events.rsfile, mentioning EventMetadata which would require a wider migration of the event streaming, filtering and parsing machinery inshared/event_handling.rsChanges
Changes ethcontract types H160, U256, BlockId to corresponding alloy types (Address, B256, BlockNumber)
How to test
unit tests, e2e tests.