Skip to content

Fix MySwapPool call #657

@Valera56pub

Description

@Valera56pub

Guideline

  1. Carefully read the issue description before applying to ensure you have all the necessary information to start working on it.
  2. Write a brief description of how you will approach the task (without using ChatGPT).
  3. Add your Telegram handler in your application (e.g., in OnlyDust or similar)
  4. Write ETA in your application

What should I do if I have a problem

  1. Try to google it before asking. Googling is taking major part of dev work
  2. If you couldn't find answer your question with Google, text your question to dev group with your question.
  3. Do not send DM to maintainer, it would be better and faster to ask other contributors in chat

How to prepare PR

  1. Check if your code smell good
  2. Add close # to link your issue with your PR
  3. Do not commit changes which is not related to your task
  4. Check after you created PR, if you committed everything.

Task description

  1. Explore apps/shared/constants.py find the POOL_MAPPING
  2. Change back:
# TODO "myswap_id": 1,
"myswap_id": None,

to

 "myswap_id": 1,

and so on.

  1. Run docker compose -f devops/dev/docker-compose.data-handler.yaml up --build
  2. Check the terminal for an error:
celery-1       |   File "/app/shared/amms.py", line 84, in get_balance
celery-1       |     myswap_pool = await get_myswap_pool(self.myswap_id)
celery-1       |                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
celery-1       |   File "/app/shared/blockchain_call.py", line 48, in get_myswap_pool
celery-1       |     res = await func_call(
celery-1       |           ^^^^^^^^^^^^^^^^
celery-1       |   File "/app/shared/blockchain_call.py", line 29, in func_call
celery-1       |     res = await NET.call_contract(call)
celery-1       |           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
celery-1       |   File "/usr/local/lib/python3.11/site-packages/starknet_py/net/full_node_client.py", line 476, in call_contract
celery-1       |     res = await self._client.call(
celery-1       |           ^^^^^^^^^^^^^^^^^^^^^^^^
celery-1       |   File "/usr/local/lib/python3.11/site-packages/starknet_py/net/http_client.py", line 75, in call
celery-1       |     self.handle_rpc_error(result)
celery-1       |   File "/usr/local/lib/python3.11/site-packages/starknet_py/net/http_client.py", line 82, in handle_rpc_error
celery-1       |     raise ClientError(
celery-1       | starknet_py.net.client_errors.ClientError: Client failed with code -32603. Message: Invalid message selector.
  1. The error is in apps/shared/blockchain_call.py in async def get_myswap_pool()

The problem is because the get_pool is the wrong selector. Your task is to find out why.
Possible solutions:

  • find the right selector
  • use another pool address
  • or find another correct way to get the pool.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions