You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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);
}
The text was updated successfully, but these errors were encountered:
Component
Forge
Have you ensured that all of these are up to date?
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:
the tx
0xdbdce1d5c14a6ca17f0e527ab762589d6a73f68697606ae0bb90df7ac9ec5087
is the preceding transaction to tx0xadbe5cf9269a001d50990d0c29075b402bcc3a0b0f3258821881621b787b35c6
.But in other cases, the vm.transact runs well:
The text was updated successfully, but these errors were encountered: