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

eth_feeHistory does not exist when deploying a token with BSC #8

Open
merc1er opened this issue Sep 26, 2022 · 0 comments
Open

eth_feeHistory does not exist when deploying a token with BSC #8

merc1er opened this issue Sep 26, 2022 · 0 comments

Comments

@merc1er
Copy link

merc1er commented Sep 26, 2022

Environment information

  • ape and plugin versions:
$ ape --version
0.5.1

$ ape plugins list
Installed Plugins:
  bsc         0.5.0a1
  vyper       0.5.0
  optimism    0.5.0a1
  • Python Version: 3.10.6
  • OS: macOS

What went wrong?

When trying to deploy an ERC 20 token, I am getting:

ValueError: {'code': -32601, 'message': 'the method eth_feeHistory does not exist/is not available'}

I am using the default script provided by the ERC 20 token template provided by Ape Academy. I am able to deploy the token fine on Ethereum mainnet and testnets as well as optimism.

I tried with two different RPC providers, Ankr (https://rpc.ankr.com/bsc) and Quicknode (requires API key).

Full traceback ⬇️
INFO: Connecting to existing Geth node at 'https://proportionate-delicate-brook.bsc.discover.quiknode.pro/xxxx/'.
0. wallet-with-bnb

Select an account: 0
/Users/cloudfloat/.pyenv/versions/ape/lib/python3.10/site-packages/web3/eth.py:661: UserWarning: There was an issue with the method eth_maxPriorityFeePerGas. Calculating using eth_feeHistory.
  warnings.warn(
Traceback (most recent call last):
  File "/Users/cloudfloat/.pyenv/versions/ape/lib/python3.10/site-packages/web3/eth.py", line 659, in max_priority_fee
    return self._max_priority_fee()
  File "/Users/cloudfloat/.pyenv/versions/ape/lib/python3.10/site-packages/web3/module.py", line 64, in caller
    result = w3.manager.request_blocking(
  File "/Users/cloudfloat/.pyenv/versions/ape/lib/python3.10/site-packages/web3/manager.py", line 199, in request_blocking
    return self.formatted_response(
  File "/Users/cloudfloat/.pyenv/versions/ape/lib/python3.10/site-packages/web3/manager.py", line 172, in formatted_response
    raise ValueError(response["error"])
ValueError: {'code': -32601, 'message': 'the method eth_maxPriorityFeePerGas does not exist/is not available'}

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/cloudfloat/.pyenv/versions/ape/bin/ape", line 8, in <module>
    sys.exit(cli())
  File "/Users/cloudfloat/.pyenv/versions/ape/lib/python3.10/site-packages/click/core.py", line 1130, in __call__
    return self.main(*args, **kwargs)
  File "/Users/cloudfloat/.pyenv/versions/ape/lib/python3.10/site-packages/click/core.py", line 1055, in main
    rv = self.invoke(ctx)
  File "/Users/cloudfloat/.pyenv/versions/ape/lib/python3.10/site-packages/ape/_cli.py", line 40, in invoke
    return super().invoke(ctx)
  File "/Users/cloudfloat/.pyenv/versions/ape/lib/python3.10/site-packages/click/core.py", line 1657, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/Users/cloudfloat/.pyenv/versions/ape/lib/python3.10/site-packages/ape_run/_cli.py", line 23, in invoke
    return super().invoke(ctx)
  File "/Users/cloudfloat/.pyenv/versions/ape/lib/python3.10/site-packages/click/core.py", line 1657, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/Users/cloudfloat/.pyenv/versions/ape/lib/python3.10/site-packages/ape/cli/commands.py", line 18, in invoke
    super().invoke(ctx)
  File "/Users/cloudfloat/.pyenv/versions/ape/lib/python3.10/site-packages/click/core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/Users/cloudfloat/.pyenv/versions/ape/lib/python3.10/site-packages/click/core.py", line 760, in invoke
    return __callback(*args, **kwargs)
  File "/Users/cloudfloat/.pyenv/versions/ape/lib/python3.10/site-packages/ape_run/_cli.py", line 73, in call
    ns["main"]()  # Execute the script
  File "/Users/cloudfloat/Documents/cloud-aud/scripts/deploy.py", line 14, in main
    account.deploy(project.Token)
  File "/Users/cloudfloat/.pyenv/versions/ape/lib/python3.10/site-packages/ape/api/accounts.py", line 174, in deploy
    receipt = self.call(txn)
  File "/Users/cloudfloat/.pyenv/versions/ape/lib/python3.10/site-packages/ape/api/accounts.py", line 94, in call
    txn = self.prepare_transaction(txn)
  File "/Users/cloudfloat/.pyenv/versions/ape/lib/python3.10/site-packages/ape/api/accounts.py", line 244, in prepare_transaction
    txn = self.provider.prepare_transaction(txn)
  File "/Users/cloudfloat/.pyenv/versions/ape/lib/python3.10/site-packages/ape/api/providers.py", line 478, in prepare_transaction
    txn.max_priority_fee = self.priority_fee  # type: ignore
  File "/Users/cloudfloat/.pyenv/versions/ape/lib/python3.10/site-packages/ape/api/providers.py", line 704, in priority_fee
    return self.web3.eth.max_priority_fee
  File "/Users/cloudfloat/.pyenv/versions/ape/lib/python3.10/site-packages/web3/eth.py", line 665, in max_priority_fee
    return fee_history_priority_fee(self)
  File "/Users/cloudfloat/.pyenv/versions/ape/lib/python3.10/site-packages/web3/_utils/fee_utils.py", line 48, in fee_history_priority_fee
    fee_history = eth.fee_history(*PRIORITY_FEE_HISTORY_PARAMS)  # type: ignore
  File "/Users/cloudfloat/.pyenv/versions/ape/lib/python3.10/site-packages/web3/eth.py", line 907, in fee_history
    return self._fee_history(block_count, newest_block, reward_percentiles)
  File "/Users/cloudfloat/.pyenv/versions/ape/lib/python3.10/site-packages/web3/module.py", line 64, in caller
    result = w3.manager.request_blocking(
  File "/Users/cloudfloat/.pyenv/versions/ape/lib/python3.10/site-packages/web3/manager.py", line 199, in request_blocking
    return self.formatted_response(
  File "/Users/cloudfloat/.pyenv/versions/ape/lib/python3.10/site-packages/web3/manager.py", line 172, in formatted_response
    raise ValueError(response["error"])
ValueError: {'code': -32601, 'message': 'the method eth_feeHistory does not exist/is not available'}
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