Skip to content
This repository was archived by the owner on May 29, 2025. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion run_service.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -1074,6 +1074,17 @@ 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)
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
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
Expand Down