Two quotation marks in sum task

42 views Asked by At

I have such a job:

type = "cron"
schemaVersion = 1
name = "gasOp"
forwardingAllowed = false
maxTaskDuration = "0s"
schedule = "CRON_TZ=UTC 0 */1 * * * *"
observationSource = """


opt_gas        [type=bridge name="gas" requestData="{\\"id\\": $(jobSpec.externalJobID), \\"data\\": { \\"network\\": \\"opt\\"}}"]
opt_gas_maxFeePerGas        [type=jsonparse path="data,maxFeePerGas"]
opt_gas_maxPriorityFeePerGas        [type=jsonparse path="data,maxPriorityFeePerGas"]
opt_gas_baseFee        [type=jsonparse path="data,baseFee"]
opt_gas_estimatedFee [type="sum"]


opt_gas->opt_gas_maxFeePerGas
opt_gas->opt_gas_maxPriorityFeePerGas
opt_gas->opt_gas_baseFee
opt_gas_maxFeePerGas->opt_gas_estimatedFee
opt_gas_maxPriorityFeePerGas->opt_gas_estimatedFee
opt_gas_baseFee->opt_gas_estimatedFee




evershop_opt [type="http"
              method=POST
              url="http://localhost:3000/api/tax/classes/gas"
              requestData="{\\"300\\": {\\"id\\": 300,\\"price\\": $(opt_gas_estimatedFee)}}"
              allowUnrestrictedNetworkAccess=true
              ]



"""

In this task: opt_gas_estimatedFee [type="sum"] I gets a result that has two quotation marks as here:

      "__typename": "TaskRun",
      "id": "98716e62-5c0b-49d2-8168-af059b9c657a",
      "createdAt": "2023-11-26T18:34:00.181724Z",
      "dotID": "opt_gas_estimatedFee",
      "error": null,
      "finishedAt": "2023-11-26T18:34:00.181766Z",
      "output": ""0.03394837"",
      "type": "sum"

in any other task gets the correct result in a single quotation mark, e.g:

      "__typename": "TaskRun",
      "id": "863c888e-a6cd-438b-9fb8-9bc2bc122f73",
      "createdAt": "2023-11-26T18:34:00.181629Z",
      "dotID": "opt_gas_maxPriorityFeePerGas",
      "error": null,
      "finishedAt": "2023-11-26T18:34:00.181706Z",
      "output": "0.007436033",
      "type": "jsonparse"

How do I remove the double quotation mark?

1

There are 1 answers

4
Derek On

Taking a look at your job configuration, it seems that your sum task is incorrect.

Can you please take a look at the following Chainlink job task documentation for the sum task, and let me know if that fixes things?