[marketplace] alias bytes32 types
`RequestId`, `SlotId`, `LockId`, `ProofId`, `EndId` types were created to avoid confusion and enforce compiler restrictions.
This commit is contained in:
parent
2478e36aba
commit
e97583befd
|
@ -345,6 +345,15 @@ contract Marketplace is Collateral, Proofs {
|
|||
return RequestId.unwrap(a) != bytes32(b);
|
||||
}
|
||||
|
||||
function _toProofId(SlotId slotId) internal pure returns (ProofId) {
|
||||
return ProofId.wrap(SlotId.unwrap(slotId));
|
||||
}
|
||||
|
||||
function _notEqual(RequestId a, uint256 b) internal pure returns (bool) {
|
||||
return RequestId.unwrap(a) != bytes32(b);
|
||||
}
|
||||
|
||||
|
||||
struct Request {
|
||||
address client;
|
||||
Ask ask;
|
||||
|
|
Loading…
Reference in New Issue