diff --git a/core/web/presenters/job.go b/core/web/presenters/job.go index bb518650516..8b01eeb5005 100644 --- a/core/web/presenters/job.go +++ b/core/web/presenters/job.go @@ -176,6 +176,7 @@ type OffChainReporting2Spec struct { BlockchainTimeout models.Interval `json:"blockchainTimeout"` ContractConfigTrackerPollInterval models.Interval `json:"contractConfigTrackerPollInterval"` ContractConfigConfirmations uint16 `json:"contractConfigConfirmations"` + OnchainSigningStrategy map[string]interface{} `json:"onchainSigningStrategy"` CreatedAt time.Time `json:"createdAt"` UpdatedAt time.Time `json:"updatedAt"` CollectTelemetry bool `json:"collectTelemetry"` @@ -194,6 +195,7 @@ func NewOffChainReporting2Spec(spec *job.OCR2OracleSpec) *OffChainReporting2Spec BlockchainTimeout: spec.BlockchainTimeout, ContractConfigTrackerPollInterval: spec.ContractConfigTrackerPollInterval, ContractConfigConfirmations: spec.ContractConfigConfirmations, + OnchainSigningStrategy: spec.OnchainSigningStrategy, CreatedAt: spec.CreatedAt, UpdatedAt: spec.UpdatedAt, CollectTelemetry: spec.CaptureEATelemetry, diff --git a/core/web/resolver/spec.go b/core/web/resolver/spec.go index ce23df49264..9a62e55308b 100644 --- a/core/web/resolver/spec.go +++ b/core/web/resolver/spec.go @@ -987,6 +987,11 @@ func (r *BootstrapSpecResolver) ContractConfigConfirmations() *int32 { return &confirmations } +// RelayConfig resolves the spec's onchain signing strategy config +func (r *OCR2SpecResolver) OnchainSigningStrategy() gqlscalar.Map { + return gqlscalar.Map(r.spec.OnchainSigningStrategy) +} + // CreatedAt resolves the spec's created at timestamp. func (r *BootstrapSpecResolver) CreatedAt() graphql.Time { return graphql.Time{Time: r.spec.CreatedAt} diff --git a/core/web/resolver/spec_test.go b/core/web/resolver/spec_test.go index 69d6a56509c..e5a08faadcf 100644 --- a/core/web/resolver/spec_test.go +++ b/core/web/resolver/spec_test.go @@ -471,6 +471,12 @@ func TestResolver_OCR2Spec(t *testing.T) { pluginConfig := map[string]interface{}{ "juelsPerFeeCoinSource": 100000000, } + onchainSigningStrategy := map[string]interface{}{ + "strategyName": "multi-chain", + "config": map[string]any{ + "evm": "b3df4d8748b67731a1112e8b45a764941974f5590c93672eebbc4f3504dd10ed", + }, + } require.NoError(t, err) testCases := []GQLTestCase{ @@ -486,6 +492,7 @@ func TestResolver_OCR2Spec(t *testing.T) { ContractID: contractAddress.String(), ContractConfigConfirmations: 1, ContractConfigTrackerPollInterval: models.Interval(1 * time.Minute), + OnchainSigningStrategy: onchainSigningStrategy, CreatedAt: f.Timestamp(), OCRKeyBundleID: null.StringFrom(keyBundleID.String()), MonitoringEndpoint: null.StringFrom("https://monitor.endpoint"), @@ -509,6 +516,7 @@ func TestResolver_OCR2Spec(t *testing.T) { contractID contractConfigConfirmations contractConfigTrackerPollInterval + onchainSigningStrategy createdAt ocrKeyBundleID monitoringEndpoint @@ -533,6 +541,12 @@ func TestResolver_OCR2Spec(t *testing.T) { "contractID": "0x613a38AC1659769640aaE063C651F48E0250454C", "contractConfigConfirmations": 1, "contractConfigTrackerPollInterval": "1m0s", + "onchainSigningStrategy": { + "strategyName": "multi-chain", + "config": { + "evm": "b3df4d8748b67731a1112e8b45a764941974f5590c93672eebbc4f3504dd10ed" + } + }, "createdAt": "2021-01-01T00:00:00Z", "ocrKeyBundleID": "f5bf259689b26f1374efb3c9a9868796953a0f814bb2d39b968d0e61b58620a5", "monitoringEndpoint": "https://monitor.endpoint", diff --git a/core/web/schema/type/spec.graphql b/core/web/schema/type/spec.graphql index db81001543c..b979b9c799f 100644 --- a/core/web/schema/type/spec.graphql +++ b/core/web/schema/type/spec.graphql @@ -82,6 +82,7 @@ type OCR2Spec { p2pv2Bootstrappers: [String!] relay: String! relayConfig: Map! + onchainSigningStrategy: Map! transmitterID: String pluginType: String! pluginConfig: Map!