Skip to content
Open
Show file tree
Hide file tree
Changes from 250 commits
Commits
Show all changes
278 commits
Select commit Hold shift + click to select a range
1b5df99
did replenishWithdrawalReserve
kyzooghost Sep 24, 2025
98fafc5
did addToWithdrawalReserve
kyzooghost Sep 24, 2025
05e155a
wrote mint lst flow
kyzooghost Sep 24, 2025
3de0956
did ossification functions
kyzooghost Sep 25, 2025
31ab538
did withdrawWithReserveDeficitPriorityAndLSTLiabilityPrincipalReduction
kyzooghost Sep 26, 2025
1fa38dc
rm unneeded yieldProvider param
kyzooghost Sep 26, 2025
e805a6f
more immutable vars
kyzooghost Sep 26, 2025
538b4f4
did math256 library impl
kyzooghost Sep 26, 2025
4bb47fa
move donation logic and state
kyzooghost Sep 26, 2025
c070c8e
fix immutable case errors
kyzooghost Sep 26, 2025
435a6c2
did settleobligations
kyzooghost Sep 26, 2025
b8fc2b7
made pendingPermissionlessUnstake a global var
kyzooghost Sep 26, 2025
d544280
did impl of claimMessageWithProofAndWithdrawLST
kyzooghost Sep 26, 2025
e051920
did _payLSTPrincipal
kyzooghost Sep 26, 2025
7c91e70
refactor _withdrawWithReserveDeficitPriorityAndLSTLiabilityPrincipalR…
kyzooghost Sep 26, 2025
c1894e0
refactor replenishWithdrawalReserve
kyzooghost Sep 26, 2025
1542ea9
add lst accounting to paymaxliability
kyzooghost Sep 26, 2025
cb5ad67
add first version of events
kyzooghost Sep 27, 2025
1fee8e1
iyieldprovider comments
kyzooghost Sep 27, 2025
af3ef02
Move YieldProviderData
kyzooghost Sep 27, 2025
54425e8
cleanup
kyzooghost Sep 27, 2025
abf5947
redid lst liability accounting to factor for extraneous liability cha…
kyzooghost Sep 27, 2025
5c93516
fixup
kyzooghost Sep 27, 2025
3ea8595
did caching of l1messageservice storage reads in yieldmanager
kyzooghost Sep 27, 2025
00ee4c5
did cache for _syncExternalLiabilitySettlement
kyzooghost Sep 27, 2025
e6b73db
did internal cleanup for yieldmansger
kyzooghost Sep 28, 2025
d4b35fe
added first draft for _validateValidatorContainerForPermissionlessUns…
kyzooghost Sep 28, 2025
b6073da
did BLS.pubkeyRoot for memory arg
kyzooghost Sep 28, 2025
39d4fc2
did verifyProof for memory arg
kyzooghost Sep 28, 2025
c1298d2
made unstake functions payable
kyzooghost Sep 28, 2025
243cc58
fix interfaces
kyzooghost Sep 28, 2025
7c49e16
more cleanup
kyzooghost Sep 28, 2025
e1a05f8
move l2yieldrecipient logic to yieldmanager
kyzooghost Sep 28, 2025
9b6e710
simplify donate function
kyzooghost Sep 28, 2025
3cc61cb
cleanup yieldmanager interface
kyzooghost Sep 28, 2025
d4de751
cleanup of YieldManagerStorageLayout
kyzooghost Sep 29, 2025
4a1462c
shift logic to CLProofVerifier
kyzooghost Sep 29, 2025
5c78e24
interface cleanup
kyzooghost Sep 29, 2025
7f8ef6d
fix for onlyKnownYieldProvider
kyzooghost Sep 29, 2025
b4413af
mintLST -> withdrawLST
kyzooghost Sep 29, 2025
f7d8040
small changes
kyzooghost Sep 29, 2025
fe43b14
Merge branch 'main' into refactor/message-update
kyzooghost Sep 30, 2025
d42d70c
add yield docgen filter out
kyzooghost Sep 30, 2025
5d2ff3a
add l2yieldrecipient as mapping
kyzooghost Sep 30, 2025
a6051cc
did roles and linting
kyzooghost Sep 30, 2025
c2c49a2
YieldProviderBase
kyzooghost Sep 30, 2025
d2620ab
add _yieldProvider param, prepare to be beacon proxy
kyzooghost Oct 1, 2025
d782d7d
edit
kyzooghost Oct 1, 2025
2695c15
pass storage pointer to internal fn
kyzooghost Oct 1, 2025
f44530b
redid withdraw functions to account for l1messageService not having r…
kyzooghost Oct 1, 2025
5881702
removed caller indexed
kyzooghost Oct 1, 2025
1f1fc8d
correct onlyKnownYieldProvider
kyzooghost Oct 1, 2025
1c72d42
add _delegatecallYieldProvider
kyzooghost Oct 1, 2025
224601c
added fundReserve()
kyzooghost Oct 1, 2025
1ff34cb
did _updateReserveConfig
kyzooghost Oct 1, 2025
398395b
revertIfZeroAddress modifier
kyzooghost Oct 1, 2025
a3fa2d0
did pause types
kyzooghost Oct 1, 2025
6e6737a
added pause to withdrawFromYieldProvider
kyzooghost Oct 1, 2025
0f04f79
immutable cap snake casE
kyzooghost Oct 1, 2025
f3cfa22
did most of yieldmanager init
kyzooghost Oct 1, 2025
c86294f
add src/yield/LidoStVaultYieldProviderFactory.sol
kyzooghost Oct 1, 2025
233a9d6
removed unneeded library code
kyzooghost Oct 1, 2025
8cd97d0
more trimming of interfaces
kyzooghost Oct 1, 2025
7037d74
did init for yieldmanager
kyzooghost Oct 1, 2025
dc4cb74
1st draft for YieldManager system natspec
kyzooghost Oct 2, 2025
0b59644
did more checks for validateAddition for Lido
kyzooghost Oct 2, 2025
9678d91
did pause roles
kyzooghost Oct 2, 2025
216438c
did undoinitiateossification
kyzooghost Oct 2, 2025
452b3bf
removed unused math library functions
kyzooghost Oct 2, 2025
2f63052
rm getWithdrawalReserveBalance
kyzooghost Oct 2, 2025
548f350
rm more exzternal fns
kyzooghost Oct 2, 2025
10565eb
remove payLstInterest
kyzooghost Oct 2, 2025
b481d0a
fixing unit tests for linearollup
kyzooghost Oct 2, 2025
6429001
added new roles to unit test fixtures
kyzooghost Oct 2, 2025
c472437
added new test cases to LineaRollup
kyzooghost Oct 2, 2025
906f5bb
LineaRollupYieldExtension move
kyzooghost Oct 2, 2025
6780e95
wrote first unit tests for LineaRollupYieldExtension
kyzooghost Oct 2, 2025
b234906
did some yield reporting tests
kyzooghost Oct 2, 2025
3800241
more tests
kyzooghost Oct 2, 2025
ca1f255
prepare for next tests
kyzooghost Oct 2, 2025
3df8a43
more tests and claimMessageAndWithdrawLST comments
kyzooghost Oct 3, 2025
316b181
did reentry case
kyzooghost Oct 3, 2025
0e6ca0a
more refactor for linearollupyieldextension test
kyzooghost Oct 3, 2025
4265b37
did first unit test for YieldManager
kyzooghost Oct 3, 2025
3a037b2
remove garbage copy
kyzooghost Oct 3, 2025
cf58947
did init unit tests for yieldmanager
kyzooghost Oct 3, 2025
6b70401
did tests for add and remove l2yield recipients
kyzooghost Oct 3, 2025
3bf4c50
consolidated to single setWithdrawalReserveParameters fn
kyzooghost Oct 3, 2025
ee011b4
did unit tests for withdrawal reserve param setting
kyzooghost Oct 3, 2025
73052a8
did tests for effective balance functions
kyzooghost Oct 3, 2025
a31a100
more reserve param getter function testing done
kyzooghost Oct 3, 2025
e398b51
added getters to yieldmanager
kyzooghost Oct 3, 2025
e9e786a
new test cases for init
kyzooghost Oct 5, 2025
c4d3194
did add yield provider tests
kyzooghost Oct 5, 2025
7504297
fix test issues
kyzooghost Oct 5, 2025
a4d7453
did first test for removing yield providers
kyzooghost Oct 5, 2025
7dd05c5
more unit tests
kyzooghost Oct 5, 2025
b09120b
did emergency remove tests
kyzooghost Oct 5, 2025
1ec8e62
did receiveFundsFromReserve unit tests
kyzooghost Oct 5, 2025
878b1a3
did transferFundsToReserve tests
kyzooghost Oct 5, 2025
2a9706a
fix native yield staking role for opsafe
kyzooghost Oct 6, 2025
e83821c
enhance mockyieldprovider
kyzooghost Oct 6, 2025
0672fcb
did MockYieldProviderStorageLayout
kyzooghost Oct 6, 2025
5da88b2
mock iprovements
kyzooghost Oct 6, 2025
0555c16
added non-0 LSTPrincipal case
kyzooghost Oct 6, 2025
cb140e1
defined new invariant for lstPrincipal
kyzooghost Oct 6, 2025
d652cae
did revert tests for unstake
kyzooghost Oct 6, 2025
f3fe430
did unstakepermissionless tests
kyzooghost Oct 6, 2025
f311b5c
fix
kyzooghost Oct 6, 2025
9f1bab0
writing tests for withdraw delegate helper
kyzooghost Oct 6, 2025
f478ef3
did tests for delegatecall helper for withdraw from yield provider he…
kyzooghost Oct 6, 2025
c7a6cee
did decrementPendingPermissionlessUnstake test
kyzooghost Oct 6, 2025
d457bf2
did most of tests for withdraw with target deficit priority and lst l…
kyzooghost Oct 6, 2025
8d223f9
did last case for withdraw with target deficit priority and lst liabi…
kyzooghost Oct 6, 2025
0706dcd
Redo setup for actual funding
kyzooghost Oct 6, 2025
c2befc9
did some cases for withdraw from yield provider
kyzooghost Oct 6, 2025
1b23465
correction for lstPrincipalPayment and userFund pairing
kyzooghost Oct 6, 2025
e6a739d
newly worded lstprincipalpayment tests
kyzooghost Oct 6, 2025
9e36016
did first few cases for add withdrawal reserve
kyzooghost Oct 6, 2025
82bb92e
rewire to mockwithdrawtarget
kyzooghost Oct 6, 2025
d6347ab
did cases for addToWithdrawalReserve
kyzooghost Oct 6, 2025
ab77666
did permissionless rebalance unit tests
kyzooghost Oct 7, 2025
b7e8c5e
fix unit test for unstakePermissionless
kyzooghost Oct 7, 2025
83b5dc5
did withdraw lst tests
kyzooghost Oct 7, 2025
e282c56
new unit test file for YieldManager control functions
kyzooghost Oct 7, 2025
aebf6e8
more unit tests for yieldmanager
kyzooghost Oct 7, 2025
a13aa72
test fixes
kyzooghost Oct 7, 2025
88616bd
run linter and change package.json linting command
kyzooghost Oct 7, 2025
51fb34f
update to Consensys
kyzooghost Oct 7, 2025
9075d55
new mock contracts
kyzooghost Oct 7, 2025
002b8d5
first attempt for deployLidoStVaultYieldProviderFactory
kyzooghost Oct 7, 2025
c2fd81c
wrote test for LidoStVaultYieldProviderFactory
kyzooghost Oct 7, 2025
ded06ef
first tests for yield provider
kyzooghost Oct 8, 2025
1cf7458
did first few unit tests for withdrawable Value
kyzooghost Oct 8, 2025
808a4c5
standardize deploy helper
kyzooghost Oct 8, 2025
1d45e80
fix tests for removal of beacon proxy pattern and role change
kyzooghost Oct 8, 2025
3c2328f
fix role coverage
kyzooghost Oct 8, 2025
97c9d22
new tests
kyzooghost Oct 8, 2025
84aa2c1
first try for test lido st vault
kyzooghost Oct 8, 2025
7511885
Revert "first try for test lido st vault"
kyzooghost Oct 8, 2025
8648c21
do test contracts
kyzooghost Oct 8, 2025
971ab16
?stable deploy arrangement
kyzooghost Oct 8, 2025
2377eab
added helper ossify
kyzooghost Oct 8, 2025
c54633c
did more tests for lido yield provider
kyzooghost Oct 8, 2025
d26ec0f
fix
kyzooghost Oct 8, 2025
bdf3119
did fund test
kyzooghost Oct 8, 2025
815ee0b
more unit tests for lido st yield provider
kyzooghost Oct 9, 2025
4778053
did easy tests for lido yield provider
kyzooghost Oct 9, 2025
780a5f8
added unit tests for 2 yield calc functions
kyzooghost Oct 9, 2025
1ccb1a1
did tests for payLSTPrincipal
kyzooghost Oct 9, 2025
eae9515
did payObligations tests
kyzooghost Oct 9, 2025
fe7d489
did payNodeOperatorFees
kyzooghost Oct 9, 2025
99d6dd3
did payNodeOperatorFees
kyzooghost Oct 9, 2025
8407b28
did LSTWithdrawalRequiresDeficit error
kyzooghost Oct 9, 2025
73367fc
did handlePostiveYieldAccounting
kyzooghost Oct 9, 2025
88c1089
did report yield unit tests
kyzooghost Oct 9, 2025
1d531f3
did basic unstake permissionless tests
kyzooghost Oct 9, 2025
008120c
added tests for math256 library
kyzooghost Oct 9, 2025
27c5b79
add testgindex
kyzooghost Oct 9, 2025
5a6fa05
did gindex test
kyzooghost Oct 10, 2025
3f597a2
did ssz test
kyzooghost Oct 10, 2025
3011244
add bls test and rm unused function
kyzooghost Oct 10, 2025
577f67b
first passing clproofverifier test
kyzooghost Oct 10, 2025
3b20046
change constant name
kyzooghost Oct 10, 2025
96f2f27
add 0x02 validator struct
kyzooghost Oct 10, 2025
3a82bbb
2 more unit tests for clproofverifier
kyzooghost Oct 10, 2025
1ba8eda
successfully adjusted clfproofverifier unit tests
kyzooghost Oct 10, 2025
69094b6
successfully converted 0x02 validator
kyzooghost Oct 10, 2025
f7d07f0
refactor to generateEIP4478Witness function
kyzooghost Oct 12, 2025
7c77f57
Added ValidatorNotActiveForLongEnough test
kyzooghost Oct 12, 2025
c38d91b
did unstakePErmissionless test
kyzooghost Oct 12, 2025
d7f6b49
first draft for LidoStVaultYieldProvider tests
kyzooghost Oct 12, 2025
f24cff9
fix conflicting loadfixtures
kyzooghost Oct 12, 2025
97c6f01
fix gwei -> wei for maxUnstakeAmount
kyzooghost Oct 12, 2025
45072df
did struct packing and change uint256 vars to uint128
kyzooghost Oct 13, 2025
dd63620
Revert "did struct packing and change uint256 vars to uint128"
kyzooghost Oct 13, 2025
3656a66
redo slot text
kyzooghost Oct 13, 2025
c794bb1
added reinitializeLineaRollupV7
kyzooghost Oct 13, 2025
8c86d76
first version of reinit test
kyzooghost Oct 13, 2025
e919a90
did reinit tests
kyzooghost Oct 13, 2025
582f968
redo reinit test
kyzooghost Oct 13, 2025
41ae1a9
consolidate to PAUSE_NATIVE_YIELD_PERMISSIONLESS_ACTIONS_ROLE, create…
kyzooghost Oct 13, 2025
f4d05fc
removed NATIVE_YIELD_RESERVE_FUNDING pause type
kyzooghost Oct 13, 2025
a8aed2e
new pause type - native yield donations
kyzooghost Oct 13, 2025
5b312f2
YIELD_PROVIDER_FUNDER_ROLE -> YIELD_PROVIDER_STAKING_ROLE
kyzooghost Oct 13, 2025
56051f2
rm RESERVE_OPERATOR_ROLE
kyzooghost Oct 13, 2025
bf16bf9
did STAKING_PAUSE_CONTROLLER_ROLE
kyzooghost Oct 13, 2025
73e4336
first withdraw lst test
kyzooghost Oct 13, 2025
0ac9774
did happy paths for yield report
kyzooghost Oct 13, 2025
49b7603
added more integration test cases
kyzooghost Oct 14, 2025
948e196
did more integration tests
kyzooghost Oct 14, 2025
0916121
add revert tests for pause types
kyzooghost Oct 14, 2025
9a7d48c
more pause unit tests
kyzooghost Oct 14, 2025
ea03e06
added new integration test
kyzooghost Oct 14, 2025
adf7e93
initial contract changes
kyzooghost Oct 14, 2025
21003db
fixed tests
kyzooghost Oct 14, 2025
8774d69
remove donation function
kyzooghost Oct 14, 2025
5acca4d
did 2nd native yield resilience scenario
kyzooghost Oct 14, 2025
2c9e9e0
remove currentNegativeYield from storage
kyzooghost Oct 15, 2025
1d87b33
added outstandingnegativeyield as response to reportYield
kyzooghost Oct 15, 2025
d01fecd
change stakingVault to availableBalance
kyzooghost Oct 16, 2025
1674699
settleVaultObligations -> settleLidoFees
kyzooghost Oct 16, 2025
183b29d
rm undoInitiateOssification
kyzooghost Oct 16, 2025
ddf2e91
small fix
kyzooghost Oct 16, 2025
8cd7cfd
modify payObligations impl
kyzooghost Oct 16, 2025
da3004f
rm RESERVE_OPERATOR
kyzooghost Oct 16, 2025
f1406ae
split ossifier roles
kyzooghost Oct 17, 2025
0b76981
processPendingOssification -> progressPendingOssification
kyzooghost Oct 17, 2025
057425c
removed TRANSIENT_RECEIVE_CALLER, new design for progressPendingOssif…
kyzooghost Oct 17, 2025
19186f6
implemented initializeVendorContracts
kyzooghost Oct 17, 2025
bd59481
Merge branch 'main' into refactor/message-update
kyzooghost Oct 17, 2025
19617be
did unit tests for new addYieldProvider impl
kyzooghost Oct 17, 2025
935c85e
add new test case for receiveFundsFromReserve
kyzooghost Oct 17, 2025
9df85a3
added exitVendorContracts
kyzooghost Oct 17, 2025
301bfd1
modify ordering of withdrawal param update event
kyzooghost Oct 17, 2025
4f9c0a5
added CONNECT_DEPOSIT to initializeVaultContracts
kyzooghost Oct 17, 2025
6176b0b
middle of test
kyzooghost Oct 17, 2025
7fcd201
almost finished integration test
kyzooghost Oct 17, 2025
0c5c1ed
remedied integration test situation
kyzooghost Oct 20, 2025
5c12a9d
rm coupling between userFunds and lstLiabilityPrincipal state mutation
kyzooghost Oct 20, 2025
720ef0e
unit tests for safeAddToWithdrawalReserve
kyzooghost Oct 20, 2025
649f4e1
more tests for safeAddToWithdrawalReserve
kyzooghost Oct 20, 2025
3f987bd
fix storage location for LineaRollupYieldExtension
kyzooghost Oct 20, 2025
3d8c955
change header text for CLProofVerifier
kyzooghost Oct 21, 2025
3093002
add revert to fund() for 0 value
kyzooghost Oct 22, 2025
be63227
did LidoStVaultYieldProviderFactoryDeployed
kyzooghost Oct 22, 2025
8ce7167
rm initializer from lidostvaultyieldprovider
kyzooghost Oct 22, 2025
123868e
did LidoStVaultYieldProviderDeployed
kyzooghost Oct 22, 2025
54b3d73
did YieldManagerInitialized and YieldManagerDeployed
kyzooghost Oct 22, 2025
2063a47
did YieldManagerDeployed event test
kyzooghost Oct 22, 2025
551363b
add 'tolerate external interaction failure' semantics to initiateOssi…
kyzooghost Oct 24, 2025
191a475
move try-catch logic to the yieldprovider
kyzooghost Oct 27, 2025
092f4af
did lido dashboard interface changes
kyzooghost Oct 28, 2025
d94f41b
did try-catch for Dashboard.disburseFees
kyzooghost Oct 28, 2025
98fab88
add ossified check to fundYieldProvider
kyzooghost Oct 28, 2025
b1dd747
rm unused fields in _syncExternalLiabilitySettlement
kyzooghost Oct 28, 2025
43e4652
unit tests passing for ValidatorContainerProofVerifier change
kyzooghost Oct 28, 2025
e887b35
did constructor tests for validator container proof verifier
kyzooghost Oct 28, 2025
f2ede9e
add natspec to ValidatorContainerProofVerifier
kyzooghost Oct 28, 2025
2f88e1e
mild fixes for lido yield provider
kyzooghost Oct 28, 2025
c4c3452
added YieldProviderReturnedZeroUnstakeAmount
kyzooghost Oct 29, 2025
5e0afb5
added userFunds param to YieldProviderHasRemainingFunds error
kyzooghost Oct 29, 2025
f648fab
Merge branch 'main' into refactor/message-update
kyzooghost Oct 29, 2025
c595c3e
added reinit guard
kyzooghost Oct 29, 2025
fe095bc
added CallerNotProxyAdmin
kyzooghost Oct 30, 2025
50f52e9
small unit test name fix
kyzooghost Oct 30, 2025
74e823b
added new reinit tests
kyzooghost Oct 30, 2025
f7e1be1
[Fix] - various tweaks (#1665)
thedarkjester Oct 31, 2025
2f7890b
small edit
kyzooghost Oct 31, 2025
3ed10b7
small fixes
kyzooghost Oct 31, 2025
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
8 changes: 7 additions & 1 deletion contracts/.solhintignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,10 @@ node_modules
lib/forge-std
test/foundry
src/_testing
src/proxies
src/proxies

# TODO - Remove below when PR ready
src/bridging/token/TokenBridgeBase.sol
src/messaging/l2/v1/L2MessageServiceV1.sol
src/_testing/unit/rollup/InheritingLineaRollup.sol
src/_testing/unit/rollup/TestLineaRollup.sol
3 changes: 3 additions & 0 deletions contracts/common/constants/general.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,7 @@ export const LINEA_ROLLUP_INITIALIZE_SIGNATURE =
export const L2_MESSAGE_SERVICE_INITIALIZE_SIGNATURE =
"initialize(uint256,uint256,address,(address,bytes32)[],(uint8,bytes32)[],(uint8,bytes32)[])";

export const YIELD_MANAGER_INITIALIZE_SIGNATURE =
"initialize(((uint8,bytes32)[],(uint8,bytes32)[],(address,bytes32)[],address[],address,uint16,uint16,uint256,uint256))";

export const EMPTY_INITIALIZE_SIGNATURE = "initialize()";
40 changes: 39 additions & 1 deletion contracts/common/constants/pauseTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,24 @@ import {
PAUSE_L1_L2_ROLE,
PAUSE_BLOB_SUBMISSION_ROLE,
PAUSE_L2_L1_ROLE,
PAUSE_NATIVE_YIELD_PERMISSIONLESS_ACTIONS_ROLE,
PAUSE_NATIVE_YIELD_REPORTING_ROLE,
PAUSE_NATIVE_YIELD_STAKING_ROLE,
PAUSE_NATIVE_YIELD_UNSTAKING_ROLE,
UNPAUSE_ALL_ROLE,
UNPAUSE_BLOB_SUBMISSION_ROLE,
UNPAUSE_COMPLETE_TOKEN_BRIDGING_ROLE,
UNPAUSE_FINALIZATION_ROLE,
UNPAUSE_INITIATE_TOKEN_BRIDGING_ROLE,
UNPAUSE_L1_L2_ROLE,
UNPAUSE_BLOB_SUBMISSION_ROLE,
UNPAUSE_L2_L1_ROLE,
UNPAUSE_NATIVE_YIELD_PERMISSIONLESS_ACTIONS_ROLE,
UNPAUSE_NATIVE_YIELD_REPORTING_ROLE,
UNPAUSE_NATIVE_YIELD_STAKING_ROLE,
UNPAUSE_NATIVE_YIELD_UNSTAKING_ROLE,
} from "./roles";

export const UNUSED_PAUSE_TYPE = 0;
export const GENERAL_PAUSE_TYPE = 1;
export const L1_L2_PAUSE_TYPE = 2;
export const L2_L1_PAUSE_TYPE = 3;
Expand All @@ -23,6 +32,10 @@ export const CALLDATA_SUBMISSION_PAUSE_TYPE = 5;
export const FINALIZATION_PAUSE_TYPE = 6;
export const INITIATE_TOKEN_BRIDGING_PAUSE_TYPE = 7;
export const COMPLETE_TOKEN_BRIDGING_PAUSE_TYPE = 8;
export const NATIVE_YIELD_STAKING_PAUSE_TYPE = 9;
export const NATIVE_YIELD_UNSTAKING_PAUSE_TYPE = 10;
export const NATIVE_YIELD_PERMISSIONLESS_ACTIONS_PAUSE_TYPE = 11;
export const NATIVE_YIELD_REPORTING_PAUSE_TYPE = 12;

export const BASE_PAUSE_TYPES_ROLES = [{ pauseType: GENERAL_PAUSE_TYPE, role: PAUSE_ALL_ROLE }];
export const BASE_UNPAUSE_TYPES_ROLES = [{ pauseType: GENERAL_PAUSE_TYPE, role: UNPAUSE_ALL_ROLE }];
Expand All @@ -35,6 +48,7 @@ export const LINEA_ROLLUP_PAUSE_TYPES_ROLES = [
{ pauseType: BLOB_SUBMISSION_PAUSE_TYPE, role: PAUSE_BLOB_SUBMISSION_ROLE },
{ pauseType: CALLDATA_SUBMISSION_PAUSE_TYPE, role: PAUSE_BLOB_SUBMISSION_ROLE },
{ pauseType: FINALIZATION_PAUSE_TYPE, role: PAUSE_FINALIZATION_ROLE },
{ pauseType: NATIVE_YIELD_STAKING_PAUSE_TYPE, role: PAUSE_NATIVE_YIELD_STAKING_ROLE },
];

export const LINEA_ROLLUP_UNPAUSE_TYPES_ROLES = [
Expand All @@ -44,6 +58,7 @@ export const LINEA_ROLLUP_UNPAUSE_TYPES_ROLES = [
{ pauseType: BLOB_SUBMISSION_PAUSE_TYPE, role: UNPAUSE_BLOB_SUBMISSION_ROLE },
{ pauseType: CALLDATA_SUBMISSION_PAUSE_TYPE, role: UNPAUSE_BLOB_SUBMISSION_ROLE },
{ pauseType: FINALIZATION_PAUSE_TYPE, role: UNPAUSE_FINALIZATION_ROLE },
{ pauseType: NATIVE_YIELD_STAKING_PAUSE_TYPE, role: UNPAUSE_NATIVE_YIELD_STAKING_ROLE },
];

// L2MessageService
Expand Down Expand Up @@ -71,3 +86,26 @@ export const TOKEN_BRIDGE_UNPAUSE_TYPES_ROLES = [
{ pauseType: INITIATE_TOKEN_BRIDGING_PAUSE_TYPE, role: UNPAUSE_INITIATE_TOKEN_BRIDGING_ROLE },
{ pauseType: COMPLETE_TOKEN_BRIDGING_PAUSE_TYPE, role: UNPAUSE_COMPLETE_TOKEN_BRIDGING_ROLE },
];

// YieldManager
export const YIELD_MANAGER_PAUSE_TYPES_ROLES = [
...BASE_PAUSE_TYPES_ROLES,
{ pauseType: NATIVE_YIELD_STAKING_PAUSE_TYPE, role: PAUSE_NATIVE_YIELD_STAKING_ROLE },
{ pauseType: NATIVE_YIELD_UNSTAKING_PAUSE_TYPE, role: PAUSE_NATIVE_YIELD_UNSTAKING_ROLE },
{
pauseType: NATIVE_YIELD_PERMISSIONLESS_ACTIONS_PAUSE_TYPE,
role: PAUSE_NATIVE_YIELD_PERMISSIONLESS_ACTIONS_ROLE,
},
{ pauseType: NATIVE_YIELD_REPORTING_PAUSE_TYPE, role: PAUSE_NATIVE_YIELD_REPORTING_ROLE },
];

export const YIELD_MANAGER_UNPAUSE_TYPES_ROLES = [
...BASE_UNPAUSE_TYPES_ROLES,
{ pauseType: NATIVE_YIELD_STAKING_PAUSE_TYPE, role: UNPAUSE_NATIVE_YIELD_STAKING_ROLE },
{ pauseType: NATIVE_YIELD_UNSTAKING_PAUSE_TYPE, role: UNPAUSE_NATIVE_YIELD_UNSTAKING_ROLE },
{
pauseType: NATIVE_YIELD_PERMISSIONLESS_ACTIONS_PAUSE_TYPE,
role: UNPAUSE_NATIVE_YIELD_PERMISSIONLESS_ACTIONS_ROLE,
},
{ pauseType: NATIVE_YIELD_REPORTING_PAUSE_TYPE, role: UNPAUSE_NATIVE_YIELD_REPORTING_ROLE },
];
97 changes: 97 additions & 0 deletions contracts/common/constants/roles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,70 @@ export const SET_CUSTOM_CONTRACT_ROLE = generateKeccak256(["string"], ["SET_CUST
export const SET_MESSAGE_SERVICE_ROLE = generateKeccak256(["string"], ["SET_MESSAGE_SERVICE_ROLE"], {
encodePacked: true,
});
// Roles for LineaRollup introduced with YieldManager
export const SET_YIELD_MANAGER_ROLE = generateKeccak256(["string"], ["SET_YIELD_MANAGER_ROLE"], {
encodePacked: true,
});
export const PAUSE_NATIVE_YIELD_STAKING_ROLE = generateKeccak256(["string"], ["PAUSE_NATIVE_YIELD_STAKING_ROLE"], {
encodePacked: true,
});
export const UNPAUSE_NATIVE_YIELD_STAKING_ROLE = generateKeccak256(["string"], ["UNPAUSE_NATIVE_YIELD_STAKING_ROLE"], {
encodePacked: true,
});
// Roles for YieldManager
export const YIELD_PROVIDER_STAKING_ROLE = generateKeccak256(["string"], ["YIELD_PROVIDER_STAKING_ROLE"], {
encodePacked: true,
});
export const YIELD_PROVIDER_UNSTAKER_ROLE = generateKeccak256(["string"], ["YIELD_PROVIDER_UNSTAKER_ROLE"], {
encodePacked: true,
});
export const YIELD_REPORTER_ROLE = generateKeccak256(["string"], ["YIELD_REPORTER_ROLE"], {
encodePacked: true,
});
export const STAKING_PAUSE_CONTROLLER_ROLE = generateKeccak256(["string"], ["STAKING_PAUSE_CONTROLLER_ROLE"], {
encodePacked: true,
});
export const OSSIFICATION_INITIATOR_ROLE = generateKeccak256(["string"], ["OSSIFICATION_INITIATOR_ROLE"], {
encodePacked: true,
});
export const OSSIFICATION_PROCESSOR_ROLE = generateKeccak256(["string"], ["OSSIFICATION_PROCESSOR_ROLE"], {
encodePacked: true,
});
export const WITHDRAWAL_RESERVE_SETTER_ROLE = generateKeccak256(["string"], ["WITHDRAWAL_RESERVE_SETTER_ROLE"], {
encodePacked: true,
});
export const SET_YIELD_PROVIDER_ROLE = generateKeccak256(["string"], ["SET_YIELD_PROVIDER_ROLE"], {
encodePacked: true,
});
export const SET_L2_YIELD_RECIPIENT_ROLE = generateKeccak256(["string"], ["SET_L2_YIELD_RECIPIENT_ROLE"], {
encodePacked: true,
});
export const PAUSE_NATIVE_YIELD_UNSTAKING_ROLE = generateKeccak256(["string"], ["PAUSE_NATIVE_YIELD_UNSTAKING_ROLE"], {
encodePacked: true,
});
export const UNPAUSE_NATIVE_YIELD_UNSTAKING_ROLE = generateKeccak256(
["string"],
["UNPAUSE_NATIVE_YIELD_UNSTAKING_ROLE"],
{ encodePacked: true },
);
export const PAUSE_NATIVE_YIELD_PERMISSIONLESS_ACTIONS_ROLE = generateKeccak256(
["string"],
["PAUSE_NATIVE_YIELD_PERMISSIONLESS_ACTIONS_ROLE"],
{ encodePacked: true },
);
export const UNPAUSE_NATIVE_YIELD_PERMISSIONLESS_ACTIONS_ROLE = generateKeccak256(
["string"],
["UNPAUSE_NATIVE_YIELD_PERMISSIONLESS_ACTIONS_ROLE"],
{ encodePacked: true },
);
export const PAUSE_NATIVE_YIELD_REPORTING_ROLE = generateKeccak256(["string"], ["PAUSE_NATIVE_YIELD_REPORTING_ROLE"], {
encodePacked: true,
});
export const UNPAUSE_NATIVE_YIELD_REPORTING_ROLE = generateKeccak256(
["string"],
["UNPAUSE_NATIVE_YIELD_REPORTING_ROLE"],
{ encodePacked: true },
);

export const BASE_ROLES = [PAUSE_ALL_ROLE, UNPAUSE_ALL_ROLE];

Expand All @@ -93,6 +157,11 @@ export const LINEA_ROLLUP_ROLES = [
UNPAUSE_BLOB_SUBMISSION_ROLE,
PAUSE_FINALIZATION_ROLE,
UNPAUSE_FINALIZATION_ROLE,
// New roles introduced with YieldManager
SET_YIELD_MANAGER_ROLE,
YIELD_PROVIDER_STAKING_ROLE,
PAUSE_NATIVE_YIELD_STAKING_ROLE,
UNPAUSE_NATIVE_YIELD_STAKING_ROLE,
];

export const L2_MESSAGE_SERVICE_ROLES = [
Expand All @@ -119,3 +188,31 @@ export const TOKEN_BRIDGE_ROLES = [
PAUSE_COMPLETE_TOKEN_BRIDGING_ROLE,
UNPAUSE_COMPLETE_TOKEN_BRIDGING_ROLE,
];

// For NativeYieldCronJob
export const YIELD_MANAGER_OPERATOR_ROLES = [
YIELD_PROVIDER_STAKING_ROLE,
YIELD_PROVIDER_UNSTAKER_ROLE,
YIELD_REPORTER_ROLE,
STAKING_PAUSE_CONTROLLER_ROLE,
OSSIFICATION_PROCESSOR_ROLE,
];

export const YIELD_MANAGER_SECURITY_COUNCIL_ROLES = [
...BASE_ROLES,
...YIELD_MANAGER_OPERATOR_ROLES,
// Operational roles unique to Security Council
OSSIFICATION_INITIATOR_ROLE,
SET_YIELD_PROVIDER_ROLE,
SET_L2_YIELD_RECIPIENT_ROLE,
WITHDRAWAL_RESERVE_SETTER_ROLE,
// Pause/unpause roles
PAUSE_NATIVE_YIELD_STAKING_ROLE,
UNPAUSE_NATIVE_YIELD_STAKING_ROLE,
PAUSE_NATIVE_YIELD_UNSTAKING_ROLE,
UNPAUSE_NATIVE_YIELD_UNSTAKING_ROLE,
PAUSE_NATIVE_YIELD_PERMISSIONLESS_ACTIONS_ROLE,
UNPAUSE_NATIVE_YIELD_PERMISSIONLESS_ACTIONS_ROLE,
PAUSE_NATIVE_YIELD_REPORTING_ROLE,
UNPAUSE_NATIVE_YIELD_REPORTING_ROLE,
];
28 changes: 17 additions & 11 deletions contracts/docs/workflows/administration/unpausing.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,16 +44,22 @@ Safe Member
## 🗂️ Pause Types


| Value | Address |
|-------|---------------------------------------|
| 1 | GENERAL_PAUSE_TYPE |
| 2 | L1_L2_PAUSE_TYPE |
| 3 | L2_L1_PAUSE_TYPE |
| 4 | PROVING_SYSTEM_PAUSE_TYPE |
| 5 | CALLDATA_SUBMISSION_PAUSE_TYPE |
| 6 | FINALIZATION_PAUSE_TYPE |
| 7 | INITIATE_TOKEN_BRIDGING_PAUSE_TYPE |
| 8 | COMPLETE_TOKEN_BRIDGING_PAUSE_TYPE |
| Value | Pause Type |
|-------|----------------------------------------------|
| 0 | UNUSED_PAUSE_TYPE |
| 1 | GENERAL_PAUSE_TYPE |
| 2 | L1_L2_PAUSE_TYPE |
| 3 | L2_L1_PAUSE_TYPE |
| 4 | BLOB_SUBMISSION_PAUSE_TYPE |
| 5 | CALLDATA_SUBMISSION_PAUSE_TYPE |
| 6 | FINALIZATION_PAUSE_TYPE |
| 7 | INITIATE_TOKEN_BRIDGING_PAUSE_TYPE |
| 8 | COMPLETE_TOKEN_BRIDGING_PAUSE_TYPE |
| 9 | NATIVE_YIELD_STAKING_PAUSE_TYPE |
| 10 | NATIVE_YIELD_UNSTAKING_PAUSE_TYPE |
| 11 | NATIVE_YIELD_PERMISSIONLESS_ACTIONS_PAUSE_TYPE |
| 12 | NATIVE_YIELD_REPORTING_PAUSE_TYPE |
| 13 | NATIVE_YIELD_DONATION_PAUSE_TYPE |


---
Expand All @@ -76,4 +82,4 @@ Safe Member
| L2MessageService | `0x508cA82Df566dCD1B0DE828967a0e96332cDc446` |
| L2 Token Bridge | `0x353012d04a9A6cF5C941bADC267f82004A8ceB9` |

<img src="../diagrams/unpausing.png">
<img src="../diagrams/unpausing.png">
2 changes: 2 additions & 0 deletions contracts/hardhat.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ const config: HardhatUserConfig = {
networks: {
hardhat: {
hardfork: "prague",
allowUnlimitedContractSize: true, // TODO - Remove when ready for PR
},
mainnet: {
accounts: [process.env.MAINNET_PRIVATE_KEY || EMPTY_HASH],
Expand Down Expand Up @@ -135,6 +136,7 @@ const config: HardhatUserConfig = {
"security/reentrancy/TransientStorageReentrancyGuardUpgradeable.sol",
"tokens",
"verifiers",
"yield", // TODO - Remove this when we are ready for PR
],
pages: "files",
outputDir: "docs/api/",
Expand Down
3 changes: 2 additions & 1 deletion contracts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"prettier": "prettier -c '**/*.{js,ts,sol}'",
"prettier:fix": "prettier -w '**/*.{js,ts,sol}'",
"lint:sol": "solhint -f stylish 'src/**/*.sol'",
"lint:sol:fix": "solhint --fix --noPrompt -f stylish 'src/**/*.sol'",
"lint:sol:fix": "prettier -w 'src/**/*.sol'",
"lint:ts": "npx eslint '**/*.{js,ts}'",
"lint:ts:fix": "npx eslint --fix '**/*.{js,ts}'",
"lint": "pnpm run lint:sol && npm run lint:ts && npm run prettier",
Expand All @@ -25,6 +25,7 @@
},
"devDependencies": {
"@chainlink/contracts": "1.4.0",
"@chainsafe/blst": "2.2.0",
"@ethereumjs/util": "9.0.3",
"@nomicfoundation/hardhat-ethers": "3.0.5",
"@nomicfoundation/hardhat-foundry": "1.1.3",
Expand Down
Loading