Skip to content

Commit e463f42

Browse files
authored
Merge pull request #12 from kleros/feat/core-plurality-disputekit-jaybuidl
Feat/core plurality disputekit
2 parents f56aa9f + 032b8da commit e463f42

14 files changed

+3761
-251
lines changed

.codeclimate.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
engines:
2+
tslint:
3+
enabled: true
4+
checks:
5+
quotemark:
6+
enabled: false

.vscode/settings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
2-
"solidity.compileUsingRemoteVersion": "v0.8.9+commit.e5eed63a",
2+
"solidity.compileUsingRemoteVersion": "v0.8.10+commit.fc410830",
33
"mochaExplorer.files": "contracts/test/**/*.{j,t}s"
44
}

contracts/hardhat.config.ts

Lines changed: 35 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,10 @@ import "@nomiclabs/hardhat-waffle";
66
import "@typechain/hardhat";
77
import "hardhat-gas-reporter";
88
import "solidity-coverage";
9-
import "hardhat-deploy"
10-
import "hardhat-deploy-ethers"
9+
import "hardhat-deploy";
10+
import "hardhat-deploy-ethers";
11+
import "hardhat-watcher";
12+
import "hardhat-docgen";
1113

1214
dotenv.config();
1315

@@ -43,6 +45,18 @@ const config: HardhatUserConfig = {
4345
saveDeployments: false,
4446
tags: ["test", "local"],
4547
},
48+
mainnetFork: {
49+
url: `http://127.0.0.1:8545`,
50+
chainId: 1,
51+
forking: {
52+
url: `https://mainnet.infura.io/v3/${process.env.INFURA_API_KEY}`,
53+
},
54+
accounts: process.env.MAINNET_PRIVATE_KEY !== undefined ? [process.env.MAINNET_PRIVATE_KEY] : [],
55+
live: false,
56+
saveDeployments: false,
57+
tags: ["test", "local"],
58+
},
59+
4660
// Home chain ---------------------------------------------------------------------------------
4761
arbitrumRinkeby: {
4862
chainId: 421611,
@@ -101,6 +115,25 @@ const config: HardhatUserConfig = {
101115
etherscan: {
102116
apiKey: process.env.ETHERSCAN_API_KEY,
103117
},
118+
watcher: {
119+
compilation: {
120+
tasks: ["compile"],
121+
files: ["./contracts"],
122+
verbose: true,
123+
},
124+
testArbitration: {
125+
tasks: [
126+
{ command: "compile", params: { quiet: true } },
127+
{ command: "test", params: { noCompile: true, testFiles: ["./test/arbitration/index.ts"] } },
128+
],
129+
files: ["./test/**/*", "./src/**/*"],
130+
},
131+
},
132+
docgen: {
133+
path: './docs',
134+
clear: true,
135+
runOnCompile: false,
136+
},
104137
};
105138

106139
export default config;

contracts/package.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,15 @@
1414
"build": "hardhat compile",
1515
"clean": "hardhat clean",
1616
"deploy": "hardhat deploy",
17-
"test": "hardhat test"
17+
"test": "hardhat test",
18+
"watch": "hardhat watch",
19+
"docgen": "hardhat docgen"
1820
},
1921
"devDependencies": {
2022
"@nomiclabs/hardhat-ethers": "^2.0.2",
2123
"@nomiclabs/hardhat-etherscan": "^2.1.7",
2224
"@nomiclabs/hardhat-waffle": "^2.0.1",
25+
"@openzeppelin/contracts": "^4.4.1",
2326
"@typechain/ethers-v5": "^7.2.0",
2427
"@typechain/hardhat": "^2.3.1",
2528
"@types/chai": "^4.2.22",
@@ -35,7 +38,9 @@
3538
"hardhat": "^2.6.8",
3639
"hardhat-deploy": "^0.9.6",
3740
"hardhat-deploy-ethers": "^0.3.0-beta.11",
41+
"hardhat-docgen": "^1.2.1",
3842
"hardhat-gas-reporter": "^1.0.4",
43+
"hardhat-watcher": "^2.1.1",
3944
"json-schema": "^0.4.0",
4045
"mocha": "^9.1.3",
4146
"solhint": "^3.3.6",

contracts/src/arbitration/ArbitrableExample.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import "./IArbitrable.sol";
66

77
/**
88
* @title ArbitrableExample
9-
* An example of the arbitrable contract which connects to the arbitator that implements IArbitrator interface.
9+
* An example of an arbitrable contract which connects to the arbitator that implements the updated interface.
1010
*/
1111
contract ArbitrableExample is IArbitrable {
1212
struct DisputeStruct {

contracts/src/arbitration/CentralizedArbitrator.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ contract CentralizedArbitrator is IArbitrator {
125125
uint256 _arbitrationFee,
126126
uint256 _appealDuration,
127127
uint256 _appealFee
128-
) public {
128+
) {
129129
arbitrationFee = _arbitrationFee;
130130
appealDuration = _appealDuration;
131131
appealFee = _appealFee;

0 commit comments

Comments
 (0)