Skip to content

Commit

Permalink
Merge pull request #195 from OasisDEX/dev
Browse files Browse the repository at this point in the history
  • Loading branch information
halaprix committed Apr 26, 2023
2 parents 9b3bcb8 + ffc9f40 commit 526a873
Show file tree
Hide file tree
Showing 126 changed files with 26,735 additions and 21,774 deletions.
7 changes: 6 additions & 1 deletion .env.example
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
ETHERSCAN_API_KEY=ABC123ABC123ABC123ABC123ABC123ABC1
ROPSTEN_URL=https://eth-ropsten.alchemyapi.io/v2/<YOUR ALCHEMY KEY>
ALCHEMY_NODE=https://eth-mainnet.alchemyapi.io/v2/<YOUR_ALCHEMY_KEY>
ALCHEMY_NODE_GOERLI=https://eth-goerli.alchemyapi.io/v2/<YOU_ALCHEMY_KEY>
ALCHEMY_NODE_RINKEBY=https://eth-rinkeby.alchemyapi.io/v2/<YOUR_ALCHEMY_KEY>
PRIVATE_KEY=0xabc123abc123abc123abc123abc123abc123abc123abc123abc123abc123abc1
PRIVATE_KEY_GOERLI=0xabc123abc123abc123abc123abc123abc123abc123abc123abc123abc123abc1
TENDERLY_USERNAME=mylogin
TENDERLY_PROJECT=myprojectname
47 changes: 25 additions & 22 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,24 +1,27 @@
module.exports = {
env: {
browser: false,
es2021: true,
mocha: true,
node: true,
},
plugins: ["@typescript-eslint"],
extends: [
"standard",
"plugin:prettier/recommended",
"plugin:node/recommended",
],
parser: "@typescript-eslint/parser",
parserOptions: {
ecmaVersion: 12,
},
rules: {
"node/no-unsupported-features/es-syntax": [
"error",
{ ignores: ["modules"] },
env: {
browser: false,
es2021: true,
mocha: true,
node: true,
},
plugins: ['@typescript-eslint'],
extends: [
'plugin:prettier/recommended',
'plugin:node/recommended',
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
],
},
};
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaVersion: 12,
},
rules: {
'node/no-unsupported-features/es-syntax': ['error', { ignores: ['modules'] }],
'node/no-missing-import': 'off',
'@typescript-eslint/no-extra-semi': 'off',
'@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-non-null-assertion': 'off',
},
}
103 changes: 60 additions & 43 deletions .github/workflows/verify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,50 +4,67 @@ name: CI

# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the main branch
push:
branches: [ dev, main ]
pull_request:
branches: [ dev, main ]
# Triggers the workflow on push or pull request events but only for the main branch
push:
branches: [dev, main]
pull_request:
branches: [dev, main]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2

- name: Cache YARN dependencies
uses: actions/cache@v1

with:
path: node_modules
key: ${{ runner.OS }}-yarn-cache-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.OS }}-yarn-cache-
- name: install
run: npm install

- name: lint
run: npm run lint

- name: format
run: npm run format

- name: compile
run: npx hardhat compile

- name: test
run: npx hardhat test

- name: coverage
run: npx hardhat coverage
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3

- name: Cache YARN dependencies
uses: actions/cache@v3
with:
path: node_modules
key: ${{ runner.OS }}-yarn-cache-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.OS }}-yarn-cache-
- uses: actions/setup-node@v3
with:
node-version: 18.12.1

- name: install
run: yarn

- name: lint
run: yarn lint

- name: format
run: yarn format

- name: compile
env:
ALCHEMY_NODE: ${{ secrets.ALCHEMY_NODE }}
ETHERSCAN_API_KEY: ${{ secrets.ETHERSCAN_API_KEY }}
ALCHEMY_NODE_GOERLI: ${{ secrets.ALCHEMY_NODE_GOERLI }}
run: npx hardhat compile

- name: test
env:
ALCHEMY_NODE: ${{ secrets.ALCHEMY_NODE }}
ETHERSCAN_API_KEY: ${{ secrets.ETHERSCAN_API_KEY }}
ALCHEMY_NODE_GOERLI: ${{ secrets.ALCHEMY_NODE_GOERLI }}
BLOCK_NUMBER: 16047227
run: npx hardhat test

- name: coverage
env:
ALCHEMY_NODE: ${{ secrets.ALCHEMY_NODE }}
ETHERSCAN_API_KEY: ${{ secrets.ETHERSCAN_API_KEY }}
ALCHEMY_NODE_GOERLI: ${{ secrets.ALCHEMY_NODE_GOERLI }}
BLOCK_NUMBER: 16047227
run: npx hardhat coverage
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,11 @@ node_modules
coverage
coverage.json
typechain
.idea

#Hardhat files
cache
artifacts
dist/
test/workspace.code-workspace
tenderly.yaml
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
16.14.1
24 changes: 24 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"printWidth": 120,
"tabWidth": 4,
"semi": false,
"singleQuote": true,
"arrowParens": "avoid",
"trailingComma": "all",
"proseWrap": "always",
"overrides": [
{
"files": "*.sol",
"options": {
"printWidth": 100,
"tabWidth": 4,
"compiler": "0.8.13",
"useTabs": false,
"singleQuote": false,
"bracketSpacing": true,
"explicitTypes": "always"
}
},
{ "files": "*.json", "options": { "tabWidth": 2 } }
]
}
2 changes: 1 addition & 1 deletion .solhint.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
"rules": {
"compiler-version": ["error", "^0.8.0"],
"func-visibility": ["warn", { "ignoreConstructors": true }],
"not-rely-on-time":"error"
"not-rely-on-time": "warn"
}
}
Loading

0 comments on commit 526a873

Please sign in to comment.