Skip to content

AbiCoder accept arrays of values when it shouldn't #3659

Answered by ricmoo
fvictorio asked this question in Q&A
Discussion options

You must be logged in to vote

In v5, a BigNumberish is allowed to be a big-endian array. So, it's just interpreting it that way.

If you notice though, this will fail: utils.defaultAbiCoder.encode(['uint16'], [[1, 2, 3]]), because 3 bytes is too big for a uint16. ;)

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by fvictorio
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #3402 on January 18, 2023 12:49.