Skip to content

update_token_insight.py script failure #662

@franckc

Description

@franckc

We seem to be hitting what I think are etherscan rate limiting when the update_token_insight.py script runs.

Seen in the logs:

2023-04-27T19:05:54.791682+00:00 app[scheduler.1237]: Error while fetching balance
2023-04-27T19:05:54.791698+00:00 app[scheduler.1237]: {'status': '0', 'message': 'NOTOK', 'result': 'Max rate limit reached'}
2023-04-27T19:05:54.840276+00:00 app[scheduler.1237]: Traceback (most recent call last):
2023-04-27T19:05:54.842113+00:00 app[scheduler.1237]: File "/app/logic/scripts/update_token_insight.py", line 483, in <module>
2023-04-27T19:05:54.842267+00:00 app[scheduler.1237]: fetch_reserved_wallet_balances()
2023-04-27T19:05:54.842271+00:00 app[scheduler.1237]: File "/app/logic/scripts/update_token_insight.py", line 453, in fetch_reserved_wallet_balances
2023-04-27T19:05:54.842340+00:00 app[scheduler.1237]: fetch_wallet_balance(token_stats.new_foundation_reserve_address)
2023-04-27T19:05:54.842342+00:00 app[scheduler.1237]: File "/app/logic/scripts/update_token_insight.py", line 389, in fetch_wallet_balance
2023-04-27T19:05:54.842406+00:00 app[scheduler.1237]: ogn_balance = fetch_wallet_token_balance(wallet, token_stats.ogn_contract)
2023-04-27T19:05:54.842407+00:00 app[scheduler.1237]: File "/app/logic/scripts/update_token_insight.py", line 359, in fetch_wallet_token_balance
2023-04-27T19:05:54.842467+00:00 app[scheduler.1237]: raise ValueError(resp["message"] or ("Failed to fetch %s balance" % token_addr))
2023-04-27T19:05:54.842478+00:00 app[scheduler.1237]: ValueError: NOTOK

Relevant code:

def fetch_wallet_token_balance(wallet, token_addr, decimals = 18):

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working as intended

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions