Skip to content

Commit

Permalink
Merge branch 'master' into sync/dao-master
Browse files Browse the repository at this point in the history
  • Loading branch information
tamtamchik committed Sep 30, 2024
2 parents a9a9ea5 + 9eb1257 commit 57f03d8
Show file tree
Hide file tree
Showing 821 changed files with 48,717 additions and 95,285 deletions.
7 changes: 3 additions & 4 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ end_of_line = lf
insert_final_newline = true
charset = utf-8
indent_style = space
indent_size = 4

[*.{js,yml,json,cjs}]
indent_size = 2
max_line_length = 120

[*.sol]
indent_size = 4
59 changes: 59 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
# RPC URL for a locally running node (Ganache, Anvil, Hardhat Network, etc.), used for scratch deployment and tests
LOCAL_RPC_URL=http://localhost:8555

LOCAL_LOCATOR_ADDRESS=
LOCAL_AGENT_ADDRESS=
LOCAL_VOTING_ADDRESS=
LOCAL_EASY_TRACK_EXECUTOR_ADDRESS=
LOCAL_ACCOUNTING_ORACLE_ADDRESS=
LOCAL_ACL_ADDRESS=
LOCAL_BURNER_ADDRESS=
LOCAL_DEPOSIT_SECURITY_MODULE_ADDRESS=
LOCAL_EL_REWARDS_VAULT_ADDRESS=
LOCAL_HASH_CONSENSUS_ADDRESS=
LOCAL_KERNEL_ADDRESS=
LOCAL_LEGACY_ORACLE_ADDRESS=
LOCAL_LIDO_ADDRESS=
LOCAL_NOR_ADDRESS=
LOCAL_ORACLE_DAEMON_CONFIG_ADDRESS=
LOCAL_ORACLE_REPORT_SANITY_CHECKER_ADDRESS=
LOCAL_SDVT_ADDRESS=
LOCAL_STAKING_ROUTER_ADDRESS=
LOCAL_VALIDATORS_EXIT_BUS_ORACLE_ADDRESS=
LOCAL_WITHDRAWAL_QUEUE_ADDRESS=
LOCAL_WITHDRAWAL_VAULT_ADDRESS=

# RPC URL for a separate, non Hardhat Network node (Anvil, Infura, Alchemy, etc.)
MAINNET_RPC_URL=http://localhost:8545
# RPC URL for Hardhat Network forking, required for running tests on mainnet fork with tracing (Infura, Alchemy, etc.)
# https://hardhat.org/hardhat-network/docs/guides/forking-other-networks#forking-other-networks
MAINNET_FORKING_URL=

# https://docs.lido.fi/deployed-contracts
MAINNET_LOCATOR_ADDRESS=0xC1d0b3DE6792Bf6b4b37EccdcC24e45978Cfd2Eb
MAINNET_AGENT_ADDRESS=0x3e40D73EB977Dc6a537aF587D48316feE66E9C8c
MAINNET_VOTING_ADDRESS=0x2e59A20f205bB85a89C53f1936454680651E618e
MAINNET_EASY_TRACK_EXECUTOR_ADDRESS=0xFE5986E06210aC1eCC1aDCafc0cc7f8D63B3F977
MAINNET_ACCOUNTING_ORACLE_ADDRESS=
MAINNET_ACL_ADDRESS=
MAINNET_BURNER_ADDRESS=
MAINNET_DEPOSIT_SECURITY_MODULE_ADDRESS=
MAINNET_EL_REWARDS_VAULT_ADDRESS=
MAINNET_HASH_CONSENSUS_ADDRESS=
MAINNET_KERNEL_ADDRESS=
MAINNET_LEGACY_ORACLE_ADDRESS=
MAINNET_LIDO_ADDRESS=
MAINNET_NOR_ADDRESS=
MAINNET_ORACLE_DAEMON_CONFIG_ADDRESS=
MAINNET_ORACLE_REPORT_SANITY_CHECKER_ADDRESS=
MAINNET_SDVT_ADDRESS=
MAINNET_STAKING_ROUTER_ADDRESS=
MAINNET_VALIDATORS_EXIT_BUS_ORACLE_ADDRESS=
MAINNET_WITHDRAWAL_QUEUE_ADDRESS=
MAINNET_WITHDRAWAL_VAULT_ADDRESS=

# Scratch deployment via hardhat variables
DEPLOYER=0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266
GENESIS_TIME=1639659600
GAS_PRIORITY_FEE=1
GAS_MAX_FEE=100
33 changes: 0 additions & 33 deletions .eslintrc

This file was deleted.

5 changes: 4 additions & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
*.sol linguist-language=Solidity
/.yarn/** linguist-vendored
/.yarn/releases/* binary
/.yarn/plugins/**/* binary
/.pnp.* binary linguist-generated
7 changes: 7 additions & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# CODEOWNERS: https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners

# Any PR to `master` branch with changes to production contracts notifies the protocol team
/contracts/ @lidofinance/lido-eth-protocol

