Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
2983 commits
Select commit Hold shift + click to select a range
ce5605a
fix: allow 0 tokenid
Jeday Sep 15, 2025
585edc0
fix: arg order
Jeday Sep 15, 2025
a67e7d7
test: fix recover eth test
Jeday Sep 15, 2025
c12a597
docs: comments
Jeday Sep 15, 2025
37eb353
Merge pull request #1435 from lidofinance/feat/pause-and-fresh
TheDZhon Sep 15, 2025
d044825
fix: remove nft path
Jeday Sep 15, 2025
a16e0c9
fix: add role hash
Jeday Sep 15, 2025
c906dd3
test: collect erc20
Jeday Sep 15, 2025
19ce198
test: roles integration
Jeday Sep 15, 2025
d57c881
fix: naming
Jeday Sep 15, 2025
352f47f
Merge branch 'feat/testnet-2' into feat/fix-redemptions
tamtamchik Sep 15, 2025
859a94d
chore: comments
Jeday Sep 15, 2025
41c3e36
Merge pull request #1444 from lidofinance/feat/vault-recovery
tamtamchik Sep 15, 2025
5b28507
chore: renaming after review
tamtamchik Sep 15, 2025
dfd810b
Merge branch 'feat/testnet-2' into feat/fix-redemptions
tamtamchik Sep 15, 2025
b5ee61d
feat: optional activations
folkyatina Sep 16, 2025
1deef3d
feat: add predeposited ether to batchInfo balance
folkyatina Sep 16, 2025
eeec10d
Merge remote-tracking branch 'origin/feat/testnet-2' into fix/1-eth-g…
folkyatina Sep 16, 2025
28e7687
feat: rework fee
failingtwice Sep 16, 2025
7a125d9
fix: tests
tamtamchik Sep 16, 2025
076fbb3
chore: remove obligationsShortfallAmount
tamtamchik Sep 16, 2025
6a95b05
chore: cleanup tests
tamtamchik Sep 16, 2025
29757c9
test: fix LazyOracle unit tests
folkyatina Sep 16, 2025
0d4c162
test: fix vault factory tests
folkyatina Sep 16, 2025
c9dd9de
test: fix PDG unit tests
folkyatina Sep 16, 2025
5faa205
test: fix vaulthub unit tests
folkyatina Sep 16, 2025
6d6548e
test: fix staking vault unit tests
folkyatina Sep 16, 2025
5e1e32e
fix(PDG): wrong condition for activation
folkyatina Sep 16, 2025
d3c4ccd
fix(PDG): fix signatureless deposits
folkyatina Sep 16, 2025
b8431ef
test: fix disconnected integration test
folkyatina Sep 16, 2025
df9c5f7
fix(PDG): incorrect predeposits counting
folkyatina Sep 16, 2025
5b48307
test: fix happy path integration test
folkyatina Sep 16, 2025
af08a79
feat: update sanity check
failingtwice Sep 17, 2025
fd18253
fix: revert unexpected
failingtwice Sep 17, 2025
6983228
fix: quar calc logic
dry914 Sep 17, 2025
0df3116
fix: remove updateVaultShareLimit shortcut
dry914 Sep 17, 2025
8c3cfcd
chore: add test for 1342
dry914 Sep 17, 2025
1aa3246
fix(PDG): the scenario with reconnect
folkyatina Sep 17, 2025
542992e
feat: single deposits in StakingVault
folkyatina Sep 17, 2025
27d598c
fix: docs
dry914 Sep 17, 2025
1027b43
feat: signatureless topups
folkyatina Sep 17, 2025
7ea453e
chore: staged
folkyatina Sep 17, 2025
d088bb2
fix: staged balance check
folkyatina Sep 17, 2025
232c697
fix: quar release condition
dry914 Sep 17, 2025
5287704
chore: add docs
tamtamchik Sep 17, 2025
13864f3
chore: typos
tamtamchik Sep 17, 2025
d8be9dd
Merge branch 'feat/testnet-2' into fix/quarantine
dry914 Sep 17, 2025
f719acf
fix: coverage compilation
dry914 Sep 17, 2025
931b575
fix: quar condition
dry914 Sep 17, 2025
5e2e755
fix: fix pause in PDG
folkyatina Sep 17, 2025
6a52a80
test: restore pdg tests
folkyatina Sep 17, 2025
b2bd825
Merge pull request #1441 from lidofinance/feat/fix-redemptions
TheDZhon Sep 17, 2025
6fa908a
Merge pull request #1451 from lidofinance/fix/quarantine
TheDZhon Sep 17, 2025
4caf6dd
fix(PDG): fixes after review
folkyatina Sep 17, 2025
6e072d4
Merge remote-tracking branch 'origin/feat/testnet-2' into fix/1-eth-g…
folkyatina Sep 17, 2025
a9ddcfe
Merge pull request #1432 from lidofinance/fix/1-eth-griefing
folkyatina Sep 17, 2025
900b1a3
chore: fix comments
folkyatina Sep 17, 2025
4af82f0
chore: save an SLOAD
folkyatina Sep 17, 2025
0d4cf01
refactor: polish rework
failingtwice Sep 18, 2025
5090496
fix: disable disburse only on connect
failingtwice Sep 18, 2025
77e3a59
feat: clean up node operator fee
failingtwice Sep 18, 2025
a43bd1b
test: update node operator fee tests
failingtwice Sep 18, 2025
2c34f15
feat: disable fee on vote start
failingtwice Sep 19, 2025
7a3d988
feat: pass new settled growth on connect
failingtwice Sep 19, 2025
351c64c
feat: update consolidations
failingtwice Sep 19, 2025
25a4ead
test: update tests
failingtwice Sep 19, 2025
8d3e2da
feat: testnet 3 config
tamtamchik Sep 19, 2025
24434cb
chore: fix upgrade script
tamtamchik Sep 19, 2025
a155a02
feat: pass expected settled growth upon connect
failingtwice Sep 22, 2025
caf8430
fix: prevent owner from lowering NO fee via unguaranteed deposit
failingtwice Sep 22, 2025
76dbf40
chore: formatting
failingtwice Sep 22, 2025
550cb9b
Merge branch 'feat/testnet-2' of https://github.com/lidofinance/core …
failingtwice Sep 22, 2025
2dc06fc
feat: rename error
failingtwice Sep 22, 2025
4702658
fix(PDG): add explicit activation flow
folkyatina Sep 22, 2025
5b35dd8
feat: remove pendingCorrection
failingtwice Sep 23, 2025
5e6793c
feat: require NO approval for connect
failingtwice Sep 23, 2025
4b01826
test: update tests
failingtwice Sep 23, 2025
81c86f7
feat: slot packing
failingtwice Sep 24, 2025
c64e9cf
fix: cast fee rate internally
failingtwice Sep 24, 2025
23cac9c
refactor: renamings
failingtwice Sep 24, 2025
002a5ac
feat: combine approve/forbid
failingtwice Sep 24, 2025
5e3269f
refactor: casting
failingtwice Sep 24, 2025
3840c53
fix: only allow owner role assignments
failingtwice Sep 24, 2025
792437d
Merge branch 'rework-no-fee' of https://github.com/lidofinance/core i…
failingtwice Sep 24, 2025
cd1635d
chore: remove duplicate error
tamtamchik Sep 24, 2025
b3d78e8
feat: block ownership renouncement
tamtamchik Sep 24, 2025
e402b31
docs: add storage-location natspec
tamtamchik Sep 24, 2025
7937567
feat: combine unguaranted dep and prove unknown valiks
failingtwice Sep 24, 2025
a6ab8a3
fix(PDG): fixes after review
folkyatina Sep 24, 2025
ee3dc4b
feat: sync storage format
tamtamchik Sep 24, 2025
fb210e8
Merge pull request #1459 from lidofinance/fix/pdg-explicit-activation
folkyatina Sep 24, 2025
b760618
Merge pull request #1464 from lidofinance/feat/fix-review-comments
tamtamchik Sep 24, 2025
46974fa
Merge pull request #1466 from lidofinance/feat/audit-3
tamtamchik Sep 24, 2025
dec0f1f
Merge pull request #1448 from lidofinance/rework-no-fee
TheDZhon Sep 25, 2025
c6cdab8
feat(PDG): proveWCActivateAndTopUpValidators skips steps if not neces…
folkyatina Sep 25, 2025
75fff8e
feat(Dashboard): add PDG policy
failingtwice Sep 25, 2025
f58b94d
fix: reduce bytecode by cutting redundant view functions
failingtwice Sep 25, 2025
308050d
chore: remove unused
failingtwice Sep 25, 2025
1a99f57
fix(PDG): report pendingDeposits as separate field
folkyatina Sep 25, 2025
bc48066
test: fix tests
folkyatina Sep 25, 2025
326e8bd
fix(LazyOracle): add batch method for checking validators
folkyatina Sep 25, 2025
b733d28
chore(LazyOracle): return aggregatedBalance
folkyatina Sep 25, 2025
4b96094
fix(PDG): harden reconnection condition
folkyatina Sep 25, 2025
76822b9
Merge pull request #1458 from lidofinance/flag-ung-deps
TheDZhon Sep 26, 2025
aefb685
Merge pull request #1468 from lidofinance/feat/optimistic-prove-activ…
TheDZhon Sep 26, 2025
c535318
fix(PDG): don't allow proving without activation by default
folkyatina Sep 26, 2025
82c8b79
Merge remote-tracking branch 'origin/feat/audit-4' into fix/pdg-side-…
folkyatina Sep 26, 2025
4f45951
fix: update pause on connect to fix #1477
tamtamchik Sep 26, 2025
1ddf60c
fix: apply resume to manual pause fix #1475
tamtamchik Sep 26, 2025
9875250
test: fix a flaky test
folkyatina Sep 27, 2025
efea0dd
Merge pull request #1482 from lidofinance/fix/pdg-side-activation
folkyatina Sep 27, 2025
fa149fe
test: restore a skipped test
folkyatina Sep 28, 2025
d50d465
test: restore more sanity checker tests
folkyatina Sep 28, 2025
e56f24e
Merge pull request #1467 from lidofinance/feat/audit-4
folkyatina Sep 28, 2025
7f9111f
feat: obligationsShortfallValue
tamtamchik Sep 29, 2025
632baa2
chore: add new event
tamtamchik Sep 29, 2025
b93776a
chore: naming
tamtamchik Sep 29, 2025
5c921dd
feat: draft for stakeLimit update
tamtamchik Sep 30, 2025
3a38c5d
fix(VaultHub): limit connectVault to the owner of the vault
folkyatina Sep 30, 2025
a20b080
chore: introduce a constant for 31 ether
folkyatina Sep 30, 2025
3309c0c
fix: add a SafeCast on internalization
folkyatina Sep 30, 2025
c3c83a0
feat: add vaultInfo function to lazyOracle
dry914 Sep 30, 2025
8f48435
feat: add tests and fix the code
tamtamchik Sep 30, 2025
ca9d5e1
test(stakingLimit): add unit and fuzzing tests
tamtamchik Sep 30, 2025
5f988b1
chore: naming and simplify
tamtamchik Oct 1, 2025
97cbdb0
chore: fix comments
tamtamchik Oct 1, 2025
b921ad5
fix: remove redundant errror
dry914 Oct 1, 2025
cc7ef3d
chore: rename vaultInfo func
dry914 Oct 1, 2025
3d55079
Merge pull request #1490 from lidofinance/feat/view-vault-info
tamtamchik Oct 1, 2025
8cf2746
Merge pull request #1488 from lidofinance/feat/fix-staking-limit
tamtamchik Oct 1, 2025
cb5a960
chore: fixes after review
tamtamchik Oct 1, 2025
06ad2c1
Merge pull request #1487 from lidofinance/feat/expose-shortfall
tamtamchik Oct 1, 2025
b090c27
Merge branch 'feat/audit-5' into feat/fix-pause
tamtamchik Oct 1, 2025
e1c7f7d
chore: review
tamtamchik Oct 1, 2025
f1e00ec
chore: updates after review
tamtamchik Oct 1, 2025
d726f91
fix: integration tests
tamtamchik Oct 1, 2025
06ff85e
docs: more clarity for annual balance sanity check
folkyatina Oct 1, 2025
e2d48cd
Merge pull request #1484 from lidofinance/feat/fix-pause
tamtamchik Oct 1, 2025
ac68c5c
fix(StETH): check uint128 overflow on share mint
folkyatina Oct 1, 2025
bdb71a9
chore: more intuitive constants in UnstructuredStorageExt
folkyatina Oct 1, 2025
d9878f3
chore: optimize VaultHub bytecode
folkyatina Oct 1, 2025
92a32d7
docs(Dashboard): improve comments
folkyatina Oct 2, 2025
3a99ddc
chore: update rights for ET contracts
dry914 Oct 2, 2025
727bbb0
fix(Lido): make staking pause/resume revert if paused/resumed
folkyatina Oct 2, 2025
516f7e8
fix(Lido): simplify the pause check
folkyatina Oct 3, 2025
2ec78d2
Merge pull request #1489 from lidofinance/fix/vaulthub-polish
folkyatina Oct 4, 2025
863eeb8
Merge pull request #1493 from lidofinance/fix/revertable-staking-pause
folkyatina Oct 4, 2025
8d4265f
fix(PDG): fix reentrancy path in PDG
folkyatina Oct 6, 2025
66d902f
chore(PDG): fix indentation
folkyatina Oct 6, 2025
5af1280
fix: upgrade after TW went live on mainnet
arwer13 Oct 6, 2025
4f252fc
chore: merge deployed-mainnet.json from develop
arwer13 Oct 6, 2025
55c7e33
fix: more tidying up for V3VoteScript.sol
arwer13 Oct 6, 2025
4c5a074
fix(VaultHub): insufficient shortfall due to rounding
failingtwice Oct 6, 2025
6e7aac5
fix: #1476
tamtamchik Oct 6, 2025
294fd95
Merge remote-tracking branch 'origin/fix/upgrade-after-tw' into feat/…
tamtamchik Oct 6, 2025
c5736b8
chore: cleanup scripts a bit
tamtamchik Oct 6, 2025
b7cc102
feat: add deploy scripts stub
tamtamchik Oct 6, 2025
e66be55
Merge pull request #1496 from lidofinance/fix/upgrade-after-tw
arwer13 Oct 7, 2025
80753cc
feat: update shortfall formula
failingtwice Oct 7, 2025
482a944
Merge pull request #1492 from lidofinance/feat/update-et-rights
arwer13 Oct 7, 2025
dd3312d
Merge branch 'feat/audit-5' into feat/fix-1476
tamtamchik Oct 7, 2025
c978a2e
chore: fixes after review
tamtamchik Oct 7, 2025
ed1d5d8
Merge pull request #1495 from lidofinance/fix/pdg-reentrancy
folkyatina Oct 7, 2025
c7320bb
fix: overflow in node operator fee
folkyatina Oct 7, 2025
fddc419
Merge branch 'feat/audit-5' into feat/deploy-v3-hoodi
tamtamchik Oct 7, 2025
f9d8136
fix: ao_consensus_version
tamtamchik Oct 7, 2025
a9091e2
docs(PDG): more comments
folkyatina Oct 7, 2025
8f8b86a
Merge pull request #1500 from lidofinance/fix/no-fees-overflow
folkyatina Oct 7, 2025
1da30f1
chore: probably better branching
tamtamchik Oct 7, 2025
e60be77
feat: use precise shortfall calculation
failingtwice Oct 7, 2025
12acdb5
docs(VaultHub): clarify EIP-7002 withdrawal fee
folkyatina Oct 7, 2025
88ce964
Merge pull request #1498 from lidofinance/feat/fix-1476
TheDZhon Oct 7, 2025
41dcc20
fix: remove old comments
failingtwice Oct 7, 2025
be85f78
feat: update bad debt case
failingtwice Oct 7, 2025
a405524
feat: add vaultsAdapter mocks to mainnet and hoodi upgrades
arwer13 Oct 7, 2025
9fe1dd0
test: shortfall fuzzing wip
failingtwice Oct 7, 2025
0c09e9f
feat: update deploy parameters for hoodi
arwer13 Oct 7, 2025
7dc3330
Merge branch 'feat/audit-5' into feat/deploy-v3-hoodi
tamtamchik Oct 7, 2025
9d0b450
chore: fix validate config
tamtamchik Oct 7, 2025
2f5751f
feat(upgrade): add gate seal deployment for hoodi
arwer13 Oct 7, 2025
f435de4
Merge remote-tracking branch 'refs/remotes/origin/feat/deploy-v3-hood…
arwer13 Oct 7, 2025
f4aceb9
feat: add auxiliary hoodi deploy addresses
arwer13 Oct 8, 2025
5869aca
chore: update deploy params
dry914 Oct 8, 2025
d43361e
chore: remove locator address
dry914 Oct 8, 2025
5de69c2
Merge pull request #1491 from lidofinance/feat/audit-5
folkyatina Oct 8, 2025
bde88cd
feat: new Hoodi deploy
arwer13 Oct 8, 2025
05371a5
Merge pull request #1501 from lidofinance/feat/update-easy-params
arwer13 Oct 8, 2025
6d3069b
fix: upgrade-params-xxx.json schema
arwer13 Oct 8, 2025
c3bade0
Merge branch 'develop' into feat/deploy-v3-hoodi
arwer13 Oct 8, 2025
bbd87c3
feat: disable gate seal integration test on scratch
arwer13 Oct 8, 2025
0e5f465
fix: skipping gate seal integration tests on scratch
arwer13 Oct 8, 2025
81ffb73
fix: attempt to fix mainnet upgrade integration test
arwer13 Oct 8, 2025
317439b
test: fix vaults tests on Hoodi
folkyatina Oct 8, 2025
f60527e
fix: validate configs
tamtamchik Oct 8, 2025
9416a90
test: add shareRate provisioning for the default tier
folkyatina Oct 10, 2025
57dbe5e
chore: verify stVault contracts
tamtamchik Oct 10, 2025
bdcbeaf
feat(Dashboard): reset settled growth on disconnect
failingtwice Oct 13, 2025
66bec36
feat: reset settled growth on abandon
failingtwice Oct 14, 2025
bdeff50
feat: disburse fee circuit breaker
failingtwice Oct 14, 2025
0782a40
feat: revert disburse when paused
failingtwice Oct 14, 2025
d4ae689
feat: special function for high fee disburse
failingtwice Oct 14, 2025
3155612
feat: 1% threshold rationale
failingtwice Oct 14, 2025
8177d45
feat: rename event field
failingtwice Oct 14, 2025
038f7dd
Merge pull request #1509 from lidofinance/confirmation-event
failingtwice Oct 14, 2025
fa50152
Merge pull request #1499 from lidofinance/feat/deploy-v3-hoodi
tamtamchik Oct 14, 2025
0f5cfdf
feat: disburse abnormally high fee as admin
failingtwice Oct 15, 2025
ec3b2fa
feat: rename high fee threshold
failingtwice Oct 15, 2025
1a2f158
feat: pass settled growth to connect to avoid foot violence
failingtwice Oct 15, 2025
e35aa1f
feat: use a simpler equation with slight overcompensation with ceilDiv
failingtwice Oct 15, 2025
f55e2ba
Merge branch 'audit-6' of https://github.com/lidofinance/core into sh…
failingtwice Oct 15, 2025
21814a1
test: delete wip fuzz test
failingtwice Oct 15, 2025
72b72ec
feat: hammer down rounding with 10 wei overcompensation
failingtwice Oct 15, 2025
54af2bc
fix(PDG): prevent frontrun of the batch of activations
folkyatina Oct 15, 2025
b41b419
fix(PDG): check that array lengths match
folkyatina Oct 15, 2025
2e59e77
chore: fix a natspec
folkyatina Oct 15, 2025
0376681
fix(OperatorGrid): more parameter validation for admin methods
folkyatina Oct 15, 2025
093e651
chore: fixed some comments and on event
folkyatina Oct 15, 2025
515f34e
chore: fix comment
folkyatina Oct 15, 2025
4492527
test: fix tests
folkyatina Oct 15, 2025
39c4703
chore: fix a comment
folkyatina Oct 15, 2025
d636abf
test: fix pdg integration test for hoodi
folkyatina Oct 15, 2025
55b71dd
chore: fix params filename
folkyatina Oct 15, 2025
a56d4be
chore: fix path to upgrade params
folkyatina Oct 15, 2025
132de30
test: fix upgrade template test flow
folkyatina Oct 15, 2025
6b758ed
chore: fix warnings
folkyatina Oct 15, 2025
a2103d5
test: fix upgrade template testing
folkyatina Oct 15, 2025
b9d66cb
docs: better natspec for Dashboard
folkyatina Oct 16, 2025
ca97347
chore: fix a warning
folkyatina Oct 16, 2025
4204ee6
chore: fix some comments
folkyatina Oct 16, 2025
ffee488
fix(Dashboard): add return bool for transferVaultOwnership
folkyatina Oct 16, 2025
acba5fe
chore: more natspec improvements
folkyatina Oct 16, 2025
9e795b0
fix(OperatorGrid): add confirm expiry setter
folkyatina Oct 16, 2025
90b43f0
Merge pull request #1511 from lidofinance/fix/pdg-small-fixes
folkyatina Oct 16, 2025
f643fe8
Merge branch 'audit-6' of https://github.com/lidofinance/core into fi…
failingtwice Oct 16, 2025
96fb51a
test: fix hardcoded values
failingtwice Oct 16, 2025
7521df1
Merge pull request #1506 from lidofinance/fix-no-fee
folkyatina Oct 17, 2025
1f44239
Merge pull request #1497 from lidofinance/shortfall-rounding-fix
failingtwice Oct 17, 2025
4b2ca37
feat: add vault factory chaining for upgrade
folkyatina Oct 17, 2025
f6a4d14
fix: fix upgrade deploy for the new factory
folkyatina Oct 17, 2025
ad8e59d
test: fix a flaky test
folkyatina Oct 17, 2025
1afcebc
Merge remote-tracking branch 'origin/audit-6' into feat/upgreadable-v…
folkyatina Oct 17, 2025
0436884
test: add some tests for the factory
folkyatina Oct 19, 2025
5e71d92
fix: fixes after the review
folkyatina Oct 19, 2025
4c9ce94
chore(LazyOracle): add natspec and rearrange methods a bit
folkyatina Oct 19, 2025
176d889
Merge pull request #1513 from lidofinance/feat/upgreadable-vault-factory
folkyatina Oct 19, 2025
8f9cc04
fix(TW): hardened assembly
folkyatina Oct 19, 2025
25c2be3
Merge pull request #1515 from lidofinance/fix/prosecco-review-comments
folkyatina Oct 19, 2025
7cae7a1
Merge pull request #1512 from lidofinance/audit-6
folkyatina Oct 19, 2025
6e65416
feat: hoodi common testnet patch 1
tamtamchik Oct 21, 2025
c4ad0b6
Merge pull request #1521 from lidofinance/feat/hoodi-update-1
tamtamchik Oct 22, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
21 changes: 15 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 @@ -23,13 +22,13 @@ LOCAL_VALIDATOR_EXIT_DELAY_VERIFIER_ADDRESS=
LOCAL_VALIDATORS_EXIT_BUS_ORACLE_ADDRESS=
LOCAL_WITHDRAWAL_QUEUE_ADDRESS=
LOCAL_WITHDRAWAL_VAULT_ADDRESS=
LOCAL_STAKING_VAULT_FACTORY_ADDRESS=
LOCAL_STAKING_VAULT_BEACON_ADDRESS=
LOCAL_VALIDATOR_CONSOLIDATION_REQUESTS_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.)
# RPC URL for Hardhat Network forking, required for running tests on fork with tracing (Infura, Alchemy, etc.)
# https://hardhat.org/hardhat-network/docs/guides/forking-other-networks#forking-other-networks
FORK_RPC_URL=https://eth.drpc.org
RPC_URL=https://eth.drpc.org

# https://docs.lido.fi/deployed-contracts
MAINNET_LOCATOR_ADDRESS=0xC1d0b3DE6792Bf6b4b37EccdcC24e45978Cfd2Eb
Expand All @@ -53,12 +52,22 @@ MAINNET_STAKING_ROUTER_ADDRESS=
MAINNET_VALIDATORS_EXIT_BUS_ORACLE_ADDRESS=
MAINNET_WITHDRAWAL_QUEUE_ADDRESS=
MAINNET_WITHDRAWAL_VAULT_ADDRESS=
MAINNET_STAKING_VAULT_FACTORY_ADDRESS=
MAINNET_STAKING_VAULT_BEACON_ADDRESS=
MAINNET_VALIDATOR_CONSOLIDATION_REQUESTS_ADDRESS=

SEPOLIA_RPC_URL=
HOODI_RPC_URL=

# Scratch deployment via hardhat variables
DEPLOYER=0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266
GENESIS_TIME=1639659600
SLOTS_PER_EPOCH=32
GAS_PRIORITY_FEE=1
GAS_MAX_FEE=100

# Etherscan API key for verifying contracts
ETHERSCAN_API_KEY=

# Local devnet private key
LOCAL_DEVNET_PK=0x0000000000000000000000000000000000000000000000000000000000000000
7 changes: 2 additions & 5 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,6 @@ jobs:
- 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

