fix(statics): add EIP1559 to ETH_FEATURES_WITH_FRANKFURT for v4 forwarder flush#9122
Draft
bitgo-ai-agent-dev[bot] wants to merge 1 commit into
Draft
fix(statics): add EIP1559 to ETH_FEATURES_WITH_FRANKFURT for v4 forwarder flush#9122bitgo-ai-agent-dev[bot] wants to merge 1 commit into
bitgo-ai-agent-dev[bot] wants to merge 1 commit into
Conversation
…rder flush ETH mainnet has required EIP1559 (type-2) transactions since the London hard fork (Aug 2021). Tokens on Ethereum using ETH_FEATURES_WITH_FRANKFURT (e.g. SUSHI, LINK, DAI) lacked the EIP1559 coin feature flag, which caused the BitGo platform to fall back to legacy transaction format when building flush transactions for v4 forwarders. V4 forwarders require the flush transaction to be sent directly to the forwarder address using the flushTokens(address) method — and this path requires EIP1559 on mainnet. Add CoinFeature.EIP1559 to ETH_FEATURES_WITH_FRANKFURT so all tokens using this feature set (including SUSHI) correctly declare EIP1559 support and receive properly-typed flush transactions from v4 hot wallet forwarders. Also add a regression test that builds a SUSHI v4 forwarder flush with EIP1559 fees, confirming the correct method ID and calldata encoding. Ticket: COINS-558 Session-Id: 11a8d890-1ca4-4c30-acd7-158927258cfd Task-Id: d32e686b-2479-4535-a80d-0b0ee0871065
84df90f to
1967a93
Compare
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.
What
CoinFeature.EIP1559toETH_FEATURES_WITH_FRANKFURTincoinFeatures.ts'sushi'to theeip1559Coinslist in the statics unit test to verify the feature is presentsdk-coin-eththat builds a SUSHI token flush from a v4 forwarder using EIP-1559 fees, confirming correct method ID (0x3ef13367) and calldata encodingWhy
ETH_FEATURES_WITH_FRANKFURT(including SUSHI, LINK, DAI) lacked theEIP1559coin feature flag. The BitGo platform checks this flag when deciding the transaction type for flush operations — without it, the platform fell back to a legacy gas model that is incompatible with the v4 forwarder flush path.flushTokens(address)(selector0x3ef13367). EIP1559 is required for this to succeed on Ethereum mainnet.Test plan
yarn run unit-test --scope @bitgo/statics— verifiessushihas theEIP1559featureyarn run unit-test --scope @bitgo/sdk-coin-eth— verifies the new SUSHI v4 forwarder flush test passesETH_FEATURES_WITH_FRANKFURT(SUSHI, LINK, DAI, etc.) now haveEIP1559in their feature setTicket: COINS-558