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
5 changes: 5 additions & 0 deletions .changeset/gold-starfishes-sing.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@smartcontractkit/operator-ui': minor
---

Update the VRF job spec UI to include vrfOwnerAddress; Update the BHS job spec UI to include coordinatorV2PlusAddress, trustedBlockhashStoreAddress and trustedBlockhashStoreBatchSize
28 changes: 28 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,3 +68,31 @@ Given these constraints, the workflow would look like the following:
6. Merge in the PR created in #3
7. An automated pull requested would have been created within `smartcontractkit/chainlink` to update to the just-released version of Operator UI.
8. Merge the aforementioned PR in.

#### Referencing new Job Spec GQL Schema Fields

Note that while the GQL schema in Chainlink itself may be updated, that change is not immediately reflected in
Operator UI even after running `yarn setup`. In order to use newly added fields to a particular GQL type,
one must update the corresponding `JOB_PAYLOAD__SPEC` object appropriately.

For example, if you added a field named `blahNewField` to the `DirectRequestSpec` type in the GQL schema,
update the GQL as follows in `JobView.tsx`:

```ts
const JOB_PAYLOAD__SPEC = gql`
fragment JobPayload_Spec on JobSpec {
... on CronSpec {
schedule
}
... on DirectRequestSpec {
contractAddress
evmChainID
minIncomingConfirmations
minIncomingConfirmationsEnv
minContractPaymentLinkJuels
requesters
blahNewField # NEW FIELD HERE!
}
# ...
`
```
5 changes: 5 additions & 0 deletions src/screens/Job/JobView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ const JOB_PAYLOAD__SPEC = gql`
requestTimeout
backoffInitialDelay
backoffMaxDelay
vrfOwnerAddress
}
... on BlockhashStoreSpec {
coordinatorV1Address
Expand All @@ -107,6 +108,9 @@ const JOB_PAYLOAD__SPEC = gql`
runTimeout
evmChainID
fromAddresses
coordinatorV2PlusAddress
trustedBlockhashStoreAddress
trustedBlockhashStoreBatchSize
}
... on BlockHeaderFeederSpec {
coordinatorV1Address
Expand All @@ -121,6 +125,7 @@ const JOB_PAYLOAD__SPEC = gql`
fromAddresses
getBlockhashesBatchSize
storeBlockhashesBatchSize
coordinatorV2PlusAddress
}
... on BootstrapSpec {
contractID
Expand Down
9 changes: 9 additions & 0 deletions src/screens/Job/generateJobDefinition.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -464,6 +464,7 @@ juelsPerFeeCoinSource = "1000000000"
backoffInitialDelay: '1m',
backoffMaxDelay: '1h',
gasLanePrice: '200 gwei',
vrfOwnerAddress: '0x457eF369D905DbD122a95A099Cf749D37CbE9341',
},
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 @@ -490,6 +491,7 @@ chunkSize = 25
backoffInitialDelay = "1m"
backoffMaxDelay = "1h"
gasLanePrice = "200 gwei"
vrfOwnerAddress = "0x457eF369D905DbD122a95A099Cf749D37CbE9341"
observationSource = """
fetch [type=http method=POST url="http://localhost:8001" requestData="{\\\\"hi\\\\": \\\\"hello\\\\"}"];
parse [type=jsonparse path="data,result"];
Expand Down Expand Up @@ -597,7 +599,11 @@ chainID = 1_337
fromAddresses: ['0x52926EF10c19E810a52f11e942E502B15c7E2fEE'],
coordinatorV1Address: '0x3cCad4715152693fE3BC4460591e3D3Fbd071b42',
coordinatorV2Address: '0xD427446551a93F4686799EDEcA33Bbb741115a5b',
coordinatorV2PlusAddress: '0xd5af166B311768b4678A5eE431089FdA48d58bfe',
blockhashStoreAddress: '0x5C210eF41CD1a72de73bF76eC39637bB0d3d7BEE',
trustedBlockhashStoreAddress:
'0x1Cbdef9B2c247FD31B972242E63ff26eA02466e2',
trustedBlockhashStoreBatchSize: 100,
pollPeriod: '300ms',
waitBlocks: 30,
lookbackBlocks: 240,
Expand All @@ -614,9 +620,12 @@ externalJobID = "00000000-0000-0000-0000-0000000000001"
gasLimit = 1_000
coordinatorV1Address = "0x3cCad4715152693fE3BC4460591e3D3Fbd071b42"
coordinatorV2Address = "0xD427446551a93F4686799EDEcA33Bbb741115a5b"
coordinatorV2PlusAddress = "0xd5af166B311768b4678A5eE431089FdA48d58bfe"
waitBlocks = 30
lookbackBlocks = 240
blockhashStoreAddress = "0x5C210eF41CD1a72de73bF76eC39637bB0d3d7BEE"
trustedBlockhashStoreAddress = "0x1Cbdef9B2c247FD31B972242E63ff26eA02466e2"
trustedBlockhashStoreBatchSize = 100
pollPeriod = "300ms"
runTimeout = "10s"
evmChainID = "42161"
Expand Down
5 changes: 5 additions & 0 deletions src/screens/Job/generateJobDefinition.ts
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,7 @@ export const generateJobDefinition = (
'backoffInitialDelay',
'backoffMaxDelay',
'gasLanePrice',
'vrfOwnerAddress',
),
...extractObservationSourceField(job),
}
Expand All @@ -230,9 +231,12 @@ export const generateJobDefinition = (
job.spec,
'coordinatorV1Address',
'coordinatorV2Address',
'coordinatorV2PlusAddress',
'waitBlocks',
'lookbackBlocks',
'blockhashStoreAddress',
'trustedBlockhashStoreAddress',
'trustedBlockhashStoreBatchSize',
'pollPeriod',
'runTimeout',
'evmChainID',
Expand All @@ -249,6 +253,7 @@ export const generateJobDefinition = (
job.spec,
'coordinatorV1Address',
'coordinatorV2Address',
'coordinatorV2PlusAddress',
'waitBlocks',
'lookbackBlocks',
'blockhashStoreAddress',
Expand Down