Skip to content

Commit

Permalink
Merge branch 'main' into ng/fee-boost-fix3
Browse files Browse the repository at this point in the history
  • Loading branch information
0xnogo authored Nov 14, 2024
2 parents 341c1f1 + b53930a commit 02b3521
Show file tree
Hide file tree
Showing 9 changed files with 553 additions and 57 deletions.
5 changes: 5 additions & 0 deletions .mockery.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@ packages:
github.com/smartcontractkit/chainlink-ccip/pkg/types/ccipocr3:
interfaces:
ExecutePluginCodec:
github.com/smartcontractkit/chainlink-common/pkg/types:
interfaces:
ChainWriter:
config:
dir: mocks/chainlink_common/
github.com/smartcontractkit/libocr/networking:
interfaces:
PeerGroupFactory:
Expand Down
2 changes: 1 addition & 1 deletion commit/chainfee/observation.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ func (p *processor) Observation(
}

// Get the fee components for all available chains that we can read from
feeComponents := p.ccipReader.GetAvailableChainsFeeComponents(ctx, supportedChains.ToSlice())
feeComponents := p.ccipReader.GetChainsFeeComponents(ctx, supportedChains.ToSlice())
// Get the native token prices for all available chains that we can read from
nativeTokenPrices := p.ccipReader.GetWrappedNativeTokenPriceUSD(ctx, supportedChains.ToSlice())
// Get the latest chain fee price updates for the source chains
Expand Down
12 changes: 6 additions & 6 deletions commit/plugin_e2e_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -450,7 +450,7 @@ func TestPlugin_E2E_AllNodesAgree_ChainFee(t *testing.T) {
},
mockCCIPReader: func(m *readerpkg_mock.MockCCIPReader) {
m.EXPECT().
GetAvailableChainsFeeComponents(params.ctx, mock.Anything).
GetChainsFeeComponents(params.ctx, mock.Anything).
Return(
map[ccipocr3.ChainSelector]types.ChainFeeComponents{
destChain: newFeeComponents,
Expand All @@ -476,7 +476,7 @@ func TestPlugin_E2E_AllNodesAgree_ChainFee(t *testing.T) {
},
mockCCIPReader: func(m *readerpkg_mock.MockCCIPReader) {
m.EXPECT().
GetAvailableChainsFeeComponents(params.ctx, mock.Anything).
GetChainsFeeComponents(params.ctx, mock.Anything).
Return(
map[ccipocr3.ChainSelector]types.ChainFeeComponents{
destChain: newFeeComponents,
Expand All @@ -503,7 +503,7 @@ func TestPlugin_E2E_AllNodesAgree_ChainFee(t *testing.T) {
},
mockCCIPReader: func(m *readerpkg_mock.MockCCIPReader) {
m.EXPECT().
GetAvailableChainsFeeComponents(params.ctx, mock.Anything).
GetChainsFeeComponents(params.ctx, mock.Anything).
Return(
map[ccipocr3.ChainSelector]types.ChainFeeComponents{
destChain: newFeeComponents,
Expand Down Expand Up @@ -535,7 +535,7 @@ func TestPlugin_E2E_AllNodesAgree_ChainFee(t *testing.T) {
},
mockCCIPReader: func(m *readerpkg_mock.MockCCIPReader) {
m.EXPECT().
GetAvailableChainsFeeComponents(params.ctx, mock.Anything).
GetChainsFeeComponents(params.ctx, mock.Anything).
Return(
map[ccipocr3.ChainSelector]types.ChainFeeComponents{
destChain: newFeeComponents2,
Expand Down Expand Up @@ -567,7 +567,7 @@ func TestPlugin_E2E_AllNodesAgree_ChainFee(t *testing.T) {
},
mockCCIPReader: func(m *readerpkg_mock.MockCCIPReader) {
m.EXPECT().
GetAvailableChainsFeeComponents(params.ctx, mock.Anything).
GetChainsFeeComponents(params.ctx, mock.Anything).
Return(
map[ccipocr3.ChainSelector]types.ChainFeeComponents{
destChain: newFeeComponents2,
Expand Down Expand Up @@ -641,7 +641,7 @@ func prepareCcipReaderMock(

if mockChainFee {
ccipReader.EXPECT().
GetAvailableChainsFeeComponents(ctx, mock.Anything).
GetChainsFeeComponents(ctx, mock.Anything).
Return(map[ccipocr3.ChainSelector]types.ChainFeeComponents{}).Maybe()
ccipReader.EXPECT().
GetWrappedNativeTokenPriceUSD(ctx, mock.Anything).
Expand Down
2 changes: 1 addition & 1 deletion internal/mocks/inmem/ccipreader_inmem.go
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ func (r InMemoryCCIPReader) Nonces(
return nil, nil
}

func (r InMemoryCCIPReader) GetAvailableChainsFeeComponents(
func (r InMemoryCCIPReader) GetChainsFeeComponents(
ctx context.Context,
chains []cciptypes.ChainSelector,
) map[cciptypes.ChainSelector]types.ChainFeeComponents {
Expand Down
Loading

0 comments on commit 02b3521

Please sign in to comment.