Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Vaults #874

Draft
wants to merge 336 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 250 commits
Commits
Show all changes
336 commits
Select commit Hold shift + click to select a range
e47bba3
chore: stub for vaults tests
tamtamchik Sep 16, 2024
dc31abc
chore: fix accounting roles init
tamtamchik Sep 16, 2024
c704627
Merge pull request #13 from lidofinance/feat/report-vaults
folkyatina Sep 17, 2024
2c810dd
fix(vaults): leaked ncf
folkyatina Sep 18, 2024
26962d1
feat(vaults): split Hub and Liquidity interfaces
folkyatina Sep 18, 2024
57a5ec3
feat(vaults): add placeholder for triggerable exit
folkyatina Sep 18, 2024
b4ea4bf
fix(accounting): fees calculation
folkyatina Sep 18, 2024
705fe8f
fix(accounting): fix for the fix for the fix of fee calculation
folkyatina Sep 18, 2024
bf501da
fix(accounting): adjust naming
folkyatina Sep 18, 2024
6ae89d4
feat(accounting): treasury fees for vaults
folkyatina Sep 19, 2024
2fbbf69
fix(accounting): improve naming
folkyatina Sep 19, 2024
79095f5
feat(vaults): scetch of NO fees collection
folkyatina Sep 19, 2024
178c43f
fix(accounting): principalCLBalance calculation
folkyatina Sep 23, 2024
cdd5283
fix(accounting): fix scratch deploy
folkyatina Sep 23, 2024
4b5ebba
chore: fix integration tests
folkyatina Sep 23, 2024
9af2cb7
chore: remove old acceptance test
folkyatina Sep 24, 2024
85bb209
fix: treasury fee accounting
folkyatina Sep 30, 2024
911bc3e
fix(accounting): max -> min in for vaults fee
folkyatina Sep 30, 2024
450a362
fix(accounting): fix node operator fee
folkyatina Sep 30, 2024
a9539a2
feat(vaults): make vaults operate with StETH not shares
folkyatina Oct 1, 2024
150ebd1
fix(vaults): fix VaultHub data structure
folkyatina Oct 1, 2024
966facf
feat(vaults): make mint and rebalance payable
folkyatina Oct 2, 2024
461aa2b
feat(vaults): optimize storage
folkyatina Oct 2, 2024
df22fbe
feat(vaults): add AUM-based vault owners fee
folkyatina Oct 2, 2024
de83717
feat(vaults): reserve accumulated fees
folkyatina Oct 2, 2024
ec4c170
fix(vaults): fix report if no vaults
folkyatina Oct 3, 2024
9247e33
ci: fix docker image
tamtamchik Oct 3, 2024
4d78887
Merge pull request #15 from lidofinance/vault-fees
folkyatina Oct 4, 2024
eb6789e
feat(oracle): get rid of simulatedShareRate reporting
folkyatina Oct 7, 2024
9736ca1
chore: fix integration runner
tamtamchik Oct 9, 2024
945b779
Add factory
loga4 Oct 10, 2024
45daed6
Merge remote-tracking branch 'upstream/master'
tamtamchik Oct 14, 2024
5281ce6
Merge branch 'main' into minting
tamtamchik Oct 14, 2024
9c89ac6
Merge branch 'minting' into feat/no-simulated-rate
tamtamchik Oct 14, 2024
ae041f0
Merge remote-tracking branch 'upstream/master'
tamtamchik Oct 14, 2024
a1a407d
Merge branch 'main' into minting
tamtamchik Oct 14, 2024
fe23999
Merge branch 'minting' into feat/no-simulated-rate
tamtamchik Oct 14, 2024
b4a16c8
fix: errors in TS
tamtamchik Oct 14, 2024
c9f344f
chore: add support for staking pause
tamtamchik Oct 16, 2024
9f12f43
chore: update dependencies
tamtamchik Oct 16, 2024
5cbd407
chore: fix claimNodeOperatorFee permissions
tamtamchik Oct 16, 2024
13722bd
fix: burning shares
tamtamchik Oct 16, 2024
f404e12
chore: allow permissionless vault disconnect
tamtamchik Oct 16, 2024
78f7d30
chore: fix scratch deploy
tamtamchik Oct 16, 2024
0c42b56
chore: vaults happy path with context updates
tamtamchik Oct 16, 2024
e5da161
chore: unify some test constants
tamtamchik Oct 16, 2024
b5efdcb
factory update
loga4 Oct 17, 2024
0141020
fix: ci cleanup
tamtamchik Oct 17, 2024
71b5741
chore: treeshake oz-ownable-upgradeable
mymphe Oct 17, 2024
bebba07
feat: move vaults to 0.8.25
mymphe Oct 17, 2024
dfe7500
chore: remove vscode config
folkyatina Oct 17, 2024
2964b26
fix: remove simulatedShareRate checks from sanity checker
folkyatina Oct 17, 2024
1bc770a
fix: add some report checks
folkyatina Oct 17, 2024
7fdf060
chore: streamline report simulation flow
folkyatina Oct 17, 2024
c278cea
fix: more specific view method for simulation
folkyatina Oct 17, 2024
ad40013
Merge branch 'feat/no-simulated-rate' into feat/no-simulated-rate-int…
tamtamchik Oct 17, 2024
aca1078
fix: scratch
tamtamchik Oct 17, 2024
8edd98e
feat: vault delegation
mymphe Oct 18, 2024
3053360
docs: note on 0.8.25
mymphe Oct 18, 2024
4cb435d
fix: ts
tamtamchik Oct 18, 2024
ec11ab1
fix: oracleReportSanityChecker unit tests
tamtamchik Oct 18, 2024
932838e
fix: accounting oracle deploy
tamtamchik Oct 18, 2024
c396eec
style: fix naming
tamtamchik Oct 18, 2024
b09817d
chore: changes after review
tamtamchik Oct 18, 2024
33fe1eb
feat: use npm oz instead of local
mymphe Oct 21, 2024
f3051d8
feat: extract fees WIP
mymphe Oct 21, 2024
b2e79bf
Merge pull request #21 from lidofinance/feat/no-simulated-rate-integr…
tamtamchik Oct 21, 2024
93ec0c6
refactor: base vault
mymphe Oct 21, 2024
a55edac
fix: some renaming
mymphe Oct 21, 2024
b6f781e
chore: add soft limits for external balance
tamtamchik Oct 21, 2024
f84b2a3
chore: simplify code a bit
tamtamchik Oct 21, 2024
156d82d
refactor: some renames
mymphe Oct 21, 2024
15633e9
feat: extract management fee wip
mymphe Oct 21, 2024
4aa7e94
fix: error name
mymphe Oct 21, 2024
dc2c78e
feat: max subscriptions
mymphe Oct 21, 2024
b45e716
feat: subscribe to vault report
mymphe Oct 21, 2024
b94d96b
fix: remove unused error
mymphe Oct 21, 2024
7ed7790
feat: claim mgment due
mymphe Oct 21, 2024
e052a3f
refactoring: renaming
mymphe Oct 21, 2024
151649a
refactor: use single interface
mymphe Oct 21, 2024
2994fff
chore: update
tamtamchik Oct 21, 2024
56ab8bc
build(deps): bump secp256k1 from 4.0.3 to 4.0.4
dependabot[bot] Oct 21, 2024
e3aa1d2
test(burner): restore 100% coverage
tamtamchik Oct 22, 2024
23b4af5
chore: better naming
tamtamchik Oct 22, 2024
70bc869
test(steth): restore 100% coverage
tamtamchik Oct 22, 2024
3d930c5
test: vault setup
mymphe Oct 23, 2024
8d66a87
chore: use local OZ upgradeable
mymphe Oct 23, 2024
5edbeb5
fix: reset formatting
mymphe Oct 23, 2024
c8318d0
refactor: combine into a single vault
mymphe Oct 23, 2024
4c6d8a6
refactor: use single ivault interface
mymphe Oct 23, 2024
17e7765
refactor(hub): use single vault interface
mymphe Oct 23, 2024
b881df3
refactor(hub): extract hub interface
mymphe Oct 23, 2024
68c74db
chore: fix some errors
tamtamchik Oct 23, 2024
d4c9deb
chore: fix some errors for contract verifications
tamtamchik Oct 23, 2024
897e48a
refactor: safecast and renames
mymphe Oct 24, 2024
b7d3062
feat: fundAndProceed modifier
mymphe Oct 24, 2024
ff62933
fix: onReport hook
mymphe Oct 24, 2024
c509f1d
refactor: some renaming
mymphe Oct 24, 2024
e5eac5e
test: set up vault test
mymphe Oct 24, 2024
24c7410
refactor: rename Vault->StakingVault
mymphe Oct 24, 2024
49afced
fix: restore holesky state file
tamtamchik Oct 24, 2024
a98f97e
chore: move testnet defaults
tamtamchik Oct 24, 2024
878e619
chore: better naming
tamtamchik Oct 24, 2024
2a82f01
Merge pull request #27 from lidofinance/feat/devnet-0-deploy
tamtamchik Oct 24, 2024
3e55a97
Merge pull request #26 from lidofinance/feat/tests
tamtamchik Oct 24, 2024
d64faa8
refactor: use vaulthub itself instead of interface
mymphe Oct 24, 2024
7e28470
test: fund wip
mymphe Oct 24, 2024
ab9f0f0
feat: transfer ownership to new delegator
mymphe Oct 24, 2024
9f3761e
chore: devnet 0 deployment
tamtamchik Oct 24, 2024
e6e7a2c
chore: add support for running integration tests on devnet
tamtamchik Oct 24, 2024
a80d3f9
ci: run integration on holesky devnet 0
tamtamchik Oct 24, 2024
e590772
Merge pull request #28 from lidofinance/test/holesky
tamtamchik Oct 24, 2024
33047cc
chore: better naming and more comments
folkyatina Oct 24, 2024
06ade6e
fix: fix tests
folkyatina Oct 24, 2024
a307d1b
Merge pull request #24 from lidofinance/feat/external-mint-limits
folkyatina Oct 24, 2024
f89a394
Merge pull request #16 from lidofinance/feat/no-simulated-rate
folkyatina Oct 24, 2024
03174d0
chore: cleanup postTokenRebaseReceiver
tamtamchik Oct 25, 2024
cac61bd
chore: extract IPostTokenRebaseReceiver
folkyatina Oct 25, 2024
fa14fd5
fix: tests
tamtamchik Oct 25, 2024
813c890
Merge pull request #29 from lidofinance/feat/cleanup
tamtamchik Oct 25, 2024
79dabfd
fix: remove fee constants
mymphe Oct 28, 2024
7aab2c3
fix: check fees
mymphe Oct 28, 2024
a7b2421
fix: improve naming
mymphe Oct 28, 2024
473fd70
refactor: use raw bytes for roles
mymphe Oct 28, 2024
325649c
refactor: a bunch of renames
mymphe Oct 28, 2024
b7201d2
feat: update vault interface
mymphe Oct 28, 2024
2d4baad
feat: update
mymphe Oct 28, 2024
7d42361
Merge branch 'minting' of https://github.com/lidofinance/core-stealth…
mymphe Oct 28, 2024
46e4816
Merge branch 'vault-ownable-upgradeable' into feat/factory
loga4 Oct 28, 2024
2a4539a
feat: migrate accounting to 0825
mymphe Oct 29, 2024
a234144
feat: extract interfaces
mymphe Oct 29, 2024
701bba4
feat: mimic contract
mymphe Oct 29, 2024
17513b0
fix: sync with parent branch
mymphe Oct 29, 2024
9790510
factory update
loga4 Oct 29, 2024
f86d7bd
feat: reserve ratio
folkyatina Oct 29, 2024
033d272
Merge branch 'minting' of https://github.com/lidofinance/core-stealth…
mymphe Oct 29, 2024
1322877
fix: scratch
tamtamchik Oct 29, 2024
73f4cc3
fix: catch report hook
mymphe Oct 30, 2024
0431aa1
feat: add a Keymaker role for deposits to beacon chain
mymphe Oct 30, 2024
8bbf7b0
Merge branch 'minting' of https://github.com/lidofinance/core-stealth…
mymphe Oct 30, 2024
6bcf1f1
feat: sync with current vaulthub
mymphe Oct 30, 2024
e7b1e7b
refactor: extract vault interface for hub
mymphe Oct 30, 2024
7f05d28
fix: event param naming
mymphe Oct 30, 2024
65dcee2
feat: some renaming
mymphe Oct 30, 2024
56bf1b5
fix: bring back reserve ratio
mymphe Oct 31, 2024
7e85256
fix: fix reserveRatio and tests
folkyatina Oct 31, 2024
57aa7d8
Merge branch 'minting' of https://github.com/lidofinance/core-stealth…
mymphe Oct 31, 2024
220a2b8
feat: sync with main branch
mymphe Oct 31, 2024
4d22b6d
feat: threshold reserve ratio
folkyatina Oct 31, 2024
be8984c
chore: ignore vendor and immutable contracts linting
folkyatina Oct 31, 2024
b44fa28
move factory to 0.8.25
loga4 Oct 31, 2024
e44b4bf
Merge pull request #30 from lidofinance/thresholdReserveRatio
mymphe Oct 31, 2024
2dc84bc
fix: use address for external getters
mymphe Oct 31, 2024
18b8b16
fix: remove 0.8.9 vault contracts
mymphe Oct 31, 2024
7f5a8b5
feat: create vault facade and extract mint/burn from vault
mymphe Oct 31, 2024
2fab86e
feat: minting in delegator
mymphe Oct 31, 2024
46d31a2
docs: add some todos
mymphe Oct 31, 2024
432176e
feat: use mintableShares instead of reserveRatio
folkyatina Oct 31, 2024
0459957
feat: requestValidatorExit
folkyatina Oct 31, 2024
7d6a123
fix: support validator exit in delegator
folkyatina Oct 31, 2024
4147412
add versioned
loga4 Nov 1, 2024
fdafbb3
Merge branch 'vault-ownable-upgradeable' into feat/factory
loga4 Nov 1, 2024
facd6a9
update tests
loga4 Nov 1, 2024
45a81a6
feat: vault dashboard
mymphe Nov 1, 2024
372639b
feat: remove steth ref
mymphe Nov 1, 2024
aa1ebec
feat: add current reserve ratio getter
mymphe Nov 1, 2024
229f07f
fix mock
loga4 Nov 1, 2024
4cc457c
fix test
loga4 Nov 1, 2024
8acd9c5
fix: reserve ratio return
mymphe Nov 1, 2024
dd1054f
fix: update interface
mymphe Nov 1, 2024
2feafd8
Merge pull request #32 from lidofinance/mintableShares
folkyatina Nov 1, 2024
d651d42
Merge pull request #33 from lidofinance/requestValidatorExit
folkyatina Nov 1, 2024
c3fd29f
Merge branch 'vault-ownable-upgradeable' into feat/vault-facade
folkyatina Nov 1, 2024
00a7d9d
fix: adapt VaultDashboard to new VaultHub interface
folkyatina Nov 1, 2024
d3bd25e
fix: vault events
mymphe Nov 1, 2024
3ed008c
upd factory
loga4 Nov 4, 2024
fdbfda3
feat: reorganize vault owner contract
mymphe Nov 4, 2024
0405cb3
fix: burn for eoa and contract owner
mymphe Nov 4, 2024
de9cefb
fix: use more precise name
mymphe Nov 4, 2024
fe930d0
fix: include steth in constructor
mymphe Nov 4, 2024
eca2210
fix: fund before mint
mymphe Nov 4, 2024
3d74e02
feat: let funder mint and rebalance vault
mymphe Nov 4, 2024
ef66184
feat: locked cannot be decreased
mymphe Nov 4, 2024
eeadb69
fix: use transferFrom for burn
mymphe Nov 4, 2024
470a4cb
feat: add burn for funder
mymphe Nov 4, 2024
fcd1443
fix: disallow funder to eject validators
mymphe Nov 4, 2024
36c8b85
Merge pull request #31 from lidofinance/feat/vault-facade
mymphe Nov 4, 2024
c223268
upd factory
loga4 Nov 4, 2024
6b75ce1
upd vault tests
loga4 Nov 4, 2024
b45447c
upd factory, add minimal proxy
loga4 Nov 4, 2024
32003e2
feat: restrict transfering vault to default admin
mymphe Nov 5, 2024
9dc1b2a
fix: use common lido interface
mymphe Nov 5, 2024
365fbb1
fix: typo
mymphe Nov 5, 2024
5f36fed
fix: remove return from mint
mymphe Nov 5, 2024
d2bc338
fix: rename error to match var name
mymphe Nov 5, 2024
dcf84b6
fix: use a more precise error name
mymphe Nov 5, 2024
e70ac5d
fix: use socket in memory instead of sload
mymphe Nov 5, 2024
e4cd7ad
fix: better naming
mymphe Nov 5, 2024
a30be20
feat: use common ReportValues for ^0.8.0
mymphe Nov 5, 2024
398186b
docs(compilers): explain local upgreadeable OZ copies
mymphe Nov 5, 2024
9849c53
feat: remove unused steth reference
mymphe Nov 5, 2024
d77d34f
fix: remove empty comment
mymphe Nov 5, 2024
c6fb347
fix: headers
mymphe Nov 5, 2024
d65a117
Update test/0.8.25/vaults/vault.test.ts
mymphe Nov 5, 2024
f2dbc87
test: skip vault unit tests for now
mymphe Nov 5, 2024
dfb4935
upd
loga4 Nov 5, 2024
7d07a44
fix: update error strign to match param
mymphe Nov 5, 2024
0d3577e
upd
loga4 Nov 5, 2024
f5a96d1
refactor: rename default admin to owner for better semantics
mymphe Nov 5, 2024
d06c53a
feat: special role for mint/burn
mymphe Nov 5, 2024
04b41ce
Merge pull request #22 from lidofinance/vault-ownable-upgradeable
mymphe Nov 5, 2024
7614192
setup MANAGER_ROLE and OPERATOR_ROLE via factory
loga4 Nov 5, 2024
027bc47
merge conflicts with OWNER role
loga4 Nov 5, 2024
0c55686
redundant storage calls have been removed
loga4 Nov 5, 2024
499b521
reduce size for locked and inOutDelta vars
loga4 Nov 5, 2024
1238ce9
add checks for manager and operator addresses
loga4 Nov 5, 2024
75fa209
return types of vault storage
loga4 Nov 7, 2024
007794d
reduce size for locked and inOutDelta vars
loga4 Nov 7, 2024
852d82c
vaultStafffRoomParams refactoring
loga4 Nov 7, 2024
b4955c5
add notes for initialization _params var
loga4 Nov 7, 2024
9652868
fix: solhint
tamtamchik Nov 7, 2024
aa3efdd
chore: apply IStakingVault to StakingVault
tamtamchik Nov 7, 2024
34b654a
test: small refactoring
tamtamchik Nov 7, 2024
5973c00
fix: ci warnings
tamtamchik Nov 8, 2024
fae1537
chore: update deps
tamtamchik Nov 8, 2024
c83edc3
move report storage values to Report struct
loga4 Nov 8, 2024
c8d19e6
move report storage values to Report struct
loga4 Nov 8, 2024
4c2ae7c
Merge pull request #19 from lidofinance/feat/factory
folkyatina Nov 8, 2024
94f1d18
Merge pull request #25 from lidofinance/dependabot/npm_and_yarn/secp2…
folkyatina Nov 8, 2024
c7bbf23
fix: return value and stuff
folkyatina Nov 8, 2024
9cfe04e
unify events
loga4 Nov 8, 2024
c384a2c
Merge pull request #35 from lidofinance/factory/minor_fixes
loga4 Nov 8, 2024
8206704
chore: fixes for vaults reporting
tamtamchik Nov 9, 2024
7987794
Update contracts/0.8.25/vaults/StakingVault.sol
tamtamchik Nov 9, 2024
58e5b83
test(integration): restore partially happy path
tamtamchik Nov 9, 2024
0757a90
fix: solhint
tamtamchik Nov 9, 2024
97f330b
test(integration): finish happy path
tamtamchik Nov 10, 2024
b6e4f82
Merge pull request #36 from lidofinance/feat/fixes
tamtamchik Nov 11, 2024
c26f793
Merge branch 'main' into minting
tamtamchik Nov 13, 2024
8e0c17f
chore: update scratch deploy
tamtamchik Nov 13, 2024
ba2c2aa
Merge pull request #37 from lidofinance/feat/update-scratch
folkyatina Nov 14, 2024
20770b3
chore: mekong deploy
tamtamchik Nov 18, 2024
528dae7
ci: enable workflows
tamtamchik Nov 27, 2024
ce34c54
chore: update dependencies
tamtamchik Nov 27, 2024
1e57a1b
chore: exclude OZ contracts from the coverage
tamtamchik Nov 27, 2024
803199c
chore: apply suggestions from code review
tamtamchik Nov 27, 2024
bf83fcd
chore: update deps
tamtamchik Nov 27, 2024
d376ee3
chore: bump node to 22.11
tamtamchik Nov 27, 2024
f560380
chore: apply suggestions from code review
tamtamchik Nov 27, 2024
6286561
test: fix getMaxExternalEther in tests
tamtamchik Nov 27, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# 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=
Expand All @@ -25,11 +24,6 @@ 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
HARDHAT_FORKING_URL=