Expand All @@ -35,7 +31,8 @@ jobs:
with:
path: ./coverage/cobertura-coverage.xml
publish: true
threshold: 95
# TODO: restore to 95% before release
threshold: 80
diff: true
diff-branch: master
diff-storage: _core_coverage_reports
Expand Down
26 changes: 26 additions & 0 deletions .github/workflows/linters.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,29 @@ jobs:

- name: Run typescript types check
run: yarn typecheck

format:
name: Format
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

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

- name: Run format check
run: yarn format

validate-configs:
name: Validate Configs
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

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

- name: Validate configurations
run: yarn validate:configs
33 changes: 18 additions & 15 deletions .github/workflows/tests-integration-mainnet.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,27 @@
name: Integration Tests
name: Integration Tests On Upgrade
# For local testing of this scenario use ./scripts/dao-upgrade-and-test-on-fork.sh

on:
push:
schedule:
- cron: "0 10 */2 * *"
on: [push]

jobs:
test_hardhat_integration_fork:
name: Hardhat / Mainnet
runs-on: ubuntu-latest
timeout-minutes: 120
env:
NODE_OPTIONS: --max_old_space_size=7200
SKIP_GAS_REPORT: true
SKIP_CONTRACT_SIZE: true
SKIP_INTERFACES_CHECK: true

