ApeWorX / silverback

Blockchain automation library, and SDK for the Silverback Platform
https://apeworx.io/silverback
Apache License 2.0
88 stars 10 forks source link

bug: `none is not an allowed value (type=type_error.none.not_allowed)` #2

Closed sabotagebeats closed 1 year ago

sabotagebeats commented 1 year ago

Environment information

$ ape --version
0.6.10

$ ape plugins list
Installed Plugins:
  infura         0.6.1
  tokens         0.6.0
  cairo          0.6.1
  avalanche      0.6.2
  vyper          0.6.7
  foundry        0.6.8
  solidity       0.6.5
  hardhat        0.6.7
  optimism       0.6.0
  template       0.6.0
  arbitrum       0.6.0
  etherscan      0.6.5
  fantom         0.6.0
  ens            0.6.0
  alchemy        0.6.1
  addressbook    0.6.0

What went wrong?

Please include information like:

$ silverback run example:app --network http://3.86.11.61:8545

How can it be fixed?

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

sabotagebeats commented 1 year ago

https://github.com/ApeWorX/ape-foundry/blob/main/ape_foundry/provider.py#L719-L722

this needs to be fixed in geth provider or ape-ethereum in order to work properly without the foundry plugin for anvil

sabotagebeats commented 1 year ago

after fixing that in ape core, I still have the following issue:

$ silverback run -v DEBUG example:app --network http://35.175.202.145:8545
DEBUG: Making request HTTP. URI: http://35.175.202.145:8545, Method: web3_clientVersion
DEBUG: Getting response HTTP. URI: http://35.175.202.145:8545, Method: web3_clientVersion, Response: {'jsonrpc': '2.0', 'id': 0, 'result': 'anvil/v0.1.0'}
DEBUG: Making request HTTP. URI: http://35.175.202.145:8545, Method: web3_clientVersion
DEBUG: Getting response HTTP. URI: http://35.175.202.145:8545, Method: web3_clientVersion, Response: {'jsonrpc': '2.0', 'id': 1, 'result': 'anvil/v0.1.0'}
DEBUG: Making request. Method: web3_clientVersion
DEBUG: Making request HTTP. URI: http://35.175.202.145:8545, Method: web3_clientVersion
DEBUG: Getting response HTTP. URI: http://35.175.202.145:8545, Method: web3_clientVersion, Response: {'jsonrpc': '2.0', 'id': 2, 'result': 'anvil/v0.1.0'}
WARNING: Connecting Geth plugin to non-Geth client 'anvil'.
DEBUG: Making request. Method: eth_chainId
DEBUG: Making request HTTP. URI: http://35.175.202.145:8545, Method: eth_chainId
DEBUG: Getting response HTTP. URI: http://35.175.202.145:8545, Method: eth_chainId, Response: {'jsonrpc': '2.0', 'id': 3, 'result': '0x1'}
DEBUG: Making request. Method: eth_getBlockByNumber
DEBUG: Making request HTTP. URI: http://35.175.202.145:8545, Method: eth_getBlockByNumber
DEBUG: Getting response HTTP. URI: http://35.175.202.145:8545, Method: eth_getBlockByNumber, Response: {'jsonrpc': '2.0', 'id': 4, 'result': {'hash': '0x8039bf2fc5599c3b39f6d230d96abdcaba62f1f4884caffadbbf22984385e3e1', 'parentHash': '0x80d8e0609a83b9a8d1f7a56b04fb0ddd52c3ff9ced2e7aa26fa9c957e02c5d86', 'sha3Uncles': '0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347', 'miner': '0x0000000000000000000000000000000000000000', 'stateRoot': '0x0000000000000000000000000000000000000000000000000000000000000000', 'transactionsRoot': '0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421', 'receiptsRoot': '0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421', 'number': '0x10a12f4', 'gasUsed': '0x0', 'gasLimit': '0x1c9c380', 'extraData': '0x', 'logsBloom': '0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000', 'timestamp': '0x6482214b', 'difficulty': '0x0', 'totalDifficulty': '0x2a800298f36b809a2031535769c9544d4b3f7600861984a93e538faacdbf5ca8', 'sealFields': ['0x0000000000000000000000000000000000000000000000000000000000000000', '0x0000000000000000'], 'uncles': [], 'transactions': [], 'size': '0x202', 'mixHash': '0x0000000000000000000000000000000000000000000000000000000000000000', 'nonce': '0x0000000000000000', 'baseFeePerGas': '0x7'}}
DEBUG: Making request HTTP. URI: http://35.175.202.145:8545, Method: web3_clientVersion
DEBUG: Getting response HTTP. URI: http://35.175.202.145:8545, Method: web3_clientVersion, Response: {'jsonrpc': '2.0', 'id': 5, 'result': 'anvil/v0.1.0'}
DEBUG: Making request. Method: eth_chainId
DEBUG: Making request HTTP. URI: http://35.175.202.145:8545, Method: eth_chainId
DEBUG: Getting response HTTP. URI: http://35.175.202.145:8545, Method: eth_chainId, Response: {'jsonrpc': '2.0', 'id': 6, 'result': '0x1'}
Traceback (most recent call last):
  File "/home/doge/.pyenv/versions/silverback/bin/silverback", line 33, in <module>
    sys.exit(load_entry_point('silverback', 'console_scripts', 'silverback')())
  File "/home/doge/.pyenv/versions/3.10.1/envs/silverback/lib/python3.10/site-packages/click/core.py", line 1130, in __call__
    return self.main(*args, **kwargs)
  File "/home/doge/.pyenv/versions/3.10.1/envs/silverback/lib/python3.10/site-packages/click/core.py", line 1055, in main
    rv = self.invoke(ctx)
  File "/home/doge/.pyenv/versions/3.10.1/envs/silverback/lib/python3.10/site-packages/click/core.py", line 1657, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/doge/ape/ape/src/ape/cli/commands.py", line 18, in invoke
    super().invoke(ctx)
  File "/home/doge/.pyenv/versions/3.10.1/envs/silverback/lib/python3.10/site-packages/click/core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/doge/.pyenv/versions/3.10.1/envs/silverback/lib/python3.10/site-packages/click/core.py", line 760, in invoke
    return __callback(*args, **kwargs)
  File "/home/doge/.pyenv/versions/3.10.1/envs/silverback/lib/python3.10/site-packages/click/decorators.py", line 84, in new_func
    return ctx.invoke(f, obj, *args, **kwargs)
  File "/home/doge/.pyenv/versions/3.10.1/envs/silverback/lib/python3.10/site-packages/click/core.py", line 760, in invoke
    return __callback(*args, **kwargs)
TypeError: run() got multiple values for argument 'network'
sabotagebeats commented 1 year ago

nonetype is fixed in ape core but we need to fix the multiple network arguments issue before this will be resolved.

sabotagebeats commented 1 year ago

completing and opening new issue for argument network