Skip to content

Commit

Permalink
refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
huangzhen1997 committed Jan 21, 2025
1 parent e8bbe9a commit 36a5ad1
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package ccip
package common

import (
"fmt"
Expand Down
6 changes: 3 additions & 3 deletions core/capabilities/ccip/oraclecreator/plugin.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
"github.com/gagliardetto/solana-go"
"github.com/google/uuid"
"github.com/prometheus/client_golang/prometheus"
"github.com/smartcontractkit/chainlink/v2/core/capabilities/ccip"
common2 "github.com/smartcontractkit/chainlink/v2/core/capabilities/ccip/common"
"github.com/smartcontractkit/chainlink/v2/core/services/relay"

chainsel "github.com/smartcontractkit/chain-selectors"
Expand Down Expand Up @@ -287,7 +287,7 @@ func (i *pluginOracleCreator) createFactoryAndTransmitter(
ccipreaderpkg.OCR3ConfigWithMeta(config),
ccipevm.NewCommitPluginCodecV1(),
ccipevm.NewMessageHasherV1(i.lggr.Named("MessageHasherV1")),
ccip.NewExtraArgsCodec(),
common2.NewExtraArgsCodec(),
i.homeChainReader,
i.homeChainSelector,
contractReaders,
Expand All @@ -310,7 +310,7 @@ func (i *pluginOracleCreator) createFactoryAndTransmitter(
ccipreaderpkg.OCR3ConfigWithMeta(config),
ccipevm.NewExecutePluginCodecV1(),
ccipevm.NewMessageHasherV1(i.lggr.Named("MessageHasherV1")),
ccip.NewExtraArgsCodec(),
common2.NewExtraArgsCodec(),
i.homeChainReader,
ccipevm.NewEVMTokenDataEncoder(),
ccipevm.NewGasEstimateProvider(),
Expand Down
8 changes: 4 additions & 4 deletions integration-tests/smoke/ccip/ccip_reader_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (
"github.com/ethereum/go-ethereum/crypto"
"github.com/ethereum/go-ethereum/ethclient/simulated"
"github.com/jmoiron/sqlx"
"github.com/smartcontractkit/chainlink/v2/core/capabilities/ccip"
common2 "github.com/smartcontractkit/chainlink/v2/core/capabilities/ccip/common"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"go.uber.org/zap/zapcore"
Expand Down Expand Up @@ -291,7 +291,7 @@ func TestCCIPReader_GetOffRampConfigDigest(t *testing.T) {
nil,
chainD,
addr.Bytes(),
ccip.NewExtraArgsCodec(),
common2.NewExtraArgsCodec(),
)

ccipReaderCommitDigest, err := reader.GetOffRampConfigDigest(ctx, consts.PluginTypeCommit)
Expand Down Expand Up @@ -1411,7 +1411,7 @@ func testSetupRealContracts(
contractReaders[chain] = cr
}
contractWriters := make(map[cciptypes.ChainSelector]types.ContractWriter)
edc := ccip.NewExtraArgsCodec()
edc := common2.NewExtraArgsCodec()
reader := ccipreaderpkg.NewCCIPReaderWithExtendedContractReaders(ctx, lggr, contractReaders, contractWriters, cciptypes.ChainSelector(destChain), nil, edc)

return reader
Expand Down Expand Up @@ -1527,7 +1527,7 @@ func testSetup(
contractReaders[chain] = cr
}
contractWriters := make(map[cciptypes.ChainSelector]types.ContractWriter)
edc := ccip.NewExtraArgsCodec()
edc := common2.NewExtraArgsCodec()
reader := ccipreaderpkg.NewCCIPReaderWithExtendedContractReaders(ctx, lggr, contractReaders, contractWriters, params.DestChain, nil, edc)

t.Cleanup(func() {
Expand Down

0 comments on commit 36a5ad1

Please sign in to comment.