diff --git a/go.mod b/go.mod index 585c1a2..b7862ff 100644 --- a/go.mod +++ b/go.mod @@ -5,7 +5,6 @@ toolchain go1.22.6 require ( github.com/hashicorp/go-plugin v1.6.2-0.20240829161738-06afb6d7ae99 github.com/smartcontractkit/chainlink-common v0.2.2-0.20240903145040-b10f97aaedca - github.com/smartcontractkit/chainlink-feeds v0.1.0 github.com/smartcontractkit/libocr v0.0.0-20240419185742-fd3cab206b2c github.com/stretchr/testify v1.9.0 ) @@ -76,4 +75,4 @@ require ( // until merged upstream: https://github.com/mwitkow/grpc-proxy/pull/69 replace github.com/mwitkow/grpc-proxy => github.com/smartcontractkit/grpc-proxy v0.0.0-20230731113816-f1be6620749f -module example.com/mod +module github.com/smartcontractkit/chainlink-feeds diff --git a/go.sum b/go.sum index 999fd53..351dc0f 100644 --- a/go.sum +++ b/go.sum @@ -131,8 +131,6 @@ github.com/shopspring/decimal v1.4.0 h1:bxl37RwXBklmTi0C79JfXCEBD1cqqHt0bbgBAGFp github.com/shopspring/decimal v1.4.0/go.mod h1:gawqmDU56v4yIKSwfBSFip1HdCCXN8/+DMd9qYNcwME= github.com/smartcontractkit/chainlink-common v0.2.2-0.20240903145040-b10f97aaedca h1:tuv6FkcnT6qC+qjOQ0NGDVUvq14uvEJhyBu3z+iuQoQ= github.com/smartcontractkit/chainlink-common v0.2.2-0.20240903145040-b10f97aaedca/go.mod h1:D/qaCoq0SxXzg5NRN5FtBRv98VBf+D2NOC++RbvvuOc= -github.com/smartcontractkit/chainlink-feeds v0.1.0 h1:mR6dHzr9WxWeTlyYQ1kokKYZSz3GEgjKWJmpi8IcXrQ= -github.com/smartcontractkit/chainlink-feeds v0.1.0/go.mod h1:vy1L7NybTy2F/Yv7BOh+oZBa1MACD6gzd1+DkcSkfp8= github.com/smartcontractkit/grpc-proxy v0.0.0-20240830132753-a7e17fec5ab7 h1:12ijqMM9tvYVEm+nR826WsrNi6zCKpwBhuApq127wHs= github.com/smartcontractkit/grpc-proxy v0.0.0-20240830132753-a7e17fec5ab7/go.mod h1:FX7/bVdoep147QQhsOPkYsPEXhGZjeYx6lBSaSXtZOA= github.com/smartcontractkit/libocr v0.0.0-20240419185742-fd3cab206b2c h1:lIyMbTaF2H0Q71vkwZHX/Ew4KF2BxiKhqEXwF8rn+KI= diff --git a/median/plugin.go b/median/plugin.go index c6954b9..f052f24 100644 --- a/median/plugin.go +++ b/median/plugin.go @@ -27,7 +27,7 @@ func NewPlugin(lggr logger.Logger) *Plugin { return &Plugin{Plugin: loop.Plugin{Logger: lggr}, stop: make(services.StopChan)} } -func (p *Plugin) NewMedianFactory(ctx context.Context, provider types.MedianProvider, contractAddr string, dataSource, juelsPerFeeCoin, gasPriceSubunits median.DataSource, errorLog loop.ErrorLog) (loop.ReportingPluginFactory, error) { +func (p *Plugin) NewMedianFactory(ctx context.Context, provider types.MedianProvider, contractID string, dataSource, juelsPerFeeCoin, gasPriceSubunits median.DataSource, errorLog loop.ErrorLog) (loop.ReportingPluginFactory, error) { var ctxVals loop.ContextValues ctxVals.SetValues(ctx) lggr := logger.With(p.Logger, ctxVals.Args()...) @@ -57,12 +57,12 @@ func (p *Plugin) NewMedianFactory(ctx context.Context, provider types.MedianProv if cr := provider.ChainReader(); cr != nil { if err := provider.ChainReader().Bind(ctx, []types.BoundContract{ - {Address: contractAddr, Name: contractAddr}, + {Address: contractID, Name: contractName}, }); err != nil { return nil, err } - factory.ContractTransmitter = &contractReaderContract{contractAddr: contractAddr, contractReader: cr, lggr: lggr} + factory.ContractTransmitter = &contractReaderContract{contractID: contractID, contractReader: cr, lggr: lggr} } else { factory.ContractTransmitter = provider.MedianContract() } @@ -109,7 +109,7 @@ func (r *reportingPluginFactoryService) HealthReport() map[string]error { // contractReaderContract adapts a [types.ContractReader] to [median.MedianContract]. type contractReaderContract struct { - contractAddr string + contractID string contractReader types.ContractReader lggr logger.Logger } @@ -132,7 +132,7 @@ func (c *contractReaderContract) LatestTransmissionDetails(ctx context.Context) var resp latestTransmissionDetailsResponse binding := types.BoundContract{ - Address: c.contractAddr, + Address: c.contractID, Name: contractName, } @@ -160,7 +160,7 @@ func (c *contractReaderContract) LatestRoundRequested(ctx context.Context, lookb var resp latestRoundRequested binding := types.BoundContract{ - Address: c.contractAddr, + Address: c.contractID, Name: contractName, }