Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"url": "https://api.weather.gov/radar/servers",
"schedule": "*/30 * * * * *"
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ go 1.26.4
require (
github.com/smartcontractkit/cre-sdk-go v1.5.0
github.com/smartcontractkit/cre-sdk-go/capabilities/networking/http v1.3.0
github.com/smartcontractkit/cre-sdk-go/capabilities/scheduler/cron v1.3.0
google.golang.org/protobuf v1.36.11
)

Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,16 @@ import (
"log/slog"

http "github.com/smartcontractkit/cre-sdk-go/capabilities/networking/http"
"github.com/smartcontractkit/cre-sdk-go/capabilities/scheduler/cron"
"github.com/smartcontractkit/cre-sdk-go/cre"
sdk "github.com/smartcontractkit/cre-sdk-go/cre"
"github.com/smartcontractkit/cre-sdk-go/cre/wasm"
"google.golang.org/protobuf/types/known/durationpb"
)

type Config struct {
AuthorizedKey string `json:"authorizedKey"`
URL string `json:"url"`
Schedule string `yaml:"schedule,omitempty"`
URL string `yaml:"url,omitempty"`
}

func main() {
Expand All @@ -32,14 +33,7 @@ func main() {
func RunSimpleHttpWorkflow(config Config, _ *slog.Logger, _ cre.SecretsProvider) (sdk.Workflow[Config], error) {
workflows := sdk.Workflow[Config]{
sdk.Handler(
http.Trigger(&http.Config{
AuthorizedKeys: []*http.AuthorizedKey{
{
Type: http.KeyType_KEY_TYPE_ECDSA_EVM,
PublicKey: config.AuthorizedKey,
},
},
}),
cron.Trigger(&cron.Config{Schedule: config.Schedule}),
onTrigger,
),
}
Expand All @@ -52,20 +46,19 @@ type OrderResponse struct {
Message string `json:"message,omitempty"`
}

func onTrigger(cfg Config, runtime sdk.Runtime, trigger *http.Payload) (string, error) {
func onTrigger(cfg Config, runtime sdk.Runtime, trigger *cron.Payload) (string, error) {
logger := runtime.Logger()
logger.Info("Simple HTTP workflow triggered.")

logger.Info("Processing order with inputs", "inputs", string(trigger.Input))
logger.Info("Processing order with inputs", "inputs", trigger.ScheduledExecutionTime.String())

orderPromise := sdk.RunInNodeMode(cfg, runtime,
func(cfg Config, nodeRuntime sdk.NodeRuntime) (string, error) {
client := &http.Client{}

req := &http.Request{
Url: cfg.URL,
Method: "POST",
Body: trigger.Input,
Method: "GET",
Headers: map[string]string{
"Content-Type": "application/json",
},
Expand Down
4 changes: 2 additions & 2 deletions core/scripts/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,13 @@ require (
github.com/smartcontractkit/chain-selectors v1.0.104
github.com/smartcontractkit/chainlink-automation v0.8.1
github.com/smartcontractkit/chainlink-ccip/chains/evm v0.0.0-20260618155522-3600f66e26cd
github.com/smartcontractkit/chainlink-common v0.11.2-0.20260625162847-bdf9e82b2f75
github.com/smartcontractkit/chainlink-common v0.11.2-0.20260629132106-9ce039054882
github.com/smartcontractkit/chainlink-common/keystore v1.2.0
github.com/smartcontractkit/chainlink-data-streams v0.1.15-0.20260522094612-5f9f748bd87a
github.com/smartcontractkit/chainlink-deployments-framework v0.111.1-0.20260612191326-e31c0ae4cd54
github.com/smartcontractkit/chainlink-evm v0.3.4-0.20260623170329-4577ef4ba0ae
github.com/smartcontractkit/chainlink-evm/gethwrappers v0.0.0-20260521215851-3fdbb363496f
github.com/smartcontractkit/chainlink-protos/cre/go v0.0.0-20260623200841-e0322b819f62
github.com/smartcontractkit/chainlink-protos/cre/go v0.0.0-20260629132009-6689b1429bb0
github.com/smartcontractkit/chainlink-protos/job-distributor v0.19.0
github.com/smartcontractkit/chainlink-testing-framework/framework v0.16.5
github.com/smartcontractkit/chainlink-testing-framework/framework/components/dockercompose v0.1.23
Expand Down
9 changes: 5 additions & 4 deletions core/scripts/go.sum

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions core/services/workflows/v2/engine.go
Original file line number Diff line number Diff line change
Expand Up @@ -964,6 +964,7 @@ func (e *Engine) startExecution(ctx context.Context, wrappedTriggerEvent enqueue
execHelper.initLimiters(e.cfg.LocalLimiters)
e.metrics.With(platform.KeyTriggerID, wrappedTriggerEvent.triggerCapID).RecordTriggerPayloadBytes(ctx, int64(proto.Size(triggerEvent.Payload)))
var result *sdkpb.ExecutionResult
suspendOnAwaitEnabled, _ := cresettings.Default.PerOwner.SuspendOnAwaitEnabled.GetOrDefault(execCtx, e.cfg.LocalLimiters.Settings)
result, execErr = e.cfg.Module.Execute(execCtx, &sdkpb.ExecuteRequest{
Request: &sdkpb.ExecuteRequest_Trigger{
Trigger: &sdkpb.Trigger{
Expand All @@ -972,6 +973,7 @@ func (e *Engine) startExecution(ctx context.Context, wrappedTriggerEvent enqueue
},
},
MaxResponseSize: uint64(moduleExecuteMaxResponseSizeBytes),
SuspendOnAwait: suspendOnAwaitEnabled,
Config: e.cfg.WorkflowConfig,
}, execHelper.PossiblyWithRawSecrets())
// Non-evictable modules do not record skew; label those as direct.
Expand Down
4 changes: 2 additions & 2 deletions deployment/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -46,14 +46,14 @@ require (
github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20260415165642-49f23e4d76cc
github.com/smartcontractkit/chainlink-ccip/chains/solana/gobindings v0.0.0-20260511195239-0f6e1b177fc7
github.com/smartcontractkit/chainlink-ccip/deployment v0.0.0-20260618155522-3600f66e26cd
github.com/smartcontractkit/chainlink-common v0.11.2-0.20260625162847-bdf9e82b2f75
github.com/smartcontractkit/chainlink-common v0.11.2-0.20260629132106-9ce039054882
github.com/smartcontractkit/chainlink-common/keystore v1.2.0
github.com/smartcontractkit/chainlink-data-streams v0.1.15-0.20260522094612-5f9f748bd87a
github.com/smartcontractkit/chainlink-deployments-framework v0.111.1-0.20260612191326-e31c0ae4cd54
github.com/smartcontractkit/chainlink-evm v0.3.4-0.20260623170329-4577ef4ba0ae
github.com/smartcontractkit/chainlink-evm/contracts/cre/gobindings v0.0.0-20260403151002-2c91155b5501
github.com/smartcontractkit/chainlink-evm/gethwrappers v0.0.0-20260521215851-3fdbb363496f
github.com/smartcontractkit/chainlink-protos/cre/go v0.0.0-20260623200841-e0322b819f62
github.com/smartcontractkit/chainlink-protos/cre/go v0.0.0-20260629132009-6689b1429bb0
github.com/smartcontractkit/chainlink-protos/job-distributor v0.19.0
github.com/smartcontractkit/chainlink-protos/orchestrator v0.10.1-0.20260528221400-84746b70eeeb
github.com/smartcontractkit/chainlink-solana v1.3.1-0.20260605202330-b5a89c32fdc1
Expand Down
8 changes: 4 additions & 4 deletions deployment/go.sum

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ require (
github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20260415165642-49f23e4d76cc
github.com/smartcontractkit/chainlink-ccip/chains/solana/gobindings v0.0.0-20260415165642-49f23e4d76cc
github.com/smartcontractkit/chainlink-ccv v0.0.2-0.20260622154332-695181f87033
github.com/smartcontractkit/chainlink-common v0.11.2-0.20260625162847-bdf9e82b2f75
github.com/smartcontractkit/chainlink-common v0.11.2-0.20260629132106-9ce039054882
github.com/smartcontractkit/chainlink-common/keystore v1.2.0
github.com/smartcontractkit/chainlink-common/pkg/chipingress v0.0.11-0.20260601211238-9f526774fef0
github.com/smartcontractkit/chainlink-data-streams v0.1.15-0.20260522094612-5f9f748bd87a
Expand All @@ -97,7 +97,7 @@ require (
github.com/smartcontractkit/chainlink-framework/chains v0.0.0-20260423135514-5b1a7565a99c
github.com/smartcontractkit/chainlink-framework/multinode v0.0.0-20260625152110-9afcf56e4053
github.com/smartcontractkit/chainlink-protos/billing/go v0.0.0-20251024234028-0988426d98f4
github.com/smartcontractkit/chainlink-protos/cre/go v0.0.0-20260623200841-e0322b819f62
github.com/smartcontractkit/chainlink-protos/cre/go v0.0.0-20260629132009-6689b1429bb0
github.com/smartcontractkit/chainlink-protos/data-feeds v0.1.1-0.20260501174546-2e8846986b36
github.com/smartcontractkit/chainlink-protos/linking-service/go v0.0.0-20260512230622-65f10f4cd305
github.com/smartcontractkit/chainlink-protos/node-platform v0.0.0-20260512230622-65f10f4cd305
Expand Down
8 changes: 4 additions & 4 deletions go.sum

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions integration-tests/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ require (
github.com/smartcontractkit/chainlink-ccip/chains/evm v0.0.0-20260618155522-3600f66e26cd
github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20260506144252-c100eabfda74
github.com/smartcontractkit/chainlink-ccip/chains/solana/gobindings v0.0.0-20260511195239-0f6e1b177fc7
github.com/smartcontractkit/chainlink-common v0.11.2-0.20260625162847-bdf9e82b2f75
github.com/smartcontractkit/chainlink-common v0.11.2-0.20260629132106-9ce039054882
github.com/smartcontractkit/chainlink-common/keystore v1.2.0
github.com/smartcontractkit/chainlink-deployments-framework v0.111.1-0.20260612191326-e31c0ae4cd54
github.com/smartcontractkit/chainlink-evm v0.3.4-0.20260623170329-4577ef4ba0ae
Expand Down Expand Up @@ -417,7 +417,7 @@ require (
github.com/smartcontractkit/chainlink-protos/chainlink-ccv/message-discovery v0.0.0-20251211142334-5c3421fe2c8d // indirect
github.com/smartcontractkit/chainlink-protos/chainlink-ccv/message-rules v0.0.0-20260505131349-78e491b80735 // indirect
github.com/smartcontractkit/chainlink-protos/chainlink-ccv/verifier v0.0.0-20251211142334-5c3421fe2c8d // indirect
github.com/smartcontractkit/chainlink-protos/cre/go v0.0.0-20260623200841-e0322b819f62 // indirect
github.com/smartcontractkit/chainlink-protos/cre/go v0.0.0-20260629132009-6689b1429bb0 // indirect
github.com/smartcontractkit/chainlink-protos/data-feeds v0.1.1-0.20260501174546-2e8846986b36 // indirect
github.com/smartcontractkit/chainlink-protos/linking-service/go v0.0.0-20260512230622-65f10f4cd305 // indirect
github.com/smartcontractkit/chainlink-protos/node-platform v0.0.0-20260512230622-65f10f4cd305 // indirect
Expand Down
Loading
Loading