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

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 14 additions & 14 deletions .commitlintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,18 @@ module.exports = {
2,
'always',
[
'feat', // A new feature
'fix', // A bug fix
'docs', // Documentation only changes
'style', // Changes that do not affect the meaning of the code
'feat', // A new feature
'fix', // A bug fix
'docs', // Documentation only changes
'style', // Changes that do not affect the meaning of the code
'refactor', // A code change that neither fixes a bug nor adds a feature
'perf', // A code change that improves performance
'test', // Adding missing tests or correcting existing tests
'chore', // Changes to the build process or auxiliary tools
'ci', // Changes to CI configuration files and scripts
'build', // Changes that affect the build system or external dependencies
'revert' // Reverts a previous commit
]
'perf', // A code change that improves performance
'test', // Adding missing tests or correcting existing tests
'chore', // Changes to the build process or auxiliary tools
'ci', // Changes to CI configuration files and scripts
'build', // Changes that affect the build system or external dependencies
'revert', // Reverts a previous commit
],
],
'type-case': [2, 'always', 'lower-case'],
'type-empty': [2, 'never'],
Expand All @@ -26,6 +26,6 @@ module.exports = {
'subject-full-stop': [2, 'never', '.'],
'header-max-length': [2, 'always', 72],
'body-leading-blank': [2, 'always'],
'footer-leading-blank': [2, 'always']
}
};
'footer-leading-blank': [2, 'always'],
},
};
77 changes: 67 additions & 10 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ name: CI

on:
push:
branches: [ main ]
branches: [main]
pull_request:
branches: [ main ]
branches: [main]

jobs:
Lint:
commit-message:
name: Check Commit Messages
runs-on: ubuntu-latest
steps:
Expand All @@ -19,7 +19,7 @@ jobs:
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '18'
node-version: '20'
cache: 'yarn'

- name: Install dependencies
Expand All @@ -33,6 +33,63 @@ jobs:
if: github.event_name == 'push'
run: npx --no -- commitlint --from=HEAD~1

typescript-lint:
name: TypeScript Lint
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'yarn'

- name: Install dependencies
run: yarn install --frozen-lockfile

- name: Run ESLint
run: yarn typescript:lint

solidity-lint:
name: Solidity Lint
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'yarn'

- name: Install dependencies
run: yarn install --frozen-lockfile

- name: Run Solhint
run: yarn solidity:lint

format-check:
name: Format Check
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'yarn'

- name: Install dependencies
run: yarn install --frozen-lockfile

- name: Check formatting
run: yarn format:check

circuit-build:
name: Circuit Build
runs-on: ubuntu-latest
Expand All @@ -43,7 +100,7 @@ jobs:
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '18'
node-version: '20'
cache: 'yarn'

- name: Install Noir
Expand Down Expand Up @@ -74,7 +131,7 @@ jobs:
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '18'
node-version: '20'
cache: 'yarn'

- name: Install Noir
Expand All @@ -99,7 +156,7 @@ jobs:
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '18'
node-version: '20'
cache: 'yarn'

- name: Install Noir
Expand Down Expand Up @@ -145,7 +202,7 @@ jobs:
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '18'
node-version: '20'
cache: 'yarn'

- name: Install dependencies
Expand Down Expand Up @@ -174,7 +231,7 @@ jobs:
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '18'
node-version: '20'
cache: 'yarn'

- name: Install dependencies
Expand All @@ -193,4 +250,4 @@ jobs:
path: ./

- name: Run contract tests
run: yarn contracts:test
run: yarn contracts:test
2 changes: 1 addition & 1 deletion .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1 +1 @@
echo pre-commit
npx lint-staged
26 changes: 26 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Dependencies
node_modules/

# Build outputs
dist/
build/
coverage/
typechain-types/

# Hardhat files
cache/
artifacts/

# Circuit build files
circuit/target/

# Ignition deployments
ignition/deployments/

# Environment files
.env
.env.*

# Lock files (already formatted by package managers)
yarn.lock
package-lock.json
23 changes: 23 additions & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"semi": true,
"trailingComma": "es5",
"singleQuote": true,
"printWidth": 100,
"tabWidth": 2,
"useTabs": false,
"bracketSpacing": true,
"arrowParens": "always",
"endOfLine": "lf",
"overrides": [
{
"files": "*.sol",
"options": {
"printWidth": 120,
"tabWidth": 4,
"useTabs": false,
"singleQuote": false,
"bracketSpacing": false
}
}
]
}
29 changes: 29 additions & 0 deletions .solhint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"extends": "solhint:recommended",
"plugins": [],
"rules": {
"compiler-version": ["error", "^0.8.0"],
"func-visibility": ["warn", { "ignoreConstructors": true }],
"avoid-suicide": "error",
"avoid-sha3": "warn",
"avoid-throw": "warn",
"avoid-tx-origin": "error",
"no-console": "error",
"max-line-length": ["warn", 120],
"max-states-count": ["warn", 15],
"reason-string": ["warn", { "maxLength": 64 }],
"constructor-syntax": "warn",
"quotes": ["error", "double"],
"const-name-snakecase": "error",
"func-name-mixedcase": "error",
"func-param-name-mixedcase": "error",
"modifier-name-mixedcase": "error",
"var-name-mixedcase": "error",
"private-vars-leading-underscore": ["warn", { "strict": false }],
"imports-on-top": "error",
"ordering": "warn",
"visibility-modifier-order": "error",
"no-empty-blocks": "warn",
"no-unused-vars": "warn"
}
}
12 changes: 12 additions & 0 deletions .solhintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Dependencies
node_modules/

# Hardhat files
cache/
artifacts/

# Generated verifier contracts
contracts/VerifierKeccak.sol

# Build outputs
typechain-types/
Loading