Skip to content

Conversation

@MartinquaXD
Copy link
Contributor

Description

Migrates zereox related logic to use alloy's bytes types (Address, B256). I didn't touch the U256 types yet since they tend to be more complicate.

How to test

existing e2e tests

@MartinquaXD MartinquaXD requested a review from a team as a code owner November 28, 2025 11:35
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.

LGTM overall but some notes

Comment on lines 412 to 432
IZeroex::LibNativeOrder::LimitOrder {
makerToken: zeroex_order.order().maker_token.into_alloy(),
takerToken: zeroex_order.order().taker_token.into_alloy(),
makerToken: zeroex_order.order().maker_token,
takerToken: zeroex_order.order().taker_token,
makerAmount: zeroex_order.order().maker_amount,
takerAmount: zeroex_order.order().taker_amount,
takerTokenFeeAmount: zeroex_order.order().taker_token_fee_amount,
maker: zeroex_order.order().maker.into_alloy(),
taker: zeroex_order.order().taker.into_alloy(),
sender: zeroex_order.order().sender.into_alloy(),
feeRecipient: zeroex_order.order().fee_recipient.into_alloy(),
pool: zeroex_order.order().pool.into_alloy(),
maker: zeroex_order.order().maker,
taker: zeroex_order.order().taker,
sender: zeroex_order.order().sender,
feeRecipient: zeroex_order.order().fee_recipient,
pool: zeroex_order.order().pool,
expiry: zeroex_order.order().expiry,
salt: zeroex_order.order().salt.into_alloy(),
},
IZeroex::LibSignature::Signature {
signatureType: zeroex_order.order().signature.signature_type,
v: zeroex_order.order().signature.v,
r: zeroex_order.order().signature.r.into_alloy(),
s: zeroex_order.order().signature.s.into_alloy(),
r: zeroex_order.order().signature.r,
s: zeroex_order.order().signature.s,
},
zeroex_order.order().taker_amount,
Copy link
Contributor

Choose a reason for hiding this comment

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

With all these .order() I wonder if we couldn't just make a function that returns a tuple with these 3 args and hides the .order() calls under a single one inside

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I ended up going with let order = zeroex_order.order() and referenced that variable instead.

@MartinquaXD MartinquaXD added this pull request to the merge queue Nov 28, 2025
Merged via the queue into main with commit b05b0f5 Nov 28, 2025
18 checks passed
@MartinquaXD MartinquaXD deleted the migrate-zereox-to-use-alloy-bytes-types branch November 28, 2025 12:40
@github-actions github-actions bot locked and limited conversation to collaborators Nov 28, 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