mirror of
https://github.com/status-im/codex-contracts-eth.git
synced 2025-03-01 16:40:52 +00:00
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 proofPeriod;
|
||||||
uint256 proofTimeout;
|
uint256 proofTimeout;
|
||||||
uint256 maxPrice;
|
uint256 maxPrice;
|
||||||
|
uint256 expiry;
|
||||||
bytes32 nonce;
|
bytes32 nonce;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -141,6 +141,7 @@ function requestId(request) {
|
|||||||
"uint256",
|
"uint256",
|
||||||
"uint256",
|
"uint256",
|
||||||
"uint256",
|
"uint256",
|
||||||
|
"uint256",
|
||||||
"bytes32",
|
"bytes32",
|
||||||
],
|
],
|
||||||
requestToArray(request)
|
requestToArray(request)
|
||||||
@ -166,6 +167,7 @@ function requestToArray(request) {
|
|||||||
request.proofPeriod,
|
request.proofPeriod,
|
||||||
request.proofTimeout,
|
request.proofTimeout,
|
||||||
request.maxPrice,
|
request.maxPrice,
|
||||||
|
request.expiry,
|
||||||
request.nonce,
|
request.nonce,
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@ -10,6 +10,7 @@ const exampleRequest = () => ({
|
|||||||
proofPeriod: 8, // 8 blocks ≈ 2 minutes
|
proofPeriod: 8, // 8 blocks ≈ 2 minutes
|
||||||
proofTimeout: 4, // 4 blocks ≈ 1 minute
|
proofTimeout: 4, // 4 blocks ≈ 1 minute
|
||||||
maxPrice: 42,
|
maxPrice: 42,
|
||||||
|
expiry: now() + hours(1),
|
||||||
nonce: hexlify(randomBytes(32)),
|
nonce: hexlify(randomBytes(32)),
|
||||||
})
|
})
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user