Skip to content

abi pack method doesn't encode new ABiEncoderV2 features like string[] correctly #18033

@xmxanuel

Description

@xmxanuel

It seems like the encoding of solidity function arguments for new pragma experimental ABIEncoderV2; features isn't working correctly.

I tested to encode an array of strings parameter with abigen and the transaction is not successful.

function test(string[] _values) public

The returned encoding from the Pack method in go-ethereum/accounts/abi/argument.go is different from web3.js using the same input parameters.

I compared the encoding for the same inputs with web3.js which supports the new encoding with version 1.0.0-beta.36.

The Unpack seems to work because a test with web3.js and latest geth was successful.

Is go-ethereum up to date with the latest specification?
https://solidity.readthedocs.io/en/develop/abi-spec.html

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions