Skip to content

Commit

Permalink
Fixing upgrade tests
Browse files Browse the repository at this point in the history
  • Loading branch information
anajuliabit committed Jun 28, 2023
1 parent 60b8404 commit 11dba7b
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 13 deletions.
6 changes: 3 additions & 3 deletions scripts/config/protocol-parameters.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@ module.exports = {
maxOffersPerBatch: "12",
maxTokensPerWithdrawal: "125",
maxFeesPerDisputeResolver: "75",
maxEscalationResponsePeriod: ninetyDays,
maxEscalationResponsePeriod: ninetyDays.toString(),
maxDisputesPerBatch: "75",
maxAllowedSellers: "140",
maxTotalOfferFeePercentage: "10000", // 100%
maxRoyaltyPecentage: "10000", //100%
maxResolutionPeriod: ninetyDays,
minDisputePeriod: oneWeek,
maxResolutionPeriod: ninetyDays.toString(),
minDisputePeriod: oneWeek.toString(),
maxPremintedVouchers: "10000",
},

Expand Down
5 changes: 0 additions & 5 deletions test/domain/AuthTokenTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,6 @@ describe("AuthToken", function () {
expect(authToken.tokenIdIsValid()).is.false;
expect(authToken.isValid()).is.false;

// Invalid field value
authToken.tokenId = new Date();
expect(authToken.tokenIdIsValid()).is.false;
expect(authToken.isValid()).is.false;

// Valid field value
authToken.tokenId = "0";
expect(authToken.tokenIdIsValid()).is.true;
Expand Down
10 changes: 5 additions & 5 deletions test/util/upgrade.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ const shell = require("shelljs");
const _ = require("lodash");
const { getStorageAt } = require("@nomicfoundation/hardhat-network-helpers");
const hre = require("hardhat");
const ethers = hre.ethers;

const {
keccak256,
formatBytes32String,
Expand All @@ -15,7 +13,7 @@ const {
toUtf8Bytes,
getContractFactory,
getSigners,
} = ethers;
} = hre.ethers;
const AuthToken = require("../../scripts/domain/AuthToken");
const { getMetaTransactionsHandlerFacetInitArgs } = require("../../scripts/config/facet-deploy.js");
const AuthTokenType = require("../../scripts/domain/AuthTokenType");
Expand Down Expand Up @@ -95,7 +93,8 @@ async function deploySuite(deployer, newVersion) {
shell.exec(`git fetch --force --tags origin`);
console.log(`Checking out version ${tag}`);
shell.exec(`rm -rf contracts/*`);
shell.exec(`git checkout ${tag} contracts`);
shell.exec(`git checkout ${tag} -- "contracts/**`);

if (scriptsTag) {
console.log(`Checking out scripts on version ${scriptsTag}`);
shell.exec(`rm -rf scripts/*`);
Expand All @@ -121,7 +120,7 @@ async function deploySuite(deployer, newVersion) {

// Get AccessController abstraction
const accessControllerInfo = contractsFile.contracts.find((i) => i.name === "AccessController");
const accessController = await getContractAt("AccessController", await accessControllerInfo.getAddress());
const accessController = await getContractAt("AccessController", accessControllerInfo.address);

// Temporarily grant UPGRADER role to deployer account
await accessController.grantRole(Role.UPGRADER, await deployer.getAddress());
Expand Down Expand Up @@ -374,6 +373,7 @@ async function populateProtocolContract(
await accountHandler
.connect(connectedWallet)
.createDisputeResolver(disputeResolver, disputeResolverFees, sellerAllowList);
console.log("after");
DRs.push({
wallet: connectedWallet,
id: disputeResolver.id,
Expand Down

0 comments on commit 11dba7b

Please sign in to comment.