Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release 0.1.0 #12

Merged
merged 48 commits into from
Dec 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
c3eb8a4
chore: basic and core configuration for typescript monorepo
0xjei Sep 21, 2024
73952a7
chore: apps boilerplate and lint-format configs
0xjei Sep 21, 2024
3d55318
chore(contracts): add hardhat sample project and scripts
0xjei Sep 21, 2024
b62370a
chore: basic commands and scripts for versioning and cleaning
0xjei Sep 21, 2024
cba0839
chore(contracts): missing LICENSE on contracts
0xjei Sep 21, 2024
93ea82e
fix(contracts): avoid prompt on solhint fix
0xjei Sep 23, 2024
f62fe22
ci: add basic automation for style and test on pull requests
0xjei Sep 23, 2024
cc9ed90
Merge pull request #2 from privacy-scaling-explorations/chore/ci
0xjei Sep 23, 2024
97f9c8d
fix: skip explicitly the symlinks format with prettier
0xjei Sep 23, 2024
79b6c40
feat(contracts): support hardhat and foundry for contracts package
0xjei Sep 24, 2024
45a509f
chore(contracts): update configs for networks and deployments; minor …
0xjei Sep 25, 2024
fe1c502
Merge pull request #1 from privacy-scaling-explorations/chore/boilerp…
0xjei Sep 27, 2024
fad47c5
feat(contracts): init porting of excubia core abstract contract and F…
0xjei Oct 1, 2024
1f10601
test(contracts): add advanced fuzz and invariant testing with Foundry…
0xjei Oct 2, 2024
23e2578
chore(contracts): generate coverage report for foundry
0xjei Oct 3, 2024
0c5b7eb
refactor(contracts): adapt trait to check and pass internal-external …
0xjei Oct 3, 2024
9860411
test(contracts): use hardhat fixture instead of before()
0xjei Oct 3, 2024
4e84485
refactor(contracts): apply foundry best practices & docs gen; minor d…
0xjei Oct 3, 2024
a6d6b68
Merge pull request #3 from privacy-scaling-explorations/port/core
0xjei Oct 4, 2024
81a7a89
chore: add code owners
0xjei Oct 7, 2024
f1d4bb0
Merge pull request #4 from privacy-scaling-explorations/chore/codeowners
0xjei Oct 7, 2024
e629d29
feat(contracts)!: add base and advanced Checker and Excubia contracts
0xjei Nov 6, 2024
1389b2d
refactor(contracts): add mapping of mapping to handle multiple status…
0xjei Nov 22, 2024
9f4e9a0
refactor(contracts): add return to checks
0xjei Nov 22, 2024
c1ec974
refactor(contracts): remove extensions
0xjei Nov 25, 2024
53ce02c
refactor(contracts): apply new naming conventions to contracts
0xjei Nov 25, 2024
9a6d052
test(contracts): add example implementation and tests for BaseChecker…
0xjei Nov 26, 2024
9a05be6
chore(contracts): group base test contracts under base folder
0xjei Nov 26, 2024
c4be681
chore(contracts): move contracts tests to the same place
0xjei Nov 26, 2024
0b07847
test(contracts): add missing base tests to reach max code coverage
0xjei Nov 27, 2024
39b1b30
test(contracts): add harness for checker and policy to hardhat testing
0xjei Nov 28, 2024
ab8f3fa
test(contracts): add advanced ts tests
0xjei Nov 28, 2024
1c2416d
test(contracts): add advanced tests for max code coverage
0xjei Nov 29, 2024
cad1311
refactor(contracts): make advanced policy flags immutable
0xjei Nov 29, 2024
c74c32d
refactor(contracts): improve contracts and test documentation; small …
0xjei Dec 2, 2024
23d6eed
refactor(contracts): improve custom error name of advanced contracts
0xjei Dec 3, 2024
2eb2033
refactor(contracts): move advanced control flags for checks from chec…
0xjei Dec 3, 2024
3e595b8
refactor(contracts): switched to pragma for compatibility; minor fix
0xjei Dec 3, 2024
64ae098
refactor(contracts): change setTarget() visibility from public to ext…
0xjei Dec 3, 2024
688259b
refactor(contracts): remove redundant if case; move struct to interface
0xjei Dec 3, 2024
169d545
Merge pull request #9 from privacy-scaling-explorations/update/core
0xjei Dec 3, 2024
62a3292
feat: add release workflow with github actions
0xjei Dec 3, 2024
f213632
Merge pull request #11 from privacy-scaling-explorations/release/0.1.0
0xjei Dec 4, 2024
3b19b24
docs: add first version of readmes
0xjei Dec 3, 2024
55f6037
docs: small nits on readmes
0xjei Dec 4, 2024
22f04e5
Merge pull request #10 from privacy-scaling-explorations/docs/readmes
0xjei Dec 4, 2024
8ed473a
docs: wrong example on readme command
0xjei Dec 4, 2024
e8516be
chore: v0.1.0
0xjei Dec 4, 2024
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
21 changes: 21 additions & 0 deletions .commitlintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
const fs = require("node:fs")

Check warning on line 1 in .commitlintrc.js

View workflow job for this annotation

GitHub Actions / style

File ignored by default.
const path = require("node:path")

const packages = fs.readdirSync(path.resolve(__dirname, "packages"))
const apps = fs.readdirSync(path.resolve(__dirname, "apps"))

module.exports = {
extends: ["@commitlint/config-conventional"],
prompt: {
scopes: [...packages, ...apps],
markBreakingChangeMode: true,
allowCustomIssuePrefix: false,
allowEmptyIssuePrefix: false,
issuePrefixes: [
{
value: "re",
name: "re: ISSUES related"
}
]
}
}
13 changes: 13 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#root = true

