mirror of
https://github.com/status-im/dagger-contracts.git
synced 2025-02-05 11:15:33 +00:00
Rename StorageContract -> StorageContracts
This commit is contained in:
parent
4913edb6ce
commit
d005bf7c3c
@ -3,7 +3,7 @@ pragma solidity ^0.8.0;
|
|||||||
|
|
||||||
import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol";
|
import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol";
|
||||||
|
|
||||||
contract StorageContract {
|
contract StorageContracts {
|
||||||
uint public immutable duration; // contract duration in seconds
|
uint public immutable duration; // contract duration in seconds
|
||||||
uint public immutable size; // storage size in bytes
|
uint public immutable size; // storage size in bytes
|
||||||
bytes32 public immutable contentHash; // hash of data that is to be stored
|
bytes32 public immutable contentHash; // hash of data that is to be stored
|
@ -2,7 +2,7 @@ const { expect } = require("chai")
|
|||||||
const { ethers } = require("hardhat")
|
const { ethers } = require("hardhat")
|
||||||
const { hashRequest, hashBid, sign } = require("./marketplace")
|
const { hashRequest, hashBid, sign } = require("./marketplace")
|
||||||
|
|
||||||
describe("Storage Contract", function () {
|
describe("Storage Contracts", function () {
|
||||||
|
|
||||||
const duration = 31 * 24 * 60 * 60 // 31 days
|
const duration = 31 * 24 * 60 * 60 // 31 days
|
||||||
const size = 1 * 1024 * 1024 * 1024 // 1 Gigabyte
|
const size = 1 * 1024 * 1024 * 1024 // 1 Gigabyte
|
||||||
@ -11,7 +11,7 @@ describe("Storage Contract", function () {
|
|||||||
const proofTimeout = 4 // 4 blocks ≈ 1 minute
|
const proofTimeout = 4 // 4 blocks ≈ 1 minute
|
||||||
const price = 42
|
const price = 42
|
||||||
|
|
||||||
var StorageContract
|
var StorageContracts
|
||||||
var client, host
|
var client, host
|
||||||
var bidExpiry
|
var bidExpiry
|
||||||
var requestHash, bidHash
|
var requestHash, bidHash
|
||||||
@ -19,7 +19,7 @@ describe("Storage Contract", function () {
|
|||||||
|
|
||||||
beforeEach(async function () {
|
beforeEach(async function () {
|
||||||
[client, host] = await ethers.getSigners()
|
[client, host] = await ethers.getSigners()
|
||||||
StorageContract = await ethers.getContractFactory("StorageContract")
|
StorageContracts = await ethers.getContractFactory("StorageContracts")
|
||||||
requestHash = hashRequest(
|
requestHash = hashRequest(
|
||||||
duration,
|
duration,
|
||||||
size,
|
size,
|
||||||
@ -34,7 +34,7 @@ describe("Storage Contract", function () {
|
|||||||
describe("when properly instantiated", function () {
|
describe("when properly instantiated", function () {
|
||||||
|
|
||||||
beforeEach(async function () {
|
beforeEach(async function () {
|
||||||
contract = await StorageContract.deploy(
|
contract = await StorageContracts.deploy(
|
||||||
duration,
|
duration,
|
||||||
size,
|
size,
|
||||||
contentHash,
|
contentHash,
|
Loading…
x
Reference in New Issue
Block a user