Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added bun.lockb
Binary file not shown.
File renamed without changes.
21 changes: 20 additions & 1 deletion contracts/.eslintignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,23 @@
node_modules
# directories
.coverage_artifacts
.coverage_cache
.coverage_contracts
artifacts
build
cache
coverage
dist
node_modules
types

# files
*.env
*.log
.DS_Store
.pnp.*
bun.lockb
coverage.json
gasReporterOutput.json
package-lock.json
pnpm-lock.yaml
yarn.lock
22 changes: 20 additions & 2 deletions contracts/.prettierignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,23 @@
node_modules
# directories
.coverage_artifacts
.coverage_cache
.coverage_contracts
artifacts
build
cache
coverage*
coverage
dist
node_modules
types

# files
*.env
*.log
.DS_Store
.pnp.*
bun.lockb
coverage.json
gasReporterOutput.json
package-lock.json
pnpm-lock.yaml
yarn.lock
18 changes: 10 additions & 8 deletions contracts/hardhat.config.ts
Original file line number Diff line number Diff line change
@@ -1,19 +1,21 @@
/* eslint-disable node/no-missing-require */
import * as dotenv from "dotenv";
import { HardhatUserConfig } from "hardhat/config";

import "@nomicfoundation/hardhat-chai-matchers";
import "@nomiclabs/hardhat-solhint";
import "@typechain/hardhat";
import "hardhat-deploy-tenderly";
import "hardhat-gas-reporter";
import "solidity-coverage";
import * as dotenv from "dotenv";
import "hardhat-contract-sizer";
import "hardhat-deploy";
import "hardhat-deploy-ethers";
import "hardhat-watcher";
import "hardhat-deploy-tenderly";
import "hardhat-docgen";
import "hardhat-contract-sizer";
import "hardhat-gas-reporter";
import "hardhat-tracer";
require("./scripts/simulations/tasks");
import "hardhat-watcher";
import { HardhatUserConfig } from "hardhat/config";
import "solidity-coverage";

import "./scripts/simulations/tasks";

dotenv.config();

Expand Down
29 changes: 15 additions & 14 deletions contracts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,26 +22,26 @@
"build": "hardhat compile",
"clean": "hardhat clean",
"check": "hardhat check",
"test": "TS_NODE_TRANSPILE_ONLY=1 hardhat test",
"test": "hardhat test",
"start": "hardhat node --tags nop",
"start-local": "hardhat node --tags Arbitration,HomeArbitrable --hostname 0.0.0.0",
"deploy": "hardhat deploy",
"deploy-local": "hardhat deploy --tags Arbitration,HomeArbitrable --network localhost",
"simulate": "hardhat simulate:all",
"simulate-local": "hardhat simulate:all --network localhost",
"viem:generate-devnet": "NODE_NO_WARNINGS=1 wagmi generate -c wagmi.config.devnet.ts",
"viem:generate-testnet": "NODE_NO_WARNINGS=1 wagmi generate -c wagmi.config.testnet.ts",
"viem:generate-mainnet": "NODE_NO_WARNINGS=1 wagmi generate -c wagmi.config.mainnet.ts",
"viem:generate-hardhat": "NODE_NO_WARNINGS=1 wagmi generate -c wagmi.config.hardhat.ts",
"viem:generate-devnet": "wagmi generate -c wagmi.config.devnet.ts",
"viem:generate-testnet": "wagmi generate -c wagmi.config.testnet.ts",
"viem:generate-mainnet": "wagmi generate -c wagmi.config.mainnet.ts",
"viem:generate-hardhat": "wagmi generate -c wagmi.config.hardhat.ts",
"export:devnet": "yarn hardhat export --export deployments/arbitrumSepoliaDevnet.ts --network arbitrumSepoliaDevnet",
"export:testnet": "yarn hardhat export --export deployments/arbitrumSepolia.ts --network arbitrumSepolia",
"export:mainnet": "yarn hardhat export --export deployments/arbitrum.ts --network arbitrum",
"viem:test": "NODE_NO_WARNINGS=1 NODE_OPTIONS=--experimental-fetch ts-node ./scripts/viemTest.ts",
"bot:keeper": "NODE_NO_WARNINGS=1 NODE_OPTIONS=--experimental-fetch hardhat run ./scripts/keeperBot.ts",
"bot:relayer-from-chiado": "NODE_NO_WARNINGS=1 NODE_OPTIONS=--experimental-fetch hardhat run ./scripts/disputeRelayerBotFromChiado.ts",
"bot:relayer-from-sepolia": "NODE_NO_WARNINGS=1 NODE_OPTIONS=--experimental-fetch hardhat run ./scripts/disputeRelayerBotFromSepolia.ts",
"bot:relayer-from-hardhat": "NODE_NO_WARNINGS=1 NODE_OPTIONS=--experimental-fetch hardhat run ./scripts/disputeRelayerBotFromHardhat.ts",
"bot:disputor": "NODE_NO_WARNINGS=1 yarn hardhat run ./scripts/disputeCreatorBot.ts",
"viem:test": "bun run scripts/viemTest.ts",
"bot:keeper": "hardhat run ./scripts/keeperBot.ts",
"bot:relayer-from-chiado": "hardhat run ./scripts/disputeRelayerBotFromChiado.ts",
"bot:relayer-from-sepolia": "hardhat run ./scripts/disputeRelayerBotFromSepolia.ts",
"bot:relayer-from-hardhat": "hardhat run ./scripts/disputeRelayerBotFromHardhat.ts",
"bot:disputor": "yarn hardhat run ./scripts/disputeCreatorBot.ts",
"etherscan-verify": "hardhat etherscan-verify",
"etherscan-verify-proxies": "scripts/verifyProxies.sh",
"sourcify": "hardhat sourcify --write-failing-metadata",
Expand All @@ -68,9 +68,10 @@
"@typechain/hardhat": "^7.0.0",
"@types/chai": "^4.3.11",
"@types/mocha": "^10.0.6",
"@types/node": "^20.11.3",
"@types/node": "^18.0.0",
"@wagmi/cli": "^1.5.2",
"abitype": "^0.10.3",
"bun-types": "^1.0.23",
"chai": "^4.4.1",
"dotenv": "^16.3.1",
"ethereumjs-util": "^7.1.5",
Expand All @@ -79,8 +80,8 @@
"graphql-request": "^6.1.0",
"hardhat": "2.15.0",
"hardhat-contract-sizer": "^2.10.0",
"hardhat-deploy": "^0.11.42",
"hardhat-deploy-ethers": "^0.4.0-next.1",
"hardhat-deploy": "0.11.42",
"hardhat-deploy-ethers": "0.4.0-next.1",
"hardhat-deploy-tenderly": "^0.2.0",
"hardhat-docgen": "^1.3.0",
"hardhat-gas-reporter": "^1.0.9",
Expand Down
26 changes: 17 additions & 9 deletions eslint-config/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
module.exports = {
extends: [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:prettier/recommended",
"plugin:import/recommended",
],
parser: "@typescript-eslint/parser",
parserOptions: {
ecmaVersion: 2020,
project: "@kleros/kleros-v2-tsconfig/base.json",
},
env: {
browser: true,
Expand All @@ -10,19 +16,13 @@ module.exports = {
mocha: true,
es2020: true,
},
extends: [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:prettier/recommended",
"plugin:import/recommended",
],
plugins: ["@typescript-eslint", "prettier", "import"],
rules: {
"no-unused-vars": [
"error",
{
varsIgnorePattern: "(^_+[0-9]*$)|([iI]gnored$)|(^ignored)",
argsIgnorePattern: "(^_+[0-9]*$)|([iI]gnored$)|(^ignored)",
varsIgnorePattern: "_",
argsIgnorePattern: "_",
},
],
"prettier/prettier": "error",
Expand All @@ -44,5 +44,13 @@ module.exports = {
tryExtensions: [".js", ".ts", ".json", ".node"],
},
],
"@typescript-eslint/no-floating-promises": [
"error",
{
ignoreIIFE: true,
ignoreVoid: true,
},
],
"@typescript-eslint/no-inferrable-types": "off",
},
};
6 changes: 2 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,8 @@
"license": "MIT",
"private": true,
"workspaces": [
"bots",
"bot-pinner",
"contracts",
"kleros-sdk",
"subgraph",
"web",
"eslint-config",
Expand All @@ -32,8 +30,8 @@
"yarn": "3.7.0"
},
"devDependencies": {
"@commitlint/cli": "^17.8.1",
"@commitlint/config-conventional": "^17.8.1",
"@commitlint/cli": "^18.4.2",
"@commitlint/config-conventional": "^18.4.2",
"buffer": "^5.7.1",
"conventional-changelog-cli": "^2.2.2",
"husky": "^8.0.3",
Expand Down
14 changes: 13 additions & 1 deletion prettier-config/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
module.exports = {
htmlWhitespaceSensitivity: "css",
printWidth: 120,
trailingComma: "es5",
trailingComma: "all",
endOfLine: "lf",
overrides: [
{
Expand All @@ -13,6 +13,8 @@ module.exports = {
{
files: ["*.sol"],
options: {
compiler: "0.8.18",
parser: "solidity-parse",
printWidth: 120,
tabWidth: 4,
useTabs: false,
Expand All @@ -21,5 +23,15 @@ module.exports = {
explicitTypes: "preserve",
},
},
{
files: ["*.ts"],
options: {
parser: "typescript",
importOrder: ["<THIRD_PARTY_MODULES>", "^[./]"],
importOrderParserPlugins: ["typescript"],
importOrderSeparation: true,
importOrderSortSpecifiers: true,
},
},
],
};
11 changes: 10 additions & 1 deletion tsconfig/base.json
Original file line number Diff line number Diff line change
@@ -1,18 +1,27 @@
{
"comment": "adapted from https://github.com/PaulRBerg/hardhat-template/blob/main/tsconfig.json",
"$schema": "https://json.schemastore.org/tsconfig",
"compilerOptions": {
"target": "es2021",
"target": "es2020",
"lib": [
"es2020"
],
"module": "commonjs",
"moduleResolution": "node",
"outDir": "dist",
"types": [
"bun-types"
],
"strict": true,
"esModuleInterop": true,
"declaration": true,
"declarationMap": true,
"sourceMap": true,
"noImplicitReturns": true,
"noImplicitThis": true,
"noImplicitAny": false,
"resolveJsonModule": true,
"emitDecoratorMetadata": true,
"experimentalDecorators": true
},
"exclude": [
Expand Down
17 changes: 0 additions & 17 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5466,7 +5466,6 @@ __metadata:
"@typechain/hardhat": ^7.0.0
"@types/chai": ^4.3.11
"@types/mocha": ^10.0.6
"@types/node": ^20.11.3
"@wagmi/cli": ^1.5.2
abitype: ^0.10.3
chai: ^4.4.1
Expand Down Expand Up @@ -9762,15 +9761,6 @@ __metadata:
languageName: node
linkType: hard

"@types/node@npm:^20.11.3":
version: 20.11.3
resolution: "@types/node@npm:20.11.3"
dependencies:
undici-types: ~5.26.4
checksum: 56d58fec1352af4fddcf07b6f003e427b34c9bdd936ef895f8c3db4dccf7606662a8c536865532a7b58f1208712744cce777ba23767325e66d6beaa5c772219f
languageName: node
linkType: hard

"@types/node@npm:^8.0.0":
version: 8.10.66
resolution: "@types/node@npm:8.10.66"
Expand Down Expand Up @@ -32161,13 +32151,6 @@ __metadata:
languageName: node
linkType: hard

"undici-types@npm:~5.26.4":
version: 5.26.5
resolution: "undici-types@npm:5.26.5"
checksum: 3192ef6f3fd5df652f2dc1cd782b49d6ff14dc98e5dced492aa8a8c65425227da5da6aafe22523c67f035a272c599bb89cfe803c1db6311e44bed3042fc25487
languageName: node
linkType: hard

"undici@npm:^5.12.0, undici@npm:^5.14.0":
version: 5.22.1
resolution: "undici@npm:5.22.1"
Expand Down