Skip to content

Conversation

@jmg-duarte
Copy link
Contributor

Description

This PR continues the migration from ethcontract types to alloy primitives, focusing on order
creation, signature handling, and test infrastructure. This is part of the broader effort to
adopt alloy as the primary Ethereum library across the codebase.

The changes primarily affect the e2e test suite and related infrastructure, migrating from
ethcontract::H160 and ethcontract::U256 to alloy::primitives::Address and
alloy::primitives::U256 respectively.

Changes

  • Migrate OrderCreation fields to use alloy Address and U256 types
  • Update signature recovery to use alloy types with .into_legacy() conversions where
    needed
  • Replace to_wei() with eth() helper throughout e2e tests
  • Update solver infrastructure (colocation.rs, solution.rs) to use alloy Address
  • Migrate JIT order signature handling to alloy types
  • Update test infrastructure in services.rs to accept alloy addresses
  • Remove unnecessary .into_alloy() conversions where values are already alloy types
  • Update CoW AMM tests to use alloy primitives
  • Migrate eth-flow, hooks, and limit order tests to alloy types
  • Update order validation and trade verifier to use alloy signatures

How to test

Existing tests

@jmg-duarte jmg-duarte requested a review from a team as a code owner November 30, 2025 14:48
Comment on lines 311 to 312
maker_amount: order_creation.buy_amount.try_into().unwrap(),
taker_amount: order_creation.sell_amount.try_into().unwrap(),
Copy link
Contributor

Choose a reason for hiding this comment

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

Where did multiplication go?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oooof great catch, this was probably migrated by Claude

Base automatically changed from jmgd/alloy/signature to main December 5, 2025 14:23
Copy link
Contributor

@m-sz m-sz left a comment

Choose a reason for hiding this comment

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

LGTM except for the missed multiplication as pointed out by @squadgazzz, will be happy to approve once it's fixed.

@jmg-duarte jmg-duarte requested review from m-sz and squadgazzz December 5, 2025 16:46
@jmg-duarte jmg-duarte added this pull request to the merge queue Dec 8, 2025
Merged via the queue into main with commit 2720da2 Dec 8, 2025
18 checks passed
@jmg-duarte jmg-duarte deleted the jmgd/alloy/order_creation branch December 8, 2025 10:39
@github-actions github-actions bot locked and limited conversation to collaborators Dec 8, 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