diff --git a/tinyman/governance/client.py b/tinyman/governance/client.py index 5535d6c..b9bf221 100644 --- a/tinyman/governance/client.py +++ b/tinyman/governance/client.py @@ -602,7 +602,7 @@ def prepare_create_proposal_transactions( if required_tiny_power := self.get_required_tiny_power_to_create_proposal(): if account_tiny_power < required_tiny_power: raise InsufficientTinyPower() - + if executor: executor = decode_address(executor) else: diff --git a/tinyman/governance/vault/constants.py b/tinyman/governance/vault/constants.py index 4cc8ca1..fc6756e 100644 --- a/tinyman/governance/vault/constants.py +++ b/tinyman/governance/vault/constants.py @@ -1,5 +1,5 @@ from tinyman.constants import MINIMUM_BALANCE_REQUIREMENT_PER_BOX, MINIMUM_BALANCE_REQUIREMENT_PER_BOX_BYTE -from tinyman.governance.constants import DAY, WEEK +from tinyman.governance.constants import WEEK MIN_LOCK_TIME = 4 * WEEK # 4 WEEK MAX_LOCK_TIME = 4 * 52 * WEEK # 364 * 4 Days diff --git a/tinyman/governance/vault/transactions.py b/tinyman/governance/vault/transactions.py index c367f88..940fd4e 100644 --- a/tinyman/governance/vault/transactions.py +++ b/tinyman/governance/vault/transactions.py @@ -17,7 +17,7 @@ SLOPE_CHANGE_BOX_COST, ACCOUNT_POWER_BOX_COST, TOTAL_POWER_BOX_COST, MIN_LOCK_AMOUNT, MIN_LOCK_AMOUNT_INCREMENT, INIT_APP_ARGUMENT, CREATE_LOCK_APP_ARGUMENT, \ CREATE_CHECKPOINTS_APP_ARGUMENT, INCREASE_LOCK_AMOUNT_APP_ARGUMENT, EXTEND_LOCK_END_TIME_APP_ARGUMENT, WITHDRAW_APP_ARGUMENT, GET_TINY_POWER_OF_APP_ARGUMENT, \ GET_TINY_POWER_OF_AT_APP_ARGUMENT, GET_TOTAL_TINY_POWER_APP_ARGUMENT, GET_TOTAL_TINY_POWER_AT_APP_ARGUMENT, GET_TOTAL_CUMULATIVE_POWER_AT_APP_ARGUMENT, GET_CUMULATIVE_POWER_OF_AT_APP_ARGUMENT, \ - GET_ACCOUNT_CUMULATIVE_POWER_DELTA_APP_PREFIX, GET_TOTAL_CUMULATIVE_POWER_DELTA_APP_PREFIX,DELETE_ACCOUNT_POWER_BOXES_APP_ARGUMENT, DELETE_ACCOUNT_STATE_APP_ARGUMENT + GET_ACCOUNT_CUMULATIVE_POWER_DELTA_APP_PREFIX, GET_TOTAL_CUMULATIVE_POWER_DELTA_APP_PREFIX, DELETE_ACCOUNT_POWER_BOXES_APP_ARGUMENT, DELETE_ACCOUNT_STATE_APP_ARGUMENT from tinyman.governance.vault.utils import get_new_total_power_timestamps from tinyman.utils import TransactionGroup @@ -616,7 +616,7 @@ def prepare_get_total_cumulative_power_delta_transactions( total_power_box_index_1 = 0 else: total_power_box_index_1 = total_power_index_1 // TOTAL_POWER_BOX_ARRAY_LEN - + total_power_index_2 = get_power_index_at(total_powers, timestamp_2) if total_power_index_2 is None: total_power_index_2 = 0 diff --git a/tinyman/utils.py b/tinyman/utils.py index 58995dc..5fc1776 100644 --- a/tinyman/utils.py +++ b/tinyman/utils.py @@ -90,7 +90,7 @@ def get_state_bytes(state, key): def lpad(string: bytes, n: int) -> bytes: - assert(n > 0) + assert (n > 0) return b"\x00" * (n - len(string)) + string