This repository was archived by the owner on Mar 14, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 65
use chain Id as opposed to chain type to identify Mantle (#1489) #1494
Merged
Conversation
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
## Motivation ## Solution
mateusz-sekara
approved these changes
Oct 10, 2024
| return nil, iErr | ||
| if r.chain.Config().EVM().ChainID().Uint64() == 5003 || r.chain.Config().EVM().ChainID().Uint64() == 5000 { | ||
| if commitPluginConfig.IsSourceProvider { | ||
| mantleInterceptor, iErr := mantle.NewInterceptor(ctx, r.chain.Client()) |
Contributor
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit, but iErr looks weird. I think the Go pattern is to have just err, no matter of the context. If err is already used (or defined in outer scope) you just go with err1, err2 etc
Contributor
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Initially, it was my implementation :) Linter argued about the shadowed declaration. So, InterceptorError => iErr :)
| return nil, iErr | ||
| if r.chain.Config().EVM().ChainID().Uint64() == 5003 || r.chain.Config().EVM().ChainID().Uint64() == 5000 { | ||
| if !execPluginConfig.IsSourceProvider { | ||
| mantleInterceptor, iErr := mantle.NewInterceptor(ctx, r.chain.Client()) |
Contributor
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto
valerii-kabisov-cll
approved these changes
Oct 10, 2024
|
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.


Motivation
Mantle chaintype is no longer used by the BIX team, Mantle's chaintype has been changed to optimism in chain toml
Solution
In order to match for Mantle and apply custom gas price interceptor, we can check for evm ChainId.
Not going for a more generic solution given OCR2 plugins will be sunset soon, and Mantle should be the only chain that requires such custom logic before that.
This is already included in 1.5.4 release and verified to work. Back-porting here to dev branch.