Skip to content

Conversation

@jmg-duarte
Copy link
Contributor

@jmg-duarte jmg-duarte commented Nov 25, 2025

Description

This PR continues the migration from the ethcontract library to the alloy library by updating DTOs, database layer, and
validation logic to use alloy primitive types. This is part of a larger effort to modernize the codebase's Ethereum
interaction layer.

The changes replace primitive_types::{H160, U256} with their alloy equivalents (alloy::primitives::{Address, U256})
across DTOs, API models, and validation traits, adding necessary type conversions where needed.

Changes

  • Migrate solver_competition model types from H160/U256 to Address/alloy::U256
  • Update autopilot run loop to use IntoAlloy conversions for solver settlement data
  • Migrate orderbook DTO types (Order, Quote, ExecutedAmounts, Auction) to alloy primitives
  • Update LimitOrderCounting trait to use Address instead of H160
  • Update database layer to use alloy-specific conversion functions
  • Add .into_alloy() conversions in order validation logic
  • Update test fixtures to use alloy constructors (Address::repeat_byte, U256::from)

How to test

Existing tests

jmg-duarte and others added 7 commits November 25, 2025 10:45
Migrate types from ethcontract's primitive_types to alloy::primitives across DTOs, database layer, and validation:
- Replace H160 with Address in all DTOs and traits
- Replace U256 with alloy::primitives::U256 where needed
- Add IntoAlloy conversions in autopilot run loop
- Update database helpers to use alloy-specific conversions

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@jmg-duarte jmg-duarte requested a review from a team as a code owner November 25, 2025 14:49
Base automatically changed from jmgd/alloy/quote_data to main November 25, 2025 15:12
@jmg-duarte jmg-duarte changed the title Migrate DTOs and validation to alloy types [TRIVIAL] Migrate DTOs and validation to alloy types Nov 25, 2025
@jmg-duarte jmg-duarte added this pull request to the merge queue Nov 26, 2025
Merged via the queue into main with commit 0c78a1c Nov 26, 2025
16 checks passed
@jmg-duarte jmg-duarte deleted the jmgd/temp_main branch November 26, 2025 12:11
@github-actions github-actions bot locked and limited conversation to collaborators Nov 26, 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.

3 participants