Skip to content

fix: encoding issue with ABI parameters #356

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mdqst
Copy link

@mdqst mdqst commented Apr 15, 2025

Description

II’ve corrected an issue with the data being passed to encodeAbiParameters. Previously, we were directly passing this.calls, but now each Call object is mapped to an array of [to, value, data], which aligns with the tuple[] format expected by the ABI.

Additionally, I’ve ensured that the value is properly converted to a string before encoding, as the ABI encoder expects a string representation for numbers like uint256.

This should resolve any issues related to the encoding of ABI parameters and improve compatibility with the expected format.

(Optional) Feedback Focus

Reasons why I am confident in the fixes:

  • Encoding of the Call[] array: The ABI encoder expects an array of tuples for tuple[]. We need to ensure that each element is an array of three values (in your case: to, value, and data).

  • Converting bigint to string: Typically, ABI expects a string representation for numeric values of type uint256. Converting value to a string ensures that it will be correctly encoded.

@mdqst mdqst requested review from a team as code owners April 15, 2025 19:27
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