From c0df310c102746bc58ed62960bbb9802b02fefdc Mon Sep 17 00:00:00 2001 From: jmoreira-valory Date: Thu, 10 Oct 2024 10:27:28 +0200 Subject: [PATCH 1/3] fix: onchain flow --- run_service.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/run_service.sh b/run_service.sh index 1505e047..2b3bb60b 100755 --- a/run_service.sh +++ b/run_service.sh @@ -1074,6 +1074,16 @@ if ( [ "$first_run" = "true" ] || [ "$multisig_address" == "$zero_address" ] ) & echo "[Service owner] Deploying on-chain service $service_id..." poetry run autonomy service --retries $RPC_RETRIES --timeout $RPC_TIMEOUT_SECONDS --use-custom-chain deploy "$service_id" --key "../$operator_pkey_path" $password_argument elif [ "$service_state" == "FINISHED_REGISTRATION" ]; then + + # ensure Safe owner is operator + # (This may occur if update flow was interrupted) + current_safe_owners=$(poetry run python "../scripts/get_safe_owners.py" "$service_safe_address" "../$agent_pkey_path" "$rpc" $password_argument | awk '{gsub(/"/, "\047", $0); print $0}') + + if [[ "$current_safe_owners" == "['$agent_address']" ]]; then + echo "[Agent instance] Swapping Safe owner..." + poetry run python "../scripts/swap_safe_owner.py" "$service_safe_address" "../$agent_pkey_path" "$operator_address" "$rpc" $password_argument + fi + echo "[Service owner] Deploying on-chain service $service_id..." poetry run autonomy service --retries $RPC_RETRIES --timeout $RPC_TIMEOUT_SECONDS --use-custom-chain deploy "$service_id" --key "../$operator_pkey_path" $password_argument --reuse-multisig fi From 4cab3785e44a05c34353eaa6c3ef5eba53eb6dbe Mon Sep 17 00:00:00 2001 From: jmoreira-valory Date: Thu, 10 Oct 2024 11:19:04 +0200 Subject: [PATCH 2/3] fix: small fix --- run_service.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/run_service.sh b/run_service.sh index 2b3bb60b..bc4cccfe 100755 --- a/run_service.sh +++ b/run_service.sh @@ -1077,6 +1077,7 @@ elif [ "$service_state" == "FINISHED_REGISTRATION" ]; then # ensure Safe owner is operator # (This may occur if update flow was interrupted) + service_safe_address=$(<"../$service_safe_address_path") current_safe_owners=$(poetry run python "../scripts/get_safe_owners.py" "$service_safe_address" "../$agent_pkey_path" "$rpc" $password_argument | awk '{gsub(/"/, "\047", $0); print $0}') if [[ "$current_safe_owners" == "['$agent_address']" ]]; then From 899d13419089a2805c7833646bde242b6c00ccc2 Mon Sep 17 00:00:00 2001 From: Adamantios Date: Wed, 16 Oct 2024 18:49:20 +0300 Subject: [PATCH 3/3] feat: roll back to the non-multi-bet version --- run_service.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/run_service.sh b/run_service.sh index 9e63496d..306402ad 100755 --- a/run_service.sh +++ b/run_service.sh @@ -644,7 +644,7 @@ directory="trader" service_repo=https://github.com/$org_name/$directory.git # This is a tested version that works well. # Feel free to replace this with a different version of the repo, but be careful as there might be breaking changes -service_version="v0.19.0" +service_version="v0.18.2" # Define constants for on-chain interaction gnosis_chain_id=100