An order placed onto DLN is identified by a deterministic keccak256 hash derived from an array of bytes that contains all the properties of the order. The array is designed to be cross-chain compatible, so the smart contracts residing on both EVM and Solana can easily reproduce it. The smart contracts implementing the DLN protocol usually accept all these properties as a single data struct and derive an orderId programmatically to guarantee the order with the proper orderId is being managed. To get the deterministic orderId of the order, the array of bytes should contain its following properties:
BytesBitsField
864Salt
18Maker Src Address Size (!=0)
N8*NMaker Src Address
32256Give Chain Id
18Give Token Address Size (!=0)
N8*NGive Token Address
32256Give Amount
32256Take Chain Id
18Take Token Address Size (!=0)
N8*NTake Token Address
32256Take Amount
18Receiver Dst Address Size (!=0)
N8*NReceiver Dst Address
18Give Patch Authority Address Size (!=0)
N8*NGive Patch Authority Address
18Order Authority Address Dst Size (!=0)
N8*NOrder Authority Address Dst
18Allowed Taker Dst Address Size
N8*N* Allowed Taker Address Dst
18Allowed Cancel Beneficiary Src Address Size
N8*N* Allowed Cancel Beneficiary Address Src
18Is Hook Presented 0x0 - Not, != 0x0 - Yes
32256* Hook Envelope Hash