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

Forking config seems not working #4942

Open
VetchM opened this issue Feb 28, 2024 · 3 comments
Open

Forking config seems not working #4942

VetchM opened this issue Feb 28, 2024 · 3 comments
Assignees

Comments

@VetchM
Copy link

VetchM commented Feb 28, 2024

Version of Hardhat

2.20.1

What happened?

I am using this config to start a local hardhat node:

module.exports = {
    defaultNetwork: "hardhat",
    networks: {
        hardhat: {
            chainId: 1,
            loggingEnabled: true,
            forking: {
                url: "https://eth-mainnet.g.alchemy.com/v2/<api_key>",
            }
        },
    },
};

This file is working because the chainId of my local node is changed, but i keep getting this error when I ran my test:

eth_maxPriorityFeePerGas - Method not supported

Using npx hardhat node --forking https://eth-mainnet.g.alchemy.com/v2/<api_key> has the same behavior.
If I request the "eth_maxPriorityFeePerGas" RPC using the alchemy url, I can get the correct result. Any idea what went wrong?

The node version is v20.11.1, the OS is Windows 10.

Minimal reproduction steps

Put this config at the root directory:

module.exports = {
    defaultNetwork: "hardhat",
    networks: {
        hardhat: {
            chainId: 1,
            loggingEnabled: true,
            forking: {
                url: "https://eth-mainnet.g.alchemy.com/v2/<api_key>",
            }
        },
    },
};

Run npx hardhat node to start a node then run this:

curl --location 'http://127.0.0.01:8545' \
--header 'Content-Type: application/json' \
--data '{
    "jsonrpc": "2.0",
    "method": "eth_maxPriorityFeePerGas",
    "params": [],
    "id": 83
}'

The response is:

{
    "jsonrpc": "2.0",
    "id": 83,
    "error": {
        "code": -32601,
        "message": "Method eth_maxPriorityFeePerGas not found",
        "data": {
            "message": "Method eth_maxPriorityFeePerGas not found"
        }
    }
}

Search terms

Hardnet Forking eth_maxPriorityFeePerGas

@VetchM
Copy link
Author

VetchM commented Mar 5, 2024

Do I need to provide any extar info to help you spot the problem?

@hawkj
Copy link

hawkj commented Mar 29, 2024

i have the same problem

@phpmac
Copy link

phpmac commented May 13, 2024

#5187 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Backlog
Development

No branches or pull requests

4 participants