From 5daff21124991cff40b9bc086fd2ce64889bf836 Mon Sep 17 00:00:00 2001 From: Makram Kamaleddine Date: Thu, 19 Oct 2023 16:14:26 +0300 Subject: [PATCH 1/5] chore: update vrf and bhs ui's --- src/screens/Job/generateJobDefinition.test.ts | 8 ++++++++ src/screens/Job/generateJobDefinition.ts | 5 +++++ 2 files changed, 13 insertions(+) diff --git a/src/screens/Job/generateJobDefinition.test.ts b/src/screens/Job/generateJobDefinition.test.ts index 647427aa..1df32132 100644 --- a/src/screens/Job/generateJobDefinition.test.ts +++ b/src/screens/Job/generateJobDefinition.test.ts @@ -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', @@ -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"]; @@ -597,7 +599,10 @@ chainID = 1_337 fromAddresses: ['0x52926EF10c19E810a52f11e942E502B15c7E2fEE'], coordinatorV1Address: '0x3cCad4715152693fE3BC4460591e3D3Fbd071b42', coordinatorV2Address: '0xD427446551a93F4686799EDEcA33Bbb741115a5b', + coordinatorV2PlusAddress: '0xd5af166B311768b4678A5eE431089FdA48d58bfe', blockhashStoreAddress: '0x5C210eF41CD1a72de73bF76eC39637bB0d3d7BEE', + trustedBlockhashStoreAddress: '0x1Cbdef9B2c247FD31B972242E63ff26eA02466e2', + trustedBlockhashStoreBatchSize: 100, pollPeriod: '300ms', waitBlocks: 30, lookbackBlocks: 240, @@ -614,9 +619,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" diff --git a/src/screens/Job/generateJobDefinition.ts b/src/screens/Job/generateJobDefinition.ts index 93759d0b..7b8588d4 100644 --- a/src/screens/Job/generateJobDefinition.ts +++ b/src/screens/Job/generateJobDefinition.ts @@ -217,6 +217,7 @@ export const generateJobDefinition = ( 'backoffInitialDelay', 'backoffMaxDelay', 'gasLanePrice', + 'vrfOwnerAddress', ), ...extractObservationSourceField(job), } @@ -230,9 +231,12 @@ export const generateJobDefinition = ( job.spec, 'coordinatorV1Address', 'coordinatorV2Address', + 'coordinatorV2PlusAddress', 'waitBlocks', 'lookbackBlocks', 'blockhashStoreAddress', + 'trustedBlockhashStoreAddress', + 'trustedBlockhashStoreBatchSize', 'pollPeriod', 'runTimeout', 'evmChainID', @@ -249,6 +253,7 @@ export const generateJobDefinition = ( job.spec, 'coordinatorV1Address', 'coordinatorV2Address', + 'coordinatorV2PlusAddress', 'waitBlocks', 'lookbackBlocks', 'blockhashStoreAddress', From 57667edba7fc1a98227cad892e6549a5817876a4 Mon Sep 17 00:00:00 2001 From: Makram Kamaleddine Date: Thu, 19 Oct 2023 16:17:46 +0300 Subject: [PATCH 2/5] chore: add changeset --- .changeset/gold-starfishes-sing.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/gold-starfishes-sing.md diff --git a/.changeset/gold-starfishes-sing.md b/.changeset/gold-starfishes-sing.md new file mode 100644 index 00000000..5d0a3d48 --- /dev/null +++ b/.changeset/gold-starfishes-sing.md @@ -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 From dfb6ec5b2f94cb5334681b466bd7ff53fffe56cb Mon Sep 17 00:00:00 2001 From: HenryNguyen5 <6404866+HenryNguyen5@users.noreply.github.com> Date: Thu, 19 Oct 2023 16:27:59 -0400 Subject: [PATCH 3/5] Add missing job spec fields --- src/screens/Job/JobView.tsx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/screens/Job/JobView.tsx b/src/screens/Job/JobView.tsx index f2cbb9bd..b3e88ec2 100644 --- a/src/screens/Job/JobView.tsx +++ b/src/screens/Job/JobView.tsx @@ -96,6 +96,7 @@ const JOB_PAYLOAD__SPEC = gql` requestTimeout backoffInitialDelay backoffMaxDelay + vrfOwnerAddress } ... on BlockhashStoreSpec { coordinatorV1Address @@ -107,6 +108,9 @@ const JOB_PAYLOAD__SPEC = gql` runTimeout evmChainID fromAddresses + coordinatorV2PlusAddress + trustedBlockhashStoreAddress + trustedBlockhashStoreBatchSize } ... on BlockHeaderFeederSpec { coordinatorV1Address @@ -121,6 +125,7 @@ const JOB_PAYLOAD__SPEC = gql` fromAddresses getBlockhashesBatchSize storeBlockhashesBatchSize + coordinatorV2PlusAddress } ... on BootstrapSpec { contractID From a25ab3624a849baa8eb362b6454b17f8e07a53c5 Mon Sep 17 00:00:00 2001 From: Makram Kamaleddine Date: Fri, 20 Oct 2023 11:43:34 +0300 Subject: [PATCH 4/5] chore: update README.md --- README.md | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/README.md b/README.md index 17e5def5..17261b7b 100644 --- a/README.md +++ b/README.md @@ -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! + } + # ... +` +``` From 3f2d96743514490560144778d9d28975431b7fa8 Mon Sep 17 00:00:00 2001 From: Makram Kamaleddine Date: Fri, 20 Oct 2023 13:51:57 +0300 Subject: [PATCH 5/5] chore: prettier --- src/screens/Job/generateJobDefinition.test.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/screens/Job/generateJobDefinition.test.ts b/src/screens/Job/generateJobDefinition.test.ts index 1df32132..8e300fa3 100644 --- a/src/screens/Job/generateJobDefinition.test.ts +++ b/src/screens/Job/generateJobDefinition.test.ts @@ -601,7 +601,8 @@ chainID = 1_337 coordinatorV2Address: '0xD427446551a93F4686799EDEcA33Bbb741115a5b', coordinatorV2PlusAddress: '0xd5af166B311768b4678A5eE431089FdA48d58bfe', blockhashStoreAddress: '0x5C210eF41CD1a72de73bF76eC39637bB0d3d7BEE', - trustedBlockhashStoreAddress: '0x1Cbdef9B2c247FD31B972242E63ff26eA02466e2', + trustedBlockhashStoreAddress: + '0x1Cbdef9B2c247FD31B972242E63ff26eA02466e2', trustedBlockhashStoreBatchSize: 100, pollPeriod: '300ms', waitBlocks: 30,