# Any PR to `master` branch with changes to GitHub workflows notifies the workflow review team
/.github/workflows/ @lidofinance/review-gh-workflows
53 changes: 53 additions & 0 deletions .github/ISSUE_TEMPLATE/CONTRACT-BUG-REPORT.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Contract Bug Report
description: File a bug report in a contract.
title: "[Bug]: "
labels: ["bug", "contracts"]
body:
- type: markdown
attributes:
value: |
⚠️ Important! If the bug may potentially lead to loss of user funds, denial of service, governance hijacks, data breaches, and data leaks, please refer to [Lido Bug Bounty](https://immunefi.com/bug-bounty/lido/information/).
- type: textarea
id: summary
attributes:
label: Summary
description: Short summary of the bug
validations:
required: true
- type: textarea
id: expected
attributes:
label: Expected Behavior
description: Expected behavior of the contract without the bug
validations:
required: true
- type: textarea
id: Impact
attributes:
label: Potential Impact
description: Bug's impact and possible consequences
validations:
required: true
- type: textarea
id: reproduce
attributes:
label: Steps to Reproduce
description: Instructions to reproduce the bug
validations:
required: true
- type: textarea
id: solution
attributes:
label: Possible Solutions
description: Possible ways to fix the bug
validations:
required: false
- type: checkboxes
id: terms
attributes:
label: Guidelines
options:
- label: I agree to follow [Code of Conduct](https://github.com/lidofinance/core/blob/master/CODE_OF_CONDUCT.md).
required: true
- label: I have read [Lido Contribution Guide](https://github.com/lidofinance/core/blob/master/CONTRIBUTING.md).
required: true
39 changes: 39 additions & 0 deletions .github/ISSUE_TEMPLATE/FEATURE-REQUEST.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Feature Request
description: Submit a feature request.
title: "[Feature Request]: "
labels: ["enhancement"]
body:
- type: markdown
attributes:
value: |
Thanks for taking the time to fill out this feature request form!
- type: textarea
id: summary
attributes:
label: Summary
description: Short summary of the feature
validations:
required: true
- type: textarea
id: problem
attributes:
label: Problem
description: Existing problem that the feature solves
validations:
required: true
- type: textarea
id: implementation
attributes:
label: Implementation
description: Possible ways to implement this feature
validations:
required: false
- type: checkboxes
id: terms
attributes:
label: Guidelines
options:
- label: I agree to follow [Code of Conduct](https://github.com/lidofinance/core/blob/master/CODE_OF_CONDUCT.md).
required: true
- label: I have read [Lido Contribution Guide](https://github.com/lidofinance/core/blob/master/CONTRIBUTING.md).
required: true
13 changes: 13 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
A short summary of the changes.

## Context

What the reviewer needs to know

## Problem

What problem this PR solves, link relevant issue if it exists

## Solution

Your proposed solution
76 changes: 27 additions & 49 deletions .github/workflows/analyse.yml
Original file line number Diff line number Diff line change
@@ -1,69 +1,47 @@
name: Code Analysis
name: Analysis

on:
push:
branches: [master, develop]
pull_request:
branches: [master, develop]
on: [pull_request]

jobs:
slither:
name: Slither
runs-on: ubuntu-latest

permissions:
contents: read
security-events: write

steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
persist-credentials: false
- uses: actions/checkout@v4

- name: Setup node.js version
uses: actions/setup-node@v4
with:
node-version: 18
- name: Common setup
uses: ./.github/workflows/setup

- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT
- name: Install poetry
run: pipx install poetry

- name: Cache yarn cache
id: cache-yarn-cache
uses: actions/cache@v3
- uses: actions/setup-python@v5
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: yarn-${{ hashFiles('**/yarn.lock') }}
python-version: "3.12"
cache: "poetry"

- name: Cache node_modules
id: cache-node-modules
uses: actions/cache@v3
with:
path: '**/node_modules'
key: node_modules-${{ hashFiles('**/yarn.lock') }}
restore-keys: node_modules-${{ hashFiles('**/yarn.lock') }}
- name: Install dependencies
run: poetry install --no-root

- name: Install modules
run: yarn
if: |
steps.cache-yarn-cache.outputs.cache-hit != 'true' ||
steps.cache-node-modules.outputs.cache-hit != 'true'
- uses: actions/setup-python@v4
with:
python-version: '3.10.6'

- name: Install poetry requirements
- name: Versions
run: >
curl -sSL https://install.python-poetry.org | python - &&
poetry install --no-root
- name: Remove foundry.toml
run: rm -f foundry.toml
poetry --version &&
python --version &&
echo "slither $(poetry run slither --version)" &&
poetry run slitherin --version
- name: Run slither
run: >
poetry run slither . --sarif results.sarif --no-fail-pedantic
poetry run slither . \
--no-fail-pedantic \
--compile-force-framework hardhat \
--sarif results.sarif \
--exclude pess-strange-setter,pess-arbitrary-call-calldata-tainted
- name: Check results.sarif presence
id: results
Expand All @@ -74,8 +52,8 @@ jobs:
echo 'value=present' >> $GITHUB_OUTPUT ||
echo 'value=not' >> $GITHUB_OUTPUT
- name: Upload SARIF file
uses: github/codeql-action/upload-sarif@v2
- name: Upload results.sarif file
uses: github/codeql-action/upload-sarif@v3
if: ${{ always() && steps.results.outputs.value == 'present' }}
with:
sarif_file: results.sarif
Loading

0 comments on commit 57f03d8

Please sign in to comment.