メインコンテンツへスキップ

BatchOrderTypehashRegistry

The contract generates the batch order hash that is used to compute the digest for signature verification.

hashBatchOrder

function hashBatchOrder(bytes32 root, uint256 proofLength) public pure returns (bytes32 batchOrderHash)

This function returns the hash of the concatenation of batch order type hash and merkle root.

Parameters

NameTypeDescription
rootbytes32Merkle root
proofLengthuint256Merkle proof length

Return Values

NameTypeDescription
batchOrderHashbytes32The batch order hash

_getBatchOrderTypehash

function _getBatchOrderTypehash(uint256 height) internal pure returns (bytes32 typehash)

It looks like this for each height

height == 1: BatchOrder(Maker[2] tree)Maker(uint8 quoteType,uint256 globalNonce,uint256 subsetNonce,uint256 orderNonce,uint256 strategyId,uint8 collectionType,address collection,address currency,address signer,uint256 startTime,uint256 endTime,uint256 price,uint256[] itemIds,uint256[] amounts,bytes additionalParameters)

height == 2: BatchOrder(Maker[2][2] tree)Maker(uint8 quoteType,uint256 globalNonce,uint256 subsetNonce,uint256 orderNonce,uint256 strategyId,uint8 collectionType,address collection,address currency,address signer,uint256 startTime,uint256 endTime,uint256 price,uint256[] itemIds,uint256[] amounts,bytes additionalParameters)

height == n: BatchOrder(Maker[2]...[2] tree)Maker(uint8 quoteType,uint256 globalNonce,uint256 subsetNonce,uint256 orderNonce,uint256 strategyId,uint8 collectionType,address collection,address currency,address signer,uint256 startTime,uint256 endTime,uint256 price,uint256[] itemIds,uint256[] amounts,bytes additionalParameters)