I just span up an oracle contract using "@chainlink/contracts/src/v0.7/Operator.sol";
I am using Operator.sol specifically for the fulfillRequest2 function since i need to return data in the form of bytes instead of bytes32
The request is going through and the oracle is running the job with no errors. However when it wants to return it to my consumer contract, I get this error.
The following is my job sepc File my node is running for this job :
type = "directrequest"
schemaVersion = 1
name = "Meta Data Processor - Beta"
contractAddress = "xxxx-xxxx-xxxx-xxxx"
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="bridge" name="upload-meta-data" requestData="{\\"data\\":{\\"Class\\": $(decode_cbor.Class),\\"Rarity\\": $(decode_cbor.Rarity), \\"Modifier\\": $(decode_cbor.Modifier),\\"dob\\": $(decode_cbor.dob)}, \\"id\\": $(jobSpec.externalJobID)}"]
parse [type="jsonparse" path="url" data="$(fetch)"]
encode_data [type="ethabiencode" abi="(bytes value)" data="{ \\"value\\": $(parse) }"]
encode_tx [type="ethabiencode"
abi="fulfillOracleRequest2(bytes32 requestId, uint256 payment, address callbackAddress, bytes4 callbackFunctionId, uint256 expiration, bytes calldata 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="xxxx-xxxx-xxxx" data="$(encode_tx)"]
decode_log -> decode_cbor -> fetch -> parse -> encode_data -> encode_tx -> submit_tx
"""
externalJobID = "xxxx-xxxx-xxxx-xxxx"