# https://docs.lido.fi/deployed-contracts
MAINNET_LOCATOR_ADDRESS=0xC1d0b3DE6792Bf6b4b37EccdcC24e45978Cfd2Eb
MAINNET_AGENT_ADDRESS=0x3e40D73EB977Dc6a537aF587D48316feE66E9C8c
Expand All @@ -53,6 +47,13 @@ MAINNET_VALIDATORS_EXIT_BUS_ORACLE_ADDRESS=
MAINNET_WITHDRAWAL_QUEUE_ADDRESS=
MAINNET_WITHDRAWAL_VAULT_ADDRESS=

HOLESKY_RPC_URL=
SEPOLIA_RPC_URL=

# 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
HARDHAT_FORKING_URL=

# Scratch deployment via hardhat variables
DEPLOYER=0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266
GENESIS_TIME=1639659600
Expand Down
114 changes: 57 additions & 57 deletions .github/workflows/analyse.yml
tamtamchik marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -1,59 +1,59 @@
name: Analysis

on: [pull_request]

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

permissions:
contents: read
security-events: write

steps:
- uses: actions/checkout@v4

- name: Common setup
uses: ./.github/workflows/setup

- name: Install poetry
run: pipx install poetry

- uses: actions/setup-python@v5
with:
python-version: "3.12"
cache: "poetry"

