Skip to content

feat: Add L1 SetGasLimitBuilder abstract script#91

Merged
BrianBland merged 1 commit into
mainfrom
add-set-gas-limit-builder-helper
Sep 20, 2024
Merged

feat: Add L1 SetGasLimitBuilder abstract script#91
BrianBland merged 1 commit into
mainfrom
add-set-gas-limit-builder-helper

Conversation

@BrianBland

@BrianBland BrianBland commented Sep 20, 2024

Copy link
Copy Markdown
Contributor

Adds new SetGasLimitBuilder abstract script which simplifies the repeated task of calling the setGasLimit L1 system config method via a gnosis multisig.

To use this, a child class must implement the following 3 virtual function:

function _fromGasLimit() internal virtual view returns (uint64);
function _toGasLimit() internal virtual view returns (uint64);
function _nonceOffset() internal virtual view returns (uint64);

It's expected that the nonce offset will typically be set to 0 for upgrades or 1 for pre-signed rollbacks, while the from and to gas limits may be reversed. It's also possible to use this to pre-sign a number of sequential upgrades and/or rollbacks.

See base/contract-deployments@main...example-gas-limit-upgrade for an example of this new contract in action.

@cb-heimdall

cb-heimdall commented Sep 20, 2024

Copy link
Copy Markdown
Collaborator

✅ Heimdall Review Status

Requirement Status More Info
Reviews 1/1
Denominator calculation
Show calculation
1 if user is bot 0
1 if user is external 0
From .codeflow.yml 1
Additional review requirements
Show calculation
Max 0
0
From CODEOWNERS 0
Global minimum 0
Max 1
1
1 if commit is unverified 0
Sum 1
@BrianBland BrianBland force-pushed the add-set-gas-limit-builder-helper branch from a024b43 to b38df97 Compare September 20, 2024 19:45
@BrianBland BrianBland requested a review from mdehoog September 20, 2024 21:34

@mdehoog mdehoog left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice

@BrianBland BrianBland merged commit 2482df5 into main Sep 20, 2024
@BrianBland BrianBland deleted the add-set-gas-limit-builder-helper branch September 20, 2024 22:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants