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

Truffle-migtration-4.x/Validation of nested tuples doesn't work properly in contract's methods #6085

Closed
nikoulai opened this issue May 12, 2023 · 0 comments · Fixed by #6125
Assignees
Labels
4.x 4.0 related Bug Addressing a bug Investigate

Comments

@nikoulai
Copy link
Contributor

In the truffle project, in some of their tests, they pass in a method of a contract a nested tuple as an argument.

let result = await deployedContract.run([[7, -5], 3], 1, address, address);

However, during the migration to 4.x I noticed that the validation fails with the error:

    Web3 validator found 3 error[s]:
    value "7,-5" at "/0/1" must pass "uint256" validation
    value "7,-5,3" at "/1" must pass "uint8" validation
    value "1" at "/2" must pass "address" validation
   

which indicates that our library doesn't parse right the arguments.

This happens in two tests (however, they use the same call):

https://github.com/nazarhussain/truffle/blob/20b70910c79683cdb4b4d983e95b05476fed165c/packages/decoder/test/current/test/downgrade-test.js#L83

https://github.com/nazarhussain/truffle/blob/20b70910c79683cdb4b4d983e95b05476fed165c/packages/decoder/test/current/test/downgrade-test.js#L103

@nikoulai nikoulai added 4.x 4.0 related Bug Addressing a bug Investigate labels May 15, 2023
@avkos avkos self-assigned this May 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4.x 4.0 related Bug Addressing a bug Investigate
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants