Search code examples
chainlinktoml

Chainlink Node Operator Create Job, Unknown Task Type "ETHTX"


I am a Chainlink beginner attempting to set up a Chainlink node on Rinkeby. I have the node running and can access the operator GUI. When I attempt to set up a job (following the documentation here: https://docs.chain.link/docs/fulfilling-requests/) I copy and paste the TOML blob into the field, update my oracle address.

type = "directrequest"
schemaVersion = 1
name = "Get > Uint256"

contractAddress = "updated_addr"
maxTaskDuration = "0s"
observationSource = """
   decode_log   [type="ethabidecodelog"
                 abi="OracleRequest(bytes32 indexed specId, address requester, bytes32 requestId, uint256 payment, address callbackAddr, bytes4 callbackFunctionId, uint256 cancelExpiration, uint256 dataVersion, bytes data)"
                 data="$(jobRun.logData)"
                 topics="$(jobRun.logTopics)"]

   decode_cbor  [type="cborparse" data="$(decode_log.data)"]
   fetch        [type="http" method=GET url="$(decode_cbor.get)"]
   parse        [type="jsonparse" path="$(decode_cbor.path)" data="$(fetch)"]
   multiply     [type="multiply" input="$(parse)" times=100]
   encode_data  [type="ethabiencode" abi="(uint256 value)" data="{ \\"value\\": $(multiply) }"]
   encode_tx    [type="ethabiencode"
                 abi="fulfillOracleRequest(bytes32 requestId, uint256 payment, address callbackAddress, bytes4 callbackFunctionId, uint256 expiration, bytes32 data)"
                 data="{\\"requestId\\": $(decode_log.requestId), \\"payment\\": $(decode_log.payment), \\"callbackAddress\\": $(decode_log.callbackAddr), \\"callbackFunctionId\\": $(decode_log.callbackFunctionId), \\"expiration\\": $(decode_log.cancelExpiration), \\"data\\": $(encode_data)}"
                ]
   submit_tx    [type="ethtx" to="updated_addr" data="$(encode_tx)"]

   decode_log -> decode_cbor -> fetch -> parse -> multiply -> encode_data -> encode_tx -> submit_tx
"""

When I attempt to create the job, I get the following error message:

UnmarshalTaskFromMap: unknown task type: "ethtx"

I did some digging in their documentation to see if they had changed the task name, and found this link to this specific task, and it seems to match the example code above.

https://docs.chain.link/docs/jobs/task-types/eth-tx/

I also attempted "eth tx", "eth_tx" and also ethtx without quotes without luck. I assume this has been depreciated and the documentation has not caught up.

Thank you for your time.


Solution

  • It's ethtx, you should just update your Chainlink Node to version 1.0.0 or above