Skip to content

Commit c107d65

Browse files
author
Arti
committed
Tests and script are ready
1 parent dd68a7c commit c107d65

File tree

2 files changed

+28
-7
lines changed

2 files changed

+28
-7
lines changed

scripts/vote_2025_01_28.py

Lines changed: 23 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -59,15 +59,20 @@ def start_vote(tx_params: Dict[str, str], silent: bool) -> bool | list[int | Tra
5959
csm: interface.CSModule = contracts.csm
6060
staking_router: interface.StakingRouter = contracts.staking_router
6161
csm_module_id = 3
62-
new_stake_share_limit = 200
62+
new_stake_share_limit = 200 #2%
63+
new_priority_exit_share_threshold = 250 #2.5%
6364

6465
vote_desc_items, call_script_items = zip(
6566
#
6667
# I. Community staking module: limit increase + turn off EA mode
6768
#
6869
(
6970
"1. Grant MODULE_MANAGER_ROLE",
70-
encode_oz_grant_role(csm, "MODULE_MANAGER_ROLE", voting)
71+
agent_forward(
72+
[
73+
encode_oz_grant_role(csm, "MODULE_MANAGER_ROLE", contracts.agent)
74+
]
75+
),
7176
),
7277
(
7378
"2. Activate public release mode",
@@ -79,23 +84,35 @@ def start_vote(tx_params: Dict[str, str], silent: bool) -> bool | list[int | Tra
7984
),
8085
(
8186
"3. Grant STAKING_MODULE_MANAGE_ROLE",
82-
encode_oz_grant_role(staking_router, "STAKING_MODULE_MANAGE_ROLE", voting)
87+
agent_forward(
88+
[
89+
encode_oz_grant_role(staking_router, "STAKING_MODULE_MANAGE_ROLE", contracts.agent)
90+
]
91+
),
8392
),
8493
(
8594
"4. Increase share from 1% to 2%",
8695
agent_forward(
8796
[
88-
update_staking_module(csm_module_id, new_stake_share_limit, 125, 600, 400, 30, 25)
97+
update_staking_module(csm_module_id, new_stake_share_limit, new_priority_exit_share_threshold, 600, 400, 30, 25)
8998
]
9099
),
91100
),
92101
(
93102
"5. Revoke MODULE_MANAGER_ROLE",
94-
encode_oz_revoke_role(csm, "MODULE_MANAGER_ROLE", revoke_from=voting)
103+
agent_forward(
104+
[
105+
encode_oz_revoke_role(csm, "MODULE_MANAGER_ROLE", revoke_from=contracts.agent)
106+
]
107+
),
95108
),
96109
(
97110
"6. Revoke STAKING_MODULE_MANAGE_ROLE",
98-
encode_oz_revoke_role(staking_router, "STAKING_MODULE_MANAGE_ROLE", voting)
111+
agent_forward(
112+
[
113+
encode_oz_revoke_role(staking_router, "STAKING_MODULE_MANAGE_ROLE", contracts.agent)
114+
]
115+
),
99116
),
100117
#
101118
# II. NO Acquisitions - Bridgetower is now part of Solstice Staking

tests/test_vote_2025_01_28.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
from brownie import interface
88
from utils.test.tx_tracing_helpers import *
99
from utils.config import contracts, LDO_HOLDER_ADDRESS_FOR_TESTS
10-
from utils.config import contracts
1110

1211
def test_vote(helpers, accounts, vote_ids_from_env, stranger):
1312

@@ -33,6 +32,11 @@ def test_vote(helpers, accounts, vote_ids_from_env, stranger):
3332
# 4. Increase share from 1% to 2%
3433
assert staking_router.getStakingModule(3)["stakeShareLimit"] == 200
3534

35+
# 5. Revoke MODULE_MANAGER_ROLE"
36+
assert csm.hasRole(0x79dfcec784e591aafcf60db7db7b029a5c8b12aac4afd4e8c4eb740430405fa6, contracts.agent) == False
37+
38+
# 6. Revoke STAKING_MODULE_MANAGE_ROLE"
39+
assert staking_router.hasRole(0x3105bcbf19d4417b73ae0e58d508a65ecf75665e46c2622d8521732de6080c48, contracts.agent) == False
3640
#
3741
# II. NO Acquisitions - Bridgetower is now part of Solstice Staking
3842
#

0 commit comments

Comments
 (0)