[*]
indent_style = space
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
max_line_length = 120
indent_size = 4

[*.md]
trim_trailing_whitespace = false
37 changes: 37 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# dependencies
node_modules
package-lock.json
yarn.lock
.yarn

# testing
coverage
coverage.json

# hardhat
artifacts
cache
typechain-types

# foundry
cache_forge
out
docs

# production
dist
build
/docs

# Docusaurus cache and generated files
.docusaurus
.cache-loader

# misc
.DS_Store
*.pem

# debug
npm-debug.log*
yarn-debug.log*
yarn-error.log*
38 changes: 38 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
"root": true,
"env": {
"es6": true
},
"extends": ["airbnb", "airbnb-typescript/base", "prettier"],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": 6,
"sourceType": "module",
"project": ["./tsconfig.json", "./packages/**/tsconfig.json"]
},
"plugins": ["@typescript-eslint"],
"rules": {
"react/require-default-props": "off",
"react/jsx-props-no-spreading": "off",
"react/react-in-jsx-scope": "off",
"react/jsx-filename-extension": [1, { "extensions": [".tsx"] }],
"import/prefer-default-export": "off",
"import/extensions": "off",
"no-underscore-dangle": "off",
"import/no-extraneous-dependencies": "off",
"no-bitwise": "off",
"no-await-in-loop": "off",
"no-restricted-syntax": "off",
"no-console": ["warn", { "allow": ["info", "warn", "error"] }],
"@typescript-eslint/lines-between-class-members": "off",
"no-param-reassign": "off"
},
"overrides": [
{
"files": ["./scripts/*"],
"rules": {
"no-console": "off"
}
}
]
}
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.sol linguist-language=Solidity
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* @privacy-scaling-explorations/excubiae
105 changes: 105 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
name: main

on:
push:
branches:
- main
pull_request:

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

jobs:
style:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4

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

- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1

- name: Install dependencies
run: yarn

- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v44
with:
files_yaml: |
contracts:
- packages/contracts/**/*.{js,json,ts,sol}
docs:
- apps/docs/**/*
packages:
- packages/**/*.{js,json,ts}
- '!packages/{contracts}/**/*'
to_format:
- '**/*.{cjs,js,json,jsx,md,mdx,sol,ts,tsx,yaml,yml}'
to_lint:
- '**/*.{cjs,js,jsx,ts,tsx}'

- if: steps.changed-files.outputs.contracts_any_changed == 'true'
name: Compile and lint contracts
run: |
yarn compile:contracts
yarn workspace excubiae-contracts lint

- if: steps.changed-files.outputs.docs_any_changed == 'true'
name: Build and format docs
run: |
yarn workspace excubiae-docs build
yarn workspace excubiae-docs format

- if: steps.changed-files.outputs.packages_any_changed == 'true'
name: Build packages
run: yarn build:packages

- if: steps.changed-files.outputs.to_format_any_changed == 'true'
name: Format
run: yarn run prettier --check --ignore-unknown --no-error-on-unmatched-pattern ${{ steps.changed-files.outputs.to_format_all_changed_files }}

- if: steps.changed-files.outputs.to_lint_any_changed == 'true'
name: Run Eslint
run: yarn run eslint ${{ steps.changed-files.outputs.to_lint_all_changed_files }} --ext .cjs,.js,.jsx,.ts,.tsx

test:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4

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

- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1

- name: Install dependencies
run: yarn

- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v44
with:
files_yaml: |
contracts:
- packages/contracts/**/*.{js,json,ts,sol}

- if: steps.changed-files.outputs.contracts_any_changed == 'true'
name: Build and Test contracts
run: |
yarn compile:contracts
yarn test:contracts
43 changes: 43 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: release

permissions:
contents: write

on:
push:
tags:
- "*"

jobs:
release:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: yarn
registry-url: "https://registry.npmjs.org"

- name: Authentication
run: |
echo npmAuthToken: "$NODE_AUTH_TOKEN" >> ./.yarnrc.yml
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

- name: Install dependencies
run: yarn

- name: Publish packages
run: yarn version:publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

- run: yarn version:release
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
93 changes: 93 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
# 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

# IDE
.vscode
.idea

# Testing
coverage
coverage.json
*.lcov

# Dependency directories
node_modules/

# TypeScript cache
*.tsbuildinfo

# Optional npm cache directory
.npm
.DS_Store

# Output of 'npm pack'
*.tgz

# Optional eslint cache
.eslintcache

# Microbundle cache
.rpt2_cache/
.rts2_cache_cjs/
.rts2_cache_es/
.rts2_cache_umd/

# 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

# Production
build
dist
/docs

# Docusaurus cache and generated files
.docusaurus
.cache-loader

# Hardhat
artifacts
cache
typechain-types

# Stores VSCode versions used for testing VSCode extensions
.vscode-test

# yarn v3
.pnp.*
.yarn/*
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/sdks
!.yarn/versions

# asdf
.tool-versions

# direnv
.envrc
1 change: 1 addition & 0 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
npx --no-install commitlint --edit $1
1 change: 1 addition & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
npx lint-staged
3 changes: 3 additions & 0 deletions .husky/prepare-commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
if [ "$NO_HOOK" != "1" ]; then
exec < /dev/tty && npx czg --hook || true
fi
4 changes: 4 additions & 0 deletions .lintstagedrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"**/*.{js,ts,jsx,tsx,md,json,sol,yaml,yml}": "prettier --write --no-error-on-unmatched-pattern",
"**/*.{js,ts,jsx,tsx}": "eslint"
}
Loading
Loading