services:
hardhat-node:
image: ghcr.io/lidofinance/hardhat-node:2.24.3
image: ghcr.io/lidofinance/hardhat-node:2.26.0
ports:
- 8545:8545
- 8555:8545
env:
ETH_RPC_URL: "${{ secrets.ETH_RPC_URL }}"
DONT_SET_CHAIN_ID: true
HARDFORK: "prague"

steps:
Expand All @@ -32,28 +36,27 @@ jobs:
- name: Deploy upgrade
run: yarn upgrade:deploy
env:
RPC_URL: http://localhost:8545
# first acc of default mnemonic "test test ..."
DEPLOYER: "0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266"
RPC_URL: http://localhost:8555
DEPLOYER: "0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266" # first acc of default mnemonic "test test ..."
GAS_PRIORITY_FEE: 1
GAS_MAX_FEE: 100
NETWORK_STATE_FILE: deployed-mainnet-upgrade.json
GENESIS_TIME: 1606824023
UPGRADE_PARAMETERS_FILE: scripts/upgrade/upgrade-params-mainnet.toml

- name: Mock Aragon voting
run: yarn upgrade:mock-voting
env:
RPC_URL: http://localhost:8545
RPC_URL: http://localhost:8555
NETWORK_STATE_FILE: deployed-mainnet-upgrade.json

