Skip to content

Commit 3851bbc

Browse files
authored
Merge pull request #12 from privacy-scaling-explorations/dev
Release 0.1.0
2 parents 2f8462b + e8516be commit 3851bbc

File tree

121 files changed

+28687
-2
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

121 files changed

+28687
-2
lines changed

.commitlintrc.js

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
const fs = require("node:fs")
2+
const path = require("node:path")
3+
4+
const packages = fs.readdirSync(path.resolve(__dirname, "packages"))
5+
const apps = fs.readdirSync(path.resolve(__dirname, "apps"))
6+
7+
module.exports = {
8+
extends: ["@commitlint/config-conventional"],
9+
prompt: {
10+
scopes: [...packages, ...apps],
11+
markBreakingChangeMode: true,
12+
allowCustomIssuePrefix: false,
13+
allowEmptyIssuePrefix: false,
14+
issuePrefixes: [
15+
{
16+
value: "re",
17+
name: "re: ISSUES related"
18+
}
19+
]
20+
}
21+
}

.editorconfig

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#root = true
2+
3+
[*]
4+
indent_style = space
5+
end_of_line = lf
6+
charset = utf-8
7+
trim_trailing_whitespace = true
8+
insert_final_newline = true
9+
max_line_length = 120
10+
indent_size = 4
11+
12+
[*.md]
13+
trim_trailing_whitespace = false

.eslintignore

+37
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# dependencies
2+
node_modules
3+
package-lock.json
4+
yarn.lock
5+
.yarn
6+
7+
# testing
8+
coverage
9+
coverage.json
10+
11+
# hardhat
12+
artifacts
13+
cache
14+
typechain-types
15+
16+
# foundry
17+
cache_forge
18+
out
19+
docs
20+
21+
# production
22+
dist
23+
build
24+
/docs
25+
26+
# Docusaurus cache and generated files
27+
.docusaurus
28+
.cache-loader
29+
30+
# misc
31+
.DS_Store
32+
*.pem
33+
34+
# debug
35+
npm-debug.log*
36+
yarn-debug.log*
37+
yarn-error.log*

.eslintrc.json

+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
{
2+
"root": true,
3+
"env": {
4+
"es6": true
5+
},
6+
"extends": ["airbnb", "airbnb-typescript/base", "prettier"],
7+
"parser": "@typescript-eslint/parser",
8+
"parserOptions": {
9+
"ecmaVersion": 6,
10+
"sourceType": "module",
11+
"project": ["./tsconfig.json", "./packages/**/tsconfig.json"]
12+
},
13+
"plugins": ["@typescript-eslint"],
14+
"rules": {
15+
"react/require-default-props": "off",
16+
"react/jsx-props-no-spreading": "off",
17+
"react/react-in-jsx-scope": "off",
18+
"react/jsx-filename-extension": [1, { "extensions": [".tsx"] }],
19+
"import/prefer-default-export": "off",
20+
"import/extensions": "off",
21+
"no-underscore-dangle": "off",
22+
"import/no-extraneous-dependencies": "off",
23+
"no-bitwise": "off",
24+
"no-await-in-loop": "off",
25+
"no-restricted-syntax": "off",
26+
"no-console": ["warn", { "allow": ["info", "warn", "error"] }],
27+
"@typescript-eslint/lines-between-class-members": "off",
28+
"no-param-reassign": "off"
29+
},
30+
"overrides": [
31+
{
32+
"files": ["./scripts/*"],
33+
"rules": {
34+
"no-console": "off"
35+
}
36+
}
37+
]
38+
}

.gitattributes

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
*.sol linguist-language=Solidity

.github/CODEOWNERS

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* @privacy-scaling-explorations/excubiae

.github/workflows/main.yml

