feat(op-revm): add Soul Gas Token (SGT) support for OP Stack#1
Open
blockchaindevsh wants to merge 2 commits intoop-esfrom
Open
feat(op-revm): add Soul Gas Token (SGT) support for OP Stack#1blockchaindevsh wants to merge 2 commits intoop-esfrom
blockchaindevsh wants to merge 2 commits intoop-esfrom
Conversation
Implements SGT-aware gas payment for OP Stack chains: - SGT balance reading from predeploy contract (0x4200...0800) - Deduction priority: SGT first, then native balance - Refund priority: native first, then SGT (reverse order) - Full test coverage with op-acceptance-tests - Preserves L1BlockInfo fetch behavior with SGT config Co-authored-by: Claude Code <noreply@anthropic.com>
Move sgt_enabled and sgt_is_native_backed from L1BlockInfo to CfgEnv, accessed via Cfg trait methods (is_sgt_enabled, is_sgt_native_backed). This eliminates the need to: - Mutate the EVM after creation (no configure_sgt on Evm trait) - Preserve/restore SGT flags around L1BlockInfo::try_fetch - Fork alloy-evm SGT config now flows through CfgEnv at EVM creation time, matching how OpSpecId and other hardfork config is passed. Runtime deduction tracking (sgt_native_deducted, sgt_amount_deducted) remains on L1BlockInfo as it is per-transaction mutable state. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implements SGT-aware gas payment for OP Stack chains: