Skip to content

Commit

Permalink
Tests and script are ready
Browse files Browse the repository at this point in the history
  • Loading branch information
Arti committed Jan 20, 2025
1 parent dd68a7c commit c107d65
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 7 deletions.
29 changes: 23 additions & 6 deletions scripts/vote_2025_01_28.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,15 +59,20 @@ def start_vote(tx_params: Dict[str, str], silent: bool) -> bool | list[int | Tra
csm: interface.CSModule = contracts.csm
staking_router: interface.StakingRouter = contracts.staking_router
csm_module_id = 3
new_stake_share_limit = 200
new_stake_share_limit = 200 #2%
new_priority_exit_share_threshold = 250 #2.5%

vote_desc_items, call_script_items = zip(
#
# I. Community staking module: limit increase + turn off EA mode
#
(
"1. Grant MODULE_MANAGER_ROLE",
encode_oz_grant_role(csm, "MODULE_MANAGER_ROLE", voting)
agent_forward(
[
encode_oz_grant_role(csm, "MODULE_MANAGER_ROLE", contracts.agent)
]
),
),
(
"2. Activate public release mode",
Expand All @@ -79,23 +84,35 @@ def start_vote(tx_params: Dict[str, str], silent: bool) -> bool | list[int | Tra
),
(
"3. Grant STAKING_MODULE_MANAGE_ROLE",
encode_oz_grant_role(staking_router, "STAKING_MODULE_MANAGE_ROLE", voting)
agent_forward(
[
encode_oz_grant_role(staking_router, "STAKING_MODULE_MANAGE_ROLE", contracts.agent)
]
),
),
(
"4. Increase share from 1% to 2%",
agent_forward(
[
update_staking_module(csm_module_id, new_stake_share_limit, 125, 600, 400, 30, 25)
update_staking_module(csm_module_id, new_stake_share_limit, new_priority_exit_share_threshold, 600, 400, 30, 25)
]
),
),
(
"5. Revoke MODULE_MANAGER_ROLE",
encode_oz_revoke_role(csm, "MODULE_MANAGER_ROLE", revoke_from=voting)
agent_forward(
[
encode_oz_revoke_role(csm, "MODULE_MANAGER_ROLE", revoke_from=contracts.agent)
]
),
),
(
"6. Revoke STAKING_MODULE_MANAGE_ROLE",
encode_oz_revoke_role(staking_router, "STAKING_MODULE_MANAGE_ROLE", voting)
agent_forward(
[
encode_oz_revoke_role(staking_router, "STAKING_MODULE_MANAGE_ROLE", contracts.agent)
]
),
),
#
# II. NO Acquisitions - Bridgetower is now part of Solstice Staking
Expand Down
6 changes: 5 additions & 1 deletion tests/test_vote_2025_01_28.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
from brownie import interface
from utils.test.tx_tracing_helpers import *
from utils.config import contracts, LDO_HOLDER_ADDRESS_FOR_TESTS
from utils.config import contracts

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

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

# 5. Revoke MODULE_MANAGER_ROLE"
assert csm.hasRole(0x79dfcec784e591aafcf60db7db7b029a5c8b12aac4afd4e8c4eb740430405fa6, contracts.agent) == False

# 6. Revoke STAKING_MODULE_MANAGE_ROLE"
assert staking_router.hasRole(0x3105bcbf19d4417b73ae0e58d508a65ecf75665e46c2622d8521732de6080c48, contracts.agent) == False
#
# II. NO Acquisitions - Bridgetower is now part of Solstice Staking
#
Expand Down

0 comments on commit c107d65

Please sign in to comment.