- name: Workaround for not updated state error when forking a fork
run: yarn hardhat --network local run --no-compile scripts/utils/mine.ts
env:
RPC_URL: http://localhost:8545
RPC_URL: http://localhost:8555

- name: Run integration tests
run: yarn test:integration:fork:mainnet
run: yarn test:integration
env:
RPC_URL: http://localhost:8555
LOG_LEVEL: debug
RPC_URL: http://localhost:8545
NETWORK_STATE_FILE: deployed-mainnet-upgrade.json
9 changes: 6 additions & 3 deletions .github/workflows/tests-integration-scratch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,14 @@ jobs:
name: Hardhat / Scratch
runs-on: ubuntu-latest
timeout-minutes: 120
env:
SKIP_GAS_REPORT: true
SKIP_CONTRACT_SIZE: true
SKIP_INTERFACES_CHECK: true

services:
hardhat-node:
image: ghcr.io/lidofinance/hardhat-node:2.24.3-scratch
image: ghcr.io/lidofinance/hardhat-node:2.26.0-scratch
ports:
- 8555:8545

Expand All @@ -33,13 +37,12 @@ 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

- name: Run integration tests
run: yarn test:integration:fork:local
env:
LOG_LEVEL: "debug"
INTEGRATION_WITH_CSM: "off"
28 changes: 28 additions & 0 deletions .github/workflows/tests-integration-upgrade-template.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Integration Test For Upgrade Template

