Skip to content

Conversation

@m-sz
Copy link
Contributor

@m-sz m-sz commented Dec 11, 2025

Description

Migrates most of the autopilot crate to alloy. The only leftover is the src/database/events.rs file, mentioning EventMetadata which would require a wider migration of the event streaming, filtering and parsing machinery in shared/event_handling.rs

Changes

Changes ethcontract types H160, U256, BlockId to corresponding alloy types (Address, B256, BlockNumber)

How to test

unit tests, e2e tests.

@m-sz m-sz requested a review from a team as a code owner December 11, 2025 17:02
Copy link
Contributor

@jmg-duarte jmg-duarte left a 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,
Copy link
Contributor

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

Copy link
Contributor

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
@m-sz
Copy link
Contributor Author

m-sz commented Dec 12, 2025

Changed BlockNumber -> BlockId as per the comments. Not yet convinced to change TokenAddress to just Address.

@m-sz m-sz added this pull request to the merge queue Dec 15, 2025
Merged via the queue into main with commit df1b313 Dec 15, 2025
18 checks passed
@m-sz m-sz deleted the alloy-migration/autopilot branch December 15, 2025 13:50
@github-actions github-actions bot locked and limited conversation to collaborators Dec 15, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants