-
Notifications
You must be signed in to change notification settings - Fork 0
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
0 parents
commit 6d99ff2
Showing
33 changed files
with
6,600 additions
and
0 deletions.
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,3 @@ | ||
{ | ||
"path": "cz-conventional-changelog" | ||
} |
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,16 @@ | ||
# EditorConfig http://EditorConfig.org | ||
|
||
# top-most EditorConfig file | ||
root = true | ||
|
||
# All files | ||
[*] | ||
charset = utf-8 | ||
end_of_line = lf | ||
indent_size = 2 | ||
indent_style = space | ||
insert_final_newline = true | ||
trim_trailing_whitespace = true | ||
|
||
[*.sol] | ||
indent_size = 4 |
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,10 @@ | ||
export INFURA_API_KEY="zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz" | ||
export MNEMONIC="inquiry potato become monster tornado chest logic egg tenant brick donkey hold" | ||
|
||
# Block explorer API keys | ||
export ARBISCAN_API_KEY="zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz" | ||
export BSCSCAN_API_KEY="zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz" | ||
export ETHERSCAN_API_KEY="zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz" | ||
export OPTIMISM_API_KEY="zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz" | ||
export POLYGONSCAN_API_KEY="zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz" | ||
export SNOWTRACE_API_KEY="zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz" |
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 @@ | ||
# directories | ||
.coverage_artifacts | ||
.coverage_cache | ||
.coverage_contracts | ||
artifacts | ||
build | ||
cache | ||
coverage | ||
dist | ||
node_modules | ||
types | ||
|
||
# files | ||
*.env | ||
*.log | ||
.DS_Store | ||
.pnp.* | ||
coverage.json | ||
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,21 @@ | ||
extends: | ||
- "eslint:recommended" | ||
- "plugin:@typescript-eslint/eslint-recommended" | ||
- "plugin:@typescript-eslint/recommended" | ||
- "prettier" | ||
parser: "@typescript-eslint/parser" | ||
parserOptions: | ||
project: "tsconfig.json" | ||
plugins: | ||
- "@typescript-eslint" | ||
root: true | ||
rules: | ||
"@typescript-eslint/no-floating-promises": | ||
- error | ||
- ignoreIIFE: true | ||
ignoreVoid: true | ||
"@typescript-eslint/no-inferrable-types": "off" | ||
"@typescript-eslint/no-unused-vars": | ||
- error | ||
- argsIgnorePattern: "_" | ||
varsIgnorePattern: "_" |
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,67 @@ | ||
name: "CI" | ||
|
||
env: | ||
DOTENV_CONFIG_PATH: "./.env.example" | ||
|
||
on: | ||
workflow_dispatch: | ||
pull_request: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
ci: | ||
runs-on: "ubuntu-latest" | ||
steps: | ||
- name: "Check out the repo" | ||
uses: "actions/checkout@v3" | ||
|
||
- 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 dependencies" | ||
run: "pnpm install" | ||
|
||
- name: "Lint the code" | ||
run: "pnpm lint" | ||
|
||
- name: "Add lint summary" | ||
run: | | ||
echo "## Lint results" >> $GITHUB_STEP_SUMMARY | ||
echo "✅ Passed" >> $GITHUB_STEP_SUMMARY | ||
- name: "Compile the contracts and generate the TypeChain bindings" | ||
run: "pnpm typechain" | ||
|
||
# - name: "Test the contracts and generate the coverage report" | ||
# run: "pnpm coverage" | ||
|
||
- name: Login to GitHub Container Registry | ||
uses: docker/login-action@49ed152c8eca782a232dede0303416e8f356c37b | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: "CI test" | ||
run: | | ||
pnpm fhevm:start &> fhevm.log & | ||
tail -f fhevm.log | sed '/Starting JSON WebSocket server/ q' | ||
pnpm fhevm:faucet | ||
pnpm test | ||
pnpm fhevm:stop || true | ||
- name: "Add test summary" | ||
run: | | ||
echo "## Test results" >> $GITHUB_STEP_SUMMARY | ||
echo "✅ Passed" >> $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,21 @@ | ||
# directories | ||
.coverage_artifacts | ||
.coverage_cache | ||
.coverage_contracts | ||
artifacts | ||
build | ||
cache | ||
coverage | ||
dist | ||
node_modules | ||
types | ||
deployments | ||
|
||
# files | ||
*.env | ||
*.log | ||
.DS_Store | ||
.pnp.* | ||
coverage.json | ||
package-lock.json | ||
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,10 @@ | ||
image: "gitpod/workspace-node:latest" | ||
|
||
tasks: | ||
- init: "pnpm install" | ||
|
||
vscode: | ||
extensions: | ||
- "esbenp.prettier-vscode" | ||
- "NomicFoundation.hardhat-solidity" | ||
- "ritwickdey.LiveServer" |
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 @@ | ||
# directories | ||
.coverage_artifacts | ||
.coverage_cache | ||
.coverage_contracts | ||
artifacts | ||
build | ||
cache | ||
coverage | ||
dist | ||
node_modules | ||
types | ||
|
||
# files | ||
*.env | ||
*.log | ||
.DS_Store | ||
.pnp.* | ||
coverage.json | ||
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,23 @@ | ||
bracketSpacing: true | ||
plugins: | ||
- "@trivago/prettier-plugin-sort-imports" | ||
- "prettier-plugin-solidity" | ||
printWidth: 120 | ||
proseWrap: "always" | ||
singleQuote: false | ||
tabWidth: 2 | ||
trailingComma: "all" | ||
|
||
overrides: | ||
- files: "*.sol" | ||
options: | ||
compiler: "0.8.22" | ||
parser: "solidity-parse" | ||
tabWidth: 4 | ||
- files: "*.ts" | ||
options: | ||
importOrder: ["<THIRD_PARTY_MODULES>", "^[./]"] | ||
importOrderParserPlugins: ["typescript"] | ||
importOrderSeparation: true | ||
importOrderSortSpecifiers: true | ||
parser: "typescript" |
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 @@ | ||
module.exports = { | ||
istanbulReporter: ["html", "lcov"], | ||
providerOptions: { | ||
mnemonic: process.env.MNEMONIC, | ||
}, | ||
skipFiles: ["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,19 @@ | ||
{ | ||
"extends": "solhint:recommended", | ||
"plugins": ["prettier"], | ||
"rules": { | ||
"code-complexity": ["error", 8], | ||
"compiler-version": ["error", ">=0.8.4"], | ||
"func-visibility": ["error", { "ignoreConstructors": true }], | ||
"max-line-length": ["error", 120], | ||
"named-parameters-mapping": "warn", | ||
"no-console": "off", | ||
"not-rely-on-time": "off", | ||
"prettier/prettier": [ | ||
"error", | ||
{ | ||
"endOfLine": "auto" | ||
} | ||
] | ||
} | ||
} |
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,3 @@ | ||
# directories | ||
**/artifacts | ||
**/node_modules |
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,3 @@ | ||
{ | ||
"recommendations": ["esbenp.prettier-vscode", "NomicFoundation.hardhat-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,6 @@ | ||
{ | ||
"editor.defaultFormatter": "esbenp.prettier-vscode", | ||
"editor.formatOnSave": true, | ||
"prettier.documentSelectors": ["**/*.sol"], | ||
"solidity.formatter": "prettier" | ||
} |
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,28 @@ | ||
BSD 3-Clause Clear License | ||
|
||
Copyright © 2024 ZAMA. | ||
All rights reserved. | ||
|
||
Redistribution and use in source and binary forms, with or without modification, | ||
are permitted provided that the following conditions are met: | ||
|
||
1. Redistributions of source code must retain the above copyright notice, this | ||
list of conditions and the following disclaimer. | ||
|
||
2. Redistributions in binary form must reproduce the above copyright notice, this | ||
list of conditions and the following disclaimer in the documentation and/or other | ||
materials provided with the distribution. | ||
|
||
3. Neither the name of ZAMA nor the names of its contributors may be used to endorse | ||
or promote products derived from this software without specific prior written permission. | ||
|
||
NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE GRANTED BY THIS LICENSE. | ||
THIS SOFTWARE IS PROVIDED BY THE ZAMA AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR | ||
IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF | ||
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL | ||
ZAMA OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, | ||
OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING | ||
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF | ||
ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
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,24 @@ | ||
BSD 3-Clause Clear License | ||
|
||
Copyright © 2024 ZAMA. All rights reserved. | ||
|
||
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the | ||
following conditions are met: | ||
|
||
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following | ||
disclaimer. | ||
|
||
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following | ||
disclaimer in the documentation and/or other materials provided with the distribution. | ||
|
||
3. Neither the name of ZAMA nor the names of its contributors may be used to endorse or promote products derived from | ||
this software without specific prior written permission. | ||
|
||
NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY | ||
THE ZAMA AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ZAMA OR | ||
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, | ||
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | ||
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING | ||
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH | ||
DAMAGE. |
Oops, something went wrong.