I have a call for this function (from here):
function setup(
address[] calldata _owners,
uint256 _threshold,
address to,
bytes calldata data,
address fallbackHandler,
address paymentToken,
uint256 payment,
address payable paymentReceiver
) external {
which looks like this (from here):
0xb63e800d0000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000140000000000000000000000000f48f2b2d2a534e402487b3ee7c18c33aec0fe5e40000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000f2a961af157426953e392f6468b0162f86b2acbc0000000000000000000000000000000000000000000000000000000000000000
I understand that the first 4 bytes "0xb63e800d" are function selector, so I split rest of data for 32 bytes each:
0000000000000000000000000000000000000000000000000000000000000100
0000000000000000000000000000000000000000000000000000000000000001
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000140
000000000000000000000000f48f2b2d2a534e402487b3ee7c18c33aec0fe5e4
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000001
000000000000000000000000f2a961af157426953e392f6468b0162f86b2acbc
0000000000000000000000000000000000000000000000000000000000000000
the problem, however, that there's one owner (f2a961af157426953e392f6468b0162f86b2acbc) so I would expect it as a second argument (while first being length of the _owner array), but not the last.
Could you please explain how this data is encoded exactly? What's the first value 0x100? This is initialization of gnosis safe so if "to" is zero then there's should be any data, why then firth value is 0x140?
update:
I found a great answer here https://ethereum.stackexchange.com/a/50616/46496
and here https://docs.soliditylang.org/en/v0.8.7/abi-spec.html