- name: Install dependencies
run: poetry install --no-root

- name: Versions
run: >
poetry --version &&
python --version &&
echo "slither $(poetry run slither --version)" &&
poetry run slitherin --version

- name: Run slither
run: >
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
if: always()
shell: bash
run: >
test -f results.sarif &&
echo 'value=present' >> $GITHUB_OUTPUT ||
echo 'value=not' >> $GITHUB_OUTPUT

- name: Upload results.sarif file
uses: github/codeql-action/upload-sarif@v3
if: ${{ always() && steps.results.outputs.value == 'present' }}
with:
sarif_file: results.sarif
#on: [pull_request]
#
#jobs:
# slither:
# name: Slither
# runs-on: ubuntu-latest
#
# permissions:
# contents: read
# security-events: write
#
# steps:
# - uses: actions/checkout@v4
#
# - name: Common setup
# uses: ./.github/workflows/setup
#
# - name: Install poetry
# run: pipx install poetry
#
# - uses: actions/setup-python@v5
# with:
# python-version: "3.12"
# cache: "poetry"
#
# - name: Install dependencies
# run: poetry install --no-root
#
# - name: Versions
# run: >
# poetry --version &&
# python --version &&
# echo "slither $(poetry run slither --version)" &&
# poetry run slitherin --version
#
# - name: Run slither
# run: >
# 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
# if: always()
# shell: bash
# run: >
# test -f results.sarif &&
# echo 'value=present' >> $GITHUB_OUTPUT ||
# echo 'value=not' >> $GITHUB_OUTPUT
#
# - name: Upload results.sarif file
# uses: github/codeql-action/upload-sarif@v3
# if: ${{ always() && steps.results.outputs.value == 'present' }}
# with:
# sarif_file: results.sarif
78 changes: 39 additions & 39 deletions .github/workflows/coverage.yml
tamtamchik marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -1,41 +1,41 @@
name: Coverage

