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

Add cheatcode to set block.blobbasefee #7002

Closed
onbjerg opened this issue Feb 2, 2024 · 2 comments · Fixed by #7598
Closed

Add cheatcode to set block.blobbasefee #7002

onbjerg opened this issue Feb 2, 2024 · 2 comments · Fixed by #7598
Assignees
Labels
good first issue Good for newcomers T-feature Type: feature

Comments

@onbjerg
Copy link
Member

onbjerg commented Feb 2, 2024

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

@onbjerg onbjerg added T-feature Type: feature good first issue Good for newcomers labels Feb 2, 2024
@DoTheBestToGetTheBest
Copy link
Contributor

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())
    }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers T-feature Type: feature
Projects
Status: Completed
Development

Successfully merging a pull request may close this issue.

2 participants