Skip to content

Commit 97cf4da

Browse files
committed
chore: updated the dev dependencies for the contracts package
Also downgraded solidity to v0.8.9 for better compatibility with hardhat.
1 parent 4b96372 commit 97cf4da

File tree

6 files changed

+535
-157
lines changed

6 files changed

+535
-157
lines changed

contracts/deploy/01-foreign-chain.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@ const deployForeignGateway: DeployFunction = async (hre: HardhatRuntimeEnvironme
9999
homeGatewayAddress,
100100
homeChainIdAsBytes32,
101101
],
102+
gasLimit: 4000000,
102103
log: true,
103104
});
104105

contracts/deploy/02-home-chain.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ const deployHomeGateway: DeployFunction = async (hre: HardhatRuntimeEnvironment)
3333
const homeGateway = await deploy("HomeGatewayToEthereum", {
3434
from: deployer,
3535
args: [klerosCore.address, fastBridgeSender.address, foreignGateway.address, foreignChainId],
36+
gasLimit: 4000000,
3637
log: true,
3738
}); // nonce+1
3839

contracts/hardhat.config.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ dotenv.config();
1616

1717
const config: HardhatUserConfig = {
1818
solidity: {
19-
version: "0.8.10",
19+
version: "0.8.9",
2020
settings: {
2121
optimizer: {
2222
enabled: true,
@@ -31,6 +31,7 @@ const config: HardhatUserConfig = {
3131
hardhat: {
3232
live: false,
3333
saveDeployments: true,
34+
allowUnlimitedContractSize: true,
3435
tags: ["test", "local"],
3536
},
3637
localhost: {

contracts/package.json

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -22,37 +22,37 @@
2222
"devDependencies": {
2323
"@nomiclabs/hardhat-ethers": "npm:hardhat-deploy-ethers@0.3.0-beta.13",
2424
"@nomiclabs/hardhat-waffle": "^2.0.3",
25-
"@openzeppelin/contracts": "^4.5.0",
25+
"@openzeppelin/contracts": "^4.6.0",
2626
"@tenderly/hardhat-tenderly": "^1.0.13",
27-
"@typechain/ethers-v5": "^9.0.0",
28-
"@typechain/hardhat": "^5.0.0",
29-
"@types/chai": "^4.3.0",
30-
"@types/mocha": "^9.1.0",
31-
"@types/node": "^16.11.7",
32-
"@typescript-eslint/eslint-plugin": "^5.15.0",
33-
"@typescript-eslint/parser": "^5.15.0",
27+
"@typechain/ethers-v5": "^10.0.0",
28+
"@typechain/hardhat": "^6.0.0",
29+
"@types/chai": "^4.3.1",
30+
"@types/mocha": "^9.1.1",
31+
"@types/node": "^16",
32+
"@typescript-eslint/eslint-plugin": "^5.26.0",
33+
"@typescript-eslint/parser": "^5.26.0",
3434
"chai": "^4.3.6",
3535
"chai-ethers": "^0.0.1",
36-
"dotenv": "^16.0.0",
37-
"ethereum-waffle": "^3.4.0",
36+
"dotenv": "^16.0.1",
37+
"ethereum-waffle": "^3.4.4",
3838
"ethereumjs-util": "^7.1.4",
39-
"ethers": "^5.6.1",
40-
"follow-redirects": "^1.14.9",
41-
"hardhat": "^2.9.1",
42-
"hardhat-contract-sizer": "^2.5.0",
43-
"hardhat-deploy": "^0.11.0",
39+
"ethers": "^5.6.7",
40+
"follow-redirects": "^1.15.0",
41+
"hardhat": "^2.9.6",
42+
"hardhat-contract-sizer": "^2.5.1",
43+
"hardhat-deploy": "^0.11.10",
4444
"hardhat-deploy-ethers": "^0.3.0-beta.13",
4545
"hardhat-docgen": "^1.3.0",
4646
"hardhat-gas-reporter": "^1.0.8",
47-
"hardhat-watcher": "^2.1.1",
47+
"hardhat-watcher": "^2.3.0",
4848
"json-schema": "^0.4.0",
49-
"mocha": "^9.2.0",
49+
"mocha": "^10.0.0",
5050
"npm-run-all": "^4.1.5",
51-
"shelljs": "0.8.5",
52-
"solhint": "^3.3.6",
53-
"solidity-coverage": "^0.7.17",
54-
"ts-node": "^10.4.0",
55-
"typechain": "^7.0.0",
56-
"typescript": "^4.5.5"
51+
"shelljs": "^0.8.5",
52+
"solhint": "^3.3.7",
53+
"solidity-coverage": "^0.7.21",
54+
"ts-node": "^10.8.0",
55+
"typechain": "^8.0.0",
56+
"typescript": "^4.6.4"
5757
}
5858
}

contracts/test/evidence/index.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,11 @@ describe("Home Evidence contract", async () => {
138138
expect(evidenceStr).to.equal(newEvidence, "Wrong evidence message.");
139139

140140
let contributions = await evidenceModule.getContributions(evidenceID, 0, user1.address);
141-
expect(contributions).to.deep.equal([ZERO, minRequiredDeposit, ZERO], "Wrong contributions.");
141+
expect(contributions[0]).to.equal(ZERO); // it's 1am and to.deep.equal() won't work, can't be bothered
142+
expect(contributions[1]).to.equal(BigNumber.from("93"));
143+
expect(contributions[2]).to.equal(ZERO);
144+
expect(contributions.length).to.equal(3);
145+
142146
});
143147

144148
it("Should not allowed the same evidence twice for the same evidence group id.", async () => {
@@ -181,14 +185,16 @@ describe("Home Evidence contract", async () => {
181185
await expect(
182186
evidenceModule.moderate(evidenceID, Party.Moderator, {
183187
value: totalCost,
188+
gasLimit: 500000,
184189
})
185190
).to.be.revertedWith("Moderation market is closed.");
186191

187-
await evidenceModule.resolveModerationMarket(evidenceID);
192+
await evidenceModule.resolveModerationMarket(evidenceID, {gasLimit: 500000});
188193

189194
// After market has been closed, moderation can re-open.
190195
await evidenceModule.moderate(evidenceID, Party.Submitter, {
191196
value: totalCost,
197+
gasLimit: 500000,
192198
});
193199
});
194200

0 commit comments

Comments
 (0)