Skip to content

Commit cadffa4

Browse files
authored
Merge pull request #766 from lidofinance/develop
Feature: Lido V2
2 parents df95e56 + 103ce26 commit cadffa4

File tree

510 files changed

+67241
-22951
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

510 files changed

+67241
-22951
lines changed

.editorconfig

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# top-most EditorConfig file
2+
root = true
3+
4+
[*]
5+
end_of_line = lf
6+
insert_final_newline = true
7+
charset = utf-8
8+
indent_style = space
9+
indent_size = 4
10+
11+
[*.{js,yml,json,cjs}]
12+
indent_size = 2
13+
max_line_length = 120

.eslintrc

+11-38
Original file line numberDiff line numberDiff line change
@@ -1,59 +1,32 @@
11
{
2+
"plugins": ["prettier", "standard"],
23
"env": {
34
"node": true,
4-
"es2020": true
5+
"es2022": true
56
},
6-
"extends": [
7-
"standard",
8-
"plugin:prettier/recommended",
9-
"prettier",
10-
"prettier/standard"
11-
],
12-
"parser": "babel-eslint",
7+
"extends": ["standard", "plugin:prettier/recommended"],
138
"parserOptions": {
14-
"ecmaVersion": 8,
15-
"sourceType": "module",
9+
"ecmaVersion": 2022,
10+
"sourceType": "script",
1611
"ecmaFeatures": {
17-
"jsx": true,
18-
"modules": true
12+
"jsx": true
1913
}
2014
},
21-
"plugins": [
22-
"node",
23-
"prettier",
24-
"standard"
25-
],
26-
2715
"rules": {
2816
"prettier/prettier": "error",
29-
"max-len": ["warn", { "code": 140, "ignoreComments": true, "ignoreUrls": true }],
30-
"no-undef": "warn",
31-
"no-unused-vars": "warn",
32-
"prefer-const": "warn",
3317
"camelcase": "off",
34-
"eol-last": "warn",
35-
"no-multiple-empty-lines": "warn",
36-
"comma-dangle": "warn",
3718
"quotes": ["error", "single", { "avoidEscape": true, "allowTemplateLiterals": true }],
3819
"jsx-quotes": ["error", "prefer-single"],
39-
"no-useless-escape": "off",
40-
"valid-jsdoc": "error",
41-
"linebreak-style": ["error", "unix"]
20+
"no-restricted-modules": ["error", {
21+
"name": "@aragon/contract-helpers-test/src/asserts",
22+
"message": "Please use helpers/assert instead."
23+
}]
4224
},
4325
"overrides": [
4426
{
45-
"files": [
46-
"./scripts/{**/,}*.js",
47-
"./test/{**/,}*.js",
48-
"./e2e/test/{**/,}*.js"
49-
],
27+
"files": ["./scripts/{**/,}*.js", "./test/{**/,}*.js", "./e2e/test/{**/,}*.js"],
5028
"env": {
5129
"mocha": true
52-
},
53-
"globals": {
54-
"artifacts": "readonly",
55-
"contract": "readonly",
56-
"web3": "readonly"
5730
}
5831
}
5932
]

.github/assert-deployed-bytecode.js

-128
This file was deleted.

.github/assert-git-changes.py

-16
This file was deleted.

.github/deployed-bytecode-consts.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
11
const APPS_TO_NAMES = new Map([
22
['lido', 'Lido'],
33
['node-operators-registry', 'NodeOperatorsRegistry'],
4-
['oracle', 'LidoOracle']
54
])
65

76
const CONTRACTS_TO_NAMES = new Map([
87
['wstethContract', 'WstETH'],
98
['executionLayerRewardsVault', 'LidoExecutionLayerRewardsVault'],
109
['compositePostRebaseBeaconReceiver', 'CompositePostRebaseBeaconReceiver'],
11-
['selfOwnedStETHBurner', 'SelfOwnedStETHBurner'],
10+
['burner', 'Burner'],
1211
['depositor', 'DepositSecurityModule']
1312
])
1413

.github/workflows/analyse.yml

+81
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
name: Code Analysis
2+
3+
on:
4+
push:
5+
branches: [master, develop]
6+
pull_request:
7+
branches: [master, develop]
8+
9+
jobs:
10+
slither:
11+
runs-on: ubuntu-latest
12+
permissions:
13+
contents: read
14+
security-events: write
15+
steps:
16+
- name: Checkout repository
17+
uses: actions/checkout@v3
18+
with:
19+
persist-credentials: false
20+
21+
- name: Setup node.js version
22+
uses: actions/setup-node@v3
23+
with:
24+
node-version: 16
25+
26+
- name: Get yarn cache directory path
27+
id: yarn-cache-dir-path
28+
run: echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT
29+
30+
- name: Cache yarn cache
31+
id: cache-yarn-cache
32+
uses: actions/cache@v3
33+
with:
34+
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
35+
key: yarn-${{ hashFiles('**/yarn.lock') }}
36+
restore-keys: yarn-${{ hashFiles('**/yarn.lock') }}
37+
38+
- name: Cache node_modules
39+
id: cache-node-modules
40+
uses: actions/cache@v3
41+
with:
42+
path: '**/node_modules'
43+
key: node_modules-${{ hashFiles('**/yarn.lock') }}
44+
restore-keys: node_modules-${{ hashFiles('**/yarn.lock') }}
45+
46+
- name: Install modules
47+
run: yarn
48+
if: |
49+
steps.cache-yarn-cache.outputs.cache-hit != 'true' ||
50+
steps.cache-node-modules.outputs.cache-hit != 'true'
51+
52+
- uses: actions/setup-python@v4
53+
with:
54+
python-version: '3.10.6'
55+
56+
- name: Install poetry requirements
57+
run: >
58+
curl -sSL https://install.python-poetry.org | python - &&
59+
poetry install --no-root
60+
61+
- name: Remove foundry.toml
62+
run: rm -f foundry.toml
63+
64+
- name: Run slither
65+
run: >
66+
poetry run slither . --sarif results.sarif --no-fail-pedantic
67+
68+
- name: Check results.sarif presence
69+
id: results
70+
if: always()
71+
shell: bash
72+
run: >
73+
test -f results.sarif &&
74+
echo 'value=present' >> $GITHUB_OUTPUT ||
75+
echo 'value=not' >> $GITHUB_OUTPUT
76+
77+
- name: Upload SARIF file
78+
uses: github/codeql-action/upload-sarif@v2
79+
if: ${{ always() && steps.results.outputs.value == 'present' }}
80+
with:
81+
sarif_file: results.sarif

0 commit comments

Comments
 (0)