-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
95b5726
commit 39ebc3a
Showing
28 changed files
with
12,535 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
extends: | ||
- "eslint:recommended" | ||
- "plugin:@typescript-eslint/eslint-recommended" | ||
- "plugin:@typescript-eslint/recommended" | ||
- "plugin:prettier/recommended" | ||
parser: "@typescript-eslint/parser" | ||
parserOptions: | ||
project: "tsconfig.json" | ||
plugins: | ||
- "@typescript-eslint" | ||
root: true | ||
rules: | ||
"@typescript-eslint/no-floating-promises": | ||
- error | ||
- ignoreIIFE: true | ||
ignoreVoid: true | ||
"@typescript-eslint/no-inferrable-types": "off" | ||
"@typescript-eslint/explicit-module-boundary-types": "off" | ||
"@typescript-eslint/no-explicit-any": "off" | ||
"@typescript-eslint/no-unused-vars": | ||
- error | ||
- argsIgnorePattern: _ | ||
varsIgnorePattern: _ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,5 +7,7 @@ out/ | |
/broadcast/*/31337/ | ||
/broadcast/**/dry-run/ | ||
|
||
node_modules/ | ||
|
||
# Dotenv file | ||
.env |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
out/ | ||
lib/ | ||
.run/ | ||
gasReporterOutput.json | ||
|
||
|
||
# directories | ||
.yarn/ | ||
**/.coverage_artifacts | ||
**/.coverage_cache | ||
**/.coverage_contracts | ||
**/artifacts | ||
**/build | ||
**/cache | ||
**/coverage | ||
**/dist | ||
**/node_modules | ||
**/src/types | ||
|
||
# files | ||
*.env | ||
*.log | ||
*.tsbuildinfo | ||
.pnp.* | ||
coverage.json | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
bracketSpacing: true | ||
endOfLine: auto | ||
printWidth: 120 | ||
singleQuote: false | ||
tabWidth: 2 | ||
trailingComma: all | ||
semi: true | ||
|
||
overrides: | ||
- files: "*.sol" | ||
options: | ||
tabWidth: 4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
"extends": "solhint:recommended", | ||
"plugins": ["prettier"], | ||
"rules": { | ||
"code-complexity": ["error", 7], | ||
"prettier/prettier": ["error", { "endOfLine": "auto" }], | ||
"compiler-version": ["warn", "0.8.13"], | ||
"not-rely-on-time": "off", | ||
"func-visibility": ["warn", { "ignoreConstructors": true }], | ||
"func-name-mixedcase": "off", | ||
"max-states-count": "off", | ||
"max-line-length": ["error", 120], | ||
"reason-string": ["warn", { "maxLength": 64 }] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
node_modules | ||
lib/openzeppelin-contracts | ||
lib/forge-std | ||
src/test | ||
**/artifacts |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
import * as dotenv from "dotenv"; | ||
|
||
import { HardhatUserConfig, task } from "hardhat/config"; | ||
import "@nomiclabs/hardhat-ethers"; | ||
import "hardhat-deploy"; | ||
import "@typechain/hardhat"; | ||
import "@nomiclabs/hardhat-etherscan"; | ||
|
||
// import "./tasks/createCollection"; | ||
|
||
dotenv.config(); | ||
|
||
// You need to export an object to set up your config | ||
// Go to https://hardhat.org/config/ to learn more | ||
|
||
let accounts: any[] = []; | ||
if (process.env.PRIVATE_KEY !== undefined) { | ||
accounts = [process.env.PRIVATE_KEY]; | ||
} else { | ||
throw new Error(`PRIVATE_KEY not set`); | ||
} | ||
|
||
const config: HardhatUserConfig = { | ||
solidity: { | ||
compilers: [ | ||
{ | ||
version: "0.8.13", | ||
settings: { | ||
optimizer: { | ||
enabled: true, | ||
runs: 200, | ||
}, | ||
}, | ||
}, | ||
], | ||
}, | ||
paths: { | ||
artifacts: "./artifacts", | ||
sources: "./src", | ||
}, | ||
networks: { | ||
goerli: { | ||
url: process.env.GOERLI_URL || "", | ||
accounts: accounts, | ||
}, | ||
gnosis: { | ||
url: process.env.GNOSIS_URL || "", | ||
accounts: accounts, | ||
}, | ||
}, | ||
namedAccounts: { | ||
deployer: { default: 0 }, | ||
}, | ||
etherscan: { | ||
// Your API key for Etherscan | ||
// Obtain one at https://etherscan.io/ | ||
apiKey: process.env.YOUR_ETHERSCAN_API_KEY, | ||
}, | ||
}; | ||
|
||
export default config; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
{ | ||
"name": "hardhat-project", | ||
"scripts": { | ||
"forge": "forge", | ||
"build": "forge build", | ||
"clean": "forge clean", | ||
"test": "yarn forge test -vvv --fork-url https://rpc.ankr.com/gnosis --fork-block-number 19592773 --match-contract TheBadgeTest", | ||
"test:all": "yarn forge test -vv --fork-url https://eth-goerli.alchemyapi.io/v2/QUuY7K6TSAGYCMXLBQiKwO43O9lLyrEE --fork-block-number 5744491", | ||
"lint": "yarn lint:sol && yarn lint:ts && yarn prettier:check", | ||
"lint:sol": "solhint --config ./.solhint.json \"src/**/*.sol\"", | ||
"lint:ts": "eslint --config ./.eslintrc.js --ignore-path ./.eslintignore --ext .js,.ts .", | ||
"prettier": "prettier --config ./.prettierrc.yaml --write \"**/*.{js,json,md,sol,ts,yaml,yml}\"", | ||
"prettier:check": "prettier --check --config ./.prettierrc.yaml \"**/*.{js,json,md,sol,ts,yaml,yml}\"", | ||
"deploy:goerli": "hardhat run --network goerli ./scripts/deploy.ts", | ||
"deploy:gnosis": "hardhat run --network gnosis ./scripts/deploy.ts" | ||
}, | ||
"dependencies": { | ||
"@kleros/erc-792": "^8.0.0", | ||
"@kleros/kathari": "^0.25.0", | ||
"@openzeppelin/contracts": "^4.7.1" | ||
}, | ||
"devDependencies": { | ||
"@nomicfoundation/hardhat-chai-matchers": "^1.0.3", | ||
"@nomicfoundation/hardhat-network-helpers": "^1.0.6", | ||
"@nomicfoundation/hardhat-toolbox": "^1.0.2", | ||
"@nomiclabs/hardhat-ethers": "npm:hardhat-deploy-ethers", | ||
"@nomiclabs/hardhat-etherscan": "^3.1.0", | ||
"@typechain/hardhat": "^6.1.3", | ||
"@typechain/ethers-v5": "^10.0.0", | ||
"@typescript-eslint/eslint-plugin": "^5.38.0", | ||
"@typescript-eslint/parser": "^5.27.0", | ||
"chai": "^4.3.6", | ||
"dotenv": "^16.0.2", | ||
"eslint": "^8.16.0", | ||
"eslint-config-prettier": "^8.5.0", | ||
"eslint-config-standard": "^17.0.0", | ||
"eslint-plugin-import": "^2.26.0", | ||
"eslint-plugin-node": "^11.1.0", | ||
"eslint-plugin-prettier": "^4.0.0", | ||
"eslint-plugin-promise": "^6.0.0", | ||
"hardhat": "^2.10.1", | ||
"hardhat-gas-reporter": "^1.0.9", | ||
"hardhat-deploy": "^0.11.10", | ||
"prettier": "^2.6.2", | ||
"prettier-plugin-solidity": "^1.0.0-beta.19", | ||
"solhint": "^3.3.7", | ||
"solhint-plugin-prettier": "^0.0.5", | ||
"solidity-coverage": "^0.8.2", | ||
"ts-node": "^10.9.1", | ||
"typechain": "^8.0.0", | ||
"typescript": "^4.7.4" | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import * as dotenv from "dotenv"; | ||
import hre from "hardhat"; | ||
import { HardhatRuntimeEnvironment } from "hardhat/types"; | ||
|
||
async function main(hre: HardhatRuntimeEnvironment) { | ||
const { deployments, getNamedAccounts, ethers } = hre; | ||
const { deploy } = deployments; | ||
|
||
const { deployer } = await ethers.getNamedSigners(); | ||
|
||
const collection = await deploy("TheBadge", { | ||
from: deployer.address, | ||
contract: "TheBadge", | ||
args: [], | ||
log: true, | ||
autoMine: true, | ||
}); | ||
|
||
//await collection.deployed(); | ||
|
||
console.log("TheBadge:", collection.address); | ||
} | ||
|
||
// We recommend this pattern to be able to use async/await everywhere | ||
// and properly handle errors. | ||
main(hre).catch((error) => { | ||
console.error(error); | ||
process.exitCode = 1; | ||
}); |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.