Skip to content

Conversation

@mdqst
Copy link

@mdqst mdqst commented Oct 18, 2025

PR Scope

fix type compatibility in encoding functions for ethers

Description

fixed a type issue causing ethers to reject JSBI values.

  • in encodeModifyLiquidities, added .toString() to deadline to ensure proper encoding.
  • in encodeERC721Permit, applied .toString() to tokenId, deadline, and nonce for the same reason.

these changes ensure compatibility with ethers when encoding uint256 arguments.

How Has This Been Tested?

manually verified that encoding works correctly and ethers no longer throws type errors when handling JSBI values.

Are there any breaking changes?

no breaking changes.

(Optional) Feedback Focus

confirm that this fix aligns with our preferred approach for handling JSBI → string conversions in contract interactions.

(Optional) Follow Ups

consider adding a small utility helper for consistent JSBI-to-string conversions across all encoding functions.

@mdqst mdqst requested review from a team as code owners October 18, 2025 10:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant