PackingUtils
External library used to pack and unpack values
pack
Packs values array into a single uint256
Parameters
Name
Type
Description
_values
uint256[]
values to pack
_bitLengths
uint256[]
corresponding bit lengths for each value
unpack
Unpacks a single uint256 into an array of values
Parameters
Name
Type
Description
_packed
uint256
packed value
_bitLengths
uint256[]
corresponding bit lengths for each value
unpack256To64
Unpacks a single uint256 into 4 uint64 values
Parameters
Name
Type
Description
_packed
uint256
packed value
Return Values
Name
Type
Description
a
uint64
returned value 1
b
uint64
returned value 2
c
uint64
returned value 3
d
uint64
returned value 4
unpackTriggerOrder
Unpacks trigger order calldata into 3 values
Parameters
Name
Type
Description
_packed
uint256
packed value
Return Values
Name
Type
Description
orderType
uint8
order type
trader
address
trader address
index
uint32
trade index