on:
pull_request:
push:
branches: [ master ]

jobs:
coverage:
name: Hardhat
runs-on: ubuntu-latest

permissions:
contents: write
issues: write
pull-requests: write

steps:
- uses: actions/checkout@v4

- name: Common setup
uses: ./.github/workflows/setup

# Remove the integration tests from the test suite, as they require a mainnet fork to run properly
- name: Remove integration tests
run: rm -rf test/integration

- name: Collect coverage
run: yarn test:coverage

- name: Produce the coverage report
uses: insightsengineering/coverage-action@v2
with:
path: ./coverage/cobertura-coverage.xml
publish: true
threshold: 95
diff: true
diff-branch: master
diff-storage: _core_coverage_reports
coverage-summary-title: "Hardhat Unit Tests Coverage Summary"
togglable-report: true
#on:
# pull_request:
# push:
# branches: [ master ]
#
#jobs:
# coverage:
# name: Hardhat
# runs-on: ubuntu-latest
#
# permissions:
# contents: write
# issues: write
# pull-requests: write
#
# steps:
# - uses: actions/checkout@v4
#
# - name: Common setup
# uses: ./.github/workflows/setup
#
# # Remove the integration tests from the test suite, as they require a mainnet fork to run properly
# - name: Remove integration tests
# run: rm -rf test/integration
#
# - name: Collect coverage
# run: yarn test:coverage
#
# - name: Produce the coverage report
# uses: insightsengineering/coverage-action@v2
# with:
# path: ./coverage/cobertura-coverage.xml
# publish: true
# threshold: 95
# diff: true
# diff-branch: master
# diff-storage: _core_coverage_reports
# coverage-summary-title: "Hardhat Unit Tests Coverage Summary"
# togglable-report: true
31 changes: 31 additions & 0 deletions .github/workflows/tests-integration-holesky-devnet-0.yml
tamtamchik marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Integration Tests

