-
Notifications
You must be signed in to change notification settings - Fork 54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
use chain Id as opposed to chain type to identify Mantle (#1489) #1494
Conversation
## Motivation ## Solution
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()) |
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
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()) |
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
Quality Gate failedFailed conditions |
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.