Skip to content

Commit

Permalink
execute: add token data reader to constructor (#60)
Browse files Browse the repository at this point in the history
* add token data reader to constructor

* fix ctor ordering
  • Loading branch information
makramkd authored Aug 12, 2024
1 parent 3f4a34b commit f1cc953
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion execute/factory.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import (
"github.com/smartcontractkit/libocr/commontypes"
ragep2ptypes "github.com/smartcontractkit/libocr/ragep2p/types"

"github.com/smartcontractkit/chainlink-ccip/execute/exectypes"
"github.com/smartcontractkit/chainlink-ccip/execute/internal/gas"
"github.com/smartcontractkit/chainlink-ccip/internal/reader"
"github.com/smartcontractkit/chainlink-ccip/pluginconfig"
Expand Down Expand Up @@ -54,6 +55,7 @@ type PluginFactory struct {
msgHasher cciptypes.MessageHasher
homeChainReader reader.HomeChain
estimateProvider gas.EstimateProvider
tokenDataReader exectypes.TokenDataReader
contractReaders map[cciptypes.ChainSelector]types.ContractReader
chainWriters map[cciptypes.ChainSelector]types.ChainWriter
}
Expand All @@ -64,6 +66,7 @@ func NewPluginFactory(
execCodec cciptypes.ExecutePluginCodec,
msgHasher cciptypes.MessageHasher,
homeChainReader reader.HomeChain,
tokenDataReader exectypes.TokenDataReader,
estimateProvider gas.EstimateProvider,
contractReaders map[cciptypes.ChainSelector]types.ContractReader,
chainWriters map[cciptypes.ChainSelector]types.ChainWriter,
Expand All @@ -77,6 +80,7 @@ func NewPluginFactory(
estimateProvider: estimateProvider,
contractReaders: contractReaders,
chainWriters: chainWriters,
tokenDataReader: tokenDataReader,
}
}

Expand Down Expand Up @@ -115,7 +119,7 @@ func (p PluginFactory) NewReportingPlugin(
p.execCodec,
p.msgHasher,
p.homeChainReader,
nil, // TODO: token data reader
p.tokenDataReader,
p.estimateProvider,
p.lggr,
), ocr3types.ReportingPluginInfo{
Expand Down

0 comments on commit f1cc953

Please sign in to comment.