#on: [ push ]
#
#jobs:
# test_hardhat_integration_fork:
# name: Hardhat / Holesky Devnet 0
# runs-on: ubuntu-latest
# timeout-minutes: 120
#
# services:
# hardhat-node:
# image: ghcr.io/lidofinance/hardhat-node:2.22.12
# ports:
# - 8555:8545
# env:
# ETH_RPC_URL: "${{ secrets.HOLESKY_RPC_URL }}"
#
# steps:
# - uses: actions/checkout@v4
#
# - name: Common setup
# uses: ./.github/workflows/setup
#
# - name: Set env
# run: cp .env.example .env
#
# - name: Run integration tests
# run: yarn test:integration:fork:holesky:vaults:dev0
# env:
# LOG_LEVEL: debug
58 changes: 29 additions & 29 deletions .github/workflows/tests-integration-mainnet.yml
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's restore it later

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe restore later

Original file line number Diff line number Diff line change
@@ -1,31 +1,31 @@
name: Integration Tests

on: [push]

jobs:
test_hardhat_integration_fork:
name: Hardhat / Mainnet
runs-on: ubuntu-latest
timeout-minutes: 120

services:
hardhat-node:
image: ghcr.io/lidofinance/hardhat-node:2.22.12
ports:
- 8545:8545
env:
ETH_RPC_URL: "${{ secrets.ETH_RPC_URL }}"

