LibOrder

Git Source

Consistent handling of OrderV2 for where it matters w.r.t. determinism and security.

Functions

hash

Hashes OrderV2 in a secure and deterministic way. Uses abi.encode rather than abi.encodePacked to guard against potential collisions where many inputs encode to the same output bytes.

function hash(OrderV2 memory order) internal pure returns (bytes32);

Parameters

NameTypeDescription
orderOrderV2The order to hash.

Returns

NameTypeDescription
<none>bytes32The hash of order.