valory-xyz/trader-quickstart

run_service.sh fails when the RPC is out of calls

Closed this issue · 1 comments

After updating to 7.0, I gor an out of RPC calls error:
requests.exceptions.HTTPError: 402 Client Error: Payment Required for url: https://gno.getblock.io/24bceb6e-8fc2-4fde-ad59-73322833d7f0/mainnet/

I then swapped my RPC and re-ran the script:

------------------------------
Updating on-chain service 97
------------------------------

PLEASE, DO NOT INTERRUPT THIS PROCESS.

Cancelling the on-chain service update prematurely could lead to an inconsistent state of the Safe or the on-chain service state, which may require manual intervention to resolve.

[Agent instance] Swapping Safe owner...
Traceback (most recent call last):
  File "/home/david/Valory/repos/trader-quickstart/trader/../scripts/swap_safe_owner.py", line 112, in <module>
    txd = safe.get_swap_owner_data(
  File "/home/david/Valory/repos/trader-quickstart/trader/packages/valory/contracts/gnosis_safe/contract.py", line 941, in get_swap_owner_data
    prev_owner = cls._get_prev_owner(owners, old_owner)
  File "/home/david/Valory/repos/trader-quickstart/trader/packages/valory/contracts/gnosis_safe/contract.py", line 958, in _get_prev_owner
    index = linked_list.index(target) - 1
ValueError: '0x7fA4d6e77a309Aa99EaEaBaf00124e8A3a0999C1' is not in list

The issue commented here has been addressed already in PR #78 (Namely, the service Safe is not attempted to be swapped if it is in the correct state, i.e., if the Service Owner is already the Safe Owner)