steps:
- uses: actions/checkout@v4

- name: Common setup
uses: ./.github/workflows/setup

- name: Set env
run: cp .env.example .env

- name: Run integration tests
run: yarn test:integration:fork:mainnet
env:
LOG_LEVEL: debug
#on: [push]
#
#jobs:
# test_hardhat_integration_fork:
# name: Hardhat / Mainnet
# runs-on: ubuntu-latest
# timeout-minutes: 120
#
# services:
# hardhat-node:
# image: ghcr.io/lidofinance/hardhat-node:2.22.12
# ports:
# - 8545:8545
# env:
# ETH_RPC_URL: "${{ secrets.ETH_RPC_URL }}"
#
# steps:
# - uses: actions/checkout@v4
#
# - name: Common setup
# uses: ./.github/workflows/setup
#
# - name: Set env
# run: cp .env.example .env
#
# - name: Run integration tests
# run: yarn test:integration:fork:mainnet
# env:
# LOG_LEVEL: debug
2 changes: 1 addition & 1 deletion .github/workflows/tests-integration-scratch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
GAS_PRIORITY_FEE: 1
GAS_MAX_FEE: 100
NETWORK_STATE_FILE: "deployed-local.json"
NETWORK_STATE_DEFAULTS_FILE: "scripts/scratch/deployed-testnet-defaults.json"
NETWORK_STATE_DEFAULTS_FILE: "scripts/defaults/testnet-defaults.json"

- name: Finalize scratch deployment
run: yarn hardhat --network local run --no-compile scripts/utils/mine.ts
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
.idea/
.yarn/
.vscode/

node_modules/
coverage/
Expand Down
6 changes: 4 additions & 2 deletions .solhintignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
contracts/Migrations.sol
contracts/0.6.11/deposit_contract.sol
contracts/openzeppelin/
contracts/0.6.11/deposit_contract.sol
contracts/0.6.12/WstETH.sol
contracts/0.8.4/WithdrawalsManagerProxy.sol
Loading
Loading