on: [push]

jobs:
test_hardhat_integration_fork_template:
name: Hardhat / Upgrade Template
runs-on: ubuntu-latest
timeout-minutes: 120
env:
SKIP_GAS_REPORT: true
SKIP_CONTRACT_SIZE: true
SKIP_INTERFACES_CHECK: true

steps:
- uses: actions/checkout@v4

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

- name: Prepare network state file
run: cp deployed-mainnet.json deployed-mainnet-upgrade.json

- name: Run Upgrade Template Integration Tests
run: yarn test:integration:upgrade-template
env:
RPC_URL: "${{ secrets.ETH_RPC_URL }}"
UPGRADE_PARAMETERS_FILE: scripts/upgrade/upgrade-params-mainnet.toml
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@
.yarn/
.vscode/
.cursor/
.claude/

node_modules/
coverage/
state-mate/

coverage.json

Expand All @@ -25,6 +27,7 @@ lib/abi/*.json
.env
accounts.json
deployed-local.json
deployed-local-devnet.json
deployed-hardhat.json
deployed-local-devnet.json
deployed-mainnet-upgrade.json
Expand Down
2 changes: 2 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
yarn compile
yarn lint-staged
yarn typecheck
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
20.12
22.15
3 changes: 3 additions & 0 deletions .solcover.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,8 @@ module.exports = {
// Skip contracts that are tested by Foundry tests
"common/lib", // 100% covered by test/common/*.t.sol
"0.8.9/lib/UnstructuredStorage.sol", // 100% covered by test/0.8.9/unstructuredStorage.t.sol
"openzeppelin",
"testnet",
"upgrade",
],
};
11 changes: 9 additions & 2 deletions .solhintignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,9 @@
contracts/Migrations.sol
contracts/0.6.11/deposit_contract.sol
contracts/openzeppelin/
contracts/0.8.9/utils/access/AccessControl.sol
contracts/0.8.9/utils/access/AccessControlEnumerable.sol

contracts/0.4.24/template/
contracts/0.6.11/deposit_contract.sol
contracts/0.6.12/
contracts/0.8.9/WithdrawalsManagerProxy.sol
contracts/0.8.9/LidoExecutionLayerRewardsVault.sol
3 changes: 0 additions & 3 deletions .vscode/extensions.json

This file was deleted.

8 changes: 0 additions & 8 deletions .vscode/settings.json

This file was deleted.

27 changes: 0 additions & 27 deletions .vscode/snippets.code-snippets

This file was deleted.

32 changes: 23 additions & 9 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ the [Lido Research Forum](https://research.lido.fi/).

### Requirements

- [Node.js](https://nodejs.org/en) version 20 (LTS) with `corepack` enabled
- [Node.js](https://nodejs.org/en) version 22 (LTS) with `corepack` enabled
- [Yarn](https://yarnpkg.com/) installed via corepack (see below)
- [Foundry](https://book.getfoundry.sh/) latest available version

Expand Down Expand Up @@ -117,16 +117,30 @@ the [Mocking and Harnessing Contracts](#mocking-and-harnessing-contracts) sectio

#### Unit Tests

Unit tests are crucial for ensuring the functionality of individual contracts and their components. These tests should
be written using Hardhat and placed in the `/tests` directory. Each subdirectory should correspond to the version of the
contract being tested, mirroring the structure of the `/contracts` directory.
Every contract must be accompanied by high-quality unit tests.
The [Moloch Testing Guide](https://github.com/MolochVentures/moloch/tree/master/test#readme) provides excellent recommendations,
though some guidelines may not apply directly to this project.

Follow the naming convention `*.test.ts` for unit test files, such as `myContract.test.ts`. This convention aids in the
easy identification and organization of tests.
> [!NOTE]
> Tests should not only verify correct functionality but also be clear and well-structured for thorough peer
> review—particularly for mission-critical Solidity code where tests are often as important as the implementation itself.

- All new features or code changes must include comprehensive, relevant tests.
- Refactoring should be performed separately from test modifications to maintain test integrity.
- Tests must be reliable and deterministic; flaky tests will not be accepted.
- The test suite runs automatically with every repository change, and all tests must pass before pull requests can be merged.
- Maintain test coverage as close to 100% as possible, which will be verified during pull request reviews.

Unit tests should be written using Hardhat and placed in the `/tests` directory.
The subdirectory structure should mirror the `/contracts` directory, with each subdirectory corresponding to the
Solidity version of the contracts being tested.

Use the naming convention `*.test.ts` for unit test files (e.g., `myContract.test.ts`) to ensure consistent
organization and easy identification of test files.

> [!NOTE]
> The project utilizes the `hardhat-coverage` plugin to generate coverage reports. Foundry-based tests are not included
> in the coverage.
> The project uses the `hardhat-coverage` plugin to generate coverage reports. Note that Foundry-based tests are not
> included in these coverage calculations.

#### Integration Tests

Expand Down Expand Up @@ -416,7 +430,7 @@ jobs:

services:
mainnet-fork:
image: hardhat/hardhat:2.22.8 # note: this is an example image, choose the appropriate one for your needs
image: hardhat/hardhat:2.23.0 # note: this is an example image, choose the appropriate one for your needs
ports:
- 8545:8545
env:
Expand Down
Loading
Loading