Skip to content

Commit

Permalink
Merge pull request #90 from lidofinance/develop
Browse files Browse the repository at this point in the history
1.0.0-alpha release
  • Loading branch information
Psirex authored Aug 12, 2024
2 parents 7248030 + 5cedbd4 commit dfaf963
Show file tree
Hide file tree
Showing 114 changed files with 14,304 additions and 4,146 deletions.
1 change: 1 addition & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
MAINNET_RPC_URL=<your RPC url>
37 changes: 37 additions & 0 deletions .github/workflows/slither.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Slither Analysis

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

jobs:
analyze:
runs-on: ubuntu-latest
permissions:
contents: read
security-events: write
steps:
- uses: actions/checkout@v4

- name: Run Slither
uses: crytic/slither-action@v0.4.0
id: slither
with:
sarif: results.sarif
fail-on: none

- name: Check results.sarif presence
id: results
if: always()
shell: bash
run: >
test -f results.sarif &&
echo 'value=present' >> $GITHUB_OUTPUT ||
echo 'value=not' >> $GITHUB_OUTPUT
- name: Upload SARIF file
uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: ${{ steps.slither.outputs.sarif }}
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
node_modules/
.env
coverage/
coverage.json
coverage-report/
.DS_Store

# Hardhat files
Expand All @@ -16,3 +15,4 @@ out/
!/broadcast
/broadcast/*/31337/
/broadcast/**/dry-run/
.vscode/
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v20.16.0
41 changes: 37 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,47 @@ See [this research forum discussion](https://research.lido.fi/t/ldo-steth-dual-g

This project uses NPM for dependency management and Forge for tests so you'll need to have Node.js, NPM, and Foundry installed.

Installing the dependencies:
* Install NVM https://github.com/nvm-sh/nvm/blob/master/README.md#install--update-script

```sh
npm install
```
* Install specific Node.js version
```sh
nvm install
```

* Install the dependencies:
```sh
npm ci
```

* Install Foundry and `forge` https://book.getfoundry.sh/getting-started/installation

* Create `.env` file
```sh
cp .env.example .env
```

and specify there your `MAINNET_RPC_URL`.

> **_NOTE:_** You may need to specify manually maximum allowed requests per second (rps) value for an API key/RPC url for some providers. In our experience max 100 rps will be enough to run tests.

## Running tests

```sh
forge test
```

## Test coverage HTML report generation

1. Install `lcov` package in your OS
```sh
brew install lcov
-OR-
apt-get install lcov
```
2. Run
```sh
npm run cov-report
```
3. Open `./coverage-report/index.html` in your browser.
119 changes: 0 additions & 119 deletions contracts/Configuration.sol

This file was deleted.

20 changes: 0 additions & 20 deletions contracts/ConfigurationProvider.sol

This file was deleted.

Loading

0 comments on commit dfaf963

Please sign in to comment.