titanoboa icon indicating copy to clipboard operation
titanoboa copied to clipboard

bug: arrays are returned as tuples

Open tserg opened this issue 2 years ago • 3 comments

Calling foo() returns (1, 2, 3) instead of [1, 2, 3].

@external
def foo() -> uint256[3]:
    return [1, 2, 3]
>>> boa.loads("@external\ndef foo() -> uint256[3]:\n\treturn [1,2,3]\n")
<VyperContract at 0x0000000000000000000000000000000000000067, compiled with vyper-0.3.8+847849c5>
>>> a = boa.loads("@external\ndef foo() -> uint256[3]:\n\treturn [1,2,3]\n")
>>> a.foo()
(1, 2, 3)

tserg avatar Oct 03 '22 14:10 tserg

What version of eth-abi is this?

charles-cooper avatar Oct 04 '22 15:10 charles-cooper

I tried with both 3.0.1 and the master branch.

tserg avatar Oct 04 '22 16:10 tserg

Tracking upstream: https://github.com/ethereum/eth-abi/issues/192

charles-cooper avatar Oct 04 '22 17:10 charles-cooper

please reopen if still an issue

charles-cooper avatar Nov 08 '22 22:11 charles-cooper