foundry
foundry copied to clipboard
Add cheatcode to set `block.blobbasefee`
Component
Forge
Describe the feature you would like
Add a cheatcode to set block. blobbasefee
, similar to how we can set other block fields.
This is a new field on block
in Solidity 0.8.24, only available in Cancun.
Additional context
No response
i'm unable to found the blobbasefee field, is it normal ?
i'm blocked here
impl Cheatcode for blobBaseFeeCall {
fn apply_full<DB: DatabaseExt>(&self, ccx: &mut CheatsCtxt<DB>) -> Result {
let Self { newBlobBaseFee } = self;
ensure!(
ccx.data.env.cfg.spec_id >= SpecId::CANCUN,
"`blobBaseFee` is not supported before the Cancun hard fork; \
see relevant EIP for blob base fee"
);
// there isn't any blobbasefee field here, where can i found it ?
//ccx.data.env.block. = *newBlobBaseFee;
Ok(Default::default())
}
}
See https://github.com/bluealloy/revm/blob/93c7ba0ff619534751df2922e7e77671b79077ff/crates/primitives/src/env.rs#L467