1
+ """
2
+ Voting 03/04/2025 [HOLESKY].
3
+
4
+ I. Change the limits & period for ET for LOL
5
+ 1: - Increase the limit from 210 to 500 USDC/USDT/DAI - set 500 limit on LOL registry `0x55B304a585D540421F1fD3579Ef12Abab7304492`
6
+ - Increase the period from 3 months to 6 months - set 6 months period on LOL registry `0x55B304a585D540421F1fD3579Ef12Abab7304492`
7
+
8
+ """
9
+
10
+ import time
11
+
12
+ from typing import Dict
13
+
14
+ from brownie import interface
15
+ from brownie .network .transaction import TransactionReceipt
16
+ from utils .voting import bake_vote_items , confirm_vote_script , create_vote
17
+ from utils .ipfs import upload_vote_ipfs_description , calculate_vote_ipfs_description
18
+
19
+ from utils .config import (
20
+ get_deployer_account ,
21
+ get_is_live ,
22
+ get_priority_fee ,
23
+ )
24
+
25
+ from utils .allowed_recipients_registry import (
26
+ set_limit_parameters ,
27
+ )
28
+
29
+ from utils .agent import agent_forward
30
+
31
+ description = """
32
+ I. Change the limits & period for ET for LOL
33
+ 1: - Increase the limit from 210 to 500 USDC/USDT/DAI - set 500 limit on LOL registry `0x55B304a585D540421F1fD3579Ef12Abab7304492`
34
+ - Increase the period from 3 months to 6 months - set 6 months period on LOL registry `0x55B304a585D540421F1fD3579Ef12Abab7304492`
35
+ """
36
+
37
+ def start_vote (tx_params : Dict [str , str ], silent : bool ) -> bool | list [int | TransactionReceipt | None ]:
38
+ """Prepare and run voting."""
39
+
40
+ lol_registry = interface .AllowedRecipientRegistry ("0x55B304a585D540421F1fD3579Ef12Abab7304492" )
41
+
42
+ vote_desc_items , call_script_items = zip (
43
+ #
44
+ # I. Change the limits & period for ET for LOL
45
+ #
46
+ (
47
+ """1: - Increase the limit from 210 to 500 USDC/USDT/DAI - set 500 limit on LOL registry `0x55B304a585D540421F1fD3579Ef12Abab7304492`
48
+ - Increase the period from 3 months to 6 months - set 6 months period on LOL registry `0x55B304a585D540421F1fD3579Ef12Abab7304492`""" ,
49
+ agent_forward (
50
+ [
51
+ set_limit_parameters (
52
+ registry_address = lol_registry ,
53
+ limit = 500 * 10 ** 18 ,
54
+ period_duration_months = 6
55
+ ),
56
+ ]
57
+ ),
58
+ ),
59
+ )
60
+
61
+ vote_items = bake_vote_items (list (vote_desc_items ), list (call_script_items ))
62
+
63
+ if silent :
64
+ desc_ipfs = calculate_vote_ipfs_description (description )
65
+ else :
66
+ desc_ipfs = upload_vote_ipfs_description (description )
67
+
68
+ return confirm_vote_script (vote_items , silent , desc_ipfs ) and list (
69
+ create_vote (vote_items , tx_params , desc_ipfs = desc_ipfs )
70
+ )
71
+
72
+
73
+ def main ():
74
+ tx_params = {"from" : get_deployer_account ()}
75
+
76
+ if get_is_live ():
77
+ tx_params ["priority_fee" ] = get_priority_fee ()
78
+
79
+ vote_id , _ = start_vote (tx_params = tx_params , silent = False )
80
+
81
+ vote_id >= 0 and print (f"Vote created: { vote_id } ." )
82
+
83
+ time .sleep (5 ) # hack for waiting thread #2.
0 commit comments