Skip to content

Commit abf625a

Browse files
shottahgithub-actions[bot]
authored andcommitted
feat: initial commit
0 parents  commit abf625a

26 files changed

+941
-0
lines changed

Diff for: .czrc

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"path": "cz-conventional-changelog"
3+
}

Diff for: .editorconfig

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# EditorConfig http://EditorConfig.org
2+
3+
# top-most EditorConfig file
4+
root = true
5+
6+
# All files
7+
[*]
8+
charset = utf-8
9+
end_of_line = lf
10+
indent_size = 2
11+
indent_style = space
12+
insert_final_newline = true
13+
trim_trailing_whitespace = true
14+
15+
[*.sol]
16+
indent_size = 4

Diff for: .eslintignore

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# directories
2+
.coverage_artifacts
3+
.coverage_cache
4+
.coverage_contracts
5+
artifacts
6+
build
7+
cache
8+
coverage
9+
dist
10+
node_modules
11+
types
12+
13+
# files
14+
*.env
15+
*.log
16+
.DS_Store
17+
.pnp.*
18+
bun.lockb
19+
coverage.json
20+
package-lock.json
21+
pnpm-lock.yaml
22+
yarn.lock

Diff for: .eslintrc.yml

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
extends:
2+
- "eslint:recommended"
3+
- "plugin:@typescript-eslint/eslint-recommended"
4+
- "plugin:@typescript-eslint/recommended"
5+
- "prettier"
6+
parser: "@typescript-eslint/parser"
7+
parserOptions:
8+
project: "tsconfig.json"
9+
plugins:
10+
- "@typescript-eslint"
11+
root: true
12+
rules:
13+
"@typescript-eslint/no-floating-promises":
14+
- error
15+
- ignoreIIFE: true
16+
ignoreVoid: true
17+
"@typescript-eslint/no-inferrable-types": "off"
18+
"@typescript-eslint/no-unused-vars":
19+
- error
20+
- argsIgnorePattern: "_"
21+
varsIgnorePattern: "_"

Diff for: .github/workflows/ci.yml

+55
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: "CI"
2+
3+
env:
4+
HARDHAT_VAR_MNEMONIC: "test test test test test test test test test test test junk"
5+
HARDHAT_VAR_INFURA_API_KEY: "zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz"
6+
# Uncomment the following lines to set your configuration variables using
7+
# GitHub secrets (https://docs.github.com/en/actions/security-guides/using-secrets-in-github-actions)
8+
#
9+
# HARDHAT_VAR_MNEMONIC: ${{ secrets.Mnemonic }}
10+
# HARDHAT_VAR_INFURA_API_KEY: ${{ secrets.InfuraApiKey }}
11+
# HARDHAT_VAR_ARBISCAN_API_KEY: ${{ secrets.ArbiscanApiKey }}
12+
# HARDHAT_VAR_BSCSCAN_API_KEY: ${{ secrets.BscscanApiKey }}
13+
# HARDHAT_VAR_ETHERSCAN_API_KEY: ${{ secrets.EtherscanApiKey }}
14+
# HARDHAT_VAR_OPTIMISM_API_KEY: ${{ secrets.OptimismApiKey }}
15+
# HARDHAT_VAR_POLYGONSCAN_API_KEY: ${{ secrets.PolygonscanApiKey }}
16+
# HARDHAT_VAR_SNOWTRACE_API_KEY: ${{ secrets.SnowtraceApiKey }}
17+
18+
on:
19+
workflow_dispatch:
20+
pull_request:
21+
push:
22+
branches:
23+
- main
24+
25+
jobs:
26+
ci:
27+
runs-on: "ubuntu-latest"
28+
steps:
29+
- name: "Check out the repo"
30+
uses: "actions/checkout@v4"
31+
32+
- name: "Install Bun"
33+
uses: "oven-sh/setup-bun@v1"
34+
35+
- name: "Install the dependencies"
36+
run: "bun install"
37+
38+
- name: "Lint the code"
39+
run: "bun run lint"
40+
41+
- name: "Add lint summary"
42+
run: |
43+
echo "## Lint results" >> $GITHUB_STEP_SUMMARY
44+
echo "✅ Passed" >> $GITHUB_STEP_SUMMARY
45+
46+
- name: "Compile the contracts and generate the TypeChain bindings"
47+
run: "bun run typechain"
48+
49+
- name: "Test the contracts and generate the coverage report"
50+
run: "bun run coverage"
51+
52+
- name: "Add test summary"
53+
run: |
54+
echo "## Test results" >> $GITHUB_STEP_SUMMARY
55+
echo "✅ Passed" >> $GITHUB_STEP_SUMMARY

Diff for: .gitignore

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# directories
2+
.coverage_artifacts
3+
.coverage_cache
4+
.coverage_contracts
5+
artifacts
6+
build
7+
cache
8+
coverage
9+
dist
10+
node_modules
11+
types
12+
deployments
13+
14+
# files
15+
*.env
16+
*.log
17+
.DS_Store
18+
.pnp.*
19+
coverage.json
20+
package-lock.json
21+
pnpm-lock.yaml
22+
yarn.lock

Diff for: .prettierignore

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# directories
2+
.coverage_artifacts
3+
.coverage_cache
4+
.coverage_contracts
5+
artifacts
6+
build
7+
cache
8+
coverage
9+
dist
10+
node_modules
11+
types
12+
13+
# files
14+
*.env
15+
*.log
16+
.DS_Store
17+
.pnp.*
18+
bun.lockb
19+
coverage.json
20+
package-lock.json
21+
pnpm-lock.yaml
22+
yarn.lock

Diff for: .prettierrc.yml

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
bracketSpacing: true
2+
plugins:
3+
- "@trivago/prettier-plugin-sort-imports"
4+
- "prettier-plugin-solidity"
5+
printWidth: 120
6+
proseWrap: "always"
7+
singleQuote: false
8+
tabWidth: 2
9+
trailingComma: "all"
10+
11+
overrides:
12+
- files: "*.sol"
13+
options:
14+
compiler: "0.8.17"
15+
parser: "solidity-parse"
16+
tabWidth: 4
17+
- files: "*.ts"
18+
options:
19+
importOrder: ["<THIRD_PARTY_MODULES>", "^[./]"]
20+
importOrderParserPlugins: ["typescript"]
21+
importOrderSeparation: true
22+
importOrderSortSpecifiers: true
23+
parser: "typescript"

Diff for: .solcover.js

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
module.exports = {
2+
istanbulReporter: ["html", "lcov"],
3+
skipFiles: ["test"],
4+
};

Diff for: .solhint.json

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
"extends": "solhint:recommended",
3+
"plugins": ["prettier"],
4+
"rules": {
5+
"code-complexity": ["error", 8],
6+
"compiler-version": ["error", ">=0.8.4"],
7+
"func-visibility": ["error", { "ignoreConstructors": true }],
8+
"max-line-length": ["error", 120],
9+
"named-parameters-mapping": "warn",
10+
"no-console": "off",
11+
"not-rely-on-time": "off",
12+
"prettier/prettier": [
13+
"error",
14+
{
15+
"endOfLine": "auto"
16+
}
17+
]
18+
}
19+
}

Diff for: .solhintignore

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# directories
2+
**/artifacts
3+
**/node_modules

Diff for: .vscode/extensions.json

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"recommendations": ["esbenp.prettier-vscode", "NomicFoundation.hardhat-solidity"]
3+
}

Diff for: .vscode/settings.json

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"editor.defaultFormatter": "esbenp.prettier-vscode",
3+
"editor.formatOnSave": true,
4+
"prettier.documentSelectors": ["**/*.sol"],
5+
"solidity.formatter": "prettier",
6+
"typescript.tsdk": "node_modules/typescript/lib"
7+
}

Diff for: LICENSE.md

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
MIT License
2+
3+
Copyright (c) 2023 Paul Razvan Berg
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
6+
documentation files (the "Software"), to deal in the Software without restriction, including without limitation the
7+
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit
8+
persons to whom the Software is furnished to do so, subject to the following conditions:
9+
10+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the
11+
Software.
12+
13+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
14+
WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
15+
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
16+
OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

0 commit comments

Comments
 (0)