I didn't found any instructions about nested structs (in structs). Seen video about sending bytecode to contract and I wanted to understand.
For example, method is fulfillOrder:
function fulfillOrder(
Order calldata order,
bytes32 fulfillerConduitKey
) external payable returns (bool fulfilled);
struct Order {
OrderParameters parameters;
bytes signature;
}
struct OrderParameters {
address offerer; // 0x00
address zone; // 0x20
OfferItem[] offer; // 0x40
ConsiderationItem[] consideration; // 0x60
OrderType orderType; // 0x80
uint256 startTime; // 0xa0
uint256 endTime; // 0xc0
bytes32 zoneHash; // 0xe0
uint256 salt; // 0x100
bytes32 conduitKey; // 0x120
uint256 totalOriginalConsiderationItems; // 0x140
// offer.length // 0x160
}
struct OfferItem {
ItemType itemType;
address token;
uint256 identifierOrCriteria;
uint256 startAmount;
uint256 endAmount;
}
struct ConsiderationItem {
ItemType itemType;
address token;
uint256 identifierOrCriteria;
uint256 startAmount;
uint256 endAmount;
address payable recipient;
}
enum OrderType {
FULL_OPEN,
PARTIAL_OPEN,
FULL_RESTRICTED,
PARTIAL_RESTRICTED,
CONTRACT
}
abi calldata description:
fulfillOrder(((address,address,(uint8,address,uint256,uint256,uint256)[],(uint8,address,uint256,uint256,uint256,address)[],uint8,uint256,uint256,bytes32,uint256,bytes32,uint256),bytes),bytes32)
calldata abi keccak: b3a34c4c89989a0871b97285782de68e7db27f7d5fe738e7aa7c6f1f7118d3ac
I've google a lot, it's didn't gave any results...
That is my analysis, I tried to understand but I don't.
0xb3a34c4c
32/0000000000000000000000000000000000000000000000000000000000000040 .*args[0] 32*2 >-- Order
64/0000007b02230091a7ed01230072f7006a004d60a8d4e71d599b8104250f0000 'fulfillerConduitKey |
? 96/0000000000000000000000000000000000000000000000000000000000000040 'args[0] *Order[0] <- >--
? 128/0000000000000000000000000000000000000000000000000000000000000280'-------->32*20 link SIG | OrderParams
160/000000000000000000000000047a0ba6eab7825a854049eda6256301cf0a7056' offerer Order[0] Start cnt <-
192/0000000000000000000000000000000000000000000000000000000000000000' zone
? 224/0000000000000000000000000000000000000000000000000000000000000160'- *arr1 352 32*11 *OfferItem[]
? 256/0000000000000000000000000000000000000000000000000000000000000220'- 544 32*17
288/0000000000000000000000000000000000000000000000000000000000000000' orderType
320/0000000000000000000000000000000000000000000000000000000000000000' FULL_OPEN OrderType - start static
352/000000000000000000000000000000000000000000000000000000006383abd0' start time //1669573584
384/0000000000000000000000000000000000000000000000000000000063ab38d0' end time //1672165584
416/0000000000000000000000000000000000000000000000000000000000000000' zoneHash
448/360c6ebe0000000000000000000000000000000000000000f69d6dec7287d948' salt
480/0000007b02230091a7ed01230072f7006a004d60a8d4e71d599b8104250f0000' conduitKey
512/000000000000000000000000b4fbf271143f4fbf7b91a5ded31805e42b2208d6'* arr1 weth
544/0000000000000000000000000000000000000000000000000000000000000000'* identifierOrCriteria
576/0000000000000000000000000000000000000000000000000de0b6b3a7640000'* start amount of weth 1*10^19
608/0000000000000000000000000000000000000000000000000de0b6b3a7640000'* end amount
640/0000000000000000000000000000000000000000000000000000000000000000' 20th
672/0000000000000000000000000000000000000000000000000000000000000041 --- SIG length
704/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ---
736/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx } SIG value
768/xx00000000000000000000000000000000000000000000000000000000000000 ---
Where first letter in string is question sign ?, I don't understood what is it means...
Maybe code is outdated? Where I can find out how struct in struct decoding to bytecode (calldata)?