Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TENDERLY_PROJECT variable is returning an error #13

Open
bayou020 opened this issue Feb 19, 2024 · 1 comment
Open

TENDERLY_PROJECT variable is returning an error #13

bayou020 opened this issue Feb 19, 2024 · 1 comment

Comments

@bayou020
Copy link

Environment information

  • ape and plugin versions:
$ ape --version
0.7.9
$ ape plugins list
Installed Plugins
  alchemy      0.7.1
  arbitrum     0.7.2
  etherscan    0.7.1
  foundry      0.7.3
  ganache      0.7.0
  solidity     0.7.1
  tenderly     0.7.0b0
  tokens       0.7.1
  • Python Version: 3.12
  • OS: osx

What went wrong?

After adding TENDERLY_PROJECT from project settings on tenderly dashboard, TENDERLY_ACCESS_KEY from my personal account, and TENDERLY_GATEWAY_ACCESS_KEY from gateway page
I'm getting this error related to the TENDERLY_PROJECT variable

Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.12/bin/ape", line 8, in <module>
    sys.exit(cli())
             ^^^^^
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/click/core.py", line 1157, in __call__
    return self.main(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/click/core.py", line 1078, in main
    rv = self.invoke(ctx)
         ^^^^^^^^^^^^^^^^
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/ape/_cli.py", line 79, in invoke
    return super().invoke(ctx)
           ^^^^^^^^^^^^^^^^^^^
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/click/core.py", line 1688, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/ape/cli/commands.py", line 95, in invoke
    with network_ctx as provider:
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/ape/api/networks.py", line 677, in __enter__
    return self.push_provider()
           ^^^^^^^^^^^^^^^^^^^^
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/ape/api/networks.py", line 690, in push_provider
    self._provider.connect()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/ape_tenderly/provider.py", line 45, in connect
    self._web3 = Web3(HTTPProvider(self.uri))
                                   ^^^^^^^^
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/ape_tenderly/provider.py", line 42, in uri
    return self.fork.json_rpc_url
           ^^^^^^^^^
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/functools.py", line 995, in __get__
    val = self.func(instance)
          ^^^^^^^^^^^^^^^^^^^
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/ape_tenderly/provider.py", line 38, in fork
    return self._create_fork()
           ^^^^^^^^^^^^^^^^^^^
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/ape_tenderly/provider.py", line 30, in _create_fork
    fork = self._client.create_fork(chain_id)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/ape_tenderly/client.py", line 74, in create_fork
    return Fork.model_validate_json(response.json().get("fork"))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/pydantic/main.py", line 532, in model_validate_json
    return cls.__pydantic_validator__.validate_json(json_data, strict=strict, context=context)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
pydantic_core._pydantic_core.ValidationError: 1 validation error for Fork
  JSON input should be string, bytes or bytearray [type=json_type, input_value={'id': 'a8e12b22-5853-4cd...4cdd-bd96-32143dbbb5da'}, input_type=dict]
    For further information visit https://errors.pydantic.dev/2.5/v/json_type

How can it be fixed?

Fill this in if you have ideas on how the bug could be fixed.

Copy link

linear bot commented Feb 19, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant