diff --git a/.tool-versions b/.tool-versions index 0cf1508e6..f40dfbb66 100644 --- a/.tool-versions +++ b/.tool-versions @@ -1,4 +1,4 @@ -golang 1.25.3 +golang 1.26.2 protoc 29.3 protoc-gen-go-grpc 1.3.0 golangci-lint 2.11.4 diff --git a/go.mod b/go.mod index 19873c679..ad90a7e4c 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/smartcontractkit/chainlink-common -go 1.25.3 +go 1.26.2 require ( github.com/Masterminds/semver/v3 v3.4.0 diff --git a/keystore/go.mod b/keystore/go.mod index bfe48b268..dc77a4775 100644 --- a/keystore/go.mod +++ b/keystore/go.mod @@ -1,6 +1,6 @@ module github.com/smartcontractkit/chainlink-common/keystore -go 1.25.3 +go 1.26.2 require ( github.com/NethermindEth/juno v0.12.5 diff --git a/observability-lib/go.mod b/observability-lib/go.mod index fdcf3fa26..ff011c3da 100644 --- a/observability-lib/go.mod +++ b/observability-lib/go.mod @@ -1,6 +1,6 @@ module github.com/smartcontractkit/chainlink-common/observability-lib -go 1.25.0 +go 1.26.2 require ( github.com/go-resty/resty/v2 v2.17.1 diff --git a/pkg/beholder/internal/mocks/otlp_exporter.go b/pkg/beholder/internal/mocks/otlp_exporter.go index c3ecde10d..0b8677437 100644 --- a/pkg/beholder/internal/mocks/otlp_exporter.go +++ b/pkg/beholder/internal/mocks/otlp_exporter.go @@ -5,9 +5,8 @@ package mocks import ( context "context" - log "go.opentelemetry.io/otel/sdk/log" - mock "github.com/stretchr/testify/mock" + log "go.opentelemetry.io/otel/sdk/log" ) // OTLPExporter is an autogenerated mock type for the OTLPExporter type diff --git a/pkg/capabilities/datastreams/mocks/report_codec.go b/pkg/capabilities/datastreams/mocks/report_codec.go index e4dba6e64..d15acf0ed 100644 --- a/pkg/capabilities/datastreams/mocks/report_codec.go +++ b/pkg/capabilities/datastreams/mocks/report_codec.go @@ -4,9 +4,8 @@ package mocks import ( datastreams "github.com/smartcontractkit/chainlink-common/pkg/capabilities/datastreams" - mock "github.com/stretchr/testify/mock" - values "github.com/smartcontractkit/chainlink-protos/cre/go/values" + mock "github.com/stretchr/testify/mock" ) // ReportCodec is an autogenerated mock type for the ReportCodec type diff --git a/pkg/chipingress/go.mod b/pkg/chipingress/go.mod index 1ac0640ea..073057953 100644 --- a/pkg/chipingress/go.mod +++ b/pkg/chipingress/go.mod @@ -1,6 +1,6 @@ module github.com/smartcontractkit/chainlink-common/pkg/chipingress -go 1.25.3 +go 1.26.2 require ( github.com/cloudevents/sdk-go/binding/format/protobuf/v2 v2.16.1 diff --git a/pkg/chipingress/mocks/client.go b/pkg/chipingress/mocks/client.go index 33b086905..f6b05bd9e 100644 --- a/pkg/chipingress/mocks/client.go +++ b/pkg/chipingress/mocks/client.go @@ -5,13 +5,10 @@ package mocks import ( context "context" - grpc "google.golang.org/grpc" - - mock "github.com/stretchr/testify/mock" - - pb "github.com/smartcontractkit/chainlink-common/pkg/chipingress/pb" - v2pb "github.com/cloudevents/sdk-go/binding/format/protobuf/v2/pb" + pb "github.com/smartcontractkit/chainlink-common/pkg/chipingress/pb" + mock "github.com/stretchr/testify/mock" + grpc "google.golang.org/grpc" ) // Client is an autogenerated mock type for the Client type diff --git a/pkg/loop/mocks/relayer.go b/pkg/loop/mocks/relayer.go index 42b687a59..286e6215d 100644 --- a/pkg/loop/mocks/relayer.go +++ b/pkg/loop/mocks/relayer.go @@ -6,9 +6,8 @@ import ( context "context" big "math/big" - mock "github.com/stretchr/testify/mock" - types "github.com/smartcontractkit/chainlink-common/pkg/types" + mock "github.com/stretchr/testify/mock" ) // Relayer is an autogenerated mock type for the Relayer type diff --git a/pkg/monitoring/go.mod b/pkg/monitoring/go.mod index e8b82e3c9..bc317f0cd 100644 --- a/pkg/monitoring/go.mod +++ b/pkg/monitoring/go.mod @@ -1,6 +1,6 @@ module github.com/smartcontractkit/chainlink-common/pkg/monitoring -go 1.25.0 +go 1.26.2 require ( github.com/confluentinc/confluent-kafka-go/v2 v2.3.0 diff --git a/pkg/nodeauth/jwt/mocks/jwt_authenticator.go b/pkg/nodeauth/jwt/mocks/jwt_authenticator.go index 3fc9baf44..58c8620ea 100644 --- a/pkg/nodeauth/jwt/mocks/jwt_authenticator.go +++ b/pkg/nodeauth/jwt/mocks/jwt_authenticator.go @@ -5,9 +5,8 @@ package mocks import ( context "context" - mock "github.com/stretchr/testify/mock" - types "github.com/smartcontractkit/chainlink-common/pkg/nodeauth/types" + mock "github.com/stretchr/testify/mock" ) // JWTAuthenticator is an autogenerated mock type for the JWTAuthenticator type diff --git a/pkg/types/ccip/mocks/offramp_reader_mock.go b/pkg/types/ccip/mocks/offramp_reader_mock.go index 601dcb635..4a651b11d 100644 --- a/pkg/types/ccip/mocks/offramp_reader_mock.go +++ b/pkg/types/ccip/mocks/offramp_reader_mock.go @@ -6,7 +6,6 @@ import ( context "context" ccip "github.com/smartcontractkit/chainlink-common/pkg/types/ccip" - mock "github.com/stretchr/testify/mock" ) diff --git a/pkg/types/core/mocks/capabilities_registry.go b/pkg/types/core/mocks/capabilities_registry.go index eddd985e7..3e1e81b7d 100644 --- a/pkg/types/core/mocks/capabilities_registry.go +++ b/pkg/types/core/mocks/capabilities_registry.go @@ -7,9 +7,8 @@ import ( capabilities "github.com/smartcontractkit/chainlink-common/pkg/capabilities" - mock "github.com/stretchr/testify/mock" - types "github.com/smartcontractkit/libocr/ragep2p/types" + mock "github.com/stretchr/testify/mock" ) // CapabilitiesRegistry is an autogenerated mock type for the CapabilitiesRegistry type diff --git a/pkg/types/core/mocks/gateway_connector.go b/pkg/types/core/mocks/gateway_connector.go index 1a065df12..010f5fc2a 100644 --- a/pkg/types/core/mocks/gateway_connector.go +++ b/pkg/types/core/mocks/gateway_connector.go @@ -6,10 +6,8 @@ import ( context "context" json "encoding/json" - core "github.com/smartcontractkit/chainlink-common/pkg/types/core" - jsonrpc2 "github.com/smartcontractkit/chainlink-common/pkg/jsonrpc2" - + core "github.com/smartcontractkit/chainlink-common/pkg/types/core" mock "github.com/stretchr/testify/mock" ) diff --git a/pkg/types/core/mocks/gateway_connector_handler.go b/pkg/types/core/mocks/gateway_connector_handler.go index a0bc78724..9277cd37e 100644 --- a/pkg/types/core/mocks/gateway_connector_handler.go +++ b/pkg/types/core/mocks/gateway_connector_handler.go @@ -8,7 +8,6 @@ import ( json "encoding/json" jsonrpc2 "github.com/smartcontractkit/chainlink-common/pkg/jsonrpc2" - mock "github.com/stretchr/testify/mock" ) diff --git a/pkg/types/core/mocks/relayer.go b/pkg/types/core/mocks/relayer.go index c5d3b4e9b..e5915de1c 100644 --- a/pkg/types/core/mocks/relayer.go +++ b/pkg/types/core/mocks/relayer.go @@ -5,10 +5,9 @@ package mocks import ( context "context" + types "github.com/smartcontractkit/chainlink-common/pkg/types" core "github.com/smartcontractkit/chainlink-common/pkg/types/core" mock "github.com/stretchr/testify/mock" - - types "github.com/smartcontractkit/chainlink-common/pkg/types" ) // Relayer is an autogenerated mock type for the Relayer type diff --git a/pkg/types/core/mocks/relayer_set.go b/pkg/types/core/mocks/relayer_set.go index cfdbb4119..de04bc19e 100644 --- a/pkg/types/core/mocks/relayer_set.go +++ b/pkg/types/core/mocks/relayer_set.go @@ -5,10 +5,9 @@ package mocks import ( context "context" + types "github.com/smartcontractkit/chainlink-common/pkg/types" core "github.com/smartcontractkit/chainlink-common/pkg/types/core" mock "github.com/stretchr/testify/mock" - - types "github.com/smartcontractkit/chainlink-common/pkg/types" ) // RelayerSet is an autogenerated mock type for the RelayerSet type diff --git a/pkg/types/mocks/aptos_service.go b/pkg/types/mocks/aptos_service.go index d8319ad26..d39a63ecd 100644 --- a/pkg/types/mocks/aptos_service.go +++ b/pkg/types/mocks/aptos_service.go @@ -6,7 +6,6 @@ import ( context "context" aptos "github.com/smartcontractkit/chainlink-common/pkg/types/chains/aptos" - mock "github.com/stretchr/testify/mock" ) diff --git a/pkg/types/mocks/contract_reader.go b/pkg/types/mocks/contract_reader.go index 69ca2adb3..759989353 100644 --- a/pkg/types/mocks/contract_reader.go +++ b/pkg/types/mocks/contract_reader.go @@ -6,13 +6,10 @@ import ( context "context" iter "iter" - mock "github.com/stretchr/testify/mock" - - primitives "github.com/smartcontractkit/chainlink-common/pkg/types/query/primitives" - - query "github.com/smartcontractkit/chainlink-common/pkg/types/query" - types "github.com/smartcontractkit/chainlink-common/pkg/types" + query "github.com/smartcontractkit/chainlink-common/pkg/types/query" + primitives "github.com/smartcontractkit/chainlink-common/pkg/types/query/primitives" + mock "github.com/stretchr/testify/mock" ) // ContractReader is an autogenerated mock type for the ContractReader type diff --git a/pkg/types/mocks/evm_service.go b/pkg/types/mocks/evm_service.go index aaca9d198..e6615a198 100644 --- a/pkg/types/mocks/evm_service.go +++ b/pkg/types/mocks/evm_service.go @@ -5,14 +5,11 @@ package mocks import ( context "context" + types "github.com/smartcontractkit/chainlink-common/pkg/types" evm "github.com/smartcontractkit/chainlink-common/pkg/types/chains/evm" - mock "github.com/stretchr/testify/mock" - - primitives "github.com/smartcontractkit/chainlink-common/pkg/types/query/primitives" - query "github.com/smartcontractkit/chainlink-common/pkg/types/query" - - types "github.com/smartcontractkit/chainlink-common/pkg/types" + primitives "github.com/smartcontractkit/chainlink-common/pkg/types/query/primitives" + mock "github.com/stretchr/testify/mock" ) // EVMService is an autogenerated mock type for the EVMService type diff --git a/pkg/types/mocks/solana_service.go b/pkg/types/mocks/solana_service.go index 51310cccf..36e5ac002 100644 --- a/pkg/types/mocks/solana_service.go +++ b/pkg/types/mocks/solana_service.go @@ -5,10 +5,9 @@ package mocks import ( context "context" + solana "github.com/smartcontractkit/chainlink-common/pkg/types/chains/solana" query "github.com/smartcontractkit/chainlink-common/pkg/types/query" mock "github.com/stretchr/testify/mock" - - solana "github.com/smartcontractkit/chainlink-common/pkg/types/chains/solana" ) // SolanaService is an autogenerated mock type for the SolanaService type diff --git a/pkg/types/mocks/ton_service.go b/pkg/types/mocks/ton_service.go index 69f9d0a3b..7390c75a0 100644 --- a/pkg/types/mocks/ton_service.go +++ b/pkg/types/mocks/ton_service.go @@ -5,10 +5,9 @@ package mocks import ( context "context" + types "github.com/smartcontractkit/chainlink-common/pkg/types" ton "github.com/smartcontractkit/chainlink-common/pkg/types/chains/ton" mock "github.com/stretchr/testify/mock" - - types "github.com/smartcontractkit/chainlink-common/pkg/types" ) // TONService is an autogenerated mock type for the TONService type diff --git a/pkg/values/go.mod b/pkg/values/go.mod index bfe7115d5..cea7ae4e2 100644 --- a/pkg/values/go.mod +++ b/pkg/values/go.mod @@ -1,3 +1,3 @@ module github.com/smartcontractkit/chainlink-common/pkg/values -go 1.25.0 +go 1.26.2 diff --git a/pkg/workflows/artifacts/artifacts_test.go b/pkg/workflows/artifacts/artifacts_test.go index e0d4d72ec..520438267 100644 --- a/pkg/workflows/artifacts/artifacts_test.go +++ b/pkg/workflows/artifacts/artifacts_test.go @@ -47,27 +47,27 @@ func (s *ArtifactsTestSuite) TestArtifacts() { // Compare the keccak256 hash of the binary data with the keccak256 hash of the // base64 encoded binary from CRE-CLI - expKeccak256Hash, err := hex.DecodeString("7385ae61173b2886a12250b508e2d361af0f6a40b6d0dda153fd4c20cb7e0c10") + expKeccak256Hash, err := hex.DecodeString("a057a58ff8212122016515b2922b7c3893525f7f5afe95c8442e0cd629d68420") s.NoError(err, "failed to decode expected keccak256 hash") keccak256FromSha3Lib := sha3.NewLegacyKeccak256() keccak256FromSha3Lib.Write(b64EncodedBinaryData) actualKeccak256Hash := keccak256FromSha3Lib.Sum(nil) - s.Equal(actualKeccak256Hash, expKeccak256Hash) + s.Equal(expKeccak256Hash, actualKeccak256Hash, "expected %x but got %x", expKeccak256Hash, actualKeccak256Hash) err = artifacts.Prepare() s.NoError(err, "failed to prepare artifacts") base64EncodedBinaryData := artifacts.GetBinaryData() // Compare if the compiled WASM binary is the same as the CRE-CLI output - s.Equal(563960, len(base64EncodedBinaryData), "binary data size should be same as CRE-CLI output") - s.Equal("m6kIGWtQvQYAALADgIPzAADQt3oerhGwcQAA8PV/uALY1AHwSGF6AACo9vMAqKqqqqqqqqqqqmsSAsIx", + s.Equal(636684, len(base64EncodedBinaryData), "binary data size should be same as CRE-CLI output") + s.Equal("m1upG3s6AJQvOA8AAK295+EaARsHAADf/YcBgFURwPQAANDq5wFQVVVVVVVVVVVV3ZMQEI7ZtgMAAKqq", string(base64EncodedBinaryData[0:80])) - s.Equal("iBgWTlBKb+iQflnikISk/ALWkBmXnTIkLiWJYdvkGOrbpWD+9ybhB5ISI+JHMO5tcviErMSoqk5p1CY=", + s.Equal("gUEoFNoVRfyHGTsZmdg7wCJbGVibOhmYmsDAytgg92FTTmiddpI/x8SYzdANBkPGhtLoj/Hn7jvK26YE", string(base64EncodedBinaryData[len(base64EncodedBinaryData)-80:])) s.Equal("myContract: 0x44DD9D24349965E5e20E3D6118F560BCd64828E9\nchainID: 11155111", string(artifacts.GetConfigData())) - s.Equal("008619548c29a2ed3eee5f904dc34305191e23e22559d788272b0d4587d776ef", artifacts.GetWorkflowID()) + s.Equal("004789eee3f5eee474ef64fe8b9251086083ad14af7b9135c9f33b661a128b3e", artifacts.GetWorkflowID()) } func (s *ArtifactsTestSuite) TestArtifactsSadPaths() { diff --git a/pkg/workflows/sdk/v2/pb/go.mod b/pkg/workflows/sdk/v2/pb/go.mod index 1f3be4b18..49623e0fb 100644 --- a/pkg/workflows/sdk/v2/pb/go.mod +++ b/pkg/workflows/sdk/v2/pb/go.mod @@ -1,3 +1,3 @@ module github.com/smartcontractkit/chainlink-common/pkg/workflows/sdk/v2/pb -go 1.25.0 +go 1.26.2 diff --git a/pkg/workflows/wasm/host/mock_execution_helper_test.go b/pkg/workflows/wasm/host/mock_execution_helper_test.go index 797ca989c..9f2a84d8a 100644 --- a/pkg/workflows/wasm/host/mock_execution_helper_test.go +++ b/pkg/workflows/wasm/host/mock_execution_helper_test.go @@ -4,13 +4,11 @@ package host import ( context "context" - - sdk "github.com/smartcontractkit/chainlink-protos/cre/go/sdk" - mock "github.com/stretchr/testify/mock" - time "time" + sdk "github.com/smartcontractkit/chainlink-protos/cre/go/sdk" v2 "github.com/smartcontractkit/chainlink-protos/workflows/go/v2" + mock "github.com/stretchr/testify/mock" ) // MockExecutionHelper is an autogenerated mock type for the ExecutionHelper type diff --git a/pkg/workflows/wasm/host/mocks/module_v1.go b/pkg/workflows/wasm/host/mocks/module_v1.go index 9a571031b..1e2ed2e04 100644 --- a/pkg/workflows/wasm/host/mocks/module_v1.go +++ b/pkg/workflows/wasm/host/mocks/module_v1.go @@ -5,9 +5,8 @@ package mocks import ( context "context" - mock "github.com/stretchr/testify/mock" - pb "github.com/smartcontractkit/chainlink-common/pkg/workflows/wasm/pb" + mock "github.com/stretchr/testify/mock" ) // ModuleV1 is an autogenerated mock type for the ModuleV1 type diff --git a/pkg/workflows/wasm/host/mocks/module_v2.go b/pkg/workflows/wasm/host/mocks/module_v2.go index 895f71c46..4c84a3b4a 100644 --- a/pkg/workflows/wasm/host/mocks/module_v2.go +++ b/pkg/workflows/wasm/host/mocks/module_v2.go @@ -6,9 +6,8 @@ import ( context "context" host "github.com/smartcontractkit/chainlink-common/pkg/workflows/wasm/host" - mock "github.com/stretchr/testify/mock" - sdk "github.com/smartcontractkit/chainlink-protos/cre/go/sdk" + mock "github.com/stretchr/testify/mock" ) // ModuleV2 is an autogenerated mock type for the ModuleV2 type