Skip to content
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

Merged
merged 17 commits into from
May 22, 2024
Merged

Conversation

augustbleeds
Copy link
Collaborator

@augustbleeds augustbleeds commented Jan 23, 2024

go.mod Outdated Show resolved Hide resolved
go.mod Outdated Show resolved Hide resolved
go.mod Outdated Show resolved Hide resolved
@augustbleeds augustbleeds changed the title Data Source Adjust Add Gas Price Data Source Jan 23, 2024
@jmank88 jmank88 requested review from samsondav and jmank88 April 19, 2024 20:18
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
Copy link
Collaborator Author

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 {
Copy link
Collaborator Author

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

median/plugin.go Outdated Show resolved Hide resolved
jmank88
jmank88 previously approved these changes May 17, 2024
Copy link
Collaborator

@jmank88 jmank88 left a 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

@augustbleeds
Copy link
Collaborator Author

LGTM after common update

Thanks, will update now that chainlink-common has been merged here smartcontractkit/chainlink-common#509

@jmank88 jmank88 merged commit 159fb2d into master May 22, 2024
6 checks passed
augustbleeds added a commit that referenced this pull request Jun 14, 2024
* 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
@augustbleeds augustbleeds mentioned this pull request Jun 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants