Skip to content
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

No support for custom tuples #5

Open
ashish10677 opened this issue Oct 17, 2024 · 0 comments
Open

No support for custom tuples #5

ashish10677 opened this issue Oct 17, 2024 · 0 comments

Comments

@ashish10677
Copy link

Problem

If we want to generate a merkle tree with a custom datatype:

const tree = StandardMerkleTree.of(values, ["bytes4", "tuple(uint256 chainId, uint256 amount, address target, bytes values)"]);

The current implementation doesn't support it.
It fails because the function AbiPack doesn't accept components which is required while creating argument type.

typ, err := abi.NewType(v, "string", nil)

typ, err := abi.NewType(v, "string", nil)

Instead of passing nil, for tuple type we need to pass the components of type []abi.ArgumentMarshaling

@ashish10677 ashish10677 changed the title No support for custom Tuples No support for custom tuples Oct 17, 2024
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

No branches or pull requests

1 participant