Add expiry to storage requests
This commit is contained in:
parent
18e667bf19
commit
980e2343ed
|
@ -51,6 +51,7 @@ contract Marketplace is Collateral {
|
|||
uint256 proofPeriod;
|
||||
uint256 proofTimeout;
|
||||
uint256 maxPrice;
|
||||
uint256 expiry;
|
||||
bytes32 nonce;
|
||||
}
|
||||
|
||||
|
|
|
@ -141,6 +141,7 @@ function requestId(request) {
|
|||
"uint256",
|
||||
"uint256",
|
||||
"uint256",
|
||||
"uint256",
|
||||
"bytes32",
|
||||
],
|
||||
requestToArray(request)
|
||||
|
@ -166,6 +167,7 @@ function requestToArray(request) {
|
|||
request.proofPeriod,
|
||||
request.proofTimeout,
|
||||
request.maxPrice,
|
||||
request.expiry,
|
||||
request.nonce,
|
||||
]
|
||||
}
|
||||
|
|
|
@ -10,6 +10,7 @@ const exampleRequest = () => ({
|
|||
proofPeriod: 8, // 8 blocks ≈ 2 minutes
|
||||
proofTimeout: 4, // 4 blocks ≈ 1 minute
|
||||
maxPrice: 42,
|
||||
expiry: now() + hours(1),
|
||||
nonce: hexlify(randomBytes(32)),
|
||||
})
|
||||
|
||||
|
|
Loading…
Reference in New Issue