CeloSequencerFeeVault#444
Conversation
There was a problem hiding this comment.
💡 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".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 66444d2883
ℹ️ 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".
|
|
||
| emit TokenWithdrawal(_registered, _actual, value, RECIPIENT, msg.sender); | ||
|
|
||
| IERC20(_actual).safeTransfer(RECIPIENT, value); |
There was a problem hiding this comment.
Enforce L2 withdrawal network for token withdrawals
withdrawToken always performs a local safeTransfer to RECIPIENT and never checks WITHDRAWAL_NETWORK, so configurations that still use WithdrawalNetwork.L1 will not bridge token fees to L1—they are sent to the same 20-byte address on L2 instead. This is a loss-of-funds risk when the configured sequencer fee recipient is an L1-only contract/multisig (a common setup), because the tokens become stranded on L2; the function should either require WITHDRAWAL_NETWORK == L2 or implement an L1 withdrawal path for tokens.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
I don't think it is an issue, but could you double check @m-chrzan 🙏 ?
66444d2 to
80a1239
Compare
|
If we want to change base from |
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"
withdrawTokenfunction takes two arguments:registeredandactual.registeredrefers to the token as registered in the FeeCurrencyDirectory, which can be an adapter wrapper contract.actualrefers 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:
Drive by changes
mise.toml,[alias]was deprecated in favor of[tool_alias].