Skip to content

Commit d11e25b

Browse files
committed
feat: base hoodi test
1 parent 4409254 commit d11e25b

1 file changed

Lines changed: 19 additions & 1 deletion

File tree

scripts/vote_tw_csm2_hoodi.py

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,6 @@
104104
AGENT,
105105
contracts,
106106
)
107-
from utils.dual_governance import submit_proposals
108107
from utils.ipfs import upload_vote_ipfs_description, calculate_vote_ipfs_description
109108
from utils.permissions import encode_oz_grant_role, encode_oz_revoke_role
110109
from utils.easy_track import (
@@ -854,6 +853,25 @@ def start_vote(tx_params: Dict[str, str], silent: bool) -> Tuple[int, Optional[A
854853

855854
return create_vote(vote_items, tx_params, desc_ipfs=desc_ipfs)
856855

856+
def extract_as_dg_admin_call(call_script: Sequence[Tuple[str, str]]) -> Tuple[str, str]:
857+
print(f"Extracting call script for dual governance admin: {call_script}")
858+
return (call_script[0][0], call_script[0][1])
859+
860+
def submit_proposals(
861+
call_script: Sequence[Tuple],
862+
description: Optional[str] = "",
863+
) -> Tuple[str, str]:
864+
dual_governance = contracts.dual_governance
865+
forwarded = []
866+
867+
for _call in call_script:
868+
forwarded.append(extract_as_dg_admin_call([_call]))
869+
870+
print(f"Forwarding call script to dual governance: {forwarded}")
871+
return (
872+
contracts.dual_governance.address,
873+
dual_governance.submitProposal.encode_input([(_call[0], 0, _call[1]) for _call in forwarded], description),
874+
)
857875

858876
def main():
859877
tx_params = {"from": get_deployer_account()}

0 commit comments

Comments
 (0)