Skip to content
Merged
Show file tree
Hide file tree
Changes from 18 commits
Commits
Show all changes
63 commits
Select commit Hold shift + click to select a range
8eb3196
feat: add v3 phase 2 script
dry914 Dec 30, 2025
a16e675
test: init test for V3 phase 2
dry914 Dec 30, 2025
a3e4d3c
test: add scenario tests for factories
dry914 Dec 30, 2025
b731cb9
test: update expected vote id
dry914 Dec 30, 2025
0746f00
test: add event checks
dry914 Jan 4, 2026
90e736b
test: fix permitions test
dry914 Jan 4, 2026
da46aaf
test: local abi for events
dry914 Jan 4, 2026
c5b822c
test: force local events for vaultHub
dry914 Jan 4, 2026
675f597
feat: update CSM shareLimit and exit priority threshold
failingtwice Jan 8, 2026
bd77a79
feat: grant CSHashConsensus MANAGE_FRAME_CONFIG_ROLE to TwoPhaseFrame…
failingtwice Jan 8, 2026
753b29a
feat: move role grant to dg items
failingtwice Jan 9, 2026
bdb7340
test: add tests for CSM and oracle changes
failingtwice Jan 9, 2026
9d3f792
feat: update vote date
failingtwice Jan 12, 2026
8d965e9
feat: using placeholder PDG address to fix tests
failingtwice Jan 12, 2026
e2f202b
test: use custom helper for validating module update events
failingtwice Jan 12, 2026
65878dd
test: check that only the expected parameters have changed
failingtwice Jan 12, 2026
972563f
chore: add real addresses of some factories
dry914 Jan 12, 2026
c749e56
feat: add TwoPhaseFramConfigUpdate abi
failingtwice Jan 12, 2026
8d2e6c7
test: add ET factories checks
dry914 Jan 12, 2026
28bd742
feat: resume PDG
failingtwice Jan 12, 2026
53daa83
Merge pull request #582 from lidofinance/feat/v3-phase2-et
failingtwice Jan 13, 2026
f8df8a4
Merge branch 'feat/next-vote' of https://github.com/lidofinance/scrip…
failingtwice Jan 13, 2026
104293c
test: add a scenario test for frame offset contract
failingtwice Jan 13, 2026
b451e52
fix: add more context to storage manipulation
failingtwice Jan 13, 2026
8126d3e
feat: raise external shares ratio to 30%
failingtwice Jan 13, 2026
bd41e99
fix: use helper to upgrade validation
failingtwice Jan 13, 2026
4af0a00
fix: minor improvements
failingtwice Jan 13, 2026
10ce8e3
test: update vote id
failingtwice Jan 13, 2026
047a05d
fix: remove convert
failingtwice Jan 13, 2026
fa8f75a
feat: update vote date
failingtwice Jan 13, 2026
9990003
feat: update deployed addresses
failingtwice Jan 13, 2026
4d37a79
enable all CI tests
iamnp Jan 14, 2026
2715912
update DG items descriptions
iamnp Jan 14, 2026
55a47c6
update voting items descriptions
iamnp Jan 14, 2026
eddb0bf
items desc finalized
iamnp Jan 14, 2026
7dffcde
update formatting
iamnp Jan 14, 2026
9a58a70
update formatting (fix)
iamnp Jan 14, 2026
74e7c83
test: use existing validator
failingtwice Jan 14, 2026
7bf67c5
Merge branch 'feat/v3-phase-2' of https://github.com/lidofinance/scri…
failingtwice Jan 14, 2026
4c1104e
fix: reorganize DG items
failingtwice Jan 14, 2026
817abb4
fix: update date
failingtwice Jan 14, 2026
e563875
fix: remove unused vars
failingtwice Jan 14, 2026
826476e
feat: test offset reverts
failingtwice Jan 14, 2026
95e8a96
fix: items descriptions
iamnp Jan 15, 2026
9a29d23
feat: update easytrack var names for better clarity
failingtwice Jan 15, 2026
f527951
fix: uncomment asserts
failingtwice Jan 15, 2026
934a271
refactor: DRY the heck out of it
failingtwice Jan 15, 2026
e75fe01
test: vaulthub cannot mint more than external share limit
failingtwice Jan 15, 2026
21fc3e9
test: mint up to limit first, then attempt to overmint
failingtwice Jan 15, 2026
0bc3ecd
test: fix csm limits
dry914 Jan 15, 2026
1844ef8
test: fix permition test
dry914 Jan 15, 2026
2ff8235
test: fix gate seal test
dry914 Jan 15, 2026
192e887
test: fix snap tests
dry914 Jan 15, 2026
1424565
Merge pull request #584 from lidofinance/feat/v3-phase-2-ci
failingtwice Jan 16, 2026
5aace07
test: duplicate constants instead of reusing
failingtwice Jan 16, 2026
ad6c33c
Merge branch 'feat/v3-phase-2' of https://github.com/lidofinance/scri…
failingtwice Jan 16, 2026
42c6de6
fix: public CI runners
iamnp Jan 17, 2026
606fb0b
feat: add IPFS desc + test
iamnp Jan 17, 2026
a06a1aa
test: fix snap test
dry914 Jan 17, 2026
a025b9e
test: change epsilon value
dry914 Jan 17, 2026
382bcc3
chore: use develop for core tests
tamtamchik Jan 17, 2026
ee21eb4
Merge pull request #585 from lidofinance/test/v3-phase-2-snap
tamtamchik Jan 18, 2026
01f58e3
feat: update vote id
failingtwice Jan 19, 2026
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
1 change: 1 addition & 0 deletions interfaces/TwoPhaseFrameConfigUpdate.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[{"inputs":[{"internalType":"address","name":"oracle","type":"address"},{"components":[{"internalType":"uint256","name":"reportsToProcessBeforeOffsetPhase","type":"uint256"},{"internalType":"uint256","name":"reportsToProcessBeforeRestorePhase","type":"uint256"},{"internalType":"uint256","name":"offsetPhaseEpochsPerFrame","type":"uint256"},{"internalType":"uint256","name":"restorePhaseFastLaneLengthSlots","type":"uint256"}],"internalType":"struct TwoPhaseFrameConfigUpdate.PhasesConfig","name":"phasesConfig","type":"tuple"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"CurrentReportMainPhaseIsNotCompleted","type":"error"},{"inputs":[],"name":"FastLanePeriodCannotBeLongerThanFrame","type":"error"},{"inputs":[],"name":"FastLaneTooShort","type":"error"},{"inputs":[],"name":"NoneOfPhasesExpired","type":"error"},{"inputs":[],"name":"OffsetPhaseNotExecuted","type":"error"},{"inputs":[],"name":"PhaseAlreadyExecuted","type":"error"},{"inputs":[{"internalType":"uint256","name":"currentSlot","type":"uint256"},{"internalType":"uint256","name":"deadlineSlot","type":"uint256"}],"name":"PhaseExpired","type":"error"},{"inputs":[{"internalType":"uint256","name":"actual","type":"uint256"},{"internalType":"uint256","name":"expected","type":"uint256"}],"name":"UnexpectedLastProcessingRefSlot","type":"error"},{"inputs":[],"name":"ZeroEpochsPerFrame","type":"error"},{"inputs":[],"name":"ZeroOracleAddress","type":"error"},{"inputs":[],"name":"ZeroReportsToEnableUpdate","type":"error"},{"anonymous":false,"inputs":[],"name":"OffsetPhaseExecuted","type":"event"},{"anonymous":false,"inputs":[],"name":"RestorePhaseExecuted","type":"event"},{"inputs":[],"name":"GENESIS_TIME","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"HASH_CONSENSUS","outputs":[{"internalType":"contract IConsensusContract","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"OFFSET_PHASE_FAST_LANE_LENGTH","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ORACLE","outputs":[{"internalType":"contract IReportAsyncProcessor","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"SECONDS_PER_SLOT","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"SLOTS_PER_EPOCH","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"executeOffsetPhase","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"executeRestorePhase","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"getExpirationStatus","outputs":[{"internalType":"bool","name":"offsetExpired","type":"bool"},{"internalType":"bool","name":"restoreExpired","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isReadyForOffsetPhase","outputs":[{"internalType":"bool","name":"ready","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isReadyForRestorePhase","outputs":[{"internalType":"bool","name":"ready","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"offsetPhase","outputs":[{"internalType":"uint256","name":"expectedProcessingRefSlot","type":"uint256"},{"internalType":"uint256","name":"expirationSlot","type":"uint256"},{"internalType":"uint256","name":"epochsPerFrame","type":"uint256"},{"internalType":"uint256","name":"fastLaneLengthSlots","type":"uint256"},{"internalType":"bool","name":"executed","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceRoleWhenExpired","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"restorePhase","outputs":[{"internalType":"uint256","name":"expectedProcessingRefSlot","type":"uint256"},{"internalType":"uint256","name":"expirationSlot","type":"uint256"},{"internalType":"uint256","name":"epochsPerFrame","type":"uint256"},{"internalType":"uint256","name":"fastLaneLengthSlots","type":"uint256"},{"internalType":"bool","name":"executed","type":"bool"}],"stateMutability":"view","type":"function"}]
272 changes: 272 additions & 0 deletions scripts/upgrade_2026_01_21_v3_phase_2.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,272 @@
"""
Vote 2026_01_21

# TODO <a list of vote items synced with Notion Omnibus checklist>

# TODO (after vote) Vote #{vote number} passed & executed on ${date+time}, block ${blockNumber}.
"""

from brownie import interface

from typing import Dict, List, Tuple

from utils.voting import bake_vote_items, confirm_vote_script, create_vote
from utils.ipfs import upload_vote_ipfs_description, calculate_vote_ipfs_description
from utils.config import get_deployer_account, get_is_live, get_priority_fee
from utils.mainnet_fork import pass_and_exec_dao_vote
from utils.dual_governance import submit_proposals
from utils.easy_track import remove_evmscript_factory, add_evmscript_factory, create_permissions

from utils.permissions import encode_oz_revoke_role, encode_oz_grant_role
from utils.agent import agent_forward

# ============================== Addresses ===================================

# DAO addresses
AGENT = "0x3e40D73EB977Dc6a537aF587D48316feE66E9C8c"

# Lido addresses
STAKING_ROUTER = "0xFdDf38947aFB03C621C71b06C9C70bce73f12999"
OPERATOR_GRID = "0xC69685E89Cefc327b43B7234AC646451B27c544d"
VAULT_HUB = "0x1d201BE093d847f6446530Efb0E8Fb426d176709"
CS_HASH_CONSENSUS = "0x71093efF8D8599b5fA340D665Ad60fA7C80688e4"
TWO_PHASE_FRAME_CONFIG_UPDATE = "0xb2B4DB1491cbe949ae85EfF01E0d3ee239f110C1"
PREDEPOSIT_GUARANTEE = "0xF4bF42c6D6A0E38825785048124DBAD6c9eaaac3"
PREDEPOSIT_GUARANTEE_NEW_IMPL = "0x85cBc70D06CfD02D176c7e8474636cF9fCa414eA" # TODO update address after deployment

# Old Easy Track factories
ST_VAULTS_COMMITTEE = "0x18A1065c81b0Cc356F1b1C843ddd5E14e4AefffF"
OLD_VAULTS_ADAPTER = "0xe2DE6d2DefF15588a71849c0429101F8ca9FB14D"
OLD_ALTER_TIERS_IN_OPERATOR_GRID_FACTORY = "0xa29173C7BCf39dA48D5E404146A652d7464aee14"
OLD_REGISTER_GROUPS_IN_OPERATOR_GRID_FACTORY = "0x194A46DA1947E98c9D79af13E06Cfbee0D8610cC"
OLD_UPDATE_GROUPS_SHARE_LIMIT_IN_OPERATOR_GRID_FACTORY = "0x8Bdc726a3147D8187820391D7c6F9F942606aEe6"
OLD_SET_JAIL_STATUS_IN_OPERATOR_GRID_FACTORY = "0x93F1DEE4473Ee9F42c8257C201e33a6Da30E5d67"
OLD_SOCIALIZE_BAD_DEBT_IN_VAULT_HUB_FACTORY = "0x1dF50522A1D868C12bF71747Bb6F24A18Fe6d32C"
OLD_FORCE_VALIDATOR_EXITS_IN_VAULT_HUB_FACTORY = "0x6C968cD89CA358fbAf57B18e77a8973Fa869a6aA"
OLD_UPDATE_VAULTS_FEES_IN_OPERATOR_GRID_FACTORY = "0x5C3bDFa3E7f312d8cf72F56F2b797b026f6B471c"

# New Easy Track factories
VAULTS_ADAPTER = "0xe2DE6d2DefF15588a71849c0429101F8ca9FB14D" # TODO update address after deployment
ALTER_TIERS_IN_OPERATOR_GRID_FACTORY = "0xa29173C7BCf39dA48D5E404146A652d7464aee14" # TODO update address after deployment
REGISTER_GROUPS_IN_OPERATOR_GRID_FACTORY = "0x194A46DA1947E98c9D79af13E06Cfbee0D8610cC" # TODO update address after deployment
UPDATE_GROUPS_SHARE_LIMIT_IN_OPERATOR_GRID_FACTORY = "0x8Bdc726a3147D8187820391D7c6F9F942606aEe6" # TODO update address after deployment
SET_JAIL_STATUS_IN_OPERATOR_GRID_FACTORY = "0x93F1DEE4473Ee9F42c8257C201e33a6Da30E5d67" # TODO update address after deployment
SOCIALIZE_BAD_DEBT_IN_VAULT_HUB_FACTORY = "0x1dF50522A1D868C12bF71747Bb6F24A18Fe6d32C" # TODO update address after deployment
FORCE_VALIDATOR_EXITS_IN_VAULT_HUB_FACTORY = "0x6C968cD89CA358fbAf57B18e77a8973Fa869a6aA" # TODO update address after deployment
UPDATE_VAULTS_FEES_IN_OPERATOR_GRID_FACTORY = "0x5C3bDFa3E7f312d8cf72F56F2b797b026f6B471c" # TODO update address after deployment

# CSM module parameters
CSM_MODULE_ID = 3
CSM_MODULE_NEW_TARGET_SHARE_BP = 750 # increase from 500 BP to 750 BP (7.5%)
CSM_MODULE_NEW_PRIORITY_EXIT_THRESHOLD_BP = 900 # increase from 625 BP to 900 BP (9%)
CSM_MODULE_MODULE_FEE_BP = 600 # Unchanged
CSM_MODULE_TREASURY_FEE_BP = 400 # Unchanged
CSM_MODULE_MAX_DEPOSITS_PER_BLOCK = 30 # Unchanged
CSM_MODULE_MIN_DEPOSIT_BLOCK_DISTANCE = 25 # Unchanged


# ============================= Description ==================================
# TODO <a description for IPFS (will appear in the voting description on vote.lido.fi)>
IPFS_DESCRIPTION = ""


# ================================ Main ======================================
def get_vote_items() -> Tuple[List[str], List[Tuple[str, str]]]:

staking_router = interface.StakingRouter(STAKING_ROUTER)
operator_grid = interface.OperatorGrid(OPERATOR_GRID)
vault_hub = interface.VaultHub(VAULT_HUB)
vaults_adapter = interface.IVaultsAdapter(VAULTS_ADAPTER)
cs_hash_consensus = interface.CSHashConsensus(CS_HASH_CONSENSUS)
predeposit_guarantee_proxy = interface.OssifiableProxy(PREDEPOSIT_GUARANTEE)
predeposit_guarantee = interface.PredepositGuarantee(PREDEPOSIT_GUARANTEE)

dg_items = [
# 1.1. Revoke REGISTRY_ROLE on OperatorGrid from old VaultsAdapter
agent_forward([
encode_oz_revoke_role(operator_grid, "vaults.OperatorsGrid.Registry", OLD_VAULTS_ADAPTER)
]),

# 1.2. Grant REGISTRY_ROLE on OperatorGrid to new VaultsAdapter
agent_forward([
encode_oz_grant_role(operator_grid, "vaults.OperatorsGrid.Registry", VAULTS_ADAPTER)
]),

# 1.3. Revoke VALIDATOR_EXIT_ROLE on VaultHub from old VaultsAdapter
agent_forward([
encode_oz_revoke_role(vault_hub, "vaults.VaultHub.ValidatorExitRole", OLD_VAULTS_ADAPTER)
]),

# 1.4. Grant VALIDATOR_EXIT_ROLE on VaultHub to new VaultsAdapter
agent_forward([
encode_oz_grant_role(vault_hub, "vaults.VaultHub.ValidatorExitRole", VAULTS_ADAPTER)
]),

# 1.5. Revoke BAD_DEBT_MASTER_ROLE on VaultHub from old VaultsAdapter
agent_forward([
encode_oz_revoke_role(vault_hub, "vaults.VaultHub.BadDebtMasterRole", OLD_VAULTS_ADAPTER)
]),

# 1.6. Grant BAD_DEBT_MASTER_ROLE on VaultHub to new VaultsAdapter
agent_forward([
encode_oz_grant_role(vault_hub, "vaults.VaultHub.BadDebtMasterRole", VAULTS_ADAPTER)
]),

# 1.7. Raise CSM (MODULE_ID = 3) stake share limit from 500 BP to 750 BP and priority exit threshold from 625 BP to 900 BP
agent_forward([
(
staking_router.address,
staking_router.updateStakingModule.encode_input(
CSM_MODULE_ID,
CSM_MODULE_NEW_TARGET_SHARE_BP,
CSM_MODULE_NEW_PRIORITY_EXIT_THRESHOLD_BP,
CSM_MODULE_MODULE_FEE_BP,
CSM_MODULE_TREASURY_FEE_BP,
CSM_MODULE_MAX_DEPOSITS_PER_BLOCK,
CSM_MODULE_MIN_DEPOSIT_BLOCK_DISTANCE,
),
),
]),

# 1.8. Grant MANAGE_FRAME_CONFIG_ROLE on CS HashConsensus to TwoPhaseFrameConfigUpdate
agent_forward([
encode_oz_grant_role(
contract=cs_hash_consensus,
role_name="MANAGE_FRAME_CONFIG_ROLE",
grant_to=TWO_PHASE_FRAME_CONFIG_UPDATE,
)
]),

# 1.9. Update PredepositGuarantee implementation
agent_forward([
(
predeposit_guarantee_proxy.address,
predeposit_guarantee_proxy.proxy__upgradeTo.encode_input(PREDEPOSIT_GUARANTEE_NEW_IMPL),
)
]),

# 1.10. Grant RESUME_ROLE on PredepositGuarantee to Agent
agent_forward([
encode_oz_grant_role(predeposit_guarantee, "PausableUntilWithRoles.ResumeRole", AGENT)
]),

# 1.11. Unpause PredepositGuarantee
agent_forward([
(
predeposit_guarantee_proxy.address,
predeposit_guarantee.resume.encode_input(),
)
]),

# 1.12. Revoke RESUME_ROLE on PredepositGuarantee from Agent
agent_forward([
encode_oz_revoke_role(predeposit_guarantee, "PausableUntilWithRoles.ResumeRole", AGENT)
]),
]

dg_call_script = submit_proposals([
(dg_items, "TODO DG proposal description")
])

vote_desc_items, call_script_items = zip(
(
"TODO 1. DG submission description",
dg_call_script[0]
),
(
"2. Remove old ALTER_TIERS_IN_OPERATOR_GRID_FACTORY factory from Easy Track",
remove_evmscript_factory(OLD_ALTER_TIERS_IN_OPERATOR_GRID_FACTORY)
),
(
"3. Add new ALTER_TIERS_IN_OPERATOR_GRID_FACTORY factory to Easy Track",
add_evmscript_factory(ALTER_TIERS_IN_OPERATOR_GRID_FACTORY, create_permissions(operator_grid, "alterTiers"))
),
(
"4. Remove old REGISTER_GROUPS_IN_OPERATOR_GRID_FACTORY factory from Easy Track",
remove_evmscript_factory(OLD_REGISTER_GROUPS_IN_OPERATOR_GRID_FACTORY)
),
(
"5. Add new REGISTER_GROUPS_IN_OPERATOR_GRID_FACTORY factory to Easy Track",
add_evmscript_factory(
REGISTER_GROUPS_IN_OPERATOR_GRID_FACTORY,
create_permissions(operator_grid, "registerGroup") + create_permissions(operator_grid, "registerTiers")[2:]
)
),
(
"6. Remove old UPDATE_GROUPS_SHARE_LIMIT_IN_OPERATOR_GRID_FACTORY factory from Easy Track",
remove_evmscript_factory(OLD_UPDATE_GROUPS_SHARE_LIMIT_IN_OPERATOR_GRID_FACTORY)
),
(
"7. Add new UPDATE_GROUPS_SHARE_LIMIT_IN_OPERATOR_GRID_FACTORY factory to Easy Track",
add_evmscript_factory(UPDATE_GROUPS_SHARE_LIMIT_IN_OPERATOR_GRID_FACTORY, create_permissions(operator_grid, "updateGroupShareLimit"))
),
(
"8. Remove old SET_JAIL_STATUS_IN_OPERATOR_GRID_FACTORY factory from Easy Track",
remove_evmscript_factory(OLD_SET_JAIL_STATUS_IN_OPERATOR_GRID_FACTORY)
),
(
"9. Add new SET_JAIL_STATUS_IN_OPERATOR_GRID_FACTORY factory to Easy Track",
add_evmscript_factory(SET_JAIL_STATUS_IN_OPERATOR_GRID_FACTORY, create_permissions(vaults_adapter, "setVaultJailStatus"))
),
(
"10. Remove old SOCIALIZE_BAD_DEBT_IN_VAULT_HUB_FACTORY factory from Easy Track",
remove_evmscript_factory(OLD_SOCIALIZE_BAD_DEBT_IN_VAULT_HUB_FACTORY)
),
(
"11. Add new SOCIALIZE_BAD_DEBT_IN_VAULT_HUB_FACTORY factory to Easy Track",
add_evmscript_factory(SOCIALIZE_BAD_DEBT_IN_VAULT_HUB_FACTORY, create_permissions(vaults_adapter, "socializeBadDebt"))
),
(
"12. Remove old FORCE_VALIDATOR_EXITS_IN_VAULT_HUB_FACTORY factory from Easy Track",
remove_evmscript_factory(OLD_FORCE_VALIDATOR_EXITS_IN_VAULT_HUB_FACTORY)
),
(
"13. Add new FORCE_VALIDATOR_EXITS_IN_VAULT_HUB_FACTORY factory to Easy Track",
add_evmscript_factory(FORCE_VALIDATOR_EXITS_IN_VAULT_HUB_FACTORY, create_permissions(vaults_adapter, "forceValidatorExit"))
),
(
"14. Remove old UPDATE_VAULTS_FEES_IN_OPERATOR_GRID_FACTORY factory from Easy Track",
remove_evmscript_factory(OLD_UPDATE_VAULTS_FEES_IN_OPERATOR_GRID_FACTORY)
),
(
"15. Add new UPDATE_VAULTS_FEES_IN_OPERATOR_GRID_FACTORY factory to Easy Track",
add_evmscript_factory(UPDATE_VAULTS_FEES_IN_OPERATOR_GRID_FACTORY, create_permissions(vaults_adapter, "updateVaultFees"))
),
)

return vote_desc_items, call_script_items


def start_vote(tx_params: Dict[str, str], silent: bool = False):
vote_desc_items, call_script_items = get_vote_items()
vote_items = bake_vote_items(list(vote_desc_items), list(call_script_items))

desc_ipfs = (
calculate_vote_ipfs_description(IPFS_DESCRIPTION)
if silent else upload_vote_ipfs_description(IPFS_DESCRIPTION)
)

vote_id, tx = confirm_vote_script(vote_items, silent, desc_ipfs) and list(
create_vote(vote_items, tx_params, desc_ipfs=desc_ipfs)
)

return vote_id, tx


def main():
tx_params: Dict[str, str] = {"from": get_deployer_account().address}
if get_is_live():
tx_params["priority_fee"] = get_priority_fee()

vote_id, _ = start_vote(tx_params=tx_params, silent=False)
vote_id >= 0 and print(f"Vote created: {vote_id}.")


def start_and_execute_vote_on_fork_manual():
if get_is_live():
raise Exception("This script is for local testing only.")

tx_params = {"from": get_deployer_account()}
vote_id, _ = start_vote(tx_params=tx_params, silent=True)
print(f"Vote created: {vote_id}.")
pass_and_exec_dao_vote(int(vote_id), step_by_step=True)
6 changes: 3 additions & 3 deletions tests/regression/test_permissions.py
Original file line number Diff line number Diff line change
Expand Up @@ -250,9 +250,9 @@ def protocol_permissions():
"contract": contracts.token_manager,
"type": "AragonApp",
"roles": {
"ISSUE_ROLE": ["0xc2f50d3277539fbd54346278e7b92faa76dc7364"],
"ASSIGN_ROLE": [VOTING, "0xc2f50d3277539fbd54346278e7b92faa76dc7364"],
"BURN_ROLE": ["0xc2f50d3277539fbd54346278e7b92faa76dc7364"],
"ISSUE_ROLE": [],
"ASSIGN_ROLE": [VOTING],
"BURN_ROLE": [],
"MINT_ROLE": [VOTING],
"REVOKE_VESTINGS_ROLE": [VOTING],
},
Expand Down
Loading
Loading