diff --git a/core/capabilities/ccip/ccipaptos/executecodec.go b/core/capabilities/ccip/ccipaptos/executecodec.go index 5ceccd6aa04..695973b3225 100644 --- a/core/capabilities/ccip/ccipaptos/executecodec.go +++ b/core/capabilities/ccip/ccipaptos/executecodec.go @@ -7,6 +7,7 @@ import ( "github.com/aptos-labs/aptos-go-sdk" "github.com/aptos-labs/aptos-go-sdk/bcs" + "github.com/smartcontractkit/chainlink-common/pkg/types/ccipocr3" cciptypes "github.com/smartcontractkit/chainlink-ccip/pkg/types/ccipocr3" @@ -15,16 +16,16 @@ import ( // ExecutePluginCodecV1 is a codec for encoding and decoding execute plugin reports. // Compatible with ccip_offramp::offramp version 1.6.0 type ExecutePluginCodecV1 struct { - extraDataCodec ccipocr3.ExtraDataCodec + extraDataCodec ccipocr3.ExtraDataCodecBundle } -func NewExecutePluginCodecV1(extraDataCodec ccipocr3.ExtraDataCodec) *ExecutePluginCodecV1 { +func NewExecutePluginCodecV1(extraDataCodec ccipocr3.ExtraDataCodecBundle) *ExecutePluginCodecV1 { return &ExecutePluginCodecV1{ extraDataCodec: extraDataCodec, } } -func (e *ExecutePluginCodecV1) Encode(ctx context.Context, report cciptypes.ExecutePluginReport) ([]byte, error) { +func (e *ExecutePluginCodecV1) Encode(ctx context.Context, report ccipocr3.ExecutePluginReport) ([]byte, error) { if len(report.ChainReports) == 0 { return nil, nil } diff --git a/core/capabilities/ccip/ccipaptos/executecodec_test.go b/core/capabilities/ccip/ccipaptos/executecodec_test.go index 64f6f721f94..40b0affa311 100644 --- a/core/capabilities/ccip/ccipaptos/executecodec_test.go +++ b/core/capabilities/ccip/ccipaptos/executecodec_test.go @@ -163,7 +163,7 @@ func TestExecutePluginCodecV1(t *testing.T) { for _, tc := range testCases { t.Run(tc.name, func(t *testing.T) { - codec := NewExecutePluginCodecV1(registeredMockExtraDataCodecMap) + codec := NewExecutePluginCodecV1(ccipocr3.ExtraDataCodecMap(registeredMockExtraDataCodecMap)) // randomExecuteReport now uses the new encoding internally report := tc.report(randomExecuteReport(t, tc.chainSelector, tc.gasLimit, tc.destGasAmount)) bytes, err := codec.Encode(ctx, report) diff --git a/core/capabilities/ccip/ccipaptos/msghasher.go b/core/capabilities/ccip/ccipaptos/msghasher.go index db7495ca6ed..ba8c093062d 100644 --- a/core/capabilities/ccip/ccipaptos/msghasher.go +++ b/core/capabilities/ccip/ccipaptos/msghasher.go @@ -11,6 +11,7 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common/hexutil" "github.com/ethereum/go-ethereum/crypto" + "github.com/smartcontractkit/chainlink-common/pkg/types/ccipocr3" "github.com/smartcontractkit/chainlink-ccip/pkg/logutil" @@ -31,7 +32,7 @@ var ( // Compatible with ccip::offramp version 1.6.0 type MessageHasherV1 struct { lggr logger.Logger - extraDataCodec ccipocr3.ExtraDataCodec + extraDataCodec ccipocr3.ExtraDataCodecBundle } type any2AptosTokenTransfer struct { @@ -42,7 +43,7 @@ type any2AptosTokenTransfer struct { Amount *big.Int } -func NewMessageHasherV1(lggr logger.Logger, extraDataCodec ccipocr3.ExtraDataCodec) *MessageHasherV1 { +func NewMessageHasherV1(lggr logger.Logger, extraDataCodec ccipocr3.ExtraDataCodecBundle) *MessageHasherV1 { return &MessageHasherV1{ lggr: lggr, extraDataCodec: extraDataCodec, diff --git a/core/capabilities/ccip/ccipaptos/pluginconfig.go b/core/capabilities/ccip/ccipaptos/pluginconfig.go index 4b2ffa76976..d85db7e5e09 100644 --- a/core/capabilities/ccip/ccipaptos/pluginconfig.go +++ b/core/capabilities/ccip/ccipaptos/pluginconfig.go @@ -14,7 +14,7 @@ import ( // initializePluginConfig returns a PluginConfig for Aptos chains. func initializePluginConfigFunc(chainselFamily string) ccipcommon.InitFunction { - return func(lggr logger.Logger, extraDataCodec ccipocr3.ExtraDataCodec) ccipcommon.PluginConfig { + return func(lggr logger.Logger, extraDataCodec ccipocr3.ExtraDataCodecBundle) ccipcommon.PluginConfig { var cwProvider ccipcommon.ChainRWProvider var transmitterFactory types.ContractTransmitterFactory var msgHasher ccipocr3.MessageHasher diff --git a/core/capabilities/ccip/ccipevm/executecodec.go b/core/capabilities/ccip/ccipevm/executecodec.go index fd44d82135e..4f39b1a7ebd 100644 --- a/core/capabilities/ccip/ccipevm/executecodec.go +++ b/core/capabilities/ccip/ccipevm/executecodec.go @@ -8,6 +8,7 @@ import ( "github.com/ethereum/go-ethereum/accounts/abi" "github.com/ethereum/go-ethereum/common" chainsel "github.com/smartcontractkit/chain-selectors" + "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v1_6_0/offramp" cciptypes "github.com/smartcontractkit/chainlink-ccip/pkg/types/ccipocr3" "github.com/smartcontractkit/chainlink-common/pkg/types/ccipocr3" @@ -19,10 +20,10 @@ import ( // - "OffRamp 1.6.0" type ExecutePluginCodecV1 struct { executeReportMethodInputs abi.Arguments - extraDataCodec ccipocr3.ExtraDataCodec + extraDataCodec ccipocr3.ExtraDataCodecBundle } -func NewExecutePluginCodecV1(extraDataCodec ccipocr3.ExtraDataCodec) *ExecutePluginCodecV1 { +func NewExecutePluginCodecV1(extraDataCodec ccipocr3.ExtraDataCodecBundle) *ExecutePluginCodecV1 { abiParsed, err := abi.JSON(strings.NewReader(offramp.OffRampABI)) if err != nil { panic(fmt.Errorf("parse multi offramp abi: %s", err)) @@ -38,7 +39,7 @@ func NewExecutePluginCodecV1(extraDataCodec ccipocr3.ExtraDataCodec) *ExecutePlu } } -func (e *ExecutePluginCodecV1) Encode(ctx context.Context, report cciptypes.ExecutePluginReport) ([]byte, error) { +func (e *ExecutePluginCodecV1) Encode(ctx context.Context, report ccipocr3.ExecutePluginReport) ([]byte, error) { evmReport := make([]offramp.InternalExecutionReport, 0, len(report.ChainReports)) for _, chainReport := range report.ChainReports { diff --git a/core/capabilities/ccip/ccipevm/executecodec_test.go b/core/capabilities/ccip/ccipevm/executecodec_test.go index b202049df6e..e22d7910456 100644 --- a/core/capabilities/ccip/ccipevm/executecodec_test.go +++ b/core/capabilities/ccip/ccipevm/executecodec_test.go @@ -12,6 +12,10 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core" chainsel "github.com/smartcontractkit/chain-selectors" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/mock" + "github.com/stretchr/testify/require" + "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v1_6_0/message_hasher" "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v1_6_0/offramp" "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v1_6_0/report_codec" @@ -22,9 +26,6 @@ import ( "github.com/smartcontractkit/chainlink-evm/pkg/utils" "github.com/smartcontractkit/chainlink/v2/core/capabilities/ccip/common/mocks" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/mock" - "github.com/stretchr/testify/require" ) var randomExecuteReport = func(t *testing.T, d *testSetupData, chainSelector uint64, gasLimit *big.Int, destGasAmount uint32) cciptypes.ExecutePluginReport { @@ -187,7 +188,7 @@ func TestExecutePluginCodecV1(t *testing.T) { for _, tc := range testCases { t.Run(tc.name, func(t *testing.T) { - edc := ccipocr3.ExtraDataCodec(registeredMockExtraDataCodecMap) + edc := ccipocr3.ExtraDataCodecMap(registeredMockExtraDataCodecMap) codec := NewExecutePluginCodecV1(edc) report := tc.report(randomExecuteReport(t, d, tc.chainSelector, tc.gasLimit, tc.destGasAmount)) bytes, err := codec.Encode(ctx, report) diff --git a/core/capabilities/ccip/ccipevm/gas_helpers.go b/core/capabilities/ccip/ccipevm/gas_helpers.go index a8e7a4ed0db..ffad7433e9e 100644 --- a/core/capabilities/ccip/ccipevm/gas_helpers.go +++ b/core/capabilities/ccip/ccipevm/gas_helpers.go @@ -5,6 +5,7 @@ import ( "math" "github.com/pkg/errors" + "github.com/smartcontractkit/chainlink-common/pkg/types/ccipocr3" cciptypes "github.com/smartcontractkit/chainlink-ccip/pkg/types/ccipocr3" @@ -34,14 +35,14 @@ const ( DestGasOverhead = 300_000 // Commit and Exec costs ) -func NewGasEstimateProvider(codec ccipocr3.ExtraDataCodec) EstimateProvider { +func NewGasEstimateProvider(codec ccipocr3.ExtraDataCodecBundle) EstimateProvider { return EstimateProvider{ extraDataCodec: codec, } } type EstimateProvider struct { - extraDataCodec ccipocr3.ExtraDataCodec + extraDataCodec ccipocr3.ExtraDataCodecBundle } // CalculateMerkleTreeGas estimates the merkle tree gas based on number of requests diff --git a/core/capabilities/ccip/ccipevm/helpers.go b/core/capabilities/ccip/ccipevm/helpers.go index b3ca2c9fc2b..ff828e619ce 100644 --- a/core/capabilities/ccip/ccipevm/helpers.go +++ b/core/capabilities/ccip/ccipevm/helpers.go @@ -32,7 +32,7 @@ func ABITypeOrPanic(t string) abi.Type { // CCIPMsgToAny2EVMMessage converts a ccipocr3.Message object to an offramp.InternalAny2EVMRampMessage object. // These are typically used to create the execution report for EVM. -func CCIPMsgToAny2EVMMessage(msg ccipocr3.Message, codec ccipocr3.ExtraDataCodec) (offramp.InternalAny2EVMRampMessage, error) { +func CCIPMsgToAny2EVMMessage(msg ccipocr3.Message, codec ccipocr3.ExtraDataCodecBundle) (offramp.InternalAny2EVMRampMessage, error) { var tokenAmounts []offramp.InternalAny2EVMTokenTransfer for _, rta := range msg.TokenAmounts { decodedMap, err := codec.DecodeTokenAmountDestExecData(rta.DestExecData, msg.Header.SourceChainSelector) diff --git a/core/capabilities/ccip/ccipevm/manualexeclib/exec.go b/core/capabilities/ccip/ccipevm/manualexeclib/exec.go index b3dc93f0ad6..196714004ae 100644 --- a/core/capabilities/ccip/ccipevm/manualexeclib/exec.go +++ b/core/capabilities/ccip/ccipevm/manualexeclib/exec.go @@ -7,6 +7,7 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common/hexutil" + "github.com/smartcontractkit/chainlink-common/pkg/types/ccipocr3" "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v1_6_0/offramp" @@ -22,7 +23,7 @@ func GetMessageHashes( lggr logger.Logger, onrampAddress common.Address, ccipMessageSentEvents []onramp.OnRampCCIPMessageSent, - extraDataCodec ccipocr3.ExtraDataCodec, + extraDataCodec ccipocr3.ExtraDataCodecBundle, ) ([][32]byte, error) { msgHasher := ccipevm.NewMessageHasherV1( lggr, @@ -107,7 +108,7 @@ func CreateExecutionReport( ccipMessageSentEvents []onramp.OnRampCCIPMessageSent, hashes [][32]byte, flags *big.Int, - extraDataCodec ccipocr3.ExtraDataCodec, + extraDataCodec ccipocr3.ExtraDataCodecBundle, ) (offramp.InternalExecutionReport, error) { var any2EVMs []offramp.InternalAny2EVMRampMessage for _, event := range ccipMessageSentEvents { diff --git a/core/capabilities/ccip/ccipevm/msghasher.go b/core/capabilities/ccip/ccipevm/msghasher.go index 17134c0bc53..55d6fa2fec4 100644 --- a/core/capabilities/ccip/ccipevm/msghasher.go +++ b/core/capabilities/ccip/ccipevm/msghasher.go @@ -11,6 +11,7 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common/hexutil" chainsel "github.com/smartcontractkit/chain-selectors" + "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v1_6_0/message_hasher" "github.com/smartcontractkit/chainlink-ccip/pkg/logutil" cciptypes "github.com/smartcontractkit/chainlink-ccip/pkg/types/ccipocr3" @@ -47,10 +48,10 @@ var ( // - "OnRamp 1.6.0" type MessageHasherV1 struct { lggr logger.Logger - extraDataCodec ccipocr3.ExtraDataCodec + extraDataCodec ccipocr3.ExtraDataCodecBundle } -func NewMessageHasherV1(lggr logger.Logger, extraDataCodec ccipocr3.ExtraDataCodec) *MessageHasherV1 { +func NewMessageHasherV1(lggr logger.Logger, extraDataCodec ccipocr3.ExtraDataCodecBundle) *MessageHasherV1 { return &MessageHasherV1{ lggr: lggr, extraDataCodec: extraDataCodec, diff --git a/core/capabilities/ccip/ccipevm/msghasher_test.go b/core/capabilities/ccip/ccipevm/msghasher_test.go index ffe12110a46..ff544d22d78 100644 --- a/core/capabilities/ccip/ccipevm/msghasher_test.go +++ b/core/capabilities/ccip/ccipevm/msghasher_test.go @@ -36,7 +36,7 @@ import ( "github.com/stretchr/testify/require" ) -var extraDataCodec = ccipocr3.ExtraDataCodec(map[string]ccipocr3.SourceChainExtraDataCodec{ +var extraDataCodec = ccipocr3.ExtraDataCodecMap(map[string]ccipocr3.SourceChainExtraDataCodec{ chainsel.FamilyAptos: ccipaptos.ExtraDataDecoder{}, chainsel.FamilyEVM: ExtraDataDecoder{}, chainsel.FamilySolana: ccipsolana.ExtraDataDecoder{}, diff --git a/core/capabilities/ccip/ccipevm/pluginconfig.go b/core/capabilities/ccip/ccipevm/pluginconfig.go index 0e690cdab57..e826bf8430f 100644 --- a/core/capabilities/ccip/ccipevm/pluginconfig.go +++ b/core/capabilities/ccip/ccipevm/pluginconfig.go @@ -2,6 +2,7 @@ package ccipevm import ( chainsel "github.com/smartcontractkit/chain-selectors" + "github.com/smartcontractkit/chainlink-common/pkg/types/ccipocr3" "github.com/smartcontractkit/chainlink-common/pkg/logger" @@ -13,7 +14,7 @@ import ( const defaultCommitGasLimit = 500_000 // InitializePluginConfig returns a PluginConfig for EVM chains. -func InitializePluginConfig(lggr logger.Logger, extraDataCodec ccipocr3.ExtraDataCodec) ccipcommon.PluginConfig { +func InitializePluginConfig(lggr logger.Logger, extraDataCodec ccipocr3.ExtraDataCodecBundle) ccipcommon.PluginConfig { return ccipcommon.PluginConfig{ CommitPluginCodec: NewCommitPluginCodecV1(), ExecutePluginCodec: NewExecutePluginCodecV1(extraDataCodec), diff --git a/core/capabilities/ccip/ccipnoop/executecodec.go b/core/capabilities/ccip/ccipnoop/executecodec.go index 461e0d006c7..969fc5ca5ce 100644 --- a/core/capabilities/ccip/ccipnoop/executecodec.go +++ b/core/capabilities/ccip/ccipnoop/executecodec.go @@ -10,10 +10,10 @@ import ( // Compatible with: // - "OffRamp 1.6.0-dev" type ExecutePluginCodecV1 struct { - extraDataCodec ccipocr3.ExtraDataCodec + extraDataCodec ccipocr3.ExtraDataCodecBundle } -func NewExecutePluginCodecV1(extraDataCodec ccipocr3.ExtraDataCodec) *ExecutePluginCodecV1 { +func NewExecutePluginCodecV1(extraDataCodec ccipocr3.ExtraDataCodecBundle) *ExecutePluginCodecV1 { return &ExecutePluginCodecV1{ extraDataCodec: extraDataCodec, } diff --git a/core/capabilities/ccip/ccipnoop/gas_helpers.go b/core/capabilities/ccip/ccipnoop/gas_helpers.go index 88717f412fb..5b9ab837f70 100644 --- a/core/capabilities/ccip/ccipnoop/gas_helpers.go +++ b/core/capabilities/ccip/ccipnoop/gas_helpers.go @@ -4,14 +4,14 @@ import ( "github.com/smartcontractkit/chainlink-common/pkg/types/ccipocr3" ) -func NewGasEstimateProvider(codec ccipocr3.ExtraDataCodec) ccipocr3.EstimateProvider { +func NewGasEstimateProvider(codec ccipocr3.ExtraDataCodecBundle) ccipocr3.EstimateProvider { return estimateProvider{ extraDataCodec: codec, } } type estimateProvider struct { - extraDataCodec ccipocr3.ExtraDataCodec + extraDataCodec ccipocr3.ExtraDataCodecBundle } // CalculateMerkleTreeGas is not implemented diff --git a/core/capabilities/ccip/ccipnoop/msghasher.go b/core/capabilities/ccip/ccipnoop/msghasher.go index 0d9a6d51855..9d5d3bc62f5 100644 --- a/core/capabilities/ccip/ccipnoop/msghasher.go +++ b/core/capabilities/ccip/ccipnoop/msghasher.go @@ -13,10 +13,10 @@ import ( // - "OnRamp 1.6.0-dev" type MessageHasherV1 struct { lggr logger.Logger - extraDataCodec ccipocr3.ExtraDataCodec + extraDataCodec ccipocr3.ExtraDataCodecBundle } -func NewMessageHasherV1(lggr logger.Logger, extraDataCodec ccipocr3.ExtraDataCodec) *MessageHasherV1 { +func NewMessageHasherV1(lggr logger.Logger, extraDataCodec ccipocr3.ExtraDataCodecBundle) *MessageHasherV1 { return &MessageHasherV1{ lggr: lggr, extraDataCodec: extraDataCodec, diff --git a/core/capabilities/ccip/ccipnoop/pluginconfig.go b/core/capabilities/ccip/ccipnoop/pluginconfig.go index 6a3c2187a91..31dbe54d28a 100644 --- a/core/capabilities/ccip/ccipnoop/pluginconfig.go +++ b/core/capabilities/ccip/ccipnoop/pluginconfig.go @@ -8,7 +8,7 @@ import ( ) // NewPluginConfig returns a pluginConfig . -func NewPluginConfig(lggr logger.Logger, extraDataCodec ccipocr3.ExtraDataCodec) ccipcommon.PluginConfig { +func NewPluginConfig(lggr logger.Logger, extraDataCodec ccipocr3.ExtraDataCodecBundle) ccipcommon.PluginConfig { return ccipcommon.PluginConfig{ CommitPluginCodec: NewCommitPluginCodecV1(), ExecutePluginCodec: NewExecutePluginCodecV1(extraDataCodec), diff --git a/core/capabilities/ccip/ccipsolana/executecodec.go b/core/capabilities/ccip/ccipsolana/executecodec.go index 04b5d5caf2a..009b2cb9bfd 100644 --- a/core/capabilities/ccip/ccipsolana/executecodec.go +++ b/core/capabilities/ccip/ccipsolana/executecodec.go @@ -11,6 +11,7 @@ import ( agbinary "github.com/gagliardetto/binary" "github.com/gagliardetto/solana-go" + "github.com/smartcontractkit/chainlink-ccip/chains/solana/gobindings/latest/ccip_offramp" cciptypes "github.com/smartcontractkit/chainlink-ccip/pkg/types/ccipocr3" "github.com/smartcontractkit/chainlink-common/pkg/types/ccipocr3" @@ -20,16 +21,16 @@ import ( // Compatible with: // - "OffRamp 1.6.0-dev" type ExecutePluginCodecV1 struct { - extraDataCodec ccipocr3.ExtraDataCodec + extraDataCodec ccipocr3.ExtraDataCodecBundle } -func NewExecutePluginCodecV1(extraDataCodec ccipocr3.ExtraDataCodec) *ExecutePluginCodecV1 { +func NewExecutePluginCodecV1(extraDataCodecBundle ccipocr3.ExtraDataCodecBundle) *ExecutePluginCodecV1 { return &ExecutePluginCodecV1{ - extraDataCodec: extraDataCodec, + extraDataCodec: extraDataCodecBundle, } } -func (e *ExecutePluginCodecV1) Encode(ctx context.Context, report cciptypes.ExecutePluginReport) ([]byte, error) { +func (e *ExecutePluginCodecV1) Encode(ctx context.Context, report ccipocr3.ExecutePluginReport) ([]byte, error) { if len(report.ChainReports) == 0 { // OCR3 runs in a constant loop and will produce empty reports, so we need to handle this case // return an empty report, CCIP will discard it on ShouldAcceptAttestedReport/ShouldTransmitAcceptedReport diff --git a/core/capabilities/ccip/ccipsolana/executecodec_test.go b/core/capabilities/ccip/ccipsolana/executecodec_test.go index ece99740a04..9f88fadc384 100644 --- a/core/capabilities/ccip/ccipsolana/executecodec_test.go +++ b/core/capabilities/ccip/ccipsolana/executecodec_test.go @@ -185,7 +185,7 @@ func TestExecutePluginCodecV1(t *testing.T) { chainsel.FamilySolana: mockExtraDataCodec, } - edc := ccipocr3.ExtraDataCodec(registeredMockExtraDataCodecMap) + edc := ccipocr3.ExtraDataCodecMap(registeredMockExtraDataCodecMap) cd := NewExecutePluginCodecV1(edc) for _, tc := range testCases { @@ -269,7 +269,7 @@ func Test_DecodingExecuteReport(t *testing.T) { err = onChainReport.MarshalWithEncoder(encoder) require.NoError(t, err) - edc := ccipocr3.ExtraDataCodec(registeredMockExtraDataCodecMap) + edc := ccipocr3.ExtraDataCodecMap(registeredMockExtraDataCodecMap) executeCodec := NewExecutePluginCodecV1(edc) decode, err := executeCodec.Decode(testutils.Context(t), buf.Bytes()) require.NoError(t, err) @@ -286,7 +286,7 @@ func Test_DecodingExecuteReport(t *testing.T) { t.Run("decode Borsh encoded execute report", func(t *testing.T) { ocrReport := randomExecuteReport(t, 124615329519749607) - edc := ccipocr3.ExtraDataCodec(registeredMockExtraDataCodecMap) + edc := ccipocr3.ExtraDataCodecMap(registeredMockExtraDataCodecMap) cd := NewExecutePluginCodecV1(edc) encodedReport, err := cd.Encode(testutils.Context(t), ocrReport) require.NoError(t, err) diff --git a/core/capabilities/ccip/ccipsolana/gas_helpers.go b/core/capabilities/ccip/ccipsolana/gas_helpers.go index c3309e907a2..48813eec3aa 100644 --- a/core/capabilities/ccip/ccipsolana/gas_helpers.go +++ b/core/capabilities/ccip/ccipsolana/gas_helpers.go @@ -13,14 +13,14 @@ const ( DestGasOverhead = 350_000 // Commit and Exec costs ) -func NewGasEstimateProvider(codec ccipocr3.ExtraDataCodec) EstimateProvider { +func NewGasEstimateProvider(codec ccipocr3.ExtraDataCodecBundle) EstimateProvider { return EstimateProvider{ extraDataCodec: codec, } } type EstimateProvider struct { - extraDataCodec ccipocr3.ExtraDataCodec + extraDataCodec ccipocr3.ExtraDataCodecBundle } // CalculateMerkleTreeGas is not implemented diff --git a/core/capabilities/ccip/ccipsolana/gas_helpers_test.go b/core/capabilities/ccip/ccipsolana/gas_helpers_test.go index 011f483b49c..807bb3d8c80 100644 --- a/core/capabilities/ccip/ccipsolana/gas_helpers_test.go +++ b/core/capabilities/ccip/ccipsolana/gas_helpers_test.go @@ -56,7 +56,7 @@ func Test_calculateMessageMaxGas(t *testing.T) { } // Set the source chain selector to be EVM for now msg.Header.SourceChainSelector = ccipocr3.ChainSelector(chainsel.SOLANA_TESTNET.Selector) - edc := ccipocr3.ExtraDataCodec(map[string]ccipocr3.SourceChainExtraDataCodec{ + edc := ccipocr3.ExtraDataCodecMap(map[string]ccipocr3.SourceChainExtraDataCodec{ chainsel.FamilyEVM: ccipevm.ExtraDataDecoder{}, chainsel.FamilySolana: ExtraDataDecoder{}, }) @@ -100,7 +100,7 @@ func TestCalculateMaxGas(t *testing.T) { } msg.Header.SourceChainSelector = ccipocr3.ChainSelector(chainsel.SOLANA_TESTNET.Selector) - edc := ccipocr3.ExtraDataCodec(map[string]ccipocr3.SourceChainExtraDataCodec{ + edc := ccipocr3.ExtraDataCodecMap(map[string]ccipocr3.SourceChainExtraDataCodec{ chainsel.FamilyEVM: ccipevm.ExtraDataDecoder{}, chainsel.FamilySolana: ExtraDataDecoder{}, }) diff --git a/core/capabilities/ccip/ccipsolana/msghasher.go b/core/capabilities/ccip/ccipsolana/msghasher.go index 21848c00303..5fd8992916d 100644 --- a/core/capabilities/ccip/ccipsolana/msghasher.go +++ b/core/capabilities/ccip/ccipsolana/msghasher.go @@ -8,6 +8,7 @@ import ( "github.com/ethereum/go-ethereum/common/hexutil" "github.com/gagliardetto/solana-go" + "github.com/smartcontractkit/chainlink-common/pkg/types/ccipocr3" "github.com/smartcontractkit/chainlink-ccip/chains/solana/gobindings/latest/ccip_offramp" @@ -21,7 +22,7 @@ import ( // - "OnRamp 1.6.0-dev" type MessageHasherV1 struct { lggr logger.Logger - extraDataCodec ccipocr3.ExtraDataCodec + extraDataCodec ccipocr3.ExtraDataCodecBundle } type extraData struct { @@ -30,7 +31,7 @@ type extraData struct { tokenReceiver solana.PublicKey } -func NewMessageHasherV1(lggr logger.Logger, extraDataCodec ccipocr3.ExtraDataCodec) *MessageHasherV1 { +func NewMessageHasherV1(lggr logger.Logger, extraDataCodec ccipocr3.ExtraDataCodecBundle) *MessageHasherV1 { return &MessageHasherV1{ lggr: lggr, extraDataCodec: extraDataCodec, diff --git a/core/capabilities/ccip/ccipsolana/msghasher_test.go b/core/capabilities/ccip/ccipsolana/msghasher_test.go index 838e3ccb5bd..17f78835af6 100644 --- a/core/capabilities/ccip/ccipsolana/msghasher_test.go +++ b/core/capabilities/ccip/ccipsolana/msghasher_test.go @@ -33,7 +33,7 @@ func TestMessageHasher_EVM2SVM(t *testing.T) { chainsel.FamilySolana: ExtraDataDecoder{}, chainsel.FamilySui: ccipaptos.ExtraDataDecoder{}, } - var extraDataCodec = ccipocr3.ExtraDataCodec(registeredExtraDataCodecMap) + var extraDataCodec = ccipocr3.ExtraDataCodecMap(registeredExtraDataCodecMap) any2AnyMsg, any2SolanaMsg, msgAccounts := createEVM2SolanaMessages(t) msgHasher := NewMessageHasherV1(logger.Test(t), extraDataCodec) actualHash, err := msgHasher.Hash(testutils.Context(t), any2AnyMsg) @@ -67,7 +67,7 @@ func TestMessageHasher_InvalidReceiver(t *testing.T) { chainsel.FamilySolana: mockExtraDataCodec, } - edc := ccipocr3.ExtraDataCodec(registeredMockExtraDataCodecMap) + edc := ccipocr3.ExtraDataCodecMap(registeredMockExtraDataCodecMap) msgHasher := NewMessageHasherV1(logger.Test(t), edc) _, err := msgHasher.Hash(testutils.Context(t), any2AnyMsg) require.Error(t, err) @@ -96,7 +96,7 @@ func TestMessageHasher_InvalidDestinationTokenAddress(t *testing.T) { chainsel.FamilyEVM: mockExtraDataCodec, chainsel.FamilySolana: mockExtraDataCodec, } - edc := ccipocr3.ExtraDataCodec(registeredMockExtraDataCodecMap) + edc := ccipocr3.ExtraDataCodecMap(registeredMockExtraDataCodecMap) msgHasher := NewMessageHasherV1(logger.Test(t), edc) _, err := msgHasher.Hash(testutils.Context(t), any2AnyMsg) require.Error(t, err) diff --git a/core/capabilities/ccip/ccipsolana/pluginconfig.go b/core/capabilities/ccip/ccipsolana/pluginconfig.go index 142f96da93b..614dfb247ae 100644 --- a/core/capabilities/ccip/ccipsolana/pluginconfig.go +++ b/core/capabilities/ccip/ccipsolana/pluginconfig.go @@ -2,6 +2,7 @@ package ccipsolana import ( chainsel "github.com/smartcontractkit/chain-selectors" + "github.com/smartcontractkit/chainlink-common/pkg/types/ccipocr3" "github.com/smartcontractkit/chainlink-ccip/pkg/consts" @@ -12,7 +13,7 @@ import ( ) // InitializePluginConfig returns a pluginConfig for Solana chains. -func InitializePluginConfig(lggr logger.Logger, extraDataCodec ccipocr3.ExtraDataCodec) ccipcommon.PluginConfig { +func InitializePluginConfig(lggr logger.Logger, extraDataCodec ccipocr3.ExtraDataCodecBundle) ccipcommon.PluginConfig { return ccipcommon.PluginConfig{ CommitPluginCodec: NewCommitPluginCodecV1(), ExecutePluginCodec: NewExecutePluginCodecV1(extraDataCodec), diff --git a/core/capabilities/ccip/ccipsui/msghasher.go b/core/capabilities/ccip/ccipsui/msghasher.go index 6029687cc67..b1b151bbd10 100644 --- a/core/capabilities/ccip/ccipsui/msghasher.go +++ b/core/capabilities/ccip/ccipsui/msghasher.go @@ -31,7 +31,7 @@ var ( // Compatible with ccip::offramp version 1.6.0 type MessageHasherV1 struct { lggr logger.Logger - extraDataCodec ccipocr3common.ExtraDataCodec + extraDataCodec ccipocr3common.ExtraDataCodecBundle } type any2SuiTokenTransfer struct { @@ -42,7 +42,7 @@ type any2SuiTokenTransfer struct { Amount *big.Int } -func NewMessageHasherV1(lggr logger.Logger, extraDataCodec ccipocr3common.ExtraDataCodec) *MessageHasherV1 { +func NewMessageHasherV1(lggr logger.Logger, extraDataCodec ccipocr3common.ExtraDataCodecBundle) *MessageHasherV1 { return &MessageHasherV1{ lggr: lggr, extraDataCodec: extraDataCodec, diff --git a/core/capabilities/ccip/ccipton/pluginconfig.go b/core/capabilities/ccip/ccipton/pluginconfig.go index ccb9d7c650f..d67a5aa00dc 100644 --- a/core/capabilities/ccip/ccipton/pluginconfig.go +++ b/core/capabilities/ccip/ccipton/pluginconfig.go @@ -2,6 +2,7 @@ package ccipton import ( chainsel "github.com/smartcontractkit/chain-selectors" + "github.com/smartcontractkit/chainlink-common/pkg/types/ccipocr3" "github.com/smartcontractkit/chainlink-ton/pkg/ccip/codec" @@ -10,7 +11,7 @@ import ( ) // InitializePluginConfig returns a pluginConfig for TON chains. -func InitializePluginConfig(lggr logger.Logger, extraDataCodec ccipocr3.ExtraDataCodec) ccipcommon.PluginConfig { +func InitializePluginConfig(lggr logger.Logger, extraDataCodec ccipocr3.ExtraDataCodecBundle) ccipcommon.PluginConfig { return ccipcommon.PluginConfig{ AddressCodec: codec.NewAddressCodec(), CommitPluginCodec: codec.NewCommitPluginCodecV1(), diff --git a/core/capabilities/ccip/common/addresscodec.go b/core/capabilities/ccip/common/addresscodec.go index 2122ac51e04..15c80a52e61 100644 --- a/core/capabilities/ccip/common/addresscodec.go +++ b/core/capabilities/ccip/common/addresscodec.go @@ -1,82 +1,7 @@ package common import ( - "fmt" - - chainsel "github.com/smartcontractkit/chain-selectors" - cciptypes "github.com/smartcontractkit/chainlink-ccip/pkg/types/ccipocr3" + cciptypes "github.com/smartcontractkit/chainlink-common/pkg/types/ccipocr3" ) -var _ cciptypes.AddressCodec = &AddressCodec{} - -// AddressCodec is a struct that holds the chain specific address codecs and -// implements a superset of the cciptypes.AddressCodec interface. -type AddressCodec struct { - registeredAddressCodecMap map[string]ChainSpecificAddressCodec -} - -// NewAddressCodec is a constructor for NewAddressCodec -func NewAddressCodec(registeredMap map[string]ChainSpecificAddressCodec) AddressCodec { - return AddressCodec{ - registeredAddressCodecMap: registeredMap, - } -} - -// AddressBytesToString converts an address from bytes to string -func (ac AddressCodec) AddressBytesToString(addr cciptypes.UnknownAddress, chainSelector cciptypes.ChainSelector) (string, error) { - family, err := chainsel.GetSelectorFamily(uint64(chainSelector)) - if err != nil { - return "", fmt.Errorf("failed to get chain family for selector %d: %w", chainSelector, err) - } - - codec, exist := ac.registeredAddressCodecMap[family] - if !exist { - return "", fmt.Errorf("unsupported family for address decode type %s", family) - } - - return codec.AddressBytesToString(addr) -} - -// TransmitterBytesToString converts a transmitter account from bytes to string -func (ac AddressCodec) TransmitterBytesToString(addr cciptypes.UnknownAddress, chainSelector cciptypes.ChainSelector) (string, error) { - family, err := chainsel.GetSelectorFamily(uint64(chainSelector)) - if err != nil { - return "", fmt.Errorf("failed to get chain family for selector %d: %w", chainSelector, err) - } - - codec, exist := ac.registeredAddressCodecMap[family] - if !exist { - return "", fmt.Errorf("unsupported family for transmitter decode type %s", family) - } - - return codec.TransmitterBytesToString(addr) -} - -// AddressStringToBytes converts an address from string to bytes -func (ac AddressCodec) AddressStringToBytes(addr string, chainSelector cciptypes.ChainSelector) (cciptypes.UnknownAddress, error) { - family, err := chainsel.GetSelectorFamily(uint64(chainSelector)) - if err != nil { - return nil, fmt.Errorf("failed to get chain family for selector %d: %w", chainSelector, err) - } - codec, exist := ac.registeredAddressCodecMap[family] - if !exist { - return nil, fmt.Errorf("unsupported family for address decode type %s", family) - } - - return codec.AddressStringToBytes(addr) -} - -// OracleIDAsAddressBytes returns valid address bytes for a given chain selector and oracle ID. -// Used for making nil transmitters in the OCR config valid, it just means that this oracle does not support the destination chain. -func (ac AddressCodec) OracleIDAsAddressBytes(oracleID uint8, chainSelector cciptypes.ChainSelector) ([]byte, error) { - family, err := chainsel.GetSelectorFamily(uint64(chainSelector)) - if err != nil { - return nil, fmt.Errorf("failed to get chain family for selector %d: %w", chainSelector, err) - } - codec, exist := ac.registeredAddressCodecMap[family] - if !exist { - return nil, fmt.Errorf("unsupported family for address decode type %s", family) - } - - return codec.OracleIDAsAddressBytes(oracleID) -} +type AddressCodec = cciptypes.AddressCodecMap diff --git a/core/capabilities/ccip/common/addresscodecregistry.go b/core/capabilities/ccip/common/addresscodecregistry.go new file mode 100644 index 00000000000..cf159c3fb30 --- /dev/null +++ b/core/capabilities/ccip/common/addresscodecregistry.go @@ -0,0 +1,101 @@ +package common + +import ( + "sync" + + cciptypes "github.com/smartcontractkit/chainlink-common/pkg/types/ccipocr3" +) + +// Ensure AddressCodecRegistry implements the AddressCodecBundle interface +var _ cciptypes.AddressCodecBundle = (*AddressCodecRegistry)(nil) + +// AddressCodecRegistry is a singleton registry that manages ChainSpecificAddressCodec instances +// for different chain families. It implements the AddressCodecBundle interface +// by delegating to the existing AddressCodec implementation. +// +// Terminology: +// - "AddressCodecRegistry": refers to the entire singleton registry instance. It both maintains the map of +// chain family to codec and provides thread-safe access to it. +// - "AddressCodecBundle": is the interface that the registry implements +type AddressCodecRegistry struct { + addressCodec cciptypes.AddressCodecMap + mu sync.RWMutex +} + +var ( + addressRegistryInstance *AddressCodecRegistry + addressRegistryOnce sync.Once +) + +// GetAddressCodecRegistry returns the singleton instance of AddressCodecRegistry. This is only called +// in core node. +func GetAddressCodecRegistry() *AddressCodecRegistry { + addressRegistryOnce.Do(func() { + addressRegistryInstance = &AddressCodecRegistry{ + addressCodec: make(cciptypes.AddressCodecMap), + } + }) + return addressRegistryInstance +} + +// RegisterFamily registers a chain family with a no-op ChainSpecificAddressCodec if not already registered. +// This is used when we know which chain families we want to support but don't have a specific codec +// implementation initialized for it yet. +func (r *AddressCodecRegistry) RegisterFamily(chainFamily string) { + r.mu.Lock() + defer r.mu.Unlock() + if _, exists := r.addressCodec[chainFamily]; !exists { + r.addressCodec[chainFamily] = NoOpChainSpecificAddressCodec{} + } +} + +// RegisterCodec registers a ChainSpecificAddressCodec for a specific chain family +func (r *AddressCodecRegistry) RegisterCodec(chainFamily string, codec ChainSpecificAddressCodec) { + r.mu.Lock() + defer r.mu.Unlock() + r.addressCodec[chainFamily] = codec +} + +// ============ Implementation of AddressCodecBundle interface ============ + +func (r *AddressCodecRegistry) AddressBytesToString(addr cciptypes.UnknownAddress, chainSelector cciptypes.ChainSelector) (string, error) { + r.mu.RLock() + defer r.mu.RUnlock() + return r.addressCodec.AddressBytesToString(addr, chainSelector) +} + +func (r *AddressCodecRegistry) TransmitterBytesToString(addr cciptypes.UnknownAddress, chainSelector cciptypes.ChainSelector) (string, error) { + r.mu.RLock() + defer r.mu.RUnlock() + return r.addressCodec.TransmitterBytesToString(addr, chainSelector) +} + +func (r *AddressCodecRegistry) AddressStringToBytes(addr string, chainSelector cciptypes.ChainSelector) (cciptypes.UnknownAddress, error) { + r.mu.RLock() + defer r.mu.RUnlock() + return r.addressCodec.AddressStringToBytes(addr, chainSelector) +} + +func (r *AddressCodecRegistry) OracleIDAsAddressBytes(oracleID uint8, chainSelector cciptypes.ChainSelector) ([]byte, error) { + r.mu.RLock() + defer r.mu.RUnlock() + return r.addressCodec.OracleIDAsAddressBytes(oracleID, chainSelector) +} + +type NoOpChainSpecificAddressCodec struct{} + +func (n NoOpChainSpecificAddressCodec) AddressBytesToString(addr []byte) (string, error) { + return string(addr), nil +} + +func (n NoOpChainSpecificAddressCodec) AddressStringToBytes(addr string) ([]byte, error) { + return []byte(addr), nil +} + +func (n NoOpChainSpecificAddressCodec) OracleIDAsAddressBytes(oracleID uint8) ([]byte, error) { + return []byte{oracleID}, nil +} + +func (n NoOpChainSpecificAddressCodec) TransmitterBytesToString(addr []byte) (string, error) { + return string(addr), nil +} diff --git a/core/capabilities/ccip/common/extradatacodec.go b/core/capabilities/ccip/common/extradatacodec.go deleted file mode 100644 index 0e96523054d..00000000000 --- a/core/capabilities/ccip/common/extradatacodec.go +++ /dev/null @@ -1,52 +0,0 @@ -package common - -import ( - "fmt" - - chainsel "github.com/smartcontractkit/chain-selectors" - - cciptypes "github.com/smartcontractkit/chainlink-ccip/pkg/types/ccipocr3" -) - -// ExtraDataCodec is a map of chain family to SourceChainExtraDataCodec -type ExtraDataCodec map[string]SourceChainExtraDataCodec - -// DecodeExtraArgs reformats bytes into a chain agnostic map[string]any representation for extra args -func (c ExtraDataCodec) DecodeExtraArgs(extraArgs cciptypes.Bytes, sourceChainSelector cciptypes.ChainSelector) (map[string]any, error) { - if len(extraArgs) == 0 { - // return empty map if extraArgs is empty - return nil, nil - } - - family, err := chainsel.GetSelectorFamily(uint64(sourceChainSelector)) - if err != nil { - return nil, fmt.Errorf("failed to get chain family for selector %d: %w", sourceChainSelector, err) - } - - codec, exist := c[family] - if !exist { - return nil, fmt.Errorf("unsupported family for extra args type %s", family) - } - - return codec.DecodeExtraArgsToMap(extraArgs) -} - -// DecodeTokenAmountDestExecData reformats bytes to chain-agnostic map[string]any for tokenAmount DestExecData field -func (c ExtraDataCodec) DecodeTokenAmountDestExecData(destExecData cciptypes.Bytes, sourceChainSelector cciptypes.ChainSelector) (map[string]any, error) { - if len(destExecData) == 0 { - // return empty map if destExecData is empty - return nil, nil - } - - family, err := chainsel.GetSelectorFamily(uint64(sourceChainSelector)) - if err != nil { - return nil, fmt.Errorf("failed to get chain family for selector %d: %w", sourceChainSelector, err) - } - - codec, exist := c[family] - if !exist { - return nil, fmt.Errorf("unsupported family for extra args type %s", family) - } - - return codec.DecodeDestExecDataToMap(destExecData) -} diff --git a/core/capabilities/ccip/common/extradatacodecregistry.go b/core/capabilities/ccip/common/extradatacodecregistry.go new file mode 100644 index 00000000000..2289e3db4fc --- /dev/null +++ b/core/capabilities/ccip/common/extradatacodecregistry.go @@ -0,0 +1,93 @@ +package common + +import ( + "sync" + + cciptypes "github.com/smartcontractkit/chainlink-common/pkg/types/ccipocr3" +) + +// Ensure ExtraDataCodecRegistry implements the ExtraDataCodecBundle interface from chainlink-common +var _ cciptypes.ExtraDataCodecBundle = (*ExtraDataCodecRegistry)(nil) + +// ExtraDataCodecRegistry is a singleton registry that manages SourceChainExtraDataCodec instances +// for different chain families. It implements the ExtraDataCodecBundle interface from chainlink-common +// by delegating to the existing ExtraDataCodec implementation. +// +// Terminology: +// - "ExtraDataCodecRegistry": refers to the entire singleton registry instance. It both maintains the map of +// chain family to codec and provides thread-safe access to it. +// - "ExtraDataCodecBundle": is the interface defined in chainlink-common that the registry implements and that +// can be called over gRPC. +type ExtraDataCodecRegistry struct { + extraDataCodec cciptypes.ExtraDataCodecMap + mu sync.RWMutex +} + +var ( + registryInstance *ExtraDataCodecRegistry + registryOnce sync.Once +) + +// GetExtraDataCodecRegistry returns the singleton instance of ExtraDataCodecRegistry. This is only called +// in core node. +func GetExtraDataCodecRegistry() *ExtraDataCodecRegistry { + registryOnce.Do(func() { + registryInstance = &ExtraDataCodecRegistry{ + extraDataCodec: make(cciptypes.ExtraDataCodecMap), + } + }) + return registryInstance +} + +// RegisterFamily registers a chain family with a no-op SourceChainExtraDataCodec if not already registered. +// This is used when we know which chain families we want to support but don't have a specific codec +// implementation initialized for it yet. This should only be called from core node, not over gRPC. +func (r *ExtraDataCodecRegistry) RegisterFamily(chainFamily string) { + r.mu.Lock() + defer r.mu.Unlock() + if _, exists := r.extraDataCodec[chainFamily]; !exists { + r.extraDataCodec[chainFamily] = NoOpSourceChainExtraDataCodec{} + } +} + +// RegisterCodec registers a SourceChainExtraDataCodec for a specific chain family and is only called +// within core node, not over gRPC. +func (r *ExtraDataCodecRegistry) RegisterCodec(chainFamily string, codec SourceChainExtraDataCodec) { + r.mu.Lock() + defer r.mu.Unlock() + r.extraDataCodec[chainFamily] = codec +} + +// ============ gRPC-compatible implementation of ExtraDataCodecBundle interface ============ + +// DecodeExtraArgs can be called either over gRPC or not. It is used to decode extra args for a specific +// source chain family +func (r *ExtraDataCodecRegistry) DecodeExtraArgs( + extraArgs cciptypes.Bytes, + sourceChainSelector cciptypes.ChainSelector, +) (map[string]any, error) { + r.mu.RLock() + defer r.mu.RUnlock() + return r.extraDataCodec.DecodeExtraArgs(extraArgs, sourceChainSelector) +} + +// DecodeTokenAmountDestExecData can be called either over gRPC or not. It is used to decode dest exec +// data for a specific source chain family. +func (r *ExtraDataCodecRegistry) DecodeTokenAmountDestExecData( + destExecData cciptypes.Bytes, + sourceChainSelector cciptypes.ChainSelector, +) (map[string]any, error) { + r.mu.RLock() + defer r.mu.RUnlock() + return r.extraDataCodec.DecodeTokenAmountDestExecData(destExecData, sourceChainSelector) +} + +type NoOpSourceChainExtraDataCodec struct{} + +func (n NoOpSourceChainExtraDataCodec) DecodeExtraArgsToMap(extraArgs cciptypes.Bytes) (map[string]any, error) { + return make(map[string]any), nil +} + +func (n NoOpSourceChainExtraDataCodec) DecodeDestExecDataToMap(destExecData cciptypes.Bytes) (map[string]any, error) { + return make(map[string]any), nil +} diff --git a/core/capabilities/ccip/common/pluginconfig.go b/core/capabilities/ccip/common/pluginconfig.go index 016e38e9907..3214b67cdfd 100644 --- a/core/capabilities/ccip/common/pluginconfig.go +++ b/core/capabilities/ccip/common/pluginconfig.go @@ -4,7 +4,6 @@ import ( "fmt" "maps" - cciptypes "github.com/smartcontractkit/chainlink-ccip/pkg/types/ccipocr3" "github.com/smartcontractkit/chainlink-common/pkg/logger" "github.com/smartcontractkit/chainlink-common/pkg/types/ccipocr3" cctypes "github.com/smartcontractkit/chainlink/v2/core/capabilities/ccip/types" @@ -12,12 +11,12 @@ import ( // PluginConfig holds the configuration for a plugin. type PluginConfig struct { - CommitPluginCodec cciptypes.CommitPluginCodec - ExecutePluginCodec cciptypes.ExecutePluginCodec - MessageHasher cciptypes.MessageHasher - TokenDataEncoder cciptypes.TokenDataEncoder - GasEstimateProvider cciptypes.EstimateProvider - RMNCrypto cciptypes.RMNCrypto + CommitPluginCodec ccipocr3.CommitPluginCodec + ExecutePluginCodec ccipocr3.ExecutePluginCodec + MessageHasher ccipocr3.MessageHasher + TokenDataEncoder ccipocr3.TokenDataEncoder + GasEstimateProvider ccipocr3.EstimateProvider + RMNCrypto ccipocr3.RMNCrypto ContractTransmitterFactory cctypes.ContractTransmitterFactory // PriceOnlyCommitFn optional method override for price only commit reports. PriceOnlyCommitFn string @@ -30,14 +29,12 @@ type PluginConfig struct { // PluginServices aggregates services for a specific chain family. type PluginServices struct { PluginConfig PluginConfig - AddrCodec AddressCodec - ExtraDataCodec ccipocr3.ExtraDataCodec ChainRW MultiChainRW CCIPProviderSupported map[string]bool } // InitFunction defines a function to initialize a PluginConfig. -type InitFunction func(logger.Logger, ccipocr3.ExtraDataCodec) PluginConfig +type InitFunction func(logger.Logger, ccipocr3.ExtraDataCodecBundle) PluginConfig var registeredFactories = make(map[string]InitFunction) @@ -53,22 +50,26 @@ func GetPluginServices(lggr logger.Logger, chainFamily string) (PluginServices, return PluginServices{}, fmt.Errorf("unsupported chain family: %s (available: %v)", chainFamily, maps.Keys(registeredFactories)) } - pluginServices := PluginServices{ - ExtraDataCodec: make(ccipocr3.ExtraDataCodec), // lazy initialize it after factory init call - } - - addressCodecMap := make(map[string]ChainSpecificAddressCodec) + pluginServices := PluginServices{} + extraDataCodecRegistry := GetExtraDataCodecRegistry() + addressCodecRegistry := GetAddressCodecRegistry() chainRWProviderMap := make(map[string]ChainRWProvider) CCIPProviderSupported := make(map[string]bool) for family, initFunc := range registeredFactories { - config := initFunc(lggr, pluginServices.ExtraDataCodec) + config := initFunc(lggr, GetExtraDataCodecRegistry()) CCIPProviderSupported[family] = config.CCIPProviderSupported - if config.AddressCodec != nil { - addressCodecMap[family] = config.AddressCodec - } + + // Add all families to the registries. If the codecs are provided by the config, set them here, otherwise + // ccipProvider will set them later in the oracle creator. + extraDataCodecRegistry.RegisterFamily(family) + addressCodecRegistry.RegisterFamily(family) + if config.ExtraDataCodec != nil { - pluginServices.ExtraDataCodec[family] = config.ExtraDataCodec // initialize and update it with the map + extraDataCodecRegistry.RegisterCodec(family, config.ExtraDataCodec) + } + if config.AddressCodec != nil { + addressCodecRegistry.RegisterCodec(family, config.AddressCodec) } if config.ChainRW != nil { chainRWProviderMap[family] = config.ChainRW @@ -78,7 +79,6 @@ func GetPluginServices(lggr logger.Logger, chainFamily string) (PluginServices, } } - pluginServices.AddrCodec = NewAddressCodec(addressCodecMap) pluginServices.ChainRW = NewCRCW(chainRWProviderMap) pluginServices.CCIPProviderSupported = CCIPProviderSupported return pluginServices, nil diff --git a/core/capabilities/ccip/delegate.go b/core/capabilities/ccip/delegate.go index 56067bfcdf1..eebf19330fc 100644 --- a/core/capabilities/ccip/delegate.go +++ b/core/capabilities/ccip/delegate.go @@ -17,13 +17,13 @@ import ( "github.com/smartcontractkit/chainlink-common/pkg/loop" "github.com/smartcontractkit/chainlink-common/pkg/sqlutil" "github.com/smartcontractkit/chainlink-common/pkg/types" + "github.com/smartcontractkit/chainlink-common/pkg/types/ccipocr3" "github.com/smartcontractkit/chainlink-common/pkg/types/query/primitives" + chainsel "github.com/smartcontractkit/chain-selectors" + "github.com/smartcontractkit/chainlink-ccip/pkg/consts" ccipreaderpkg "github.com/smartcontractkit/chainlink-ccip/pkg/reader" - cciptypes "github.com/smartcontractkit/chainlink-ccip/pkg/types/ccipocr3" - - chainsel "github.com/smartcontractkit/chain-selectors" kcr "github.com/smartcontractkit/chainlink-evm/gethwrappers/keystone/generated/capabilities_registry_1_1_0" "github.com/smartcontractkit/chainlink-evm/pkg/config/toml" @@ -214,11 +214,6 @@ func (d *Delegate) ServicesForSpec(ctx context.Context, spec job.Job) (services return nil, fmt.Errorf("failed to get chain selector from chain ID %d", homeChainChainID) } - pluginServices, err := common.GetPluginServices(d.lggr, d.capabilityConfig.ExternalRegistry().RelayID().Network) - if err != nil { - return nil, err - } - // if bootstrappers are provided we assume that the node is a plugin oracle. // the reason for this is that bootstrap oracles do not need to be aware // of other bootstrap oracles. however, plugin oracles, at least initially, @@ -239,8 +234,7 @@ func (d *Delegate) ServicesForSpec(ctx context.Context, spec job.Job) (services d.monitoringEndpointGen, bootstrapperLocators, hcr, - cciptypes.ChainSelector(homeChainChainSelector), - pluginServices.AddrCodec, + ccipocr3.ChainSelector(homeChainChainSelector), p2pID, ) } else { @@ -251,7 +245,6 @@ func (d *Delegate) ServicesForSpec(ctx context.Context, spec job.Job) (services d.monitoringEndpointGen, d.lggr, homeChainContractReader, - pluginServices.AddrCodec, ) } diff --git a/core/capabilities/ccip/ocrimpls/aptos_contract_transmitter_factory.go b/core/capabilities/ccip/ocrimpls/aptos_contract_transmitter_factory.go index 6e47c27bbd2..24da59cc4f7 100644 --- a/core/capabilities/ccip/ocrimpls/aptos_contract_transmitter_factory.go +++ b/core/capabilities/ccip/ocrimpls/aptos_contract_transmitter_factory.go @@ -26,10 +26,10 @@ type AptosExecCallArgs struct { // AptosContractTransmitterFactory implements the transmitter factory for Aptos chains. type AptosContractTransmitterFactory struct { - extraDataCodec ccipocr3.ExtraDataCodec + extraDataCodec ccipocr3.ExtraDataCodecBundle } -func NewAptosContractTransmitterFactory(extraDataCodec ccipocr3.ExtraDataCodec) *AptosContractTransmitterFactory { +func NewAptosContractTransmitterFactory(extraDataCodec ccipocr3.ExtraDataCodecBundle) *AptosContractTransmitterFactory { return &AptosContractTransmitterFactory{ extraDataCodec: extraDataCodec, } @@ -41,7 +41,7 @@ func NewAptosCommitCalldataFunc(commitMethod string) ToEd25519CalldataFunc { rawReportCtx [2][32]byte, report ocr3types.ReportWithInfo[[]byte], signatures [][96]byte, - _ ccipocr3.ExtraDataCodec, + _ ccipocr3.ExtraDataCodecBundle, ) (string, string, any, error) { return consts.ContractNameOffRamp, commitMethod, @@ -77,7 +77,7 @@ var AptosExecCallDataFunc = func( rawReportCtx [2][32]byte, report ocr3types.ReportWithInfo[[]byte], signatures [][96]byte, - _ ccipocr3.ExtraDataCodec, + _ ccipocr3.ExtraDataCodecBundle, ) (contract string, method string, args any, err error) { return consts.ContractNameOffRamp, consts.MethodExecute, diff --git a/core/capabilities/ccip/ocrimpls/config_tracker.go b/core/capabilities/ccip/ocrimpls/config_tracker.go index e1ac90b55f6..44ff75773cf 100644 --- a/core/capabilities/ccip/ocrimpls/config_tracker.go +++ b/core/capabilities/ccip/ocrimpls/config_tracker.go @@ -4,22 +4,21 @@ import ( "context" "fmt" - ccipcommon "github.com/smartcontractkit/chainlink/v2/core/capabilities/ccip/common" cctypes "github.com/smartcontractkit/chainlink/v2/core/capabilities/ccip/types" "github.com/smartcontractkit/libocr/offchainreporting2plus/ocr3confighelper" "github.com/smartcontractkit/libocr/offchainreporting2plus/types" - "github.com/smartcontractkit/chainlink-ccip/pkg/types/ccipocr3" + ccipcommontypes "github.com/smartcontractkit/chainlink-common/pkg/types/ccipocr3" ) type configTracker struct { cfg cctypes.OCR3ConfigWithMeta - addressCodec ccipcommon.AddressCodec + addressCodec ccipcommontypes.AddressCodecBundle contractConfig types.ContractConfig } -func NewConfigTracker(cfg cctypes.OCR3ConfigWithMeta, addressCodec ccipcommon.AddressCodec) (*configTracker, error) { +func NewConfigTracker(cfg cctypes.OCR3ConfigWithMeta, addressCodec ccipcommontypes.AddressCodecBundle) (*configTracker, error) { contractConfig, err := contractConfigFromOCRConfig(cfg, addressCodec) if err != nil { return nil, fmt.Errorf("failed to create contract config from ocr config: %w", err) @@ -51,7 +50,7 @@ func (c *configTracker) Notify() <-chan struct{} { return nil } -func contractConfigFromOCRConfig(cfg cctypes.OCR3ConfigWithMeta, addressCodec ccipcommon.AddressCodec) (types.ContractConfig, error) { +func contractConfigFromOCRConfig(cfg cctypes.OCR3ConfigWithMeta, addressCodec ccipcommontypes.AddressCodecBundle) (types.ContractConfig, error) { var signers [][]byte var transmitters [][]byte var err error @@ -105,7 +104,7 @@ func toOnchainPublicKeys(signers [][]byte) []types.OnchainPublicKey { return keys } -func toOCRAccounts(transmitters [][]byte, addressCodec ccipcommon.AddressCodec, chainSelector ccipocr3.ChainSelector) ([]types.Account, error) { +func toOCRAccounts(transmitters [][]byte, addressCodec ccipcommontypes.AddressCodecBundle, chainSelector ccipcommontypes.ChainSelector) ([]types.Account, error) { accounts := make([]types.Account, len(transmitters)) for i, transmitter := range transmitters { address, err := addressCodec.TransmitterBytesToString(transmitter, chainSelector) diff --git a/core/capabilities/ccip/ocrimpls/contract_transmitter.go b/core/capabilities/ccip/ocrimpls/contract_transmitter.go index 4908732e00b..37a96aafd10 100644 --- a/core/capabilities/ccip/ocrimpls/contract_transmitter.go +++ b/core/capabilities/ccip/ocrimpls/contract_transmitter.go @@ -7,6 +7,7 @@ import ( "math/big" "github.com/google/uuid" + "github.com/smartcontractkit/chainlink-common/pkg/types/ccipocr3" "github.com/smartcontractkit/libocr/offchainreporting2/chains/evmutil" @@ -28,7 +29,7 @@ type ToCalldataFunc func( report ocr3types.ReportWithInfo[[]byte], rs, ss [][32]byte, vs [32]byte, - codec ccipocr3.ExtraDataCodec, + codec ccipocr3.ExtraDataCodecBundle, ) (contract string, method string, args any, err error) // ToEd25519CalldataFunc is a function that takes in the OCR3 report and Ed25519 signature data and processes them. @@ -40,7 +41,7 @@ type ToEd25519CalldataFunc func( rawReportCtx [2][32]byte, report ocr3types.ReportWithInfo[[]byte], signatures [][96]byte, - codec ccipocr3.ExtraDataCodec, + codec ccipocr3.ExtraDataCodecBundle, ) (contract string, method string, args any, err error) var _ ocr3types.ContractTransmitter[[]byte] = &ccipTransmitter{} @@ -51,7 +52,7 @@ type ccipTransmitter struct { offrampAddress string toCalldataFn ToCalldataFunc toEd25519CalldataFn ToEd25519CalldataFunc - extraDataCodec ccipocr3.ExtraDataCodec + extraDataCodec ccipocr3.ExtraDataCodecBundle lggr logger.Logger } @@ -68,7 +69,7 @@ func XXXNewContractTransmitterTestsOnly( report ocr3types.ReportWithInfo[[]byte], rs, ss [][32]byte, vs [32]byte, - extraDataCodec ccipocr3.ExtraDataCodec) (string, string, any, error) { + extraDataCodec ccipocr3.ExtraDataCodecBundle) (string, string, any, error) { _, _, args, err := toCalldataFn(rawReportCtx, report, rs, ss, vs, extraDataCodec) return contractName, method, args, err } diff --git a/core/capabilities/ccip/ocrimpls/contract_transmitter_test.go b/core/capabilities/ccip/ocrimpls/contract_transmitter_test.go index 6ed9b52e77f..76cdcb5895d 100644 --- a/core/capabilities/ccip/ocrimpls/contract_transmitter_test.go +++ b/core/capabilities/ccip/ocrimpls/contract_transmitter_test.go @@ -191,7 +191,7 @@ func abiEncodeUint32(data uint32) ([]byte, error) { // Test EVM -> SVM extra data decoding in contract transmitter func TestSVMExecCallDataFuncExtraDataDecoding(t *testing.T) { - extraDataCodec := ccipocr3.ExtraDataCodec(map[string]ccipocr3.SourceChainExtraDataCodec{ + extraDataCodec := ccipocr3.ExtraDataCodecMap(map[string]ccipocr3.SourceChainExtraDataCodec{ chainsel.FamilyEVM: ccipevm.ExtraDataDecoder{}, chainsel.FamilySolana: ccipsolana.ExtraDataDecoder{}, }) diff --git a/core/capabilities/ccip/ocrimpls/evm_contract_transmitter_factory.go b/core/capabilities/ccip/ocrimpls/evm_contract_transmitter_factory.go index 8b671bbe4e2..6e15042d3af 100644 --- a/core/capabilities/ccip/ocrimpls/evm_contract_transmitter_factory.go +++ b/core/capabilities/ccip/ocrimpls/evm_contract_transmitter_factory.go @@ -34,11 +34,11 @@ type EVMExecCallArgs struct { // EVMContractTransmitterFactory implements the transmitter factory for EVM chains. type EVMContractTransmitterFactory struct { - extraDataCodec ccipocr3.ExtraDataCodec + extraDataCodec ccipocr3.ExtraDataCodecBundle } // NewEVMContractTransmitterFactory returns a new EVMContractTransmitterFactory. -func NewEVMContractTransmitterFactory(extraDataCodec ccipocr3.ExtraDataCodec) *EVMContractTransmitterFactory { +func NewEVMContractTransmitterFactory(extraDataCodec ccipocr3.ExtraDataCodecBundle) *EVMContractTransmitterFactory { return &EVMContractTransmitterFactory{ extraDataCodec: extraDataCodec, } @@ -50,7 +50,7 @@ var EVMExecCallDataFunc = func( report ocr3types.ReportWithInfo[[]byte], _, _ [][32]byte, _ [32]byte, - _ ccipocr3.ExtraDataCodec, + _ ccipocr3.ExtraDataCodecBundle, ) (contract string, method string, args any, err error) { return consts.ContractNameOffRamp, consts.MethodExecute, @@ -67,7 +67,7 @@ func NewEVMCommitCalldataFunc(commitMethod string) ToCalldataFunc { report ocr3types.ReportWithInfo[[]byte], rs, ss [][32]byte, vs [32]byte, - _ ccipocr3.ExtraDataCodec, + _ ccipocr3.ExtraDataCodecBundle, ) (string, string, any, error) { return consts.ContractNameOffRamp, commitMethod, diff --git a/core/capabilities/ccip/ocrimpls/no_op_contract_transmitter_factory.go b/core/capabilities/ccip/ocrimpls/no_op_contract_transmitter_factory.go index 7e5e0a54fd5..aa4f14da1c2 100644 --- a/core/capabilities/ccip/ocrimpls/no_op_contract_transmitter_factory.go +++ b/core/capabilities/ccip/ocrimpls/no_op_contract_transmitter_factory.go @@ -11,16 +11,14 @@ import ( "github.com/smartcontractkit/chainlink-ccip/pkg/consts" "github.com/smartcontractkit/chainlink-common/pkg/logger" "github.com/smartcontractkit/chainlink-common/pkg/types" - - ccipcommon "github.com/smartcontractkit/chainlink/v2/core/capabilities/ccip/common" ) type contractTransmitterFactory struct { - extraDataCodec ccipocr3.ExtraDataCodec + extraDataCodec ccipocr3.ExtraDataCodecBundle } // NewContractTransmitterFactory constructs a Noop transmitter. -func NewContractTransmitterFactory(extraDataCodec ccipocr3.ExtraDataCodec) cciptypes.ContractTransmitterFactory { +func NewContractTransmitterFactory(extraDataCodec ccipocr3.ExtraDataCodecBundle) cciptypes.ContractTransmitterFactory { return &contractTransmitterFactory{ extraDataCodec: extraDataCodec, } @@ -68,7 +66,7 @@ func NewNoopCommitCalldataFunc(commitMethod string) ToCalldataFunc { _report ocr3types.ReportWithInfo[[]byte], _rs, _ss [][32]byte, _vs [32]byte, - _ ccipocr3.ExtraDataCodec, + _ ccipocr3.ExtraDataCodecBundle, ) (string, string, any, error) { return consts.ContractNameOffRamp, commitMethod, @@ -83,7 +81,7 @@ var NoopExecCallDataFunc = func( _report ocr3types.ReportWithInfo[[]byte], _, _ [][32]byte, _ [32]byte, - _ ccipcommon.ExtraDataCodec, + _ ccipocr3.ExtraDataCodecBundle, ) (contract string, method string, args any, err error) { return consts.ContractNameOffRamp, consts.MethodExecute, diff --git a/core/capabilities/ccip/ocrimpls/sui_contract_transmitter_factory.go b/core/capabilities/ccip/ocrimpls/sui_contract_transmitter_factory.go index f2201b86f87..d0eeb74c6f8 100644 --- a/core/capabilities/ccip/ocrimpls/sui_contract_transmitter_factory.go +++ b/core/capabilities/ccip/ocrimpls/sui_contract_transmitter_factory.go @@ -32,10 +32,10 @@ type SuiExecCallArgs struct { // SuiContractTransmitterFactory implements the transmitter factory for Sui chains. type SuiContractTransmitterFactory struct { - extraDataCodec ccipocr3.ExtraDataCodec + extraDataCodec ccipocr3.ExtraDataCodecBundle } -func NewSuiContractTransmitterFactory(extraDataCodec ccipocr3.ExtraDataCodec) *SuiContractTransmitterFactory { +func NewSuiContractTransmitterFactory(extraDataCodec ccipocr3.ExtraDataCodecBundle) *SuiContractTransmitterFactory { return &SuiContractTransmitterFactory{ extraDataCodec: extraDataCodec, } @@ -47,7 +47,7 @@ func NewSuiCommitCalldataFunc(commitMethod string) ToEd25519CalldataFunc { rawReportCtx [2][32]byte, report ocr3types.ReportWithInfo[[]byte], signatures [][96]byte, - _ ccipocr3.ExtraDataCodec, + _ ccipocr3.ExtraDataCodecBundle, ) (string, string, any, error) { return consts.ContractNameOffRamp, commitMethod, @@ -83,7 +83,7 @@ var SuiExecCallDataFunc = func( rawReportCtx [2][32]byte, report ocr3types.ReportWithInfo[[]byte], signatures [][96]byte, - extraDataCodec ccipocr3.ExtraDataCodec, + extraDataCodec ccipocr3.ExtraDataCodecBundle, ) (contract string, method string, args any, err error) { var info ccipocr3.ExecuteReportInfo var extraDataDecoded ccipcommon.ExtraDataDecoded @@ -127,7 +127,7 @@ func (f *SuiContractTransmitterFactory) NewExecTransmitter( } // decodeExecData decodes the extra data from an execute report. -func decodeExecDataSui(report ccipocr3.ExecuteReportInfo, codec ccipocr3.ExtraDataCodec) (ccipcommon.ExtraDataDecoded, error) { +func decodeExecDataSui(report ccipocr3.ExecuteReportInfo, codec ccipocr3.ExtraDataCodecBundle) (ccipcommon.ExtraDataDecoded, error) { // only one report one message, since this is a stop-gap solution for solana if len(report.AbstractReports) != 1 { return ccipcommon.ExtraDataDecoded{}, fmt.Errorf("unexpected report length, expected 1, got %d", len(report.AbstractReports)) diff --git a/core/capabilities/ccip/ocrimpls/svm_contract_transmitter_factory.go b/core/capabilities/ccip/ocrimpls/svm_contract_transmitter_factory.go index 172e4d98e7c..473df859749 100644 --- a/core/capabilities/ccip/ocrimpls/svm_contract_transmitter_factory.go +++ b/core/capabilities/ccip/ocrimpls/svm_contract_transmitter_factory.go @@ -41,11 +41,11 @@ type SVMExecCallArgs struct { // SVMContractTransmitterFactory implements the transmitter factory for SVM chains. type SVMContractTransmitterFactory struct { - extraDataCodec ccipocr3.ExtraDataCodec + extraDataCodec ccipocr3.ExtraDataCodecBundle } // NewSVMContractTransmitterFactory returns a new SVMContractTransmitterFactory. -func NewSVMContractTransmitterFactory(extraDataCodec ccipocr3.ExtraDataCodec) *SVMContractTransmitterFactory { +func NewSVMContractTransmitterFactory(extraDataCodec ccipocr3.ExtraDataCodecBundle) *SVMContractTransmitterFactory { return &SVMContractTransmitterFactory{ extraDataCodec: extraDataCodec, } @@ -57,7 +57,7 @@ var SVMExecCalldataFunc = func( report ocr3types.ReportWithInfo[[]byte], _, _ [][32]byte, _ [32]byte, - extraDataCodec ccipocr3.ExtraDataCodec, + extraDataCodec ccipocr3.ExtraDataCodecBundle, ) (contract string, method string, args any, err error) { var info ccipocr3.ExecuteReportInfo var extraDataDecoded ccipcommon.ExtraDataDecoded @@ -93,7 +93,7 @@ func NewSVMCommitCalldataFunc(defaultMethod, priceOnlyMethod string) ToCalldataF report ocr3types.ReportWithInfo[[]byte], rs, ss [][32]byte, vs [32]byte, - _ ccipocr3.ExtraDataCodec, + _ ccipocr3.ExtraDataCodecBundle, ) (string, string, any, error) { var info ccipocr3.CommitReportInfo if len(report.Info) != 0 { @@ -125,7 +125,7 @@ func NewSVMCommitCalldataFunc(defaultMethod, priceOnlyMethod string) ToCalldataF } // decodeExecData decodes the extra data from an execute report. -func decodeExecData(report ccipocr3.ExecuteReportInfo, codec ccipocr3.ExtraDataCodec) (ccipcommon.ExtraDataDecoded, error) { +func decodeExecData(report ccipocr3.ExecuteReportInfo, codec ccipocr3.ExtraDataCodecBundle) (ccipcommon.ExtraDataDecoded, error) { // only one report one message, since this is a stop-gap solution for solana if len(report.AbstractReports) != 1 { return ccipcommon.ExtraDataDecoded{}, fmt.Errorf("unexpected report length, expected 1, got %d", len(report.AbstractReports)) diff --git a/core/capabilities/ccip/oraclecreator/bootstrap.go b/core/capabilities/ccip/oraclecreator/bootstrap.go index 36894f1c25b..121e1fe390e 100644 --- a/core/capabilities/ccip/oraclecreator/bootstrap.go +++ b/core/capabilities/ccip/oraclecreator/bootstrap.go @@ -120,7 +120,6 @@ type bootstrapOracleCreator struct { monitoringEndpointGen telemetry.MonitoringEndpointGenerator lggr logger.Logger homeChainContractReader types.ContractReader - addressCodec ccipcommon.AddressCodec } func NewBootstrapOracleCreator( @@ -130,7 +129,6 @@ func NewBootstrapOracleCreator( monitoringEndpointGen telemetry.MonitoringEndpointGenerator, lggr logger.Logger, homeChainContractReader types.ContractReader, - addressCodec ccipcommon.AddressCodec, ) cctypes.OracleCreator { return &bootstrapOracleCreator{ peerWrapper: peerWrapper, @@ -139,7 +137,6 @@ func NewBootstrapOracleCreator( monitoringEndpointGen: monitoringEndpointGen, lggr: lggr, homeChainContractReader: homeChainContractReader, - addressCodec: addressCodec, } } @@ -181,7 +178,7 @@ func (i *bootstrapOracleCreator) Create(ctx context.Context, _ uint32, config cc config.ConfigDigest, ) - configTracker, err := ocrimpls.NewConfigTracker(config, i.addressCodec) + configTracker, err := ocrimpls.NewConfigTracker(config, ccipcommon.GetAddressCodecRegistry()) if err != nil { return nil, fmt.Errorf("failed to create config tracker: %w", err) } diff --git a/core/capabilities/ccip/oraclecreator/create_test.go b/core/capabilities/ccip/oraclecreator/create_test.go index 71c2e58b8e7..d0578b4f520 100644 --- a/core/capabilities/ccip/oraclecreator/create_test.go +++ b/core/capabilities/ccip/oraclecreator/create_test.go @@ -64,7 +64,6 @@ func TestPluginOracleCreatorCreate_InvalidSelector(t *testing.T) { /* bootstrapperLocators */ nil, /* homeChainReader */ nil, /* homeChainSelector */ 0, - /* addressCodec */ ccipcommon.NewAddressCodec(nil), p2pk, ).(*pluginOracleCreator) diff --git a/core/capabilities/ccip/oraclecreator/plugin.go b/core/capabilities/ccip/oraclecreator/plugin.go index 490dbc55d3c..20195e7d441 100644 --- a/core/capabilities/ccip/oraclecreator/plugin.go +++ b/core/capabilities/ccip/oraclecreator/plugin.go @@ -73,7 +73,6 @@ type pluginOracleCreator struct { homeChainReader ccipreaderpkg.HomeChain homeChainSelector cciptypes.ChainSelector relayers map[types.RelayID]loop.Relayer - addressCodec ccipcommon.AddressCodec p2pID p2pkey.KeyV2 } @@ -92,7 +91,6 @@ func NewPluginOracleCreator( bootstrapperLocators []commontypes.BootstrapperLocator, homeChainReader ccipreaderpkg.HomeChain, homeChainSelector cciptypes.ChainSelector, - addressCodec ccipcommon.AddressCodec, p2pID p2pkey.KeyV2, ) cctypes.OracleCreator { return &pluginOracleCreator{ @@ -110,7 +108,6 @@ func NewPluginOracleCreator( bootstrapperLocators: bootstrapperLocators, homeChainReader: homeChainReader, homeChainSelector: homeChainSelector, - addressCodec: addressCodec, p2pID: p2pID, } } @@ -135,7 +132,13 @@ func (i *pluginOracleCreator) Create(ctx context.Context, donID uint32, config c } destRelayID := types.NewRelayID(destChainFamily, destChainID) - configTracker, err := ocrimpls.NewConfigTracker(config, i.addressCodec) + // GetPluginServices() initializes the ExtraDataCodecRegistry and AddressCodecRegistry singletons + pluginServices, err := ccipcommon.GetPluginServices(i.lggr, destChainFamily) + if err != nil { + return nil, fmt.Errorf("failed to initialize plugin config: %w", err) + } + + configTracker, err := ocrimpls.NewConfigTracker(config, ccipcommon.GetAddressCodecRegistry()) if err != nil { return nil, fmt.Errorf("failed to create config tracker: %w, %d", err, chainSelector) } @@ -144,11 +147,6 @@ func (i *pluginOracleCreator) Create(ctx context.Context, donID uint32, config c return nil, fmt.Errorf("failed to get public config from OCR config: %w", err) } - pluginServices, err := ccipcommon.GetPluginServices(i.lggr, destChainFamily) - if err != nil { - return nil, fmt.Errorf("failed to initialize plugin config: %w", err) - } - i.lggr.Infow("Creating plugin using OCR3 settings", "plugin", pluginType.String(), "chainSelector", chainSelector, @@ -169,13 +167,13 @@ func (i *pluginOracleCreator) Create(ctx context.Context, donID uint32, config c "maxDurationShouldTransmitAcceptedReport", publicConfig.MaxDurationShouldTransmitAcceptedReport, ) - offrampAddrStr, err := i.addressCodec.AddressBytesToString(config.Config.OfframpAddress, cciptypes.ChainSelector(chainSelector)) + offrampAddrStr, err := ccipcommon.GetAddressCodecRegistry().AddressBytesToString(config.Config.OfframpAddress, cciptypes.ChainSelector(chainSelector)) if err != nil { return nil, fmt.Errorf("failed to convert offramp address to string using address codec: %w", err) } i.lggr.Infow("offramp address", "offrampAddrStr", config.Config.OfframpAddress, "selector", config.Config.ChainSelector) - contractReaders, extendedReaders, chainWriters, err := i.createReadersAndWriters( + extendedReaders, chainWriters, err := i.createReadersAndWriters( ctx, pluginServices.ChainRW, destChainID, @@ -189,12 +187,28 @@ func (i *pluginOracleCreator) Create(ctx context.Context, donID uint32, config c return nil, fmt.Errorf("failed to create readers and writers: %w", err) } - // Create chain accessors - chainAccessors, err := i.createChainAccessors(ctx, extendedReaders, chainWriters, pluginServices) + // Create CCIP providers - this is the preferred way for plugins to access CCIP data + ccipProviders, err := i.createCCIPProviders( + ctx, + pluginServices, + cctypes.PluginType(config.Config.PluginType), + ) + if err != nil { + return nil, fmt.Errorf("failed to create CCIPProviders: %w", err) + } + + // Create chain accessors from providers + chainAccessors, err := i.createChainAccessors(ccipProviders, extendedReaders, chainWriters) if err != nil { return nil, fmt.Errorf("failed to create chain accessors: %w", err) } + // Populate extraDataCodecRegistry with codecs from CCIPProviders + err = i.populateCodecRegistriesWithProviderCodecs(ccipProviders) + if err != nil { + return nil, fmt.Errorf("failed to populate extraDataCodecRegistry with codecs from CCIPProviders: %w", err) + } + // build the onchain keyring. it will be the signing key for the destination chain family. keybundle, ok := i.ocrKeyBundles[destChainFamily] if !ok { @@ -275,10 +289,7 @@ func (i *pluginOracleCreator) Create(ctx context.Context, donID uint32, config c return nil, err } - closers := make([]io.Closer, 0, len(extendedReaders)+len(chainWriters)) - for _, cr := range contractReaders { - closers = append(closers, cr) - } + closers := make([]io.Closer, 0, len(chainWriters)) for _, cw := range chainWriters { closers = append(closers, cw) } @@ -329,7 +340,7 @@ func (i *pluginOracleCreator) createFactoryAndTransmitter( OcrConfig: ccipreaderpkg.OCR3ConfigWithMeta(config), CommitCodec: pluginConfig.CommitPluginCodec, MsgHasher: pluginConfig.MessageHasher, - AddrCodec: i.addressCodec, + AddrCodec: ccipcommon.GetAddressCodecRegistry(), HomeChainReader: i.homeChainReader, HomeChainSelector: i.homeChainSelector, ChainAccessors: chainAccessors, @@ -362,6 +373,7 @@ func (i *pluginOracleCreator) createFactoryAndTransmitter( transmitAccount, ) } else { + // TODO: get transmitter from CCIPProvider if the provider is supported. if len(destFromAccounts) == 0 { return nil, nil, fmt.Errorf("transmitter array is empty for dest relay ID %s", destRelayID) } @@ -389,7 +401,7 @@ func (i *pluginOracleCreator) createFactoryAndTransmitter( OcrConfig: ccipreaderpkg.OCR3ConfigWithMeta(config), ExecCodec: pluginConfig.ExecutePluginCodec, MsgHasher: pluginConfig.MessageHasher, - AddrCodec: i.addressCodec, + AddrCodec: ccipcommon.GetAddressCodecRegistry(), HomeChainReader: i.homeChainReader, TokenDataEncoder: pluginConfig.TokenDataEncoder, EstimateProvider: pluginConfig.GasEstimateProvider, @@ -424,6 +436,7 @@ func (i *pluginOracleCreator) createFactoryAndTransmitter( transmitAccount, ) } else { + // TODO: get transmitter from CCIPProvider if the provider is supported. if len(destFromAccounts) == 0 { return nil, nil, fmt.Errorf("transmitter array is empty for dest relay ID %s", destRelayID) } @@ -443,31 +456,56 @@ func (i *pluginOracleCreator) createFactoryAndTransmitter( return factory, transmitter, nil } -func (i *pluginOracleCreator) createChainAccessors( +func (i *pluginOracleCreator) createCCIPProviders( ctx context.Context, - extendedReaders map[cciptypes.ChainSelector]contractreader.Extended, - chainWriters map[cciptypes.ChainSelector]types.ContractWriter, pluginServices ccipcommon.PluginServices, -) (map[cciptypes.ChainSelector]cciptypes.ChainAccessor, error) { - chainAccessors := make(map[cciptypes.ChainSelector]cciptypes.ChainAccessor) + pluginType cctypes.PluginType, +) (map[cciptypes.ChainSelector]types.CCIPProvider, error) { + ccipProviders := make(map[cciptypes.ChainSelector]types.CCIPProvider) for relayID, relayer := range i.relayers { chainDetails, err := chainsel.GetChainDetailsByChainIDAndFamily(relayID.ChainID, relayID.Network) if err != nil { - return nil, fmt.Errorf("failed to get chain selector from relay ID %s and family %s: %w", relayID.ChainID, relayID.Network, err) + return nil, fmt.Errorf("failed to get chain selector from relay ID %s and family %s: %w", + relayID.ChainID, relayID.Network, err) } + chainSelector := cciptypes.ChainSelector(chainDetails.ChainSelector) - // check if CCIP provider is supported, otherwise create default chain accessor - var ca cciptypes.ChainAccessor - var provider types.CCIPProvider ccipProviderSupported, ok := pluginServices.CCIPProviderSupported[relayID.Network] if ccipProviderSupported && ok { - provider, err = relayer.NewCCIPProvider(ctx, types.CCIPProviderArgs{}) + ccipProvider, err := relayer.NewCCIPProvider(ctx, types.CCIPProviderArgs{ + PluginType: uint32(pluginType), + ExtraDataCodecBundle: ccipcommon.GetExtraDataCodecRegistry(), + }) if err != nil { return nil, fmt.Errorf("failed to create CCIP provider for relay ID %s: %w", relayID, err) } - ca = provider.ChainAccessor() + ccipProviders[chainSelector] = ccipProvider + } + } + + return ccipProviders, nil +} + +func (i *pluginOracleCreator) createChainAccessors( + ccipProviders map[cciptypes.ChainSelector]types.CCIPProvider, + extendedReaders map[cciptypes.ChainSelector]contractreader.Extended, + chainWriters map[cciptypes.ChainSelector]types.ContractWriter, +) (map[cciptypes.ChainSelector]cciptypes.ChainAccessor, error) { + chainAccessors := make(map[cciptypes.ChainSelector]cciptypes.ChainAccessor) + for relayID := range i.relayers { + chainDetails, err := chainsel.GetChainDetailsByChainIDAndFamily(relayID.ChainID, relayID.Network) + if err != nil { + return nil, fmt.Errorf("failed to get chain selector from relay ID %s and family %s: %w", relayID.ChainID, relayID.Network, err) + } + chainSelector := cciptypes.ChainSelector(chainDetails.ChainSelector) + + // Check if CCIPProvider is available, otherwise create default chain accessor + var ca cciptypes.ChainAccessor + ccipProvider := ccipProviders[chainSelector] + if ccipProvider != nil { + ca = ccipProvider.ChainAccessor() } else { - // use default chain accessor if cr and cw exist + // Use default chain accessor if CR and CW exist if extendedReaders[chainSelector] == nil || chainWriters[chainSelector] == nil { return nil, fmt.Errorf("cannot create default chain accessor for relay ID %s, contract reader and chain writer need to be present", relayID) } @@ -476,7 +514,7 @@ func (i *pluginOracleCreator) createChainAccessors( chainSelector, extendedReaders[chainSelector], chainWriters[chainSelector], - pluginServices.AddrCodec, + ccipcommon.GetAddressCodecRegistry(), ) if err != nil { return nil, fmt.Errorf("failed to create default chain accessor for relay ID %s: %w", relayID, err) @@ -488,6 +526,35 @@ func (i *pluginOracleCreator) createChainAccessors( return chainAccessors, nil } +func (i *pluginOracleCreator) populateCodecRegistriesWithProviderCodecs( + ccipProviders map[cciptypes.ChainSelector]types.CCIPProvider, +) error { + edcr := ccipcommon.GetExtraDataCodecRegistry() + acr := ccipcommon.GetAddressCodecRegistry() + for chainSelector, provider := range ccipProviders { + codec := provider.Codec() + chainFamily, err := chainsel.GetSelectorFamily(uint64(chainSelector)) + if err != nil { + return fmt.Errorf("failed to get chain family from chain selector %d: %w", chainSelector, err) + } + + sourceChainExtraDataCodec := codec.SourceChainExtraDataCodec + if sourceChainExtraDataCodec != nil { + edcr.RegisterCodec(chainFamily, sourceChainExtraDataCodec) + } else { + i.lggr.Warnw("CCIPProvider codec has no SourceChainExtraDataCodec", "chainSelector", chainSelector) + } + + addressCodec := codec.ChainSpecificAddressCodec + if addressCodec != nil { + acr.RegisterCodec(chainFamily, addressCodec) + } else { + i.lggr.Warnw("CCIPProvider codec has no ChainSpecificAddressCodec", "chainSelector", chainSelector) + } + } + return nil +} + func (i *pluginOracleCreator) getTransmitterFromPublicConfig(publicConfig ocr3confighelper.PublicConfig) (ocrtypes.Account, error) { var myIndex = -1 for idx, identity := range publicConfig.OracleIdentities { @@ -522,14 +589,13 @@ func (i *pluginOracleCreator) createReadersAndWriters( destChainFamily string, destAddrStr string, ) ( - map[cciptypes.ChainSelector]types.ContractReader, map[cciptypes.ChainSelector]contractreader.Extended, map[cciptypes.ChainSelector]types.ContractWriter, error, ) { ofc, err := decodeAndValidateOffchainConfig(pluginType, publicCfg) if err != nil { - return nil, nil, nil, err + return nil, nil, err } var execBatchGasLimit uint64 @@ -543,10 +609,9 @@ func (i *pluginOracleCreator) createReadersAndWriters( homeChainID, err := chainsel.GetChainIDFromSelector(uint64(i.homeChainSelector)) if err != nil { - return nil, nil, nil, fmt.Errorf("failed to get chain ID from chain selector %d: %w", i.homeChainSelector, err) + return nil, nil, fmt.Errorf("failed to get chain ID from chain selector %d: %w", i.homeChainSelector, err) } - contractReaders := make(map[cciptypes.ChainSelector]types.ContractReader) extendedReaders := make(map[cciptypes.ChainSelector]contractreader.Extended) chainWriters := make(map[cciptypes.ChainSelector]types.ContractWriter) for relayID, relayer := range i.relayers { @@ -555,7 +620,7 @@ func (i *pluginOracleCreator) createReadersAndWriters( chainDetails, err1 := chainsel.GetChainDetailsByChainIDAndFamily(chainID, relayChainFamily) chainSelector := cciptypes.ChainSelector(chainDetails.ChainSelector) if err1 != nil { - return nil, nil, nil, fmt.Errorf("failed to get chain selector from chain ID %s: %w", chainID, err1) + return nil, nil, fmt.Errorf("failed to get chain selector from chain ID %s: %w", chainID, err1) } cr, err1 := crcw.GetChainReader(ctx, ccipcommon.ChainReaderProviderOpts{ @@ -585,12 +650,12 @@ func (i *pluginOracleCreator) createReadersAndWriters( }, }) if err2 != nil { - return nil, nil, nil, fmt.Errorf("failed to bind chain reader for dest chain %s's offramp at %s: %w", chainID, offrampAddress, err2) + return nil, nil, fmt.Errorf("failed to bind chain reader for dest chain %s's offramp at %s: %w", chainID, offrampAddress, err2) } } if err2 := cr.Start(ctx); err2 != nil { - return nil, nil, nil, fmt.Errorf("failed to start contract reader for chain %s: %w", chainID, err2) + return nil, nil, fmt.Errorf("failed to start contract reader for chain %s: %w", chainID, err2) } var solanaChainWriterConfigVersion *string @@ -613,19 +678,18 @@ func (i *pluginOracleCreator) createReadersAndWriters( } if err4 := cw.Start(ctx); err4 != nil { - return nil, nil, nil, fmt.Errorf("failed to start chain writer for chain %s: %w", chainID, err4) + return nil, nil, fmt.Errorf("failed to start chain writer for chain %s: %w", chainID, err4) } extendedCr, err := wrapContractReaderInObservedExtended(i.lggr, cr, chainSelector) if err != nil { - return nil, nil, nil, fmt.Errorf("failed to wrap contract reader for chain %s: %w", chainID, err) + return nil, nil, fmt.Errorf("failed to wrap contract reader for chain %s: %w", chainID, err) } - contractReaders[chainSelector] = cr extendedReaders[chainSelector] = extendedCr chainWriters[chainSelector] = cw } - return contractReaders, extendedReaders, chainWriters, nil + return extendedReaders, chainWriters, nil } func wrapContractReaderInObservedExtended( diff --git a/core/scripts/go.mod b/core/scripts/go.mod index 10bf7ac529f..84a7d915bda 100644 --- a/core/scripts/go.mod +++ b/core/scripts/go.mod @@ -46,8 +46,8 @@ require ( github.com/rs/zerolog v1.33.0 github.com/shopspring/decimal v1.4.0 github.com/smartcontractkit/chainlink-automation v0.8.1 - github.com/smartcontractkit/chainlink-ccip v0.1.1-solana.0.20250911201806-5a095deaeb52 - github.com/smartcontractkit/chainlink-common v0.9.5-0.20250916141452-e1a0681b6bae + github.com/smartcontractkit/chainlink-ccip v0.1.1-solana.0.20250919012900-332dc2938bde + github.com/smartcontractkit/chainlink-common v0.9.5-0.20250919011014-06d4446b8a37 github.com/smartcontractkit/chainlink-data-streams v0.1.2 github.com/smartcontractkit/chainlink-deployments-framework v0.49.0 github.com/smartcontractkit/chainlink-evm v0.3.4-0.20250915101441-709f87f7d401 @@ -495,8 +495,8 @@ require ( github.com/smartcontractkit/chainlink-sui v0.0.0-20250916193659-4becc28a467f // indirect github.com/smartcontractkit/chainlink-testing-framework/framework/components/fake v0.10.0 // indirect github.com/smartcontractkit/chainlink-testing-framework/parrot v0.6.2 // indirect - github.com/smartcontractkit/chainlink-ton v0.0.0-20250917170425-f6b7494e763a // indirect - github.com/smartcontractkit/chainlink-ton/deployment v0.0.0-20250917170425-f6b7494e763a // indirect + github.com/smartcontractkit/chainlink-ton v0.0.0-20250919172159-145ae60a55a7 // indirect + github.com/smartcontractkit/chainlink-ton/deployment v0.0.0-20250919172159-145ae60a55a7 // indirect github.com/smartcontractkit/chainlink-tron/relayer v0.0.11-0.20250908203554-5bd9d2fe9513 // indirect github.com/smartcontractkit/cre-sdk-go v0.7.0 // indirect github.com/smartcontractkit/crib-sdk v0.4.0 // indirect diff --git a/core/scripts/go.sum b/core/scripts/go.sum index 1e6a75a748a..5febac571bf 100644 --- a/core/scripts/go.sum +++ b/core/scripts/go.sum @@ -1586,14 +1586,14 @@ github.com/smartcontractkit/chainlink-aptos v0.0.0-20250916164650-970686360fbf h github.com/smartcontractkit/chainlink-aptos v0.0.0-20250916164650-970686360fbf/go.mod h1:tEjqontct1/5cKHm4q75nopZa1rwzaQZwd9U9wn0uZE= github.com/smartcontractkit/chainlink-automation v0.8.1 h1:sTc9LKpBvcKPc1JDYAmgBc2xpDKBco/Q4h4ydl6+UUU= github.com/smartcontractkit/chainlink-automation v0.8.1/go.mod h1:Iij36PvWZ6blrdC5A/nrQUBuf3MH3JvsBB9sSyc9W08= -github.com/smartcontractkit/chainlink-ccip v0.1.1-solana.0.20250911201806-5a095deaeb52 h1:q0rx7lax/Wi0GK3+fTn22sx4zp4HPPu+2m5fcE12Rn8= -github.com/smartcontractkit/chainlink-ccip v0.1.1-solana.0.20250911201806-5a095deaeb52/go.mod h1:4djmYiCYf9BfpNcuhANzh/umrMKfhOQRGfnk1ZnL5Io= +github.com/smartcontractkit/chainlink-ccip v0.1.1-solana.0.20250919012900-332dc2938bde h1:Op+2l8VwEkWn6W9JnFRouZz4pWxhbOPUM+ig72ZIZJk= +github.com/smartcontractkit/chainlink-ccip v0.1.1-solana.0.20250919012900-332dc2938bde/go.mod h1:VoU5lCstXyGCNMCKm6HRPUcL+AL4JOhPFdd1bfm4cWQ= github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250908144012-8184001834b5 h1:GmJQqNrWn5pNc8YTei6l2TOSYjK2fRd4+edFZIifCrU= github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250908144012-8184001834b5/go.mod h1:Ve1xD71bl193YIZQEoJMmBqLGQJdNs29bwbuObwvbhQ= github.com/smartcontractkit/chainlink-ccip/chains/solana/gobindings v0.0.0-20250908144012-8184001834b5 h1:QhcYGEhRLInr1/qh/3RJiVdvJ0nxBHKhPe65WLbSBnU= github.com/smartcontractkit/chainlink-ccip/chains/solana/gobindings v0.0.0-20250908144012-8184001834b5/go.mod h1:xtZNi6pOKdC3sLvokDvXOhgHzT+cyBqH/gWwvxTxqrg= -github.com/smartcontractkit/chainlink-common v0.9.5-0.20250916141452-e1a0681b6bae h1:ZWR3fF8vEtT+WeTtO5pSoaOExynn2MH6ThM1JzcRo4g= -github.com/smartcontractkit/chainlink-common v0.9.5-0.20250916141452-e1a0681b6bae/go.mod h1:Sjn789M++//bIH4vC5LYdo+0zvdkGvt0xz1LCxrYx1M= +github.com/smartcontractkit/chainlink-common v0.9.5-0.20250919011014-06d4446b8a37 h1:SZPmMGoR6suwvH54pGG+PKAhNQYfV3E4u+xQhkllFio= +github.com/smartcontractkit/chainlink-common v0.9.5-0.20250919011014-06d4446b8a37/go.mod h1:EKFUYgf8IsArVMF8lzXNyIhdH6lM8mhyvztCSouZ+G8= github.com/smartcontractkit/chainlink-common/pkg/chipingress v0.0.1 h1:ca2z5OXgnbBPQRxpwXwBLJsUA1+cAp5ncfW4Ssvd6eY= github.com/smartcontractkit/chainlink-common/pkg/chipingress v0.0.1/go.mod h1:NZv/qKYGFRnkjOYBouajnDfFoZ+WDa6H2KNmSf1dnKc= github.com/smartcontractkit/chainlink-common/pkg/monitoring v0.0.0-20250415235644-8703639403c7 h1:9wh1G+WbXwPVqf0cfSRSgwIcaXTQgvYezylEAfwmrbw= @@ -1650,10 +1650,10 @@ github.com/smartcontractkit/chainlink-testing-framework/parrot v0.6.2 h1:cWUHB6Q github.com/smartcontractkit/chainlink-testing-framework/parrot v0.6.2/go.mod h1:Z4K5VJLjsfqIIaBcZ1Sfccxu0xsCxBjPa6zF+5gtQaM= github.com/smartcontractkit/chainlink-testing-framework/seth v1.51.2 h1:ZJ/8Jx6Be5//TyjPi1pS1uotnmcYq5vVkSyISIymSj8= github.com/smartcontractkit/chainlink-testing-framework/seth v1.51.2/go.mod h1:kHYJnZUqiPF7/xN5273prV+srrLJkS77GbBXHLKQpx0= -github.com/smartcontractkit/chainlink-ton v0.0.0-20250917170425-f6b7494e763a h1:2YW8whv11JB3ERH8KDzUaGm8E9dSXgBR49dYupgQ3K4= -github.com/smartcontractkit/chainlink-ton v0.0.0-20250917170425-f6b7494e763a/go.mod h1:JwhOCyjiBfABLgTc1evmLOLbh4PM2Z2ge9kJKP5EASE= -github.com/smartcontractkit/chainlink-ton/deployment v0.0.0-20250917170425-f6b7494e763a h1:LlTs8OU6p/nQR3TJxQ5b5xICubwHzXlNcSp5aN7DUxA= -github.com/smartcontractkit/chainlink-ton/deployment v0.0.0-20250917170425-f6b7494e763a/go.mod h1:0W4rs7nzxk4ELqt1Rsh7edZ7S+rwDYXSy9x3uiSnPR4= +github.com/smartcontractkit/chainlink-ton v0.0.0-20250919172159-145ae60a55a7 h1:q20IossQggFeXmvwgFjnjQCPEqwM4GUsyqIzMSmwVEk= +github.com/smartcontractkit/chainlink-ton v0.0.0-20250919172159-145ae60a55a7/go.mod h1:HcO2B+gLx58p6PhcOosU4JJ3DcGaQfHVN13m034IhbY= +github.com/smartcontractkit/chainlink-ton/deployment v0.0.0-20250919172159-145ae60a55a7 h1:4DMIiYqxIMbzEJtAym3NdpF7j6Yy8EIQvV4sszotUtk= +github.com/smartcontractkit/chainlink-ton/deployment v0.0.0-20250919172159-145ae60a55a7/go.mod h1:8Ln3xZjRo25wevE1QTYONHCgl3fZdsXnlKL/BZlzwAI= github.com/smartcontractkit/chainlink-tron/relayer v0.0.11-0.20250908203554-5bd9d2fe9513 h1:XRNxgcNqagXu6e4smJuS1crRK5cUAcCVd7u+iLduHDM= github.com/smartcontractkit/chainlink-tron/relayer v0.0.11-0.20250908203554-5bd9d2fe9513/go.mod h1:ccjEgNeqOO+bjPddnL4lUrNLzyCvGCxgBjJdhFX3wa8= github.com/smartcontractkit/chainlink-tron/relayer/gotron-sdk v0.0.5-0.20250422175525-b7575d96bd4d h1:qLmSOOtB/Ogn79eIDkuujOu8M5Jd747V1H7Brk/nTvo= diff --git a/deployment/ccip/changeset/internal/deploy_home_chain.go b/deployment/ccip/changeset/internal/deploy_home_chain.go index 92a2452b647..eb13a07e936 100644 --- a/deployment/ccip/changeset/internal/deploy_home_chain.go +++ b/deployment/ccip/changeset/internal/deploy_home_chain.go @@ -21,7 +21,8 @@ import ( "github.com/smartcontractkit/chainlink-common/pkg/utils/bytes" - "github.com/smartcontractkit/chainlink-ccip/pkg/types/ccipocr3" + cciptypes "github.com/smartcontractkit/chainlink-common/pkg/types/ccipocr3" + "github.com/smartcontractkit/chainlink-ccip/pluginconfig" "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v1_6_0/ccip_home" @@ -411,7 +412,7 @@ func BuildOCR3ConfigForCCIPHome( execOffchainCfg *pluginconfig.ExecuteOffchainConfig, skipChainConfigValidation bool, ) (map[types.PluginType]ccip_home.CCIPHomeOCR3Config, error) { - addressCodec := ccipcommon.NewAddressCodec(map[string]ccipcommon.ChainSpecificAddressCodec{ + addressCodec := cciptypes.AddressCodecMap(map[string]cciptypes.ChainSpecificAddressCodec{ chain_selectors.FamilyEVM: ccipevm.AddressCodec{}, chain_selectors.FamilySolana: ccipsolana.AddressCodec{}, }) @@ -658,12 +659,12 @@ func replaceEmptyTransmitters(transmitters []ocrtypes.Account, addressCodec ccip acct := transmitter if len(acct) == 0 { // #nosec G115 - Overflow is not a concern in this test scenario - canonicalAddress, err := addressCodec.OracleIDAsAddressBytes(uint8(oracleID), ccipocr3.ChainSelector(destSelector)) + canonicalAddress, err := addressCodec.OracleIDAsAddressBytes(uint8(oracleID), cciptypes.ChainSelector(destSelector)) if err != nil { return nil, err } - acctString, err := addressCodec.AddressBytesToString(canonicalAddress, ccipocr3.ChainSelector(destSelector)) + acctString, err := addressCodec.AddressBytesToString(canonicalAddress, cciptypes.ChainSelector(destSelector)) if err != nil { return nil, err } diff --git a/deployment/ccip/changeset/testhelpers/test_helpers_solana_v0_1_0.go b/deployment/ccip/changeset/testhelpers/test_helpers_solana_v0_1_0.go index bc5f6fb9cb4..7aa35695459 100644 --- a/deployment/ccip/changeset/testhelpers/test_helpers_solana_v0_1_0.go +++ b/deployment/ccip/changeset/testhelpers/test_helpers_solana_v0_1_0.go @@ -939,6 +939,7 @@ func MakeEVMExtraArgsV2(gasLimit uint64, allowOOO bool) []byte { func AddLane( t *testing.T, e *DeployedEnv, + state stateview.CCIPOnChainState, from, to uint64, isTestRouter bool, gasPrices map[uint64]*big.Int, @@ -968,7 +969,11 @@ func AddLane( } changesets = append(changesets, AddLaneAptosChangesets(t, from, to, gasPrices, aptosTokenPrices)...) case chainsel.FamilyTon: - addLaneConfig := tonOps.AddLaneTONConfig(&e.Env, from, to, fromFamily, toFamily, gasPrices) + onRamp, err := state.GetOnRampAddressBytes(to) + if err != nil { + return err + } + addLaneConfig := tonOps.AddLaneTONConfig(&e.Env, onRamp, from, to, fromFamily, toFamily, gasPrices) changesets = append(changesets, commoncs.Configure(tonOps.AddTonLanes{}, tonCfg.UpdateTonLanesConfig{ Lanes: []tonCfg.LaneConfig{addLaneConfig}, @@ -984,7 +989,11 @@ func AddLane( case chainsel.FamilyAptos: changesets = append(changesets, AddLaneAptosChangesets(t, from, to, gasPrices, nil)...) case chainsel.FamilyTon: - addLaneConfig := tonOps.AddLaneTONConfig(&e.Env, from, to, fromFamily, toFamily, gasPrices) + onRamp, err := state.GetOnRampAddressBytes(to) + if err != nil { + return err + } + addLaneConfig := tonOps.AddLaneTONConfig(&e.Env, onRamp, from, to, fromFamily, toFamily, gasPrices) changesets = append(changesets, commoncs.Configure(tonOps.AddTonLanes{}, tonCfg.UpdateTonLanesConfig{ Lanes: []tonCfg.LaneConfig{addLaneConfig}, @@ -1354,6 +1363,7 @@ func AddLaneWithDefaultPricesAndFeeQuoterConfig(t *testing.T, e *DeployedEnv, st err = AddLane( t, e, + state, from, to, isTestRouter, gasPrices, @@ -1391,6 +1401,7 @@ func AddLaneWithEnforceOutOfOrder(t *testing.T, e *DeployedEnv, state stateview. AddLane( t, e, + state, from, to, isTestRouter, gasPrices, diff --git a/deployment/ccip/manualexechelpers/exec.go b/deployment/ccip/manualexechelpers/exec.go index ab3ab27e198..2b77362d4cf 100644 --- a/deployment/ccip/manualexechelpers/exec.go +++ b/deployment/ccip/manualexechelpers/exec.go @@ -12,6 +12,7 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common/hexutil" chainsel "github.com/smartcontractkit/chain-selectors" + "github.com/smartcontractkit/chainlink-common/pkg/types/ccipocr3" "github.com/smartcontractkit/chainlink/v2/core/capabilities/ccip/ccipevm" "github.com/smartcontractkit/chainlink/v2/core/capabilities/ccip/ccipsolana" @@ -312,7 +313,7 @@ func manuallyExecuteSingle( lookbackDurationCommitReport, stepDuration time.Duration, reExecuteIfFailed bool, - extraDataCodec ccipocr3.ExtraDataCodec, + extraDataCodec ccipocr3.ExtraDataCodecBundle, messageSentCache *MessageSentCache, commitRootCache *RootCache, ) error { @@ -554,7 +555,7 @@ func ManuallyExecuteAll( stepDuration time.Duration, reExecuteIfFailed bool, ) error { - extraDataCodec := ccipocr3.ExtraDataCodec(map[string]ccipocr3.SourceChainExtraDataCodec{ + extraDataCodec := ccipocr3.ExtraDataCodecMap(map[string]ccipocr3.SourceChainExtraDataCodec{ chainsel.FamilyEVM: ccipevm.ExtraDataDecoder{}, chainsel.FamilySolana: ccipsolana.ExtraDataDecoder{}, }) diff --git a/deployment/go.mod b/deployment/go.mod index 7ecec8100ae..5622f665d3c 100644 --- a/deployment/go.mod +++ b/deployment/go.mod @@ -35,10 +35,10 @@ require ( github.com/smartcontractkit/ccip-owner-contracts v0.1.0 github.com/smartcontractkit/chain-selectors v1.0.71 github.com/smartcontractkit/chainlink-aptos v0.0.0-20250916164650-970686360fbf - github.com/smartcontractkit/chainlink-ccip v0.1.1-solana.0.20250911201806-5a095deaeb52 + github.com/smartcontractkit/chainlink-ccip v0.1.1-solana.0.20250919012900-332dc2938bde github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250908144012-8184001834b5 github.com/smartcontractkit/chainlink-ccip/chains/solana/gobindings v0.0.0-20250908144012-8184001834b5 - github.com/smartcontractkit/chainlink-common v0.9.5-0.20250916141452-e1a0681b6bae + github.com/smartcontractkit/chainlink-common v0.9.5-0.20250919011014-06d4446b8a37 github.com/smartcontractkit/chainlink-deployments-framework v0.49.0 github.com/smartcontractkit/chainlink-evm v0.3.4-0.20250915101441-709f87f7d401 github.com/smartcontractkit/chainlink-evm/gethwrappers v0.0.0-20250827130336-5922343458be @@ -48,8 +48,8 @@ require ( github.com/smartcontractkit/chainlink-protos/orchestrator v0.10.0 github.com/smartcontractkit/chainlink-solana v1.1.2-0.20250910230900-fa42dad2d413 github.com/smartcontractkit/chainlink-testing-framework/lib v1.54.5 - github.com/smartcontractkit/chainlink-ton v0.0.0-20250917170425-f6b7494e763a - github.com/smartcontractkit/chainlink-ton/deployment v0.0.0-20250917170425-f6b7494e763a + github.com/smartcontractkit/chainlink-ton v0.0.0-20250919172159-145ae60a55a7 + github.com/smartcontractkit/chainlink-ton/deployment v0.0.0-20250919172159-145ae60a55a7 github.com/smartcontractkit/freeport v0.1.3-0.20250716200817-cb5dfd0e369e github.com/smartcontractkit/libocr v0.0.0-20250905115425-2785a5cee79d github.com/smartcontractkit/mcms v0.25.0 diff --git a/deployment/go.sum b/deployment/go.sum index 92c381f2c1e..5082cdb0268 100644 --- a/deployment/go.sum +++ b/deployment/go.sum @@ -1323,14 +1323,14 @@ github.com/smartcontractkit/chainlink-aptos v0.0.0-20250916164650-970686360fbf h github.com/smartcontractkit/chainlink-aptos v0.0.0-20250916164650-970686360fbf/go.mod h1:tEjqontct1/5cKHm4q75nopZa1rwzaQZwd9U9wn0uZE= github.com/smartcontractkit/chainlink-automation v0.8.1 h1:sTc9LKpBvcKPc1JDYAmgBc2xpDKBco/Q4h4ydl6+UUU= github.com/smartcontractkit/chainlink-automation v0.8.1/go.mod h1:Iij36PvWZ6blrdC5A/nrQUBuf3MH3JvsBB9sSyc9W08= -github.com/smartcontractkit/chainlink-ccip v0.1.1-solana.0.20250911201806-5a095deaeb52 h1:q0rx7lax/Wi0GK3+fTn22sx4zp4HPPu+2m5fcE12Rn8= -github.com/smartcontractkit/chainlink-ccip v0.1.1-solana.0.20250911201806-5a095deaeb52/go.mod h1:4djmYiCYf9BfpNcuhANzh/umrMKfhOQRGfnk1ZnL5Io= +github.com/smartcontractkit/chainlink-ccip v0.1.1-solana.0.20250919012900-332dc2938bde h1:Op+2l8VwEkWn6W9JnFRouZz4pWxhbOPUM+ig72ZIZJk= +github.com/smartcontractkit/chainlink-ccip v0.1.1-solana.0.20250919012900-332dc2938bde/go.mod h1:VoU5lCstXyGCNMCKm6HRPUcL+AL4JOhPFdd1bfm4cWQ= github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250908144012-8184001834b5 h1:GmJQqNrWn5pNc8YTei6l2TOSYjK2fRd4+edFZIifCrU= github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250908144012-8184001834b5/go.mod h1:Ve1xD71bl193YIZQEoJMmBqLGQJdNs29bwbuObwvbhQ= github.com/smartcontractkit/chainlink-ccip/chains/solana/gobindings v0.0.0-20250908144012-8184001834b5 h1:QhcYGEhRLInr1/qh/3RJiVdvJ0nxBHKhPe65WLbSBnU= github.com/smartcontractkit/chainlink-ccip/chains/solana/gobindings v0.0.0-20250908144012-8184001834b5/go.mod h1:xtZNi6pOKdC3sLvokDvXOhgHzT+cyBqH/gWwvxTxqrg= -github.com/smartcontractkit/chainlink-common v0.9.5-0.20250916141452-e1a0681b6bae h1:ZWR3fF8vEtT+WeTtO5pSoaOExynn2MH6ThM1JzcRo4g= -github.com/smartcontractkit/chainlink-common v0.9.5-0.20250916141452-e1a0681b6bae/go.mod h1:Sjn789M++//bIH4vC5LYdo+0zvdkGvt0xz1LCxrYx1M= +github.com/smartcontractkit/chainlink-common v0.9.5-0.20250919011014-06d4446b8a37 h1:SZPmMGoR6suwvH54pGG+PKAhNQYfV3E4u+xQhkllFio= +github.com/smartcontractkit/chainlink-common v0.9.5-0.20250919011014-06d4446b8a37/go.mod h1:EKFUYgf8IsArVMF8lzXNyIhdH6lM8mhyvztCSouZ+G8= github.com/smartcontractkit/chainlink-common/pkg/chipingress v0.0.1 h1:ca2z5OXgnbBPQRxpwXwBLJsUA1+cAp5ncfW4Ssvd6eY= github.com/smartcontractkit/chainlink-common/pkg/chipingress v0.0.1/go.mod h1:NZv/qKYGFRnkjOYBouajnDfFoZ+WDa6H2KNmSf1dnKc= github.com/smartcontractkit/chainlink-common/pkg/monitoring v0.0.0-20250415235644-8703639403c7 h1:9wh1G+WbXwPVqf0cfSRSgwIcaXTQgvYezylEAfwmrbw= @@ -1383,10 +1383,10 @@ github.com/smartcontractkit/chainlink-testing-framework/parrot v0.6.2 h1:cWUHB6Q github.com/smartcontractkit/chainlink-testing-framework/parrot v0.6.2/go.mod h1:Z4K5VJLjsfqIIaBcZ1Sfccxu0xsCxBjPa6zF+5gtQaM= github.com/smartcontractkit/chainlink-testing-framework/seth v1.51.2 h1:ZJ/8Jx6Be5//TyjPi1pS1uotnmcYq5vVkSyISIymSj8= github.com/smartcontractkit/chainlink-testing-framework/seth v1.51.2/go.mod h1:kHYJnZUqiPF7/xN5273prV+srrLJkS77GbBXHLKQpx0= -github.com/smartcontractkit/chainlink-ton v0.0.0-20250917170425-f6b7494e763a h1:2YW8whv11JB3ERH8KDzUaGm8E9dSXgBR49dYupgQ3K4= -github.com/smartcontractkit/chainlink-ton v0.0.0-20250917170425-f6b7494e763a/go.mod h1:JwhOCyjiBfABLgTc1evmLOLbh4PM2Z2ge9kJKP5EASE= -github.com/smartcontractkit/chainlink-ton/deployment v0.0.0-20250917170425-f6b7494e763a h1:LlTs8OU6p/nQR3TJxQ5b5xICubwHzXlNcSp5aN7DUxA= -github.com/smartcontractkit/chainlink-ton/deployment v0.0.0-20250917170425-f6b7494e763a/go.mod h1:0W4rs7nzxk4ELqt1Rsh7edZ7S+rwDYXSy9x3uiSnPR4= +github.com/smartcontractkit/chainlink-ton v0.0.0-20250919172159-145ae60a55a7 h1:q20IossQggFeXmvwgFjnjQCPEqwM4GUsyqIzMSmwVEk= +github.com/smartcontractkit/chainlink-ton v0.0.0-20250919172159-145ae60a55a7/go.mod h1:HcO2B+gLx58p6PhcOosU4JJ3DcGaQfHVN13m034IhbY= +github.com/smartcontractkit/chainlink-ton/deployment v0.0.0-20250919172159-145ae60a55a7 h1:4DMIiYqxIMbzEJtAym3NdpF7j6Yy8EIQvV4sszotUtk= +github.com/smartcontractkit/chainlink-ton/deployment v0.0.0-20250919172159-145ae60a55a7/go.mod h1:8Ln3xZjRo25wevE1QTYONHCgl3fZdsXnlKL/BZlzwAI= github.com/smartcontractkit/chainlink-tron/relayer v0.0.11-0.20250908203554-5bd9d2fe9513 h1:XRNxgcNqagXu6e4smJuS1crRK5cUAcCVd7u+iLduHDM= github.com/smartcontractkit/chainlink-tron/relayer v0.0.11-0.20250908203554-5bd9d2fe9513/go.mod h1:ccjEgNeqOO+bjPddnL4lUrNLzyCvGCxgBjJdhFX3wa8= github.com/smartcontractkit/chainlink-tron/relayer/gotron-sdk v0.0.5-0.20250422175525-b7575d96bd4d h1:qLmSOOtB/Ogn79eIDkuujOu8M5Jd747V1H7Brk/nTvo= diff --git a/go.mod b/go.mod index 8ceddc4b28a..34b062d8528 100644 --- a/go.mod +++ b/go.mod @@ -81,10 +81,10 @@ require ( github.com/smartcontractkit/chain-selectors v1.0.70 github.com/smartcontractkit/chainlink-aptos v0.0.0-20250916164650-970686360fbf github.com/smartcontractkit/chainlink-automation v0.8.1 - github.com/smartcontractkit/chainlink-ccip v0.1.1-solana.0.20250911201806-5a095deaeb52 + github.com/smartcontractkit/chainlink-ccip v0.1.1-solana.0.20250919012900-332dc2938bde github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250908144012-8184001834b5 github.com/smartcontractkit/chainlink-ccip/chains/solana/gobindings v0.0.0-20250908144012-8184001834b5 - github.com/smartcontractkit/chainlink-common v0.9.5-0.20250916141452-e1a0681b6bae + github.com/smartcontractkit/chainlink-common v0.9.5-0.20250919011014-06d4446b8a37 github.com/smartcontractkit/chainlink-data-streams v0.1.2 github.com/smartcontractkit/chainlink-evm v0.3.4-0.20250915101441-709f87f7d401 github.com/smartcontractkit/chainlink-evm/gethwrappers v0.0.0-20250827130336-5922343458be @@ -100,7 +100,7 @@ require ( github.com/smartcontractkit/chainlink-protos/workflows/go v0.0.0-20250912140847-cbfb1710ac76 github.com/smartcontractkit/chainlink-solana v1.1.2-0.20250910230900-fa42dad2d413 github.com/smartcontractkit/chainlink-sui v0.0.0-20250916145228-cc9dd5b92c88 - github.com/smartcontractkit/chainlink-ton v0.0.0-20250917170425-f6b7494e763a + github.com/smartcontractkit/chainlink-ton v0.0.0-20250919172159-145ae60a55a7 github.com/smartcontractkit/chainlink-tron/relayer v0.0.11-0.20250815105909-75499abc4335 github.com/smartcontractkit/cre-sdk-go v0.7.0 github.com/smartcontractkit/cre-sdk-go/capabilities/networking/http v0.7.0 diff --git a/go.sum b/go.sum index 390b60c2faf..bd13dc3bea7 100644 --- a/go.sum +++ b/go.sum @@ -1107,14 +1107,14 @@ github.com/smartcontractkit/chainlink-aptos v0.0.0-20250916164650-970686360fbf h github.com/smartcontractkit/chainlink-aptos v0.0.0-20250916164650-970686360fbf/go.mod h1:tEjqontct1/5cKHm4q75nopZa1rwzaQZwd9U9wn0uZE= github.com/smartcontractkit/chainlink-automation v0.8.1 h1:sTc9LKpBvcKPc1JDYAmgBc2xpDKBco/Q4h4ydl6+UUU= github.com/smartcontractkit/chainlink-automation v0.8.1/go.mod h1:Iij36PvWZ6blrdC5A/nrQUBuf3MH3JvsBB9sSyc9W08= -github.com/smartcontractkit/chainlink-ccip v0.1.1-solana.0.20250911201806-5a095deaeb52 h1:q0rx7lax/Wi0GK3+fTn22sx4zp4HPPu+2m5fcE12Rn8= -github.com/smartcontractkit/chainlink-ccip v0.1.1-solana.0.20250911201806-5a095deaeb52/go.mod h1:4djmYiCYf9BfpNcuhANzh/umrMKfhOQRGfnk1ZnL5Io= +github.com/smartcontractkit/chainlink-ccip v0.1.1-solana.0.20250919012900-332dc2938bde h1:Op+2l8VwEkWn6W9JnFRouZz4pWxhbOPUM+ig72ZIZJk= +github.com/smartcontractkit/chainlink-ccip v0.1.1-solana.0.20250919012900-332dc2938bde/go.mod h1:VoU5lCstXyGCNMCKm6HRPUcL+AL4JOhPFdd1bfm4cWQ= github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250908144012-8184001834b5 h1:GmJQqNrWn5pNc8YTei6l2TOSYjK2fRd4+edFZIifCrU= github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250908144012-8184001834b5/go.mod h1:Ve1xD71bl193YIZQEoJMmBqLGQJdNs29bwbuObwvbhQ= github.com/smartcontractkit/chainlink-ccip/chains/solana/gobindings v0.0.0-20250908144012-8184001834b5 h1:QhcYGEhRLInr1/qh/3RJiVdvJ0nxBHKhPe65WLbSBnU= github.com/smartcontractkit/chainlink-ccip/chains/solana/gobindings v0.0.0-20250908144012-8184001834b5/go.mod h1:xtZNi6pOKdC3sLvokDvXOhgHzT+cyBqH/gWwvxTxqrg= -github.com/smartcontractkit/chainlink-common v0.9.5-0.20250916141452-e1a0681b6bae h1:ZWR3fF8vEtT+WeTtO5pSoaOExynn2MH6ThM1JzcRo4g= -github.com/smartcontractkit/chainlink-common v0.9.5-0.20250916141452-e1a0681b6bae/go.mod h1:Sjn789M++//bIH4vC5LYdo+0zvdkGvt0xz1LCxrYx1M= +github.com/smartcontractkit/chainlink-common v0.9.5-0.20250919011014-06d4446b8a37 h1:SZPmMGoR6suwvH54pGG+PKAhNQYfV3E4u+xQhkllFio= +github.com/smartcontractkit/chainlink-common v0.9.5-0.20250919011014-06d4446b8a37/go.mod h1:EKFUYgf8IsArVMF8lzXNyIhdH6lM8mhyvztCSouZ+G8= github.com/smartcontractkit/chainlink-common/pkg/chipingress v0.0.1 h1:ca2z5OXgnbBPQRxpwXwBLJsUA1+cAp5ncfW4Ssvd6eY= github.com/smartcontractkit/chainlink-common/pkg/chipingress v0.0.1/go.mod h1:NZv/qKYGFRnkjOYBouajnDfFoZ+WDa6H2KNmSf1dnKc= github.com/smartcontractkit/chainlink-common/pkg/monitoring v0.0.0-20250415235644-8703639403c7 h1:9wh1G+WbXwPVqf0cfSRSgwIcaXTQgvYezylEAfwmrbw= @@ -1155,8 +1155,8 @@ github.com/smartcontractkit/chainlink-solana v1.1.2-0.20250910230900-fa42dad2d41 github.com/smartcontractkit/chainlink-solana v1.1.2-0.20250910230900-fa42dad2d413/go.mod h1:LSZMvQYbdK20+21S68/lcTNHStehHPF1X764PICkrRU= github.com/smartcontractkit/chainlink-sui v0.0.0-20250916145228-cc9dd5b92c88 h1:L2mllixqv7DOgkSnd4GDBuRz6UzYujrhETqRJNZOxOk= github.com/smartcontractkit/chainlink-sui v0.0.0-20250916145228-cc9dd5b92c88/go.mod h1:CTR5agBB07sCpRltBkHmnkCZ+g8sXRafCJge/Hqr7aM= -github.com/smartcontractkit/chainlink-ton v0.0.0-20250917170425-f6b7494e763a h1:2YW8whv11JB3ERH8KDzUaGm8E9dSXgBR49dYupgQ3K4= -github.com/smartcontractkit/chainlink-ton v0.0.0-20250917170425-f6b7494e763a/go.mod h1:JwhOCyjiBfABLgTc1evmLOLbh4PM2Z2ge9kJKP5EASE= +github.com/smartcontractkit/chainlink-ton v0.0.0-20250919172159-145ae60a55a7 h1:q20IossQggFeXmvwgFjnjQCPEqwM4GUsyqIzMSmwVEk= +github.com/smartcontractkit/chainlink-ton v0.0.0-20250919172159-145ae60a55a7/go.mod h1:HcO2B+gLx58p6PhcOosU4JJ3DcGaQfHVN13m034IhbY= github.com/smartcontractkit/chainlink-tron/relayer v0.0.11-0.20250815105909-75499abc4335 h1:7bxYNrPpygn8PUSBiEKn8riMd7CXMi/4bjTy0fHhcrY= github.com/smartcontractkit/chainlink-tron/relayer v0.0.11-0.20250815105909-75499abc4335/go.mod h1:ccjEgNeqOO+bjPddnL4lUrNLzyCvGCxgBjJdhFX3wa8= github.com/smartcontractkit/chainlink-tron/relayer/gotron-sdk v0.0.5-0.20250422175525-b7575d96bd4d h1:qLmSOOtB/Ogn79eIDkuujOu8M5Jd747V1H7Brk/nTvo= diff --git a/integration-tests/go.mod b/integration-tests/go.mod index 0234db6940f..b5df315a092 100644 --- a/integration-tests/go.mod +++ b/integration-tests/go.mod @@ -47,10 +47,10 @@ require ( github.com/smartcontractkit/chain-selectors v1.0.71 github.com/smartcontractkit/chainlink-aptos v0.0.0-20250916164650-970686360fbf github.com/smartcontractkit/chainlink-automation v0.8.1 - github.com/smartcontractkit/chainlink-ccip v0.1.1-solana.0.20250911201806-5a095deaeb52 + github.com/smartcontractkit/chainlink-ccip v0.1.1-solana.0.20250919012900-332dc2938bde github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250908144012-8184001834b5 github.com/smartcontractkit/chainlink-ccip/chains/solana/gobindings v0.0.0-20250908144012-8184001834b5 - github.com/smartcontractkit/chainlink-common v0.9.5-0.20250916141452-e1a0681b6bae + github.com/smartcontractkit/chainlink-common v0.9.5-0.20250919011014-06d4446b8a37 github.com/smartcontractkit/chainlink-deployments-framework v0.49.0 github.com/smartcontractkit/chainlink-evm v0.3.4-0.20250915101441-709f87f7d401 github.com/smartcontractkit/chainlink-evm/gethwrappers v0.0.0-20250827130336-5922343458be @@ -62,7 +62,7 @@ require ( github.com/smartcontractkit/chainlink-testing-framework/sentinel v0.1.2 github.com/smartcontractkit/chainlink-testing-framework/seth v1.51.2 github.com/smartcontractkit/chainlink-testing-framework/wasp v1.51.0 - github.com/smartcontractkit/chainlink-ton v0.0.0-20250917170425-f6b7494e763a + github.com/smartcontractkit/chainlink-ton v0.0.0-20250919172159-145ae60a55a7 github.com/smartcontractkit/libocr v0.0.0-20250905115425-2785a5cee79d github.com/smartcontractkit/mcms v0.25.0 github.com/spf13/cobra v1.9.1 @@ -499,7 +499,7 @@ require ( github.com/smartcontractkit/chainlink-solana v1.1.2-0.20250910230900-fa42dad2d413 // indirect github.com/smartcontractkit/chainlink-sui v0.0.0-20250916193659-4becc28a467f // indirect github.com/smartcontractkit/chainlink-testing-framework/framework v0.10.24 // indirect - github.com/smartcontractkit/chainlink-ton/deployment v0.0.0-20250917170425-f6b7494e763a // indirect + github.com/smartcontractkit/chainlink-ton/deployment v0.0.0-20250919172159-145ae60a55a7 // indirect github.com/smartcontractkit/chainlink-tron/relayer v0.0.11-0.20250908203554-5bd9d2fe9513 // indirect github.com/smartcontractkit/freeport v0.1.3-0.20250716200817-cb5dfd0e369e // indirect github.com/smartcontractkit/grpc-proxy v0.0.0-20240830132753-a7e17fec5ab7 // indirect diff --git a/integration-tests/go.sum b/integration-tests/go.sum index 7a1cfb762f7..ea33a0605bc 100644 --- a/integration-tests/go.sum +++ b/integration-tests/go.sum @@ -1570,14 +1570,14 @@ github.com/smartcontractkit/chainlink-aptos v0.0.0-20250916164650-970686360fbf h github.com/smartcontractkit/chainlink-aptos v0.0.0-20250916164650-970686360fbf/go.mod h1:tEjqontct1/5cKHm4q75nopZa1rwzaQZwd9U9wn0uZE= github.com/smartcontractkit/chainlink-automation v0.8.1 h1:sTc9LKpBvcKPc1JDYAmgBc2xpDKBco/Q4h4ydl6+UUU= github.com/smartcontractkit/chainlink-automation v0.8.1/go.mod h1:Iij36PvWZ6blrdC5A/nrQUBuf3MH3JvsBB9sSyc9W08= -github.com/smartcontractkit/chainlink-ccip v0.1.1-solana.0.20250911201806-5a095deaeb52 h1:q0rx7lax/Wi0GK3+fTn22sx4zp4HPPu+2m5fcE12Rn8= -github.com/smartcontractkit/chainlink-ccip v0.1.1-solana.0.20250911201806-5a095deaeb52/go.mod h1:4djmYiCYf9BfpNcuhANzh/umrMKfhOQRGfnk1ZnL5Io= +github.com/smartcontractkit/chainlink-ccip v0.1.1-solana.0.20250919012900-332dc2938bde h1:Op+2l8VwEkWn6W9JnFRouZz4pWxhbOPUM+ig72ZIZJk= +github.com/smartcontractkit/chainlink-ccip v0.1.1-solana.0.20250919012900-332dc2938bde/go.mod h1:VoU5lCstXyGCNMCKm6HRPUcL+AL4JOhPFdd1bfm4cWQ= github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250908144012-8184001834b5 h1:GmJQqNrWn5pNc8YTei6l2TOSYjK2fRd4+edFZIifCrU= github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250908144012-8184001834b5/go.mod h1:Ve1xD71bl193YIZQEoJMmBqLGQJdNs29bwbuObwvbhQ= github.com/smartcontractkit/chainlink-ccip/chains/solana/gobindings v0.0.0-20250908144012-8184001834b5 h1:QhcYGEhRLInr1/qh/3RJiVdvJ0nxBHKhPe65WLbSBnU= github.com/smartcontractkit/chainlink-ccip/chains/solana/gobindings v0.0.0-20250908144012-8184001834b5/go.mod h1:xtZNi6pOKdC3sLvokDvXOhgHzT+cyBqH/gWwvxTxqrg= -github.com/smartcontractkit/chainlink-common v0.9.5-0.20250916141452-e1a0681b6bae h1:ZWR3fF8vEtT+WeTtO5pSoaOExynn2MH6ThM1JzcRo4g= -github.com/smartcontractkit/chainlink-common v0.9.5-0.20250916141452-e1a0681b6bae/go.mod h1:Sjn789M++//bIH4vC5LYdo+0zvdkGvt0xz1LCxrYx1M= +github.com/smartcontractkit/chainlink-common v0.9.5-0.20250919011014-06d4446b8a37 h1:SZPmMGoR6suwvH54pGG+PKAhNQYfV3E4u+xQhkllFio= +github.com/smartcontractkit/chainlink-common v0.9.5-0.20250919011014-06d4446b8a37/go.mod h1:EKFUYgf8IsArVMF8lzXNyIhdH6lM8mhyvztCSouZ+G8= github.com/smartcontractkit/chainlink-common/pkg/chipingress v0.0.1 h1:ca2z5OXgnbBPQRxpwXwBLJsUA1+cAp5ncfW4Ssvd6eY= github.com/smartcontractkit/chainlink-common/pkg/chipingress v0.0.1/go.mod h1:NZv/qKYGFRnkjOYBouajnDfFoZ+WDa6H2KNmSf1dnKc= github.com/smartcontractkit/chainlink-common/pkg/monitoring v0.0.0-20250415235644-8703639403c7 h1:9wh1G+WbXwPVqf0cfSRSgwIcaXTQgvYezylEAfwmrbw= @@ -1638,10 +1638,10 @@ github.com/smartcontractkit/chainlink-testing-framework/seth v1.51.2 h1:ZJ/8Jx6B github.com/smartcontractkit/chainlink-testing-framework/seth v1.51.2/go.mod h1:kHYJnZUqiPF7/xN5273prV+srrLJkS77GbBXHLKQpx0= github.com/smartcontractkit/chainlink-testing-framework/wasp v1.51.0 h1:qaLw7J7oRRsj+lUzzIjGVlXAVNmkAEwjj7xTXe0hcAk= github.com/smartcontractkit/chainlink-testing-framework/wasp v1.51.0/go.mod h1:eqV2n0vpqnY5N51je5/1vC/Qm8MMXVKvOXjLM+53Sog= -github.com/smartcontractkit/chainlink-ton v0.0.0-20250917170425-f6b7494e763a h1:2YW8whv11JB3ERH8KDzUaGm8E9dSXgBR49dYupgQ3K4= -github.com/smartcontractkit/chainlink-ton v0.0.0-20250917170425-f6b7494e763a/go.mod h1:JwhOCyjiBfABLgTc1evmLOLbh4PM2Z2ge9kJKP5EASE= -github.com/smartcontractkit/chainlink-ton/deployment v0.0.0-20250917170425-f6b7494e763a h1:LlTs8OU6p/nQR3TJxQ5b5xICubwHzXlNcSp5aN7DUxA= -github.com/smartcontractkit/chainlink-ton/deployment v0.0.0-20250917170425-f6b7494e763a/go.mod h1:0W4rs7nzxk4ELqt1Rsh7edZ7S+rwDYXSy9x3uiSnPR4= +github.com/smartcontractkit/chainlink-ton v0.0.0-20250919172159-145ae60a55a7 h1:q20IossQggFeXmvwgFjnjQCPEqwM4GUsyqIzMSmwVEk= +github.com/smartcontractkit/chainlink-ton v0.0.0-20250919172159-145ae60a55a7/go.mod h1:HcO2B+gLx58p6PhcOosU4JJ3DcGaQfHVN13m034IhbY= +github.com/smartcontractkit/chainlink-ton/deployment v0.0.0-20250919172159-145ae60a55a7 h1:4DMIiYqxIMbzEJtAym3NdpF7j6Yy8EIQvV4sszotUtk= +github.com/smartcontractkit/chainlink-ton/deployment v0.0.0-20250919172159-145ae60a55a7/go.mod h1:8Ln3xZjRo25wevE1QTYONHCgl3fZdsXnlKL/BZlzwAI= github.com/smartcontractkit/chainlink-tron/relayer v0.0.11-0.20250908203554-5bd9d2fe9513 h1:XRNxgcNqagXu6e4smJuS1crRK5cUAcCVd7u+iLduHDM= github.com/smartcontractkit/chainlink-tron/relayer v0.0.11-0.20250908203554-5bd9d2fe9513/go.mod h1:ccjEgNeqOO+bjPddnL4lUrNLzyCvGCxgBjJdhFX3wa8= github.com/smartcontractkit/chainlink-tron/relayer/gotron-sdk v0.0.5-0.20250422175525-b7575d96bd4d h1:qLmSOOtB/Ogn79eIDkuujOu8M5Jd747V1H7Brk/nTvo= diff --git a/integration-tests/load/go.mod b/integration-tests/load/go.mod index 42d94d12423..edee04d971c 100644 --- a/integration-tests/load/go.mod +++ b/integration-tests/load/go.mod @@ -29,10 +29,10 @@ require ( github.com/slack-go/slack v0.15.0 github.com/smartcontractkit/chain-selectors v1.0.71 github.com/smartcontractkit/chainlink-aptos v0.0.0-20250916164650-970686360fbf - github.com/smartcontractkit/chainlink-ccip v0.1.1-solana.0.20250911201806-5a095deaeb52 + github.com/smartcontractkit/chainlink-ccip v0.1.1-solana.0.20250919012900-332dc2938bde github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250908144012-8184001834b5 github.com/smartcontractkit/chainlink-ccip/chains/solana/gobindings v0.0.0-20250908144012-8184001834b5 - github.com/smartcontractkit/chainlink-common v0.9.5-0.20250916141452-e1a0681b6bae + github.com/smartcontractkit/chainlink-common v0.9.5-0.20250919011014-06d4446b8a37 github.com/smartcontractkit/chainlink-deployments-framework v0.49.0 github.com/smartcontractkit/chainlink-evm v0.3.4-0.20250915101441-709f87f7d401 github.com/smartcontractkit/chainlink-evm/gethwrappers v0.0.0-20250827130336-5922343458be @@ -491,8 +491,8 @@ require ( github.com/smartcontractkit/chainlink-testing-framework/lib/grafana v1.51.0 // indirect github.com/smartcontractkit/chainlink-testing-framework/parrot v0.6.2 // indirect github.com/smartcontractkit/chainlink-testing-framework/sentinel v0.1.2 // indirect - github.com/smartcontractkit/chainlink-ton v0.0.0-20250917170425-f6b7494e763a // indirect - github.com/smartcontractkit/chainlink-ton/deployment v0.0.0-20250917170425-f6b7494e763a // indirect + github.com/smartcontractkit/chainlink-ton v0.0.0-20250919172159-145ae60a55a7 // indirect + github.com/smartcontractkit/chainlink-ton/deployment v0.0.0-20250919172159-145ae60a55a7 // indirect github.com/smartcontractkit/chainlink-tron/relayer v0.0.11-0.20250908203554-5bd9d2fe9513 // indirect github.com/smartcontractkit/freeport v0.1.3-0.20250716200817-cb5dfd0e369e // indirect github.com/smartcontractkit/grpc-proxy v0.0.0-20240830132753-a7e17fec5ab7 // indirect diff --git a/integration-tests/load/go.sum b/integration-tests/load/go.sum index ea66690c7b5..79d057e8235 100644 --- a/integration-tests/load/go.sum +++ b/integration-tests/load/go.sum @@ -1548,14 +1548,14 @@ github.com/smartcontractkit/chainlink-aptos v0.0.0-20250916164650-970686360fbf h github.com/smartcontractkit/chainlink-aptos v0.0.0-20250916164650-970686360fbf/go.mod h1:tEjqontct1/5cKHm4q75nopZa1rwzaQZwd9U9wn0uZE= github.com/smartcontractkit/chainlink-automation v0.8.1 h1:sTc9LKpBvcKPc1JDYAmgBc2xpDKBco/Q4h4ydl6+UUU= github.com/smartcontractkit/chainlink-automation v0.8.1/go.mod h1:Iij36PvWZ6blrdC5A/nrQUBuf3MH3JvsBB9sSyc9W08= -github.com/smartcontractkit/chainlink-ccip v0.1.1-solana.0.20250911201806-5a095deaeb52 h1:q0rx7lax/Wi0GK3+fTn22sx4zp4HPPu+2m5fcE12Rn8= -github.com/smartcontractkit/chainlink-ccip v0.1.1-solana.0.20250911201806-5a095deaeb52/go.mod h1:4djmYiCYf9BfpNcuhANzh/umrMKfhOQRGfnk1ZnL5Io= +github.com/smartcontractkit/chainlink-ccip v0.1.1-solana.0.20250919012900-332dc2938bde h1:Op+2l8VwEkWn6W9JnFRouZz4pWxhbOPUM+ig72ZIZJk= +github.com/smartcontractkit/chainlink-ccip v0.1.1-solana.0.20250919012900-332dc2938bde/go.mod h1:VoU5lCstXyGCNMCKm6HRPUcL+AL4JOhPFdd1bfm4cWQ= github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250908144012-8184001834b5 h1:GmJQqNrWn5pNc8YTei6l2TOSYjK2fRd4+edFZIifCrU= github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250908144012-8184001834b5/go.mod h1:Ve1xD71bl193YIZQEoJMmBqLGQJdNs29bwbuObwvbhQ= github.com/smartcontractkit/chainlink-ccip/chains/solana/gobindings v0.0.0-20250908144012-8184001834b5 h1:QhcYGEhRLInr1/qh/3RJiVdvJ0nxBHKhPe65WLbSBnU= github.com/smartcontractkit/chainlink-ccip/chains/solana/gobindings v0.0.0-20250908144012-8184001834b5/go.mod h1:xtZNi6pOKdC3sLvokDvXOhgHzT+cyBqH/gWwvxTxqrg= -github.com/smartcontractkit/chainlink-common v0.9.5-0.20250916141452-e1a0681b6bae h1:ZWR3fF8vEtT+WeTtO5pSoaOExynn2MH6ThM1JzcRo4g= -github.com/smartcontractkit/chainlink-common v0.9.5-0.20250916141452-e1a0681b6bae/go.mod h1:Sjn789M++//bIH4vC5LYdo+0zvdkGvt0xz1LCxrYx1M= +github.com/smartcontractkit/chainlink-common v0.9.5-0.20250919011014-06d4446b8a37 h1:SZPmMGoR6suwvH54pGG+PKAhNQYfV3E4u+xQhkllFio= +github.com/smartcontractkit/chainlink-common v0.9.5-0.20250919011014-06d4446b8a37/go.mod h1:EKFUYgf8IsArVMF8lzXNyIhdH6lM8mhyvztCSouZ+G8= github.com/smartcontractkit/chainlink-common/pkg/chipingress v0.0.1 h1:ca2z5OXgnbBPQRxpwXwBLJsUA1+cAp5ncfW4Ssvd6eY= github.com/smartcontractkit/chainlink-common/pkg/chipingress v0.0.1/go.mod h1:NZv/qKYGFRnkjOYBouajnDfFoZ+WDa6H2KNmSf1dnKc= github.com/smartcontractkit/chainlink-common/pkg/monitoring v0.0.0-20250415235644-8703639403c7 h1:9wh1G+WbXwPVqf0cfSRSgwIcaXTQgvYezylEAfwmrbw= @@ -1616,10 +1616,10 @@ github.com/smartcontractkit/chainlink-testing-framework/seth v1.51.2 h1:ZJ/8Jx6B github.com/smartcontractkit/chainlink-testing-framework/seth v1.51.2/go.mod h1:kHYJnZUqiPF7/xN5273prV+srrLJkS77GbBXHLKQpx0= github.com/smartcontractkit/chainlink-testing-framework/wasp v1.51.0 h1:qaLw7J7oRRsj+lUzzIjGVlXAVNmkAEwjj7xTXe0hcAk= github.com/smartcontractkit/chainlink-testing-framework/wasp v1.51.0/go.mod h1:eqV2n0vpqnY5N51je5/1vC/Qm8MMXVKvOXjLM+53Sog= -github.com/smartcontractkit/chainlink-ton v0.0.0-20250917170425-f6b7494e763a h1:2YW8whv11JB3ERH8KDzUaGm8E9dSXgBR49dYupgQ3K4= -github.com/smartcontractkit/chainlink-ton v0.0.0-20250917170425-f6b7494e763a/go.mod h1:JwhOCyjiBfABLgTc1evmLOLbh4PM2Z2ge9kJKP5EASE= -github.com/smartcontractkit/chainlink-ton/deployment v0.0.0-20250917170425-f6b7494e763a h1:LlTs8OU6p/nQR3TJxQ5b5xICubwHzXlNcSp5aN7DUxA= -github.com/smartcontractkit/chainlink-ton/deployment v0.0.0-20250917170425-f6b7494e763a/go.mod h1:0W4rs7nzxk4ELqt1Rsh7edZ7S+rwDYXSy9x3uiSnPR4= +github.com/smartcontractkit/chainlink-ton v0.0.0-20250919172159-145ae60a55a7 h1:q20IossQggFeXmvwgFjnjQCPEqwM4GUsyqIzMSmwVEk= +github.com/smartcontractkit/chainlink-ton v0.0.0-20250919172159-145ae60a55a7/go.mod h1:HcO2B+gLx58p6PhcOosU4JJ3DcGaQfHVN13m034IhbY= +github.com/smartcontractkit/chainlink-ton/deployment v0.0.0-20250919172159-145ae60a55a7 h1:4DMIiYqxIMbzEJtAym3NdpF7j6Yy8EIQvV4sszotUtk= +github.com/smartcontractkit/chainlink-ton/deployment v0.0.0-20250919172159-145ae60a55a7/go.mod h1:8Ln3xZjRo25wevE1QTYONHCgl3fZdsXnlKL/BZlzwAI= github.com/smartcontractkit/chainlink-tron/relayer v0.0.11-0.20250908203554-5bd9d2fe9513 h1:XRNxgcNqagXu6e4smJuS1crRK5cUAcCVd7u+iLduHDM= github.com/smartcontractkit/chainlink-tron/relayer v0.0.11-0.20250908203554-5bd9d2fe9513/go.mod h1:ccjEgNeqOO+bjPddnL4lUrNLzyCvGCxgBjJdhFX3wa8= github.com/smartcontractkit/chainlink-tron/relayer/gotron-sdk v0.0.5-0.20250422175525-b7575d96bd4d h1:qLmSOOtB/Ogn79eIDkuujOu8M5Jd747V1H7Brk/nTvo= diff --git a/integration-tests/smoke/ccip/ccip_aptos_msghasher_test.go b/integration-tests/smoke/ccip/ccip_aptos_msghasher_test.go index 1bd875e0a21..e293b7b1c83 100644 --- a/integration-tests/smoke/ccip/ccip_aptos_msghasher_test.go +++ b/integration-tests/smoke/ccip/ccip_aptos_msghasher_test.go @@ -51,7 +51,7 @@ func Test_CCIP_AptosMessageHasher_OnChainVerification(t *testing.T) { destChain := aptosChainSelectors[0] // Aptos destination // Setup off-chain message hasher - extraDataCodec := ccipocr3common.ExtraDataCodec(map[string]ccipocr3common.SourceChainExtraDataCodec{ + extraDataCodec := ccipocr3common.ExtraDataCodecMap(map[string]ccipocr3common.SourceChainExtraDataCodec{ chain_selectors.FamilyAptos: ccipaptos.ExtraDataDecoder{}, chain_selectors.FamilyEVM: ccipevm.ExtraDataDecoder{}, }) diff --git a/integration-tests/smoke/ccip/ccip_disable_lane_test.go b/integration-tests/smoke/ccip/ccip_disable_lane_test.go index 6d16c77b3bf..f05ec3a2f0d 100644 --- a/integration-tests/smoke/ccip/ccip_disable_lane_test.go +++ b/integration-tests/smoke/ccip/ccip_disable_lane_test.go @@ -129,7 +129,7 @@ func TestDisableLane(t *testing.T) { // re-enable all the disabled lanes for _, pair := range pairs { - testhelpers.AddLane(t, &tenv, pair.SourceChainSelector, pair.DestChainSelector, false, + err := testhelpers.AddLane(t, &tenv, state, pair.SourceChainSelector, pair.DestChainSelector, false, map[uint64]*big.Int{ pair.DestChainSelector: testhelpers.DefaultGasPrice, }, @@ -138,6 +138,7 @@ func TestDisableLane(t *testing.T) { state.MustGetEVMChainState(pair.SourceChainSelector).Weth9.Address().String(): wethPrice, }, v1_6.DefaultFeeQuoterDestChainConfig(true)) + require.NoError(t, err) } // send a message in all the lane including re-enabled lanes for _, pair := range pairs { diff --git a/system-tests/lib/go.mod b/system-tests/lib/go.mod index 710229025e1..0a89dac09ea 100644 --- a/system-tests/lib/go.mod +++ b/system-tests/lib/go.mod @@ -32,7 +32,7 @@ require ( github.com/rs/zerolog v1.33.0 github.com/scylladb/go-reflectx v1.0.1 github.com/smartcontractkit/chain-selectors v1.0.71 - github.com/smartcontractkit/chainlink-common v0.9.5-0.20250916141452-e1a0681b6bae + github.com/smartcontractkit/chainlink-common v0.9.5-0.20250919011014-06d4446b8a37 github.com/smartcontractkit/chainlink-deployments-framework v0.49.0 github.com/smartcontractkit/chainlink-evm v0.3.4-0.20250915101441-709f87f7d401 github.com/smartcontractkit/chainlink-evm/gethwrappers v0.0.0-20250827130336-5922343458be @@ -448,7 +448,7 @@ require ( github.com/smartcontractkit/ccip-owner-contracts v0.1.0 // indirect github.com/smartcontractkit/chainlink-aptos v0.0.0-20250916164650-970686360fbf // indirect github.com/smartcontractkit/chainlink-automation v0.8.1 // indirect - github.com/smartcontractkit/chainlink-ccip v0.1.1-solana.0.20250911201806-5a095deaeb52 // indirect + github.com/smartcontractkit/chainlink-ccip v0.1.1-solana.0.20250919012900-332dc2938bde // indirect github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250908144012-8184001834b5 // indirect github.com/smartcontractkit/chainlink-ccip/chains/solana/gobindings v0.0.0-20250908144012-8184001834b5 // indirect github.com/smartcontractkit/chainlink-common/pkg/chipingress v0.0.1 // indirect @@ -467,8 +467,8 @@ require ( github.com/smartcontractkit/chainlink-protos/workflows/go v0.0.0-20250912140847-cbfb1710ac76 // indirect github.com/smartcontractkit/chainlink-sui v0.0.0-20250916193659-4becc28a467f // indirect github.com/smartcontractkit/chainlink-testing-framework/parrot v0.6.2 // indirect - github.com/smartcontractkit/chainlink-ton v0.0.0-20250917170425-f6b7494e763a // indirect - github.com/smartcontractkit/chainlink-ton/deployment v0.0.0-20250917170425-f6b7494e763a // indirect + github.com/smartcontractkit/chainlink-ton v0.0.0-20250919172159-145ae60a55a7 // indirect + github.com/smartcontractkit/chainlink-ton/deployment v0.0.0-20250919172159-145ae60a55a7 // indirect github.com/smartcontractkit/chainlink-tron/relayer v0.0.11-0.20250908203554-5bd9d2fe9513 // indirect github.com/smartcontractkit/freeport v0.1.3-0.20250716200817-cb5dfd0e369e // indirect github.com/smartcontractkit/grpc-proxy v0.0.0-20240830132753-a7e17fec5ab7 // indirect diff --git a/system-tests/lib/go.sum b/system-tests/lib/go.sum index f8d673e00a4..ce72839513c 100644 --- a/system-tests/lib/go.sum +++ b/system-tests/lib/go.sum @@ -1564,14 +1564,14 @@ github.com/smartcontractkit/chainlink-aptos v0.0.0-20250916164650-970686360fbf h github.com/smartcontractkit/chainlink-aptos v0.0.0-20250916164650-970686360fbf/go.mod h1:tEjqontct1/5cKHm4q75nopZa1rwzaQZwd9U9wn0uZE= github.com/smartcontractkit/chainlink-automation v0.8.1 h1:sTc9LKpBvcKPc1JDYAmgBc2xpDKBco/Q4h4ydl6+UUU= github.com/smartcontractkit/chainlink-automation v0.8.1/go.mod h1:Iij36PvWZ6blrdC5A/nrQUBuf3MH3JvsBB9sSyc9W08= -github.com/smartcontractkit/chainlink-ccip v0.1.1-solana.0.20250911201806-5a095deaeb52 h1:q0rx7lax/Wi0GK3+fTn22sx4zp4HPPu+2m5fcE12Rn8= -github.com/smartcontractkit/chainlink-ccip v0.1.1-solana.0.20250911201806-5a095deaeb52/go.mod h1:4djmYiCYf9BfpNcuhANzh/umrMKfhOQRGfnk1ZnL5Io= +github.com/smartcontractkit/chainlink-ccip v0.1.1-solana.0.20250919012900-332dc2938bde h1:Op+2l8VwEkWn6W9JnFRouZz4pWxhbOPUM+ig72ZIZJk= +github.com/smartcontractkit/chainlink-ccip v0.1.1-solana.0.20250919012900-332dc2938bde/go.mod h1:VoU5lCstXyGCNMCKm6HRPUcL+AL4JOhPFdd1bfm4cWQ= github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250908144012-8184001834b5 h1:GmJQqNrWn5pNc8YTei6l2TOSYjK2fRd4+edFZIifCrU= github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250908144012-8184001834b5/go.mod h1:Ve1xD71bl193YIZQEoJMmBqLGQJdNs29bwbuObwvbhQ= github.com/smartcontractkit/chainlink-ccip/chains/solana/gobindings v0.0.0-20250908144012-8184001834b5 h1:QhcYGEhRLInr1/qh/3RJiVdvJ0nxBHKhPe65WLbSBnU= github.com/smartcontractkit/chainlink-ccip/chains/solana/gobindings v0.0.0-20250908144012-8184001834b5/go.mod h1:xtZNi6pOKdC3sLvokDvXOhgHzT+cyBqH/gWwvxTxqrg= -github.com/smartcontractkit/chainlink-common v0.9.5-0.20250916141452-e1a0681b6bae h1:ZWR3fF8vEtT+WeTtO5pSoaOExynn2MH6ThM1JzcRo4g= -github.com/smartcontractkit/chainlink-common v0.9.5-0.20250916141452-e1a0681b6bae/go.mod h1:Sjn789M++//bIH4vC5LYdo+0zvdkGvt0xz1LCxrYx1M= +github.com/smartcontractkit/chainlink-common v0.9.5-0.20250919011014-06d4446b8a37 h1:SZPmMGoR6suwvH54pGG+PKAhNQYfV3E4u+xQhkllFio= +github.com/smartcontractkit/chainlink-common v0.9.5-0.20250919011014-06d4446b8a37/go.mod h1:EKFUYgf8IsArVMF8lzXNyIhdH6lM8mhyvztCSouZ+G8= github.com/smartcontractkit/chainlink-common/pkg/chipingress v0.0.1 h1:ca2z5OXgnbBPQRxpwXwBLJsUA1+cAp5ncfW4Ssvd6eY= github.com/smartcontractkit/chainlink-common/pkg/chipingress v0.0.1/go.mod h1:NZv/qKYGFRnkjOYBouajnDfFoZ+WDa6H2KNmSf1dnKc= github.com/smartcontractkit/chainlink-common/pkg/monitoring v0.0.0-20250415235644-8703639403c7 h1:9wh1G+WbXwPVqf0cfSRSgwIcaXTQgvYezylEAfwmrbw= @@ -1628,10 +1628,10 @@ github.com/smartcontractkit/chainlink-testing-framework/parrot v0.6.2 h1:cWUHB6Q github.com/smartcontractkit/chainlink-testing-framework/parrot v0.6.2/go.mod h1:Z4K5VJLjsfqIIaBcZ1Sfccxu0xsCxBjPa6zF+5gtQaM= github.com/smartcontractkit/chainlink-testing-framework/seth v1.51.2 h1:ZJ/8Jx6Be5//TyjPi1pS1uotnmcYq5vVkSyISIymSj8= github.com/smartcontractkit/chainlink-testing-framework/seth v1.51.2/go.mod h1:kHYJnZUqiPF7/xN5273prV+srrLJkS77GbBXHLKQpx0= -github.com/smartcontractkit/chainlink-ton v0.0.0-20250917170425-f6b7494e763a h1:2YW8whv11JB3ERH8KDzUaGm8E9dSXgBR49dYupgQ3K4= -github.com/smartcontractkit/chainlink-ton v0.0.0-20250917170425-f6b7494e763a/go.mod h1:JwhOCyjiBfABLgTc1evmLOLbh4PM2Z2ge9kJKP5EASE= -github.com/smartcontractkit/chainlink-ton/deployment v0.0.0-20250917170425-f6b7494e763a h1:LlTs8OU6p/nQR3TJxQ5b5xICubwHzXlNcSp5aN7DUxA= -github.com/smartcontractkit/chainlink-ton/deployment v0.0.0-20250917170425-f6b7494e763a/go.mod h1:0W4rs7nzxk4ELqt1Rsh7edZ7S+rwDYXSy9x3uiSnPR4= +github.com/smartcontractkit/chainlink-ton v0.0.0-20250919172159-145ae60a55a7 h1:q20IossQggFeXmvwgFjnjQCPEqwM4GUsyqIzMSmwVEk= +github.com/smartcontractkit/chainlink-ton v0.0.0-20250919172159-145ae60a55a7/go.mod h1:HcO2B+gLx58p6PhcOosU4JJ3DcGaQfHVN13m034IhbY= +github.com/smartcontractkit/chainlink-ton/deployment v0.0.0-20250919172159-145ae60a55a7 h1:4DMIiYqxIMbzEJtAym3NdpF7j6Yy8EIQvV4sszotUtk= +github.com/smartcontractkit/chainlink-ton/deployment v0.0.0-20250919172159-145ae60a55a7/go.mod h1:8Ln3xZjRo25wevE1QTYONHCgl3fZdsXnlKL/BZlzwAI= github.com/smartcontractkit/chainlink-tron/relayer v0.0.11-0.20250908203554-5bd9d2fe9513 h1:XRNxgcNqagXu6e4smJuS1crRK5cUAcCVd7u+iLduHDM= github.com/smartcontractkit/chainlink-tron/relayer v0.0.11-0.20250908203554-5bd9d2fe9513/go.mod h1:ccjEgNeqOO+bjPddnL4lUrNLzyCvGCxgBjJdhFX3wa8= github.com/smartcontractkit/chainlink-tron/relayer/gotron-sdk v0.0.5-0.20250422175525-b7575d96bd4d h1:qLmSOOtB/Ogn79eIDkuujOu8M5Jd747V1H7Brk/nTvo= diff --git a/system-tests/tests/go.mod b/system-tests/tests/go.mod index 6d82043a939..6a5f001401e 100644 --- a/system-tests/tests/go.mod +++ b/system-tests/tests/go.mod @@ -33,7 +33,7 @@ require ( github.com/prometheus/common v0.65.0 github.com/rs/zerolog v1.33.0 github.com/shopspring/decimal v1.4.0 - github.com/smartcontractkit/chainlink-common v0.9.5-0.20250916141452-e1a0681b6bae + github.com/smartcontractkit/chainlink-common v0.9.5-0.20250919011014-06d4446b8a37 github.com/smartcontractkit/chainlink-data-streams v0.1.2 github.com/smartcontractkit/chainlink-deployments-framework v0.49.0 github.com/smartcontractkit/chainlink-evm/gethwrappers v0.0.0-20250827130336-5922343458be @@ -529,7 +529,7 @@ require ( github.com/smartcontractkit/chain-selectors v1.0.71 // indirect github.com/smartcontractkit/chainlink-aptos v0.0.0-20250916164650-970686360fbf // indirect github.com/smartcontractkit/chainlink-automation v0.8.1 // indirect - github.com/smartcontractkit/chainlink-ccip v0.1.1-solana.0.20250911201806-5a095deaeb52 // indirect + github.com/smartcontractkit/chainlink-ccip v0.1.1-solana.0.20250919012900-332dc2938bde // indirect github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250908144012-8184001834b5 // indirect github.com/smartcontractkit/chainlink-ccip/chains/solana/gobindings v0.0.0-20250908144012-8184001834b5 // indirect github.com/smartcontractkit/chainlink-common/pkg/chipingress v0.0.1 // indirect @@ -549,8 +549,8 @@ require ( github.com/smartcontractkit/chainlink-testing-framework/framework/components/dockercompose v0.1.14-0.20250912141514-907781001913 // indirect github.com/smartcontractkit/chainlink-testing-framework/lib/grafana v1.50.0 // indirect github.com/smartcontractkit/chainlink-testing-framework/parrot v0.6.2 // indirect - github.com/smartcontractkit/chainlink-ton v0.0.0-20250917170425-f6b7494e763a // indirect - github.com/smartcontractkit/chainlink-ton/deployment v0.0.0-20250917170425-f6b7494e763a // indirect + github.com/smartcontractkit/chainlink-ton v0.0.0-20250919172159-145ae60a55a7 // indirect + github.com/smartcontractkit/chainlink-ton/deployment v0.0.0-20250919172159-145ae60a55a7 // indirect github.com/smartcontractkit/chainlink-tron/relayer v0.0.11-0.20250908203554-5bd9d2fe9513 // indirect github.com/smartcontractkit/crib-sdk v0.4.0 // indirect github.com/smartcontractkit/freeport v0.1.3-0.20250716200817-cb5dfd0e369e // indirect diff --git a/system-tests/tests/go.sum b/system-tests/tests/go.sum index f12d4304350..0acc51fc4b1 100644 --- a/system-tests/tests/go.sum +++ b/system-tests/tests/go.sum @@ -1767,14 +1767,14 @@ github.com/smartcontractkit/chainlink-aptos v0.0.0-20250916164650-970686360fbf h github.com/smartcontractkit/chainlink-aptos v0.0.0-20250916164650-970686360fbf/go.mod h1:tEjqontct1/5cKHm4q75nopZa1rwzaQZwd9U9wn0uZE= github.com/smartcontractkit/chainlink-automation v0.8.1 h1:sTc9LKpBvcKPc1JDYAmgBc2xpDKBco/Q4h4ydl6+UUU= github.com/smartcontractkit/chainlink-automation v0.8.1/go.mod h1:Iij36PvWZ6blrdC5A/nrQUBuf3MH3JvsBB9sSyc9W08= -github.com/smartcontractkit/chainlink-ccip v0.1.1-solana.0.20250911201806-5a095deaeb52 h1:q0rx7lax/Wi0GK3+fTn22sx4zp4HPPu+2m5fcE12Rn8= -github.com/smartcontractkit/chainlink-ccip v0.1.1-solana.0.20250911201806-5a095deaeb52/go.mod h1:4djmYiCYf9BfpNcuhANzh/umrMKfhOQRGfnk1ZnL5Io= +github.com/smartcontractkit/chainlink-ccip v0.1.1-solana.0.20250919012900-332dc2938bde h1:Op+2l8VwEkWn6W9JnFRouZz4pWxhbOPUM+ig72ZIZJk= +github.com/smartcontractkit/chainlink-ccip v0.1.1-solana.0.20250919012900-332dc2938bde/go.mod h1:VoU5lCstXyGCNMCKm6HRPUcL+AL4JOhPFdd1bfm4cWQ= github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250908144012-8184001834b5 h1:GmJQqNrWn5pNc8YTei6l2TOSYjK2fRd4+edFZIifCrU= github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250908144012-8184001834b5/go.mod h1:Ve1xD71bl193YIZQEoJMmBqLGQJdNs29bwbuObwvbhQ= github.com/smartcontractkit/chainlink-ccip/chains/solana/gobindings v0.0.0-20250908144012-8184001834b5 h1:QhcYGEhRLInr1/qh/3RJiVdvJ0nxBHKhPe65WLbSBnU= github.com/smartcontractkit/chainlink-ccip/chains/solana/gobindings v0.0.0-20250908144012-8184001834b5/go.mod h1:xtZNi6pOKdC3sLvokDvXOhgHzT+cyBqH/gWwvxTxqrg= -github.com/smartcontractkit/chainlink-common v0.9.5-0.20250916141452-e1a0681b6bae h1:ZWR3fF8vEtT+WeTtO5pSoaOExynn2MH6ThM1JzcRo4g= -github.com/smartcontractkit/chainlink-common v0.9.5-0.20250916141452-e1a0681b6bae/go.mod h1:Sjn789M++//bIH4vC5LYdo+0zvdkGvt0xz1LCxrYx1M= +github.com/smartcontractkit/chainlink-common v0.9.5-0.20250919011014-06d4446b8a37 h1:SZPmMGoR6suwvH54pGG+PKAhNQYfV3E4u+xQhkllFio= +github.com/smartcontractkit/chainlink-common v0.9.5-0.20250919011014-06d4446b8a37/go.mod h1:EKFUYgf8IsArVMF8lzXNyIhdH6lM8mhyvztCSouZ+G8= github.com/smartcontractkit/chainlink-common/pkg/chipingress v0.0.1 h1:ca2z5OXgnbBPQRxpwXwBLJsUA1+cAp5ncfW4Ssvd6eY= github.com/smartcontractkit/chainlink-common/pkg/chipingress v0.0.1/go.mod h1:NZv/qKYGFRnkjOYBouajnDfFoZ+WDa6H2KNmSf1dnKc= github.com/smartcontractkit/chainlink-common/pkg/monitoring v0.0.0-20250415235644-8703639403c7 h1:9wh1G+WbXwPVqf0cfSRSgwIcaXTQgvYezylEAfwmrbw= @@ -1837,10 +1837,10 @@ github.com/smartcontractkit/chainlink-testing-framework/seth v1.51.2 h1:ZJ/8Jx6B github.com/smartcontractkit/chainlink-testing-framework/seth v1.51.2/go.mod h1:kHYJnZUqiPF7/xN5273prV+srrLJkS77GbBXHLKQpx0= github.com/smartcontractkit/chainlink-testing-framework/wasp v1.51.1 h1:azdJaWIyZJlHFEQQExHklfGfb30zzAx3WsxaCaMm4IM= github.com/smartcontractkit/chainlink-testing-framework/wasp v1.51.1/go.mod h1:vB5W8mngbHvDFlpujHY8jIotHr0a8J/8TIsexP/yANo= -github.com/smartcontractkit/chainlink-ton v0.0.0-20250917170425-f6b7494e763a h1:2YW8whv11JB3ERH8KDzUaGm8E9dSXgBR49dYupgQ3K4= -github.com/smartcontractkit/chainlink-ton v0.0.0-20250917170425-f6b7494e763a/go.mod h1:JwhOCyjiBfABLgTc1evmLOLbh4PM2Z2ge9kJKP5EASE= -github.com/smartcontractkit/chainlink-ton/deployment v0.0.0-20250917170425-f6b7494e763a h1:LlTs8OU6p/nQR3TJxQ5b5xICubwHzXlNcSp5aN7DUxA= -github.com/smartcontractkit/chainlink-ton/deployment v0.0.0-20250917170425-f6b7494e763a/go.mod h1:0W4rs7nzxk4ELqt1Rsh7edZ7S+rwDYXSy9x3uiSnPR4= +github.com/smartcontractkit/chainlink-ton v0.0.0-20250919172159-145ae60a55a7 h1:q20IossQggFeXmvwgFjnjQCPEqwM4GUsyqIzMSmwVEk= +github.com/smartcontractkit/chainlink-ton v0.0.0-20250919172159-145ae60a55a7/go.mod h1:HcO2B+gLx58p6PhcOosU4JJ3DcGaQfHVN13m034IhbY= +github.com/smartcontractkit/chainlink-ton/deployment v0.0.0-20250919172159-145ae60a55a7 h1:4DMIiYqxIMbzEJtAym3NdpF7j6Yy8EIQvV4sszotUtk= +github.com/smartcontractkit/chainlink-ton/deployment v0.0.0-20250919172159-145ae60a55a7/go.mod h1:8Ln3xZjRo25wevE1QTYONHCgl3fZdsXnlKL/BZlzwAI= github.com/smartcontractkit/chainlink-tron/relayer v0.0.11-0.20250908203554-5bd9d2fe9513 h1:XRNxgcNqagXu6e4smJuS1crRK5cUAcCVd7u+iLduHDM= github.com/smartcontractkit/chainlink-tron/relayer v0.0.11-0.20250908203554-5bd9d2fe9513/go.mod h1:ccjEgNeqOO+bjPddnL4lUrNLzyCvGCxgBjJdhFX3wa8= github.com/smartcontractkit/chainlink-tron/relayer/gotron-sdk v0.0.5-0.20250422175525-b7575d96bd4d h1:qLmSOOtB/Ogn79eIDkuujOu8M5Jd747V1H7Brk/nTvo=