Where can I find AbiEncoderV2 encoding Tuple algorithm?
I would like to add Tuples support to a ruby library.
Ethereum Stack Exchange is a question and answer site for users of Ethereum, the decentralized application platform and smart contract enabled blockchain. It only takes a minute to sign up.
Sign up to join this communityWhere can I find AbiEncoderV2 encoding Tuple algorithm?
I would like to add Tuples support to a ruby library.
Basically, a tuple is encoded as if all its members were separate parameters, so the following function returns true
:
struct Foo {
uint x;
uint y;
uint z;
}
function foo () public pure returns (bool) {
return keccak256 (abi.encode (1, 2, 3)) ==
keccak256 (abi.encode (Foo (1, 2, 3)));
}