-
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.
"caculate liquidity, tick, amount in contracts"
- Loading branch information
Showing
135 changed files
with
29,070 additions
and
64 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,2 @@ | ||
extends: | ||
- "@commitlint/config-conventional" |
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,2 @@ | ||
INFURA_API_KEY="zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz" | ||
MNEMONIC="here is where your twelve words mnemonic should be put my friend" |
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 | ||
.yarn/ | ||
**/.nyc_output | ||
**/artifacts | ||
**/build | ||
**/cache | ||
**/coverage | ||
**/coverage-contracts | ||
**/coverage-ts | ||
**/dist | ||
**/node_modules | ||
**/src/types | ||
|
||
# files | ||
*.env | ||
*.log | ||
*.tsbuildinfo | ||
coverage.json | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* |
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 @@ | ||
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-namespace": "off" | ||
"@typescript-eslint/no-non-null-assertion": "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 @@ | ||
custom: ["https://gitcoin.co/grants/1657/paulrberg-open-source-engineering"] |
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,93 @@ | ||
name: "Continuous Integration" | ||
|
||
env: | ||
COVERAGE_GIT_BRANCH: "main" | ||
COVERAGE_SERVICE_NAME: "github-actions-ci" | ||
ETHERSCAN_API_KEY: ${{ secrets.ETHERSCAN_API_KEY }} | ||
INFURA_API_KEY: ${{ secrets.INFURA_API_KEY }} | ||
MNEMONIC: ${{ secrets.MNEMONIC }} | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- "main" | ||
push: | ||
branches: | ||
- "main" | ||
|
||
jobs: | ||
run-contracts-integration: | ||
runs-on: "ubuntu-latest" | ||
steps: | ||
- name: "Check out the repo" | ||
uses: "actions/checkout@v3" | ||
|
||
- name: "Install Node.js" | ||
uses: "actions/setup-node@v3" | ||
with: | ||
cache: "yarn" | ||
node-version: "16" | ||
|
||
- name: "Install the dependencies" | ||
run: "yarn install --immutable" | ||
|
||
- name: "Lint the code" | ||
run: "yarn lint:contracts" | ||
|
||
- name: "Compile the contracts and generate the TypeChain bindings" | ||
run: "yarn generate:types" | ||
|
||
- name: "Test the contracts and generate the coverage report" | ||
run: "yarn coverage:contracts" | ||
|
||
- name: "Prepare the coverage report" | ||
uses: "coverallsapp/github-action@master" | ||
with: | ||
flag-name: "prb-math-contracts" | ||
github-token: "${{ secrets.GITHUB_TOKEN }}" | ||
parallel: true | ||
path-to-lcov: "./coverage-contracts/lcov.info" | ||
|
||
run-ts-integration: | ||
runs-on: "ubuntu-latest" | ||
steps: | ||
- name: "Check out the repo" | ||
uses: "actions/checkout@v3" | ||
|
||
- name: "Install Node.js" | ||
uses: "actions/setup-node@v3" | ||
with: | ||
cache: "yarn" | ||
node-version: "16" | ||
|
||
- name: "Install the dependencies" | ||
run: "yarn install --immutable" | ||
|
||
- name: "Lint the code" | ||
run: "yarn lint:ts" | ||
|
||
- name: "Compile the contracts and generate the TypeChain bindings" | ||
run: "yarn generate:types" | ||
|
||
- name: "Test the code and generate the coverage report" | ||
run: "yarn coverage:ts" | ||
|
||
- name: "Prepare the coverage report" | ||
uses: "coverallsapp/github-action@master" | ||
with: | ||
flag-name: "prb-math-ts" | ||
github-token: "${{ secrets.GITHUB_TOKEN }}" | ||
parallel: true | ||
path-to-lcov: "./coverage-ts/lcov.info" | ||
|
||
upload-coverage-report: | ||
needs: | ||
- "run-contracts-integration" | ||
- "run-ts-integration" | ||
runs-on: "ubuntu-latest" | ||
steps: | ||
- name: "Upload the coverage reports to Coveralls" | ||
uses: "coverallsapp/github-action@master" | ||
with: | ||
github-token: "${{ secrets.GITHUB_TOKEN }}" | ||
parallel-finished: true |
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,26 @@ | ||
# directories | ||
.yarn/* | ||
!.yarn/patches | ||
!.yarn/releases | ||
!.yarn/plugins | ||
!.yarn/sdks | ||
!.yarn/versions | ||
**/.nyc_output | ||
**/artifacts | ||
**/build | ||
**/cache | ||
**/coverage | ||
**/coverage-contracts | ||
**/coverage-ts | ||
**/dist | ||
**/node_modules | ||
**/src/types | ||
|
||
# files | ||
*.env | ||
*.log | ||
*.tsbuildinfo | ||
coverage.json | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* |
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 @@ | ||
_ |
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,4 @@ | ||
#!/bin/sh | ||
. "$(dirname "$0")/_/husky.sh" | ||
|
||
yarn dlx commitlint --edit $1 |
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,4 @@ | ||
#!/bin/sh | ||
. "$(dirname "$0")/_/husky.sh" | ||
|
||
yarn dlx lint-staged |
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,5 @@ | ||
{ | ||
"*.{js,json,md,sol,ts,yaml,yml}": [ | ||
"prettier --config ./.prettierrc.yml --write" | ||
] | ||
} |
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 @@ | ||
extension: "ts" | ||
recursive: true | ||
require: | ||
- "hardhat/register" | ||
- "ts-node/register/transpile-only" | ||
- "./test/shared/setup.ts" | ||
timeout: 30000 | ||
watchExtension: "ts" |
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,12 @@ | ||
check-coverage: false | ||
exclude: | ||
- "src/constants.ts" | ||
- "src/errors.ts" | ||
- "src/helpers.ts" | ||
extends: "@istanbuljs/nyc-config-typescript" | ||
include: | ||
- "src/**/*.ts" | ||
report-dir: "coverage-ts" | ||
reporter: | ||
- "html" | ||
- "lcov" |
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 @@ | ||
# directories | ||
.yarn/ | ||
**/.nyc_output | ||
**/artifacts | ||
**/build | ||
**/cache | ||
**/coverage | ||
**/coverage-contracts | ||
**/coverage-ts | ||
**/dist | ||
**/node_modules | ||
**/src/types | ||
|
||
# files | ||
coverage.json | ||
LICENSE.md |
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 @@ | ||
arrowParens: avoid | ||
bracketSpacing: true | ||
endOfLine: auto | ||
importOrder: ["<THIRD_PARTY_MODULES>", "^[./]"] | ||
importOrderParserPlugins: ["typescript"] | ||
importOrderSeparation: true | ||
importOrderSortSpecifiers: true | ||
printWidth: 120 | ||
singleQuote: false | ||
tabWidth: 2 | ||
trailingComma: all | ||
|
||
overrides: | ||
- files: "*.sol" | ||
options: | ||
tabWidth: 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 @@ | ||
const shell = require("shelljs"); | ||
|
||
module.exports = { | ||
istanbulFolder: "coverage-contracts", | ||
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,22 @@ | ||
{ | ||
"extends": "solhint:recommended", | ||
"plugins": ["prettier"], | ||
"rules": { | ||
"code-complexity": "off", | ||
"compiler-version": ["error", ">=0.8.4"], | ||
"const-name-snakecase": "off", | ||
"constructor-syntax": "error", | ||
"func-visibility": ["error", { "ignoreConstructors": true }], | ||
"max-line-length": ["error", 132], | ||
"no-inline-assembly": "off", | ||
"not-rely-on-time": "off", | ||
"prettier/prettier": [ | ||
"error", | ||
{ | ||
"endOfLine": "auto" | ||
} | ||
], | ||
"reason-string": "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,3 @@ | ||
# directories | ||
**/artifacts | ||
**/node_modules |
546 changes: 546 additions & 0 deletions
546
lib/prb-math/.yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
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,9 @@ | ||
enableTelemetry: false | ||
|
||
nodeLinker: node-modules | ||
|
||
plugins: | ||
- path: .yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs | ||
spec: "@yarnpkg/plugin-interactive-tools" | ||
|
||
yarnPath: .yarn/releases/yarn-3.2.0.cjs |
Oops, something went wrong.