2021-11-02 08:04:51 +00:00
|
|
|
const { ethers } = require("hardhat")
|
|
|
|
|
2021-11-02 08:45:49 +00:00
|
|
|
const exampleRequest = () => ({
|
2021-11-04 09:19:23 +00:00
|
|
|
duration: 150, // 150 blocks ≈ half an hour
|
2021-11-02 08:04:51 +00:00
|
|
|
size: 1 * 1024 * 1024 * 1024, // 1 Gigabyte
|
|
|
|
contentHash: ethers.utils.sha256("0xdeadbeef"),
|
|
|
|
proofPeriod: 8, // 8 blocks ≈ 2 minutes
|
|
|
|
proofTimeout: 4, // 4 blocks ≈ 1 minute
|
2021-11-02 08:45:49 +00:00
|
|
|
nonce: ethers.utils.randomBytes(32)
|
|
|
|
})
|
|
|
|
|
|
|
|
const exampleBid = () => ({
|
2021-11-02 08:04:51 +00:00
|
|
|
price: 42,
|
|
|
|
bidExpiry: Math.round(Date.now() / 1000) + 60 * 60 // 1 hour from now
|
|
|
|
})
|
|
|
|
|
2021-11-02 08:45:49 +00:00
|
|
|
module.exports = { exampleRequest, exampleBid }
|