Skip to content

Commit

Permalink
feat: add first time deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
0xArdi committed Aug 14, 2024
1 parent e5c7d48 commit c46c86f
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion operate/services/protocol.py
Original file line number Diff line number Diff line change
Expand Up @@ -1136,6 +1136,7 @@ def get_deploy_data_from_safe(
ledger_api=self.ledger_api,
contract_address=self.contracts["service_manager"],
)
approve_hash_message = None
if reuse_multisig:
_deployment_payload, approve_hash_message, error = get_reuse_multisig_from_safe_payload(
ledger_api=self.ledger_api,
Expand All @@ -1150,7 +1151,10 @@ def get_deploy_data_from_safe(
GNOSIS_SAFE_SAME_ADDRESS_MULTISIG_CONTRACT.name
).contracts[self.chain_type]
else:
raise NotImplementedError
deployment_payload = get_delployment_payload()
gnosis_safe_multisig = ContractConfigs.get(
GNOSIS_SAFE_PROXY_FACTORY_CONTRACT.name
).contracts[self.chain_type]

deploy_data = registry_instance.encodeABI(
fn_name="deploy",
Expand All @@ -1166,6 +1170,8 @@ def get_deploy_data_from_safe(
"operation": MultiSendOperation.CALL,
"value": 0,
}
if approve_hash_message is None:
return [deploy_message]
return [approve_hash_message, deploy_message]

def get_terminate_data(self, service_id: int) -> t.Dict:
Expand Down

0 comments on commit c46c86f

Please sign in to comment.