-
Notifications
You must be signed in to change notification settings - Fork 78
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
Showing
64 changed files
with
9,759 additions
and
1 deletion.
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,18 @@ | ||
# Config | ||
INFURA_KEY= | ||
PRIVATE_KEY=0000000000000000000000000000000000000000000000000000000000000001 | ||
ETHERSCAN_API_KEY= | ||
|
||
# Verax Testnet Config | ||
ROUTER_ADDRESS=0x736c78b2f2cBf4F921E8551b2acB6A5Edc9177D5 | ||
PORTAL_REGISTRY_ADDRESS=0x506f88a5Ca8D5F001f2909b029738A40042e42a6 | ||
SCHEMA_REGISTRY_ADDRESS=0xB2c4Da1f8F08A0CA25862509E5431289BE2b598B | ||
MODULE_REGISTRY_ADDRESS=0x1a20b2CFA134686306436D2c9f778D7eC6c43A43 | ||
ATTESTATION_REGISTRY_ADDRESS=0xC765F28096F6121C2F2b82D35A4346280164428b | ||
|
||
# Verax Mainnet Config | ||
#ROUTER_ADDRESS=0x4d3a380A03f3a18A5dC44b01119839D8674a552E | ||
#PORTAL_REGISTRY_ADDRESS=0xd5d61e4ECDf6d46A63BfdC262af92544DFc19083 | ||
#SCHEMA_REGISTRY_ADDRESS=0x0f95dCec4c7a93F2637eb13b655F2223ea036B59 | ||
#MODULE_REGISTRY_ADDRESS=0xf851513A732996F22542226341748f3C9978438f | ||
#ATTESTATION_REGISTRY_ADDRESS=0x3de3893aa4Cdea029e84e75223a152FD08315138 |
Validating CODEOWNERS rules …
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 @@ | ||
* @alainncls @fdemiramon @satyajeetkolhapure @orbmis @0xEillo |
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,22 @@ | ||
--- | ||
name: Bug report | ||
about: Create a report to help us improve | ||
title: "[BUG] " | ||
labels: "" | ||
assignees: "" | ||
--- | ||
|
||
**Describe the bug** A clear and concise description of what the bug is. | ||
|
||
**To Reproduce** Steps to reproduce the behavior: | ||
|
||
1. Go to '...' | ||
2. Click on '....' | ||
3. Scroll down to '....' | ||
4. See error | ||
|
||
**Expected behavior** A clear and concise description of what you expected to happen. | ||
|
||
**Screenshots** If applicable, add screenshots to help explain your problem. | ||
|
||
**Additional context** Add any other context about the problem here, e.g. transaction hash, network name etc. |
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,17 @@ | ||
--- | ||
name: Feature request | ||
about: Suggest an idea for this project | ||
title: "" | ||
labels: "" | ||
assignees: "" | ||
--- | ||
|
||
**Is your feature request related to a problem? Please describe.** A clear and concise description of what the problem | ||
is. Ex. I'm always frustrated when [...] | ||
|
||
**Describe the solution you'd like** A clear and concise description of what you want to happen. | ||
|
||
**Describe alternatives you've considered** A clear and concise description of any alternative solutions or features | ||
you've considered. | ||
|
||
**Additional context** Add any other context or screenshots about the feature request here. |
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,17 @@ | ||
## What does this PR do? | ||
|
||
### Related ticket | ||
|
||
Fixes # | ||
|
||
### Type of change | ||
|
||
- [ ] Chore | ||
- [ ] Bug fix | ||
- [ ] New feature | ||
- [ ] Documentation update | ||
|
||
## Check list | ||
|
||
- [ ] Unit tests for any smart contract change | ||
- [ ] Contracts and functions are documented |
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,21 @@ | ||
--- | ||
name: New version releaser | ||
|
||
on: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
release: | ||
if: github.actor == 'alainncls' || github.actor == 'fdemiramon' || github.actor == 'satyajeetkolhapure' || github.actor == 'orbmis' || github.actor == '0xEillo' | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: "Check out the repo" | ||
uses: "actions/checkout@v3" | ||
with: | ||
fetch-depth: 0 | ||
token: ${{ secrets.PROD_RELEASER_GH_TOKEN }} | ||
|
||
- name: "Run release script" | ||
run: ./release.sh |
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,163 @@ | ||
name: Smart Contracts Test | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
- dev | ||
- release/* | ||
push: | ||
branches: | ||
- main | ||
- dev | ||
- release/* | ||
|
||
env: | ||
FOUNDRY_PROFILE: ci | ||
|
||
jobs: | ||
lint: | ||
runs-on: "ubuntu-latest" | ||
steps: | ||
- name: "Check out the repo" | ||
uses: "actions/checkout@v3" | ||
|
||
- name: "Install Foundry" | ||
uses: "foundry-rs/foundry-toolchain@v1" | ||
|
||
- name: "Install Pnpm" | ||
uses: "pnpm/action-setup@v2" | ||
with: | ||
version: "8" | ||
|
||
- name: "Install Node.js" | ||
uses: "actions/setup-node@v3" | ||
with: | ||
cache: "pnpm" | ||
node-version: "lts/*" | ||
|
||
- name: "Install the Node.js dependencies" | ||
run: "pnpm install" | ||
|
||
- name: "Lint the contracts" | ||
run: "pnpm lint" | ||
|
||
- name: "Add lint summary" | ||
run: | | ||
echo "## Lint result" >> $GITHUB_STEP_SUMMARY | ||
echo "✅ Passed" >> $GITHUB_STEP_SUMMARY | ||
build: | ||
runs-on: "ubuntu-latest" | ||
steps: | ||
- name: "Check out the repo" | ||
uses: "actions/checkout@v3" | ||
with: | ||
submodules: "recursive" | ||
|
||
- name: "Install Foundry" | ||
uses: "foundry-rs/foundry-toolchain@v1" | ||
|
||
- name: "Show the Foundry config" | ||
run: "forge config" | ||
|
||
- name: "Produce a build" | ||
run: "forge build" | ||
|
||
- name: "Add build summary" | ||
run: | | ||
echo "## Build result" >> $GITHUB_STEP_SUMMARY | ||
echo "✅ Passed" >> $GITHUB_STEP_SUMMARY | ||
test-unit: | ||
env: | ||
FOUNDRY_FUZZ_RUNS: "5000" | ||
needs: [ "lint", "build" ] | ||
runs-on: "ubuntu-latest" | ||
steps: | ||
- name: "Check out the repo" | ||
uses: "actions/checkout@v3" | ||
with: | ||
submodules: "recursive" | ||
|
||
- name: "Install Foundry" | ||
uses: "foundry-rs/foundry-toolchain@v1" | ||
|
||
- name: "Run the unit tests" | ||
run: "forge test --match-path \"test/*\"" | ||
|
||
- name: "Add test summary" | ||
run: | | ||
echo "## Unit tests result" >> $GITHUB_STEP_SUMMARY | ||
echo "✅ Passed" >> $GITHUB_STEP_SUMMARY | ||
coverage: | ||
needs: [ "lint", "build" ] | ||
runs-on: "ubuntu-latest" | ||
steps: | ||
- name: "Check out the repo" | ||
uses: "actions/checkout@v3" | ||
with: | ||
submodules: "recursive" | ||
|
||
- name: "Install Foundry" | ||
uses: "foundry-rs/foundry-toolchain@v1" | ||
|
||
- name: "Generate the coverage report using the unit tests" | ||
run: "forge coverage --match-path \"test/**/*.sol\" --report lcov" | ||
|
||
- name: "Upload coverage report to Codecov" | ||
uses: "codecov/codecov-action@v3" | ||
with: | ||
files: "./lcov.info" | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
fail_ci_if_error: true | ||
verbose: true | ||
|
||
- name: "Check test coverage" | ||
uses: "terencetcf/github-actions-lcov-minimum-coverage-checker@v1" | ||
with: | ||
coverage-file: lcov.info | ||
minimum-coverage: 96 | ||
|
||
- name: "Add coverage summary" | ||
run: | | ||
echo "## Coverage result" >> $GITHUB_STEP_SUMMARY | ||
echo "✅ Uploaded to Codecov" >> $GITHUB_STEP_SUMMARY | ||
upgradeability: | ||
needs: [ "lint", "build" ] | ||
runs-on: "ubuntu-latest" | ||
steps: | ||
- name: "Check out the repo" | ||
uses: "actions/checkout@v3" | ||
with: | ||
submodules: "recursive" | ||
|
||
- name: "Install Foundry" | ||
uses: "foundry-rs/foundry-toolchain@v1" | ||
|
||
- name: "Install Pnpm" | ||
uses: "pnpm/action-setup@v2" | ||
with: | ||
version: "8" | ||
|
||
- name: "Install Node.js" | ||
uses: "actions/setup-node@v3" | ||
with: | ||
cache: "pnpm" | ||
node-version: "lts/*" | ||
|
||
- name: "Install the Node.js dependencies" | ||
run: "pnpm install" | ||
|
||
- name: "Produce a build" | ||
run: "forge build" | ||
|
||
- name: "Check contracts upgradeability" | ||
run: "pnpm run check:upgradeability:ci" | ||
|
||
- name: "Add upgradeability summary" | ||
run: | | ||
echo "## Upgradeability check result" >> $GITHUB_STEP_SUMMARY | ||
echo "✅ Contracts are upgradeable" >> $GITHUB_STEP_SUMMARY |
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,31 @@ | ||
# Compiler files | ||
cache/ | ||
out/ | ||
|
||
# Ignores development broadcast logs | ||
!/broadcast | ||
/broadcast/*/31337/ | ||
/broadcast/**/dry-run/ | ||
|
||
# Docs | ||
docs/ | ||
|
||
# Dotenv file | ||
.env | ||
|
||
# Modules | ||
node_modules | ||
|
||
# IDE | ||
.idea | ||
.vscode | ||
|
||
# Coverage | ||
lcov.info | ||
coverage | ||
|
||
# Hardhat | ||
cache_hardhat | ||
artifacts | ||
typechain-types | ||
.openzeppelin |
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 @@ | ||
[submodule "lib/forge-std"] | ||
branch = "v1" | ||
path = "lib/forge-std" | ||
url = "https://github.com/foundry-rs/forge-std" | ||
[submodule "lib/openzeppelin-contracts-upgradeable"] | ||
branch = "release-v4.9" | ||
path = "lib/openzeppelin-contracts-upgradeable" | ||
url = "https://github.com/OpenZeppelin/openzeppelin-contracts-upgradeable" |
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,6 @@ | ||
#!/usr/bin/env sh | ||
. "$(dirname -- "$0")/_/husky.sh" | ||
|
||
pnpm run prettier:write | ||
pnpm run lint | ||
pnpm run 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,23 @@ | ||
# directories | ||
.github/workflows | ||
broadcast | ||
cache | ||
coverage | ||
docs | ||
lib | ||
node_modules | ||
out | ||
out-optimized | ||
out-svg | ||
artifacts | ||
cache_hardhat | ||
|
||
# files | ||
*.env | ||
*.log | ||
.DS_Store | ||
.pnp.* | ||
lcov.info | ||
package-lock.json | ||
pnpm-lock.yaml | ||
yarn.lock |
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,13 @@ | ||
bracketSpacing: true | ||
printWidth: 120 | ||
proseWrap: "always" | ||
singleQuote: false | ||
tabWidth: 2 | ||
trailingComma: "all" | ||
useTabs: false | ||
overrides: | ||
- files: "*.svg" | ||
options: | ||
parser: "html" | ||
plugins: | ||
- "prettier-plugin-solidity" |
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,17 @@ | ||
{ | ||
"extends": "solhint:recommended", | ||
"rules": { | ||
"avoid-low-level-calls": "off", | ||
"code-complexity": ["error", 9], | ||
"compiler-version": ["error", "0.8.21"], | ||
"contract-name-camelcase": "off", | ||
"const-name-snakecase": "off", | ||
"func-name-mixedcase": "off", | ||
"func-visibility": ["error", { "ignoreConstructors": true }], | ||
"max-line-length": ["error", 123], | ||
"named-parameters-mapping": "warn", | ||
"no-empty-blocks": "off", | ||
"not-rely-on-time": "off", | ||
"var-name-mixedcase": "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,7 @@ | ||
Copyright 2023 ConsenSys Software, Inc | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
Oops, something went wrong.