+105
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
name: main
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
9+
concurrency:
10+
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
11+
cancel-in-progress: true
12+
13+
jobs:
14+
style:
15+
runs-on: ubuntu-latest
16+
17+
steps:
18+
- name: Checkout
19+
uses: actions/checkout@v4
20+
21+
- name: Setup Node
22+
uses: actions/setup-node@v4
23+
with:
24+
node-version: 20
25+
cache: yarn
26+
27+
- name: Install Foundry
28+
uses: foundry-rs/foundry-toolchain@v1
29+
30+
- name: Install dependencies
31+
run: yarn
32+
33+
- name: Get changed files
34+
id: changed-files
35+
uses: tj-actions/changed-files@v44
36+
with:
37+
files_yaml: |
38+
contracts:
39+
- packages/contracts/**/*.{js,json,ts,sol}
40+
docs:
41+
- apps/docs/**/*
42+
packages:
43+
- packages/**/*.{js,json,ts}
44+
- '!packages/{contracts}/**/*'
45+
to_format:
46+
- '**/*.{cjs,js,json,jsx,md,mdx,sol,ts,tsx,yaml,yml}'
47+
to_lint:
48+
- '**/*.{cjs,js,jsx,ts,tsx}'
49+
50+
- if: steps.changed-files.outputs.contracts_any_changed == 'true'
51+
name: Compile and lint contracts
52+
run: |
53+
yarn compile:contracts
54+
yarn workspace excubiae-contracts lint
55+
56+
- if: steps.changed-files.outputs.docs_any_changed == 'true'
57+
name: Build and format docs
58+
run: |
59+
yarn workspace excubiae-docs build
60+
yarn workspace excubiae-docs format
61+
62+
- if: steps.changed-files.outputs.packages_any_changed == 'true'
63+
name: Build packages
64+
run: yarn build:packages
65+
66+
- if: steps.changed-files.outputs.to_format_any_changed == 'true'
67+
name: Format
68+
run: yarn run prettier --check --ignore-unknown --no-error-on-unmatched-pattern ${{ steps.changed-files.outputs.to_format_all_changed_files }}
69+
70+
- if: steps.changed-files.outputs.to_lint_any_changed == 'true'
71+
name: Run Eslint
72+
run: yarn run eslint ${{ steps.changed-files.outputs.to_lint_all_changed_files }} --ext .cjs,.js,.jsx,.ts,.tsx
73+
74+
test:
75+
runs-on: ubuntu-latest
76+
77+
steps:
78+
- name: Checkout
79+
uses: actions/checkout@v4
80+
81+
- name: Setup Node
82+
uses: actions/setup-node@v4
83+
with:
84+
node-version: 20
85+
cache: yarn
86+
87+
- name: Install Foundry
88+
uses: foundry-rs/foundry-toolchain@v1
89+
90+
- name: Install dependencies
91+
run: yarn
92+
93+
- name: Get changed files
94+
id: changed-files
95+
uses: tj-actions/changed-files@v44
96+
with:
97+
files_yaml: |
98+
contracts:
99+
- packages/contracts/**/*.{js,json,ts,sol}
100+
101+
- if: steps.changed-files.outputs.contracts_any_changed == 'true'
102+
name: Build and Test contracts
103+
run: |
104+
yarn compile:contracts
105+
yarn test:contracts

.github/workflows/release.yml

+43
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: release
2+
3+
permissions:
4+
contents: write
5+
6+
on:
7+
push:
8+
tags:
9+
- "*"
10+
11+
jobs:
12+
release:
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- uses: actions/checkout@v4
17+
with:
18+
fetch-depth: 0
19+
20+
- name: Install Node.js
21+
uses: actions/setup-node@v4
22+
with:
23+
node-version: 20
24+
cache: yarn
25+
registry-url: "https://registry.npmjs.org"
26+
27+
- name: Authentication
28+
run: |
29+
echo npmAuthToken: "$NODE_AUTH_TOKEN" >> ./.yarnrc.yml
30+
env:
31+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
32+
33+
- name: Install dependencies
34+
run: yarn
35+
36+
- name: Publish packages
37+
run: yarn version:publish
38+
env:
39+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
40+
41+
- run: yarn version:release
42+
env:
43+
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}

.gitignore

+93
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
# Logs
2+
logs
3+
*.log
4+
npm-debug.log*
5+
yarn-debug.log*
6+
yarn-error.log*
7+
lerna-debug.log*
8+
.pnpm-debug.log*
9+
10+
# Diagnostic reports (https://nodejs.org/api/report.html)
11+
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
12+
13+
# Runtime data
14+
pids
15+
*.pid
16+
*.seed
17+
*.pid.lock
18+
19+
# IDE
20+
.vscode
21+
.idea
22+
23+
# Testing
24+
coverage
25+
coverage.json
26+
*.lcov
27+
28+
# Dependency directories
29+
node_modules/
30+
31+
# TypeScript cache
32+
*.tsbuildinfo
33+
34+
# Optional npm cache directory
35+
.npm
36+
.DS_Store
37+
38+
# Output of 'npm pack'
39+
*.tgz
40+
41+
# Optional eslint cache
42+
.eslintcache
43+
44+
# Microbundle cache
45+
.rpt2_cache/
46+
.rts2_cache_cjs/
47+
.rts2_cache_es/
48+
.rts2_cache_umd/
49+
50+
# Output of 'npm pack'
51+
*.tgz
52+
53+
# Yarn Integrity file
54+
.yarn-integrity
55+
56+
# dotenv environment variable files
57+
.env
58+
.env.development.local
59+
.env.test.local
60+
.env.production.local
61+
.env.local
62+
63+
# Production
64+
build
65+
dist
66+
/docs
67+
68+
# Docusaurus cache and generated files
69+
.docusaurus
70+
.cache-loader
71+
72+
# Hardhat
73+
artifacts
74+
cache
75+
typechain-types
76+
77+
# Stores VSCode versions used for testing VSCode extensions
78+
.vscode-test
79+
80+
# yarn v3
81+
.pnp.*
82+
.yarn/*
83+
!.yarn/patches
84+
!.yarn/plugins
85+
!.yarn/releases
86+
!.yarn/sdks
87+
!.yarn/versions
88+
89+
# asdf
90+
.tool-versions
91+
92+
# direnv
93+
.envrc

.husky/commit-msg

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
npx --no-install commitlint --edit $1

.husky/pre-commit

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
npx lint-staged

.husky/prepare-commit-msg

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
if [ "$NO_HOOK" != "1" ]; then
2+
exec < /dev/tty && npx czg --hook || true
3+
fi

.lintstagedrc.json

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"**/*.{js,ts,jsx,tsx,md,json,sol,yaml,yml}": "prettier --write --no-error-on-unmatched-pattern",
3+
"**/*.{js,ts,jsx,tsx}": "eslint"
4+
}

0 commit comments

Comments
 (0)