Skip to content

Commit

Permalink
Merge pull request #81 from smartcontractkit/BCF-3273-cronspec-chain-id
Browse files Browse the repository at this point in the history
src/screens/Job: add CronSpec.evmChainID
  • Loading branch information
jmank88 authored Jun 26, 2024
2 parents a8d3bf9 + 46f758b commit 094d250
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/screens/Job/JobView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ const JOB_PAYLOAD__SPEC = gql`
fragment JobPayload_Spec on JobSpec {
... on CronSpec {
schedule
evmChainID
}
... on DirectRequestSpec {
contractAddress
Expand Down
2 changes: 2 additions & 0 deletions src/screens/Job/generateJobDefinition.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ describe('generateJobDefinition', () => {
spec: {
__typename: 'CronSpec',
schedule: '*/2 * * * *',
evmChainID: '42',
},
observationSource:
' fetch [type=http method=POST url="http://localhost:8001" requestData="{\\"hi\\": \\"hello\\"}"];\n parse [type=jsonparse path="data,result"];\n multiply [type=multiply times=100];\n fetch -> parse -> multiply;\n',
Expand All @@ -37,6 +38,7 @@ externalJobID = "00000000-0000-0000-0000-0000000000001"
gasLimit = 1_000
maxTaskDuration = "10s"
schedule = "*/2 * * * *"
evmChainID = "42"
observationSource = """
fetch [type=http method=POST url="http://localhost:8001" requestData="{\\\\"hi\\\\": \\\\"hello\\\\"}"];
parse [type=jsonparse path="data,result"];
Expand Down
2 changes: 1 addition & 1 deletion src/screens/Job/generateJobDefinition.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ export const generateJobDefinition = (
case 'CronSpec':
values = {
...extractJobFields(job, 'maxTaskDuration'),
...extractSpecFields(job.spec, 'schedule'),
...extractSpecFields(job.spec, 'schedule', 'evmChainID'),
...extractObservationSourceField(job),
}

Expand Down

0 comments on commit 094d250

Please sign in to comment.