We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
It seems like the encoding of solidity function arguments for new pragma experimental ABIEncoderV2; features isn't working correctly.
pragma experimental ABIEncoderV2;
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.
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
go-ethereum
The text was updated successfully, but these errors were encountered:
It might be the Pack method in go-ethereum doesn't add the offsets of the dynamic types inside the array at the beginning correctly.
Solidity Method
function mintDummy(string[] _values) public
Input
values := []string{"hello","aaaaaaaaaaa"}
Expected abi encoding (using web3.js)
"0xe71e5caf0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000568656c6c6f000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000b6161616161616161616161000000000000000000000000000000000000000000"
abi encoding in go-ethereum
"0xe71e5caf00000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000568656c6c6f000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000b6161616161616161616161000000000000000000000000000000000000000000"
Sorry, something went wrong.
No branches or pull requests
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.
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
The text was updated successfully, but these errors were encountered: