useUse ([,type])(type1,type2,...)
to represent tuplestructs.
forFor example, the fillOrderfillOrder
function in 0x 2.0:
theThe function selector is calculated using:
fillOrder((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes),uint256,bytes)fillOrder((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes),uint256,bytes)
which the keccak-256 isThis produces a keccak256 of: b4be83d519a652e54a6073d7e55643f575508112b09dcc74264b807477b576c5b4be83d519a652e54a6073d7e55643f575508112b09dcc74264b807477b576c5
, and the first 4 bytes isare: b4be83d5b4be83d5
and youYou can confirm this by looking at this tx which called fillOrder: https://etherscan.io/tx/0x4811b7492bd845a46a052b063f943c4760174e932cb171ca25a934de6e7e4da4