-
Notifications
You must be signed in to change notification settings - Fork 1
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
Add Gas Price Data Source #28
Conversation
go.mod
Outdated
@@ -4,14 +4,16 @@ go 1.21.3 | |||
|
|||
require ( | |||
github.com/hashicorp/go-plugin v1.6.0 | |||
github.com/smartcontractkit/chainlink-common v0.1.7-0.20240327133125-eed636b9a6df | |||
github.com/smartcontractkit/chainlink-common v0.1.7-0.20240515160501-a375a7ccb29e |
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.
will point to master once smartcontractkit/chainlink-common#509 is merged
@@ -33,6 +34,11 @@ func aggregate(observations []median.ParsedAttributedObservation) *aggregatedAtt | |||
}) | |||
aggregated.JuelsPerFeeCoin = observations[n/2].JuelsPerFeeCoin | |||
|
|||
slices.SortFunc(observations, func(a, b median.ParsedAttributedObservation) int { |
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.
extracts the GasPriceSubunits to the aggregated observation. If it uses the default codec or codecs that do not know about this field, then field is ignored (see https://chainlink-core.slack.com/archives/C03EZMT3XPX/p1715627908908079?thread_ts=1711719895.085089&cid=C03EZMT3XPX).
If it's on Starknet, the Starknet codec will utilize it
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.
LGTM after common update
Thanks, will update now that chainlink-common has been merged here smartcontractkit/chainlink-common#509 |
* adjust for nil case * add gas price to test cases * update libocr and chainlink-common * update libocr and chainlink-common * update common again * remove replace * update deps * update NewMedianFactory * update variable naming * simplify logic * simplify comment * comment * update to chainlink-common master * typo
This is in the same vein of work as smartcontractkit/chainlink-common#509.
Introducing a new gas price data source.
Merge Order