Comments (4)
just confirming that you are hitting max fee per gas less than block base fee
while calling eth_estimateGas on anvil? or it is happening when sending transactions?
from foundry.
@klkvr It happens when i try to send a transaction. I looked around in the code and found that it is due to some automatic gas config that hardhat is taking care of. the source of the difference is in the eth_feeHistory
method. Hardhat uses this to calculate the maxFeePerGas
value to set. For the following request, i get different results for different versions
cast rpc eth_feeHistory 0x1 latest
On nightly-2cb875799419c907cc3709e586ece2559e6b340e
(working for me):
{"gasUsedRatio":[],"oldestBlock":"0x0","reward":[]}
On the most recent version:
{"baseFeePerGas":["0x3b9aca00","0x1dcd6500"],"gasUsedRatio":[0.0],"oldestBlock":"0x0","reward":[]}
In the most recent version, i think its a little odd that there are two entries returned, when no blocks have been mined on the node, but this seems to be the source of the issue. Not sure if this is intended behavior or not.
it seems to be fixed in the most recent version of hardhat, which I can't upgrade to at the moment, but given that other issues in other places arose around the same time (previously mentioned issues), i'm wondering if its intended.
from foundry.
Fee history contains items for genesis block and for the next block (pending) which is correct I believe, not sure why exactly such response makes hardhat to produce an invalid transaction
from foundry.
I see thanks for the explanation. That makes sense, but is it a little odd that the next block value: 0x1dcd6500 is 500,000,000 when the node base fee is 1,000,000,000?
from foundry.
Related Issues (20)
- Contract verification failed with `create` command when library specified
- Smart app control has blocked part of this app.. no foundry for windows any more HOT 3
- Environment variable, ETH_RPC_URL, is not being picked up by forge script HOT 3
- Forge test doesn't treat calls to external libraries like part of a parent transaction but as independent transactions HOT 10
- Add serializeUintQuantity cheatcode HOT 6
- bug(cast): resolve-name and lookup-address ENS commands do not work HOT 1
- Support for foundry plugins written in Rust
- Support for flamegraph
- add `--background` and `stop` to allow anvil to run in the background HOT 2
- Regression: cast call results in execution reverted on local test network HOT 2
- Can't deploy contracts
- Anvil panic crash on eth_estimategas
- `vm.print` to replace `console.log` library
- Member "rpc" not found HOT 1
- Fee history ignores block count HOT 1
- deleteFork cheatcode HOT 3
- `forge coverage` produces incorrect output
- vm.expectRevert results in: panic: array out-of-bounds access (0x32) HOT 2
- Gas estimation when using the keystore is too high HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from foundry.