Skip to content

Commit f1f03b6

Browse files
authored
feat: sets go sdk to v1 (#159)
1 parent 1994cb3 commit f1f03b6

File tree

8 files changed

+21
-18
lines changed

8 files changed

+21
-18
lines changed

cmd/creinit/go_module_init.go

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,10 @@ import (
1111
"github.com/rs/zerolog"
1212
)
1313

14-
const SdkVersion = "v1.0.0-beta.0"
14+
const (
15+
SdkVersion = "v1.0.0"
16+
CapabilitiesVersion = "v1.0.0-beta.0"
17+
)
1518

1619
func initializeGoModule(logger *zerolog.Logger, workingDirectory, moduleName string) error {
1720
var deps []string
@@ -36,13 +39,13 @@ func initializeGoModule(logger *zerolog.Logger, workingDirectory, moduleName str
3639
if err := captureDep("go", "get", "github.com/smartcontractkit/cre-sdk-go@"+SdkVersion); err != nil {
3740
return err
3841
}
39-
if err := captureDep("go", "get", "github.com/smartcontractkit/cre-sdk-go/capabilities/blockchain/evm@"+SdkVersion); err != nil {
42+
if err := captureDep("go", "get", "github.com/smartcontractkit/cre-sdk-go/capabilities/blockchain/evm@"+CapabilitiesVersion); err != nil {
4043
return err
4144
}
42-
if err := captureDep("go", "get", "github.com/smartcontractkit/cre-sdk-go/capabilities/networking/http@"+SdkVersion); err != nil {
45+
if err := captureDep("go", "get", "github.com/smartcontractkit/cre-sdk-go/capabilities/networking/http@"+CapabilitiesVersion); err != nil {
4346
return err
4447
}
45-
if err := captureDep("go", "get", "github.com/smartcontractkit/cre-sdk-go/capabilities/scheduler/cron@"+SdkVersion); err != nil {
48+
if err := captureDep("go", "get", "github.com/smartcontractkit/cre-sdk-go/capabilities/scheduler/cron@"+CapabilitiesVersion); err != nil {
4649
return err
4750
}
4851

cmd/generate-bindings/generate-bindings.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ type Inputs struct {
2626
}
2727

2828
func New(runtimeContext *runtime.Context) *cobra.Command {
29-
var generateBindingsCmd = &cobra.Command{
29+
generateBindingsCmd := &cobra.Command{
3030
Use: "generate-bindings <chain-family>",
3131
Short: "Generate bindings from contract ABI",
3232
Long: `This command generates bindings from contract ABI files.
@@ -211,7 +211,7 @@ func (h *handler) processAbiDirectory(inputs Inputs) error {
211211

212212
// Create per-contract output directory
213213
contractOutDir := filepath.Join(inputs.OutPath, packageName)
214-
if err := os.MkdirAll(contractOutDir, 0755); err != nil {
214+
if err := os.MkdirAll(contractOutDir, 0o755); err != nil {
215215
return fmt.Errorf("failed to create contract output directory %s: %w", contractOutDir, err)
216216
}
217217

@@ -247,7 +247,7 @@ func (h *handler) processSingleAbi(inputs Inputs) error {
247247

248248
// Create per-contract output directory
249249
contractOutDir := filepath.Join(inputs.OutPath, packageName)
250-
if err := os.MkdirAll(contractOutDir, 0755); err != nil {
250+
if err := os.MkdirAll(contractOutDir, 0o755); err != nil {
251251
return fmt.Errorf("failed to create contract output directory %s: %w", contractOutDir, err)
252252
}
253253

@@ -280,7 +280,7 @@ func (h *handler) Execute(inputs Inputs) error {
280280
switch inputs.ChainFamily {
281281
case "evm":
282282
// Create output directory if it doesn't exist
283-
if err := os.MkdirAll(inputs.OutPath, 0755); err != nil {
283+
if err := os.MkdirAll(inputs.OutPath, 0o755); err != nil {
284284
return fmt.Errorf("failed to create output directory: %w", err)
285285
}
286286

@@ -304,7 +304,7 @@ func (h *handler) Execute(inputs Inputs) error {
304304
if err != nil {
305305
return err
306306
}
307-
err = runCommand(inputs.ProjectRoot, "go", "get", "github.com/smartcontractkit/cre-sdk-go/capabilities/blockchain/evm@"+creinit.SdkVersion)
307+
err = runCommand(inputs.ProjectRoot, "go", "get", "github.com/smartcontractkit/cre-sdk-go/capabilities/blockchain/evm@"+creinit.CapabilitiesVersion)
308308
if err != nil {
309309
return err
310310
}

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ require (
2929
github.com/smartcontractkit/chainlink-protos/workflows/go v0.0.0-20251025021331-aa7746850cc4
3030
github.com/smartcontractkit/chainlink-testing-framework/seth v1.51.3
3131
github.com/smartcontractkit/chainlink/v2 v2.29.1-cre-beta.0.0.20251028190359-418f9c8fcee9
32-
github.com/smartcontractkit/cre-sdk-go v1.0.0-beta.0
32+
github.com/smartcontractkit/cre-sdk-go v1.0.0
3333
github.com/smartcontractkit/cre-sdk-go/capabilities/blockchain/evm v1.0.0-beta.0
3434
github.com/smartcontractkit/tdh2/go/tdh2 v0.0.0-20250624150019-e49f7e125e6b
3535
github.com/spf13/cobra v1.9.1

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1032,8 +1032,8 @@ github.com/smartcontractkit/chainlink-tron/relayer/gotron-sdk v0.0.5-0.202510141
10321032
github.com/smartcontractkit/chainlink-tron/relayer/gotron-sdk v0.0.5-0.20251014143056-a0c6328c91e9/go.mod h1:ea1LESxlSSOgc2zZBqf1RTkXTMthHaspdqUHd7W4lF0=
10331033
github.com/smartcontractkit/chainlink/v2 v2.29.1-cre-beta.0.0.20251028190359-418f9c8fcee9 h1:VP5RQym58ziXd7TtXb7e9WDT8M7qWjPkIrxu7FXlr2o=
10341034
github.com/smartcontractkit/chainlink/v2 v2.29.1-cre-beta.0.0.20251028190359-418f9c8fcee9/go.mod h1:UvZ4qQZEJEuOhwWf/CZaL+wQLxV94A1jL8IEuxZol0o=
1035-
github.com/smartcontractkit/cre-sdk-go v1.0.0-beta.0 h1:gn590TowprDRpqN5XqZKWJn4F7SbMAXqTavtoPKFZGw=
1036-
github.com/smartcontractkit/cre-sdk-go v1.0.0-beta.0/go.mod h1:CQY8hCISjctPmt8ViDVgFm4vMGLs5fYI198QhkBS++Y=
1035+
github.com/smartcontractkit/cre-sdk-go v1.0.0 h1:O52/QDmw/W8SJ7HQ9ASlVx7alSMGsewjL0Y8WZmgf5w=
1036+
github.com/smartcontractkit/cre-sdk-go v1.0.0/go.mod h1:CQY8hCISjctPmt8ViDVgFm4vMGLs5fYI198QhkBS++Y=
10371037
github.com/smartcontractkit/cre-sdk-go/capabilities/blockchain/evm v1.0.0-beta.0 h1:t2bzRHnqkyxvcrJKSsKPmCGLMjGO97ESgrtLCnTIEQw=
10381038
github.com/smartcontractkit/cre-sdk-go/capabilities/blockchain/evm v1.0.0-beta.0/go.mod h1:VVJ4mvA7wOU1Ic5b/vTaBMHEUysyxd0gdPPXkAu8CmY=
10391039
github.com/smartcontractkit/freeport v0.1.3-0.20250716200817-cb5dfd0e369e h1:Hv9Mww35LrufCdM9wtS9yVi/rEWGI1UnjHbcKKU0nVY=

test/test_project/blank_workflow/go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ module flowtest69
33
go 1.24.5
44

55
require (
6-
github.com/smartcontractkit/cre-sdk-go v1.0.0-beta.0
6+
github.com/smartcontractkit/cre-sdk-go v1.0.0
77
github.com/smartcontractkit/cre-sdk-go/capabilities/scheduler/cron v1.0.0-beta.0
88
)
99

test/test_project/blank_workflow/go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ github.com/shopspring/decimal v1.4.0 h1:bxl37RwXBklmTi0C79JfXCEBD1cqqHt0bbgBAGFp
2222
github.com/shopspring/decimal v1.4.0/go.mod h1:gawqmDU56v4yIKSwfBSFip1HdCCXN8/+DMd9qYNcwME=
2323
github.com/smartcontractkit/chainlink-protos/cre/go v0.0.0-20250911124514-5874cc6d62b2 h1:1/KdO5AbUr3CmpLjMPuJXPo2wHMbfB8mldKLsg7D4M8=
2424
github.com/smartcontractkit/chainlink-protos/cre/go v0.0.0-20250911124514-5874cc6d62b2/go.mod h1:jUC52kZzEnWF9tddHh85zolKybmLpbQ1oNA4FjOHt1Q=
25-
github.com/smartcontractkit/cre-sdk-go v1.0.0-beta.0 h1:gn590TowprDRpqN5XqZKWJn4F7SbMAXqTavtoPKFZGw=
26-
github.com/smartcontractkit/cre-sdk-go v1.0.0-beta.0/go.mod h1:CQY8hCISjctPmt8ViDVgFm4vMGLs5fYI198QhkBS++Y=
25+
github.com/smartcontractkit/cre-sdk-go v1.0.0 h1:O52/QDmw/W8SJ7HQ9ASlVx7alSMGsewjL0Y8WZmgf5w=
26+
github.com/smartcontractkit/cre-sdk-go v1.0.0/go.mod h1:CQY8hCISjctPmt8ViDVgFm4vMGLs5fYI198QhkBS++Y=
2727
github.com/smartcontractkit/cre-sdk-go/capabilities/scheduler/cron v1.0.0-beta.0 h1:Tui4xQVln7Qtk3CgjBRgDfihgEaAJy2t2MofghiGIDA=
2828
github.com/smartcontractkit/cre-sdk-go/capabilities/scheduler/cron v1.0.0-beta.0/go.mod h1:PWyrIw16It4TSyq6mDXqmSR0jF2evZRKuBxu7pK1yDw=
2929
github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA=

test/test_project/por_workflow/go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ require (
66
github.com/ethereum/go-ethereum v1.16.4
77
github.com/shopspring/decimal v1.4.0
88
github.com/smartcontractkit/chainlink-protos/cre/go v0.0.0-20250918131840-564fe2776a35
9-
github.com/smartcontractkit/cre-sdk-go v1.0.0-beta.0
9+
github.com/smartcontractkit/cre-sdk-go v1.0.0
1010
github.com/smartcontractkit/cre-sdk-go/capabilities/blockchain/evm v1.0.0-beta.0
1111
github.com/smartcontractkit/cre-sdk-go/capabilities/networking/http v1.0.0-beta.0
1212
github.com/smartcontractkit/cre-sdk-go/capabilities/scheduler/cron v1.0.0-beta.0

test/test_project/por_workflow/go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -175,8 +175,8 @@ github.com/shopspring/decimal v1.4.0 h1:bxl37RwXBklmTi0C79JfXCEBD1cqqHt0bbgBAGFp
175175
github.com/shopspring/decimal v1.4.0/go.mod h1:gawqmDU56v4yIKSwfBSFip1HdCCXN8/+DMd9qYNcwME=
176176
github.com/smartcontractkit/chainlink-protos/cre/go v0.0.0-20250918131840-564fe2776a35 h1:hhKdzgNZT+TnohlmJODtaxlSk+jyEO79YNe8zLFtp78=
177177
github.com/smartcontractkit/chainlink-protos/cre/go v0.0.0-20250918131840-564fe2776a35/go.mod h1:jUC52kZzEnWF9tddHh85zolKybmLpbQ1oNA4FjOHt1Q=
178-
github.com/smartcontractkit/cre-sdk-go v1.0.0-beta.0 h1:gn590TowprDRpqN5XqZKWJn4F7SbMAXqTavtoPKFZGw=
179-
github.com/smartcontractkit/cre-sdk-go v1.0.0-beta.0/go.mod h1:CQY8hCISjctPmt8ViDVgFm4vMGLs5fYI198QhkBS++Y=
178+
github.com/smartcontractkit/cre-sdk-go v1.0.0 h1:O52/QDmw/W8SJ7HQ9ASlVx7alSMGsewjL0Y8WZmgf5w=
179+
github.com/smartcontractkit/cre-sdk-go v1.0.0/go.mod h1:CQY8hCISjctPmt8ViDVgFm4vMGLs5fYI198QhkBS++Y=
180180
github.com/smartcontractkit/cre-sdk-go/capabilities/blockchain/evm v1.0.0-beta.0 h1:t2bzRHnqkyxvcrJKSsKPmCGLMjGO97ESgrtLCnTIEQw=
181181
github.com/smartcontractkit/cre-sdk-go/capabilities/blockchain/evm v1.0.0-beta.0/go.mod h1:VVJ4mvA7wOU1Ic5b/vTaBMHEUysyxd0gdPPXkAu8CmY=
182182
github.com/smartcontractkit/cre-sdk-go/capabilities/networking/http v1.0.0-beta.0 h1:E3S3Uk4O2/cEJtgh+mDhakK3HFcDI2zeqJIsTxUWeS8=

0 commit comments

Comments
 (0)