Skip to content

Commit

Permalink
fix: linters
Browse files Browse the repository at this point in the history
  • Loading branch information
jmoreira-valory committed Aug 28, 2024
1 parent 2c58a21 commit 9317ea3
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 6 deletions.
4 changes: 3 additions & 1 deletion operate/services/manage.py
Original file line number Diff line number Diff line change
Expand Up @@ -476,7 +476,9 @@ def _deploy_service_onchain_from_safe( # pylint: disable=too-many-statements,to
)

on_chain_hash = self._get_on_chain_hash(chain_config=chain_config)
current_agent_bond = staking_params["min_staking_deposit"] # TODO fixme, read from service registry token utility contract
current_agent_bond = staking_params[
"min_staking_deposit"
] # TODO fixme, read from service registry token utility contract
is_first_mint = (
self._get_on_chain_state(service=service, chain_id=chain_id)
== OnChainState.NON_EXISTENT
Expand Down
2 changes: 0 additions & 2 deletions operate/services/protocol.py
Original file line number Diff line number Diff line change
Expand Up @@ -710,8 +710,6 @@ def staking_rewards_available(self, staking_contract: str) -> bool:

# def get_agent_bond(self, staking_contract: str) -> int:
# self._patch()




class OnChainManager(_ChainUtil):
Expand Down
12 changes: 9 additions & 3 deletions operate/services/service.py
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +418,9 @@ def _build_docker(
builder.try_update_abci_connection_params()

home_chain_data = service.chain_configs[service.home_chain_id].chain_data
home_chain_ledger_config = service.chain_configs[service.home_chain_id].ledger_config
home_chain_ledger_config = service.chain_configs[
service.home_chain_id
].ledger_config
builder.try_update_runtime_params(
multisig_address=home_chain_data.multisig,
agent_instances=home_chain_data.instances,
Expand Down Expand Up @@ -795,12 +797,16 @@ def new( # pylint: disable=too-many-locals
service.store()
return service

def update_user_params_from_template(self, service_template: ServiceTemplate) -> None:
def update_user_params_from_template(
self, service_template: ServiceTemplate
) -> None:
"""Update user params from template."""
for chain, config in service_template["configurations"].items():
self.chain_configs[
chain
].chain_data.user_params = OnChainUserParams.from_json(config) # type: ignore
].chain_data.user_params = OnChainUserParams.from_json(
config
) # type: ignore

self.store()

Expand Down

0 comments on commit 9317ea3

Please sign in to comment.