-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
(feat): Combine common Transmitter into FunctionsContractTransmitter #12473
Conversation
I see that you haven't updated any README files. Would it make sense to do so? |
@@ -71,11 +71,18 @@ func (t *transmitter) CreateEthTransaction(ctx context.Context, toAddress common | |||
return errors.Wrap(err, "skipped OCR transmission, error getting round-robin address") | |||
} | |||
|
|||
var gasLimit uint64 | |||
if txMeta != nil && txMeta.GasLimit != nil { |
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.
Who sets this field "txMeta.GasLimit"?
Will it be added in a later PR?
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.
Yes exactly. The place where Functions would use this is here:
return errors.Wrap(oc.transmitter.CreateEthTransaction(ctx, destinationContract, payload, txMeta), "failed to send Eth transaction") |
return oc.effectiveTransmitterAddress | ||
} | ||
|
||
func (oc *contractTransmitter) fromAddress() common.Address { |
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.
we don't need a helper if it's used only once
…enable product specific modifications
contractReader contractReader | ||
lp logpoller.LogPoller | ||
lggr logger.Logger | ||
reportToEvmTxMeta ReportToEthMetadata |
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.
We can get rid of this, it's always set to nil (= no-op). Also remove reportToEvmTxMetaNoop function.
}, nil | ||
} | ||
|
||
func (oc *contractTransmitter) createEthTransaction(ctx context.Context, toAddress common.Address, payload []byte, txMeta *txmgr.TxMeta) error { |
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.
I think txMeta is always nil so we could remove it from params.
transmittedEventSig: transmitted.ID, | ||
lp: lp, | ||
contractReader: caller, | ||
lggr: lggr.Named("OCRContractTransmitter"), |
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.
would it help when debugging if the lggr was named: OCRFunctionsContractTransmitter
?
Quality Gate passedIssues Measures |
No description provided.