Skip to content
Merged
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
3 changes: 3 additions & 0 deletions core/capabilities/encoder_factory.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import (
"github.com/smartcontractkit/chainlink-common/pkg/capabilities/consensus/ocr3/types"
"github.com/smartcontractkit/chainlink-common/pkg/logger"
"github.com/smartcontractkit/chainlink-protos/cre/go/values"
"github.com/smartcontractkit/chainlink-solana/pkg/solana"

"github.com/smartcontractkit/chainlink/v2/core/services/relay/evm"
)
Expand All @@ -16,6 +17,8 @@ func NewEncoder(name string, config *values.Map, lggr logger.Logger) (types.Enco
switch ocr3cap.Encoder(name) {
case ocr3cap.EncoderEVM:
return evm.NewEVMEncoder(config)
case ocr3cap.EncoderBorsh:
return solana.NewEncoder(config)
case ocr3cap.EncoderValueMap:
return ocr3.ValueMapEncoder{}, nil
// TODO: add a "no-op" encoder for users who only want to use dynamic ones?
Expand Down
35 changes: 34 additions & 1 deletion core/capabilities/encoder_factory_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,12 @@ func Test_NewEncoder(t *testing.T) {
t.Run("All ocr3 encoder types return a factory", func(t *testing.T) {
evmEncoding, err := values.NewMap(map[string]any{"abi": "bytes[] Full_reports"})
require.NoError(t, err)
solanaEncoding := getSolCfg(t)

config := map[ocr3cap.Encoder]*values.Map{ocr3cap.EncoderEVM: evmEncoding}
config := map[ocr3cap.Encoder]*values.Map{
ocr3cap.EncoderEVM: evmEncoding,
ocr3cap.EncoderBorsh: solanaEncoding,
}

for _, tt := range ocr3cap.Encoders() {
encoder, err2 := NewEncoder(string(tt), config[tt], logger.Nop())
Expand All @@ -31,3 +35,32 @@ func Test_NewEncoder(t *testing.T) {
require.Error(t, err2)
})
}

func getSolCfg(t *testing.T) *values.Map {
cfg := map[string]any{
"report_schema": `{
"kind": "struct",
"fields": [
{ "name": "payload", "type": { "vec": { "defined": "DecimalReport" } } }
]
}`,
"defined_types": `
[
{
"name":"DecimalReport",
"type":{
"kind":"struct",
"fields":[
{ "name":"timestamp", "type":"u32" },
{ "name":"answer", "type":"u128" },
{ "name": "dataId", "type": {"array": ["u8",16]}}
]
}
}
]`,
}

mcfg, err := values.NewMap(cfg)
require.NoError(t, err)
return mcfg
}
2 changes: 1 addition & 1 deletion core/capabilities/integration_tests/keystone/workflow.go
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ consensus:
ref: "secure-mint-consensus"
inputs:
observations:
- "$(trigger.outputs)"
- event: $(trigger.outputs)
config:
report_id: "0003"
key_id: "evm"
Expand Down
18 changes: 18 additions & 0 deletions core/config/docs/chains-solana.toml
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,24 @@ FinalityTagEnabled = true # Default
# FinalizedBlockOffset is the offset from the finalized block to use for finality tags.
FinalizedBlockOffset = 0 # Default

[Solana.Workflow]
# AcceptanceTimeout is the default timeout for a tranmission to be accepted on chain
AcceptanceTimeout = '45s' # Default
# PollPeriod is the default poll period for checking transmission state
PollPeriod = '3s' # Default
# ForwarderAddress is the keystone forwarder program address on chain.
ForwarderAddress = '14grJpemFaf88c8tiVb77W7TYg2W3ir6pfkKz3YjhhZ5' # Example
# ForwarderState is the keystone forwarder program state account on chain.
ForwarderState = '14grJpemFaf88c8tiVb77W7TYg2W3ir6pfkKz3YjhhZ5' # Example
# FromAddress is Address of the transmitter key to use for workflow writes.
FromAddress = '4BJXYkfvg37zEmBbsacZjeQDpTNx91KppxFJxRqrz48e' # Example
# GasLimitDefault is the default gas limit for workflow transactions.
GasLimitDefault = 300_000 # Default
# TxAcceptanceState is the default acceptance state for writer DON tranmissions.
TxAcceptanceState = 3 # Default
# Local determines whether Relayer runs against a local devnet
Local = false # Default

[[Solana.Nodes]]
# Name is a unique (per-chain) identifier for this node.
Name = 'primary' # Example
Expand Down
6 changes: 4 additions & 2 deletions core/scripts/ccip/manual-execution/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
module manual-execution

go 1.24.4
go 1.24.5

toolchain go1.24.7

require (
github.com/ethereum/go-ethereum v1.15.3
Expand Down Expand Up @@ -54,7 +56,7 @@ require (
golang.org/x/sync v0.16.0 // indirect
golang.org/x/sys v0.34.0 // indirect
golang.org/x/time v0.12.0 // indirect
google.golang.org/protobuf v1.36.6 // indirect
google.golang.org/protobuf v1.36.7 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
rsc.io/tmplfunc v0.0.3 // indirect
)
4 changes: 2 additions & 2 deletions core/scripts/ccip/manual-execution/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -309,8 +309,8 @@ google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzi
google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
google.golang.org/protobuf v1.36.6 h1:z1NpPI8ku2WgiWnf+t9wTPsn6eP1L7ksHUlkfLvd9xY=
google.golang.org/protobuf v1.36.6/go.mod h1:jduwjTPXsFjZGTmRluh+L6NjiWu7pchiJ2/5YcXBHnY=
google.golang.org/protobuf v1.36.7 h1:IgrO7UwFQGJdRNXH/sQux4R1Dj1WAKcLElzeeRaXV2A=
google.golang.org/protobuf v1.36.7/go.mod h1:jduwjTPXsFjZGTmRluh+L6NjiWu7pchiJ2/5YcXBHnY=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk=
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q=
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
module github.com/smartcontractkit/chainlink/core/scripts/cre/environment/examples/workflows/v1/proof-of-reserve/cron-based

go 1.24.2
go 1.24.5

toolchain go1.24.7

require (
github.com/smartcontractkit/chainlink-common v0.9.1-0.20250811122449-9242c88f1c99
github.com/smartcontractkit/chainlink-common v0.9.5-0.20250905131850-7713941a6848
gopkg.in/yaml.v3 v3.0.1
)

require (
github.com/bahlo/generic-list-go v0.2.0 // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/buger/jsonparser v1.1.1 // indirect
github.com/cenkalti/backoff/v4 v4.3.0 // indirect
github.com/cenkalti/backoff/v5 v5.0.2 // indirect
github.com/cespare/xxhash/v2 v2.3.0 // indirect
github.com/cloudevents/sdk-go/binding/format/protobuf/v2 v2.16.1 // indirect
github.com/cloudevents/sdk-go/v2 v2.16.1 // indirect
Expand All @@ -21,56 +23,56 @@ require (
github.com/go-logr/stdr v1.2.2 // indirect
github.com/go-playground/locales v0.14.1 // indirect
github.com/go-playground/universal-translator v0.18.1 // indirect
github.com/go-playground/validator/v10 v10.25.0 // indirect
github.com/go-viper/mapstructure/v2 v2.3.0 // indirect
github.com/go-playground/validator/v10 v10.26.0 // indirect
github.com/go-viper/mapstructure/v2 v2.4.0 // indirect
github.com/google/uuid v1.6.0 // indirect
github.com/grpc-ecosystem/grpc-gateway/v2 v2.26.1 // indirect
github.com/grpc-ecosystem/grpc-gateway/v2 v2.26.3 // indirect
github.com/holiman/uint256 v1.3.2 // indirect
github.com/invopop/jsonschema v0.12.0 // indirect
github.com/invopop/jsonschema v0.13.0 // indirect
github.com/json-iterator/go v1.1.12 // indirect
github.com/leodido/go-urn v1.4.0 // indirect
github.com/mailru/easyjson v0.7.7 // indirect
github.com/mailru/easyjson v0.9.0 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/mr-tron/base58 v1.2.0 // indirect
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
github.com/prometheus/client_golang v1.22.0 // indirect
github.com/prometheus/client_model v0.6.1 // indirect
github.com/prometheus/common v0.63.0 // indirect
github.com/prometheus/procfs v0.16.0 // indirect
github.com/prometheus/client_model v0.6.2 // indirect
github.com/prometheus/common v0.65.0 // indirect
github.com/prometheus/procfs v0.16.1 // indirect
github.com/santhosh-tekuri/jsonschema/v5 v5.3.1 // indirect
github.com/shopspring/decimal v1.4.0 // indirect
github.com/smartcontractkit/chainlink-common/pkg/chipingress v0.0.1 // indirect
github.com/smartcontractkit/chainlink-common/pkg/values v0.0.0-20250806152407-159881c7589c // indirect
github.com/smartcontractkit/libocr v0.0.0-20250408131511-c90716988ee0 // indirect
github.com/smartcontractkit/chainlink-protos/cre/go v0.0.0-20250829155125-f4655b0b4605 // indirect
github.com/smartcontractkit/libocr v0.0.0-20250707144819-babe0ec4e358 // indirect
github.com/wk8/go-ordered-map/v2 v2.1.8 // indirect
go.opentelemetry.io/auto/sdk v1.1.0 // indirect
go.opentelemetry.io/otel v1.37.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc v0.10.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp v0.10.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.35.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.34.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.35.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.34.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.35.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc v0.12.2 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp v0.12.2 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.36.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.36.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.36.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.36.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.36.0 // indirect
go.opentelemetry.io/otel/exporters/stdout/stdoutlog v0.13.0 // indirect
go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.34.0 // indirect
go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.34.0 // indirect
go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.36.0 // indirect
go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.36.0 // indirect
go.opentelemetry.io/otel/log v0.13.0 // indirect
go.opentelemetry.io/otel/metric v1.37.0 // indirect
go.opentelemetry.io/otel/sdk v1.37.0 // indirect
go.opentelemetry.io/otel/sdk/log v0.13.0 // indirect
go.opentelemetry.io/otel/sdk/metric v1.37.0 // indirect
go.opentelemetry.io/otel/trace v1.37.0 // indirect
go.opentelemetry.io/proto/otlp v1.5.0 // indirect
go.opentelemetry.io/proto/otlp v1.6.0 // indirect
go.uber.org/multierr v1.11.0 // indirect
go.uber.org/zap v1.27.0 // indirect
golang.org/x/crypto v0.40.0 // indirect
golang.org/x/net v0.42.0 // indirect
golang.org/x/sys v0.34.0 // indirect
golang.org/x/text v0.27.0 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20250324211829-b45e905df463 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20250519155744-55703ea1f237 // indirect
google.golang.org/grpc v1.73.0 // indirect
google.golang.org/protobuf v1.36.6 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20250528174236-200df99c418a // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20250603155806-513f23925822 // indirect
google.golang.org/grpc v1.74.2 // indirect
google.golang.org/protobuf v1.36.7 // indirect
)
Loading
Loading