diff --git a/operate/services/manage.py b/operate/services/manage.py index cb4cb5e37..71f317b49 100644 --- a/operate/services/manage.py +++ b/operate/services/manage.py @@ -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 diff --git a/operate/services/protocol.py b/operate/services/protocol.py index 6c52fb069..709e65576 100644 --- a/operate/services/protocol.py +++ b/operate/services/protocol.py @@ -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): diff --git a/operate/services/service.py b/operate/services/service.py index 2107cce56..675a526f1 100644 --- a/operate/services/service.py +++ b/operate/services/service.py @@ -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, @@ -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()