generated from EthSign/forge-hardhat-template
-
Notifications
You must be signed in to change notification settings - Fork 0
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
0 parents
commit 249d1eb
Showing
22 changed files
with
7,591 additions
and
0 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,7 @@ | ||
PRIVATE_KEY= | ||
ETHERSCAN_KEY= | ||
POLYGONSCAN_API_KEY= | ||
MUMBAI_RPC_URL= | ||
ZETACHAIN_TESTNET_RPC_URL= | ||
ZETASCAN_API_KEY= | ||
ALCHEMY_ETH_RPC= |
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,84 @@ | ||
{ | ||
"ignorePatterns": [ | ||
"dist", | ||
"node_modules" | ||
], | ||
"root": true, | ||
"parser": "@typescript-eslint/parser", | ||
"parserOptions": { | ||
"project": ["./tsconfig.json"], | ||
"ecmaVersion": 12 | ||
}, | ||
"plugins": [ | ||
"@typescript-eslint", | ||
"prettier" | ||
], | ||
"extends": [ | ||
"eslint:recommended", | ||
"plugin:@typescript-eslint/eslint-recommended", | ||
"plugin:@typescript-eslint/recommended", | ||
"plugin:@typescript-eslint/recommended-requiring-type-checking", | ||
"prettier" | ||
], | ||
"rules": { | ||
"no-constructor-return": "error", | ||
"no-duplicate-imports": "error", | ||
"no-promise-executor-return": "error", | ||
"no-self-compare": "error", | ||
"no-unmodified-loop-condition": "error", | ||
"no-unreachable-loop": "error", | ||
"no-unused-private-class-members": "error", | ||
"require-atomic-updates": "error", | ||
"arrow-body-style": ["error", "as-needed"], | ||
"block-scoped-var": "error", | ||
"camelcase": ["error",{ "properties": "always" }], | ||
"curly": ["error","all"], | ||
"default-case": "error", | ||
"default-case-last": "error", | ||
"default-param-last": "error", | ||
"dot-notation": "error", | ||
"eqeqeq": "error", | ||
"max-depth": ["error", { "max": 4 }], | ||
"multiline-comment-style": ["error", "starred-block"], | ||
"no-array-constructor": "error", | ||
"no-bitwise": "error", | ||
"no-console": "error", | ||
"no-continue": "error", | ||
"no-else-return": "error", | ||
"no-eq-null": "error", | ||
"no-extra-label": "error", | ||
"no-implicit-coercion": "error", | ||
"no-implicit-globals": "error", | ||
"no-implied-eval": "error", | ||
"no-invalid-this": "error", | ||
"no-lone-blocks": "error", | ||
"no-lonely-if": "error", | ||
"no-loop-func": "error", | ||
"no-mixed-operators": "error", | ||
"no-multi-assign": "error", | ||
"no-negated-condition": "error", | ||
"no-nested-ternary": "error", | ||
"no-param-reassign": "error", | ||
"no-return-assign": "error", | ||
"no-return-await": "error", | ||
"no-shadow": "error", | ||
"no-undefined": "error", | ||
"no-useless-constructor": "error", | ||
"no-useless-rename": "error", | ||
"no-useless-return": "error", | ||
"no-var": "error", | ||
"one-var-declaration-per-line": "error", | ||
"prefer-arrow-callback": "error", | ||
"prefer-const": "error", | ||
"spaced-comment": "error", | ||
"strict" : "error", | ||
"arrow-spacing": "error", | ||
"comma-spacing": ["error", { "before": false, "after": true }], | ||
"eol-last": "error", | ||
"@typescript-eslint/no-misused-promises": [ | ||
"error", | ||
{"checksConditionals": true,"checksVoidReturn": false} | ||
], | ||
"prettier/prettier": "error" | ||
} | ||
} |
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,60 @@ | ||
name: test | ||
|
||
on: | ||
push: | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
env: | ||
FOUNDRY_PROFILE: ci | ||
|
||
jobs: | ||
check: | ||
strategy: | ||
fail-fast: true | ||
|
||
name: Foundry project | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
submodules: recursive | ||
|
||
- name: Install Foundry | ||
uses: foundry-rs/foundry-toolchain@v1 | ||
with: | ||
version: nightly | ||
|
||
- name: Setup pnpm | ||
uses: pnpm/[email protected] | ||
with: | ||
version: 9 | ||
run_install: false | ||
|
||
- name: Get pnpm store directory | ||
shell: bash | ||
run: | | ||
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV | ||
- name: Setup pnpm cache | ||
uses: actions/cache@v3 | ||
with: | ||
path: ${{ env.STORE_PATH }} | ||
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} | ||
restore-keys: | | ||
${{ runner.os }}-pnpm-store- | ||
- name: Install dependencies | ||
run: pnpm i --frozen-lockfile | ||
|
||
- name: Run Forge build | ||
run: | | ||
forge --version | ||
forge build --sizes | ||
id: build | ||
|
||
- name: Run Forge tests | ||
run: | | ||
forge test -vvv | ||
id: test |
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,136 @@ | ||
# Logs | ||
logs | ||
*.log | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
lerna-debug.log* | ||
.pnpm-debug.log* | ||
|
||
# Diagnostic reports (https://nodejs.org/api/report.html) | ||
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json | ||
|
||
# Runtime data | ||
pids | ||
*.pid | ||
*.seed | ||
*.pid.lock | ||
|
||
# Directory for instrumented libs generated by jscoverage/JSCover | ||
lib-cov | ||
|
||
# Coverage directory used by tools like istanbul | ||
coverage | ||
*.lcov | ||
|
||
# nyc test coverage | ||
.nyc_output | ||
|
||
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) | ||
.grunt | ||
|
||
# Bower dependency directory (https://bower.io/) | ||
bower_components | ||
|
||
# node-waf configuration | ||
.lock-wscript | ||
|
||
# Compiled binary addons (https://nodejs.org/api/addons.html) | ||
build/Release | ||
|
||
# Dependency directories | ||
node_modules/ | ||
jspm_packages/ | ||
|
||
# Snowpack dependency directory (https://snowpack.dev/) | ||
web_modules/ | ||
|
||
# TypeScript cache | ||
*.tsbuildinfo | ||
|
||
# Optional npm cache directory | ||
.npm | ||
|
||
# Optional eslint cache | ||
.eslintcache | ||
|
||
# Optional stylelint cache | ||
.stylelintcache | ||
|
||
# Microbundle cache | ||
.rpt2_cache/ | ||
.rts2_cache_cjs/ | ||
.rts2_cache_es/ | ||
.rts2_cache_umd/ | ||
|
||
# Optional REPL history | ||
.node_repl_history | ||
|
||
# Output of 'npm pack' | ||
*.tgz | ||
|
||
# Yarn Integrity file | ||
.yarn-integrity | ||
|
||
# dotenv environment variable files | ||
.env | ||
.env.development.local | ||
.env.test.local | ||
.env.production.local | ||
.env.local | ||
|
||
# parcel-bundler cache (https://parceljs.org/) | ||
.cache | ||
.parcel-cache | ||
|
||
# Next.js build output | ||
.next | ||
out | ||
|
||
# Nuxt.js build / generate output | ||
.nuxt | ||
dist | ||
|
||
# Gatsby files | ||
.cache/ | ||
# Comment in the public line in if your project uses Gatsby and not Next.js | ||
# https://nextjs.org/blog/next-9-1#public-directory-support | ||
# public | ||
|
||
# vuepress build output | ||
.vuepress/dist | ||
|
||
# vuepress v2.x temp and cache directory | ||
.temp | ||
.cache | ||
|
||
# Docusaurus cache and generated files | ||
.docusaurus | ||
|
||
# Serverless directories | ||
.serverless/ | ||
|
||
# FuseBox cache | ||
.fusebox/ | ||
|
||
# DynamoDB Local files | ||
.dynamodb/ | ||
|
||
# TernJS port file | ||
.tern-port | ||
|
||
# Stores VSCode versions used for testing VSCode extensions | ||
.vscode-test | ||
|
||
# yarn v2 | ||
.yarn/cache | ||
.yarn/unplugged | ||
.yarn/build-state.yml | ||
.yarn/install-state.gz | ||
.pnp.* | ||
|
||
# Hardhat | ||
artifacts | ||
cache | ||
cache_hardhat | ||
typechain-types |
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 @@ | ||
npx lint-staged && npm run build |
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,4 @@ | ||
{ | ||
"*.sol": ["npm run lint:sol"], | ||
"*.ts": ["npm run prettier:check"] | ||
} |
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 @@ | ||
shamefully-hoist=true |
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,18 @@ | ||
# directories | ||
broadcast | ||
cache | ||
coverage | ||
node_modules | ||
out | ||
deployments | ||
typechain-types | ||
artifacts | ||
cache_forge | ||
|
||
# files | ||
*.env | ||
*.log | ||
.DS_Store | ||
.pnp.* | ||
lcov.info | ||
pnpm-lock.yaml |
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,18 @@ | ||
{ | ||
"$schema": "http://json.schemastore.org/prettierrc", | ||
"overrides": [ | ||
{ | ||
"files": "*.ts", | ||
"options": { | ||
"arrowParens": "always", | ||
"bracketSpacing": false, | ||
"endOfLine": "lf", | ||
"printWidth": 80, | ||
"semi": false, | ||
"singleQuote": true, | ||
"tabWidth": 4, | ||
"trailingComma": "none" | ||
} | ||
} | ||
] | ||
} |
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", | ||
"rules": { | ||
"code-complexity": ["error", 8], | ||
"compiler-version": "off", | ||
"const-name-snakecase": "off", | ||
"func-name-mixedcase": "off", | ||
"func-visibility": ["error", { "ignoreConstructors": true }], | ||
"max-line-length": ["error", 120], | ||
"named-parameters-mapping": "warn", | ||
"no-inline-assembly": "off", | ||
"not-rely-on-time": "off", | ||
"one-contract-per-file": "off" | ||
} | ||
} |
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,2 @@ | ||
# Dependency directories | ||
node_modules |
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,8 @@ | ||
{ | ||
"solidity.compileUsingRemoteVersion": "v0.8.24+commit.e11b9ed9", | ||
"editor.formatOnSave": true, | ||
"[solidity]": { | ||
"editor.defaultFormatter": "JuanBlanco.solidity" | ||
}, | ||
"solidity.formatter": "forge" | ||
} |
Oops, something went wrong.