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

Encountered GasPriceLessThanBasefee error when executing vm.transact #6538

Closed
2 tasks done
WulaSilver opened this issue Dec 7, 2023 · 0 comments · Fixed by #6835
Closed
2 tasks done

Encountered GasPriceLessThanBasefee error when executing vm.transact #6538

WulaSilver opened this issue Dec 7, 2023 · 0 comments · Fixed by #6835
Labels
T-bug Type: bug

Comments

@WulaSilver
Copy link

WulaSilver commented Dec 7, 2023

Component

Forge

Have you ensured that all of these are up to date?

  • Foundry
  • Foundryup

What version of Foundry are you on?

forge 0.2.0 (a0d1911 2023-11-20T13:23:07.990080800Z)

What command(s) is the bug in?

forge test

Operating System

Windows

Describe the bug

I forked the blockchain state to the specified transaction hash location and then use vm.transact to replay the next tx. However, I got the following error:
[FAIL. Reason: backend: failed committing transaction: Transaction error: GasPriceLessThanBasefee]

The code I executed is as follows:

    function test_transact()public{
        bytes32 lastHash =0xdbdce1d5c14a6ca17f0e527ab762589d6a73f68697606ae0bb90df7ac9ec5087;
        vm.createSelectFork("mainnet",lastHash);
        bytes32 txhash=0xadbe5cf9269a001d50990d0c29075b402bcc3a0b0f3258821881621b787b35c6;
        vm.transact(txhash);
    }

the tx 0xdbdce1d5c14a6ca17f0e527ab762589d6a73f68697606ae0bb90df7ac9ec5087 is the preceding transaction to tx 0xadbe5cf9269a001d50990d0c29075b402bcc3a0b0f3258821881621b787b35c6.

But in other cases, the vm.transact runs well:

    function test_transact()public{
        bytes32 lastHash =0x42baa97863cd5c5f05fb43bae40573ed994149fd2cf08b0e72dd88fc2e06a60c;
        vm.createSelectFork("mainnet",lastHash);
        bytes32 txhash=0x390def749b71f516d8bf4329a4cb07bb3568a3627c25e607556621182a17f1f9;
        vm.transact(txhash);
    }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T-bug Type: bug
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

1 participant