Skip to content

CeloSequencerFeeVault#444

Open
m-chrzan wants to merge 6 commits into
op-deployer/v5.0.0from
m-chrzan/fee-vault
Open

CeloSequencerFeeVault#444
m-chrzan wants to merge 6 commits into
op-deployer/v5.0.0from
m-chrzan/fee-vault

Conversation

@m-chrzan
Copy link
Copy Markdown

Implements an extension to the standard SequencerFeeVault that also allows withdrawals of ERC-20 tokens, as the CELO system allows for gas payments in some non-native tokens.

Because some of the tokens use a special adapter contract, the "base" withdrawToken function takes two arguments: registered and actual. registered refers to the token as registered in the FeeCurrencyDirectory, which can be an adapter wrapper contract. actual refers to the actual ERC-20 token that should be transferred. A single-argument convenience overload is provided. On withdrawal, the token is verified to be registered in the FeeCurrencyDirectory.

Some design decisions:

  • We don't use a minimal withdrawal amount mechanism as with the original native token implementation. This isn't a security check, and maintaining a configuration to work with multiple tokens that have varying real-world values, and decimals, would add unnecessary complexity.
  • We only do this for the SequencerFeeVault, rather than a more general solution like extending FeeVault (the parent of all fee vaults), as currently, and for the foreseeable future, Celo only uses the SequencerFeeVault, and might even opt out of it in favor of a different mechanism in the future.

Drive by changes

  • Updated mise.toml, [alias] was deprecated in favor of [tool_alias].
  • Linting fix.

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 2f421fbd18

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

ISequencerFeeVault vault = ISequencerFeeVault(
DeployUtils.create1({
_name: "SequencerFeeVault",
_name: "CeloSequencerFeeVault",
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Keep standard SequencerFeeVault as default genesis impl

setSequencerFeeVault now unconditionally deploys CeloSequencerFeeVault for every L2 genesis, which replaces the standard OP Stack predeploy implementation even on non-Celo chains. This introduces Celo-specific behavior (e.g., withdrawToken depends on CELO_REGISTRY) and changes the deployed bytecode/version for SEQUENCER_FEE_WALLET globally, so non-Celo deployments no longer get the canonical SequencerFeeVault implementation they previously received. This should be gated behind a Celo-specific config/feature flag and keep SequencerFeeVault as the default path.

Useful? React with 👍 / 👎.

@m-chrzan m-chrzan changed the base branch from celo-contracts/v5.0.0 to op-deployer/v5.0.0 May 11, 2026 14:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants