I am trying to use an external adapter to take in parameters for off-chain computation. The job seems to fail before it even gets to the external adapter because it is unable to find a data key that seems to exist. (below)
requestData: key decode_cbor / keypath decode_cbor.userId: keypath not found
data: key decode_log / keypath **decode_log.data**: keypath not found
decode_log ethabidecodelog
{"callbackAddr":"0xf0e477c7a664631df4544cc8d3fe6cd34443d78d","callbackFunctionId":[146,205,170,243],"cancelExpiration":1637816760,"data":"amFtb3VudFBhaWRhMWZ1c2VySWRkV2lsbGpjb250cmFjdElkZ2F3ZXJhc2Q=","dataVersion":1,"payment":1000000000000000000,"requestId":[90,93,214,7,123,29,189,59,8,213,171,109,197,119,238,114,0,2,247,196,90,23,232,53,255,135,143,200,168,211,46,156],"requester":"0xf0e477c7a664631df4544cc8d3fe6cd34443d78d","specId":[56,54,57,52,99,56,54,54,50,56,102,48,52,98,49,53,56,98,101,101,97,48,98,49,50,56,53,54,98,50,52,54]}
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 cborparse
data: key decode_log / keypath decode_log.data: keypath not found
data: $(decode_log.data)
The data comes into the contract via req.add calls and i was wondering if it might be a problem with my abi
function requestData(address _oracle, string memory _jobId,string memory _amount, string memory _userId, string memory _contractId)
public
onlyOwner
{
Chainlink.Request memory req = buildChainlinkRequest(stringToBytes32(_jobId), address(this), this.fulfillEthereumPrice.selector);
req.add("amountPaid", _amount);
req.add("userId", _userId);
req.add("contractId", _contractId);
sendChainlinkRequestTo(_oracle, req, ORACLE_PAYMENT);
}
'''
_______
```type = "directrequest"
schemaVersion = 1
name = "TgetherisPaid"
contractAddress = "0x7CbeF9F1C57b13d412D7651D8a1cFb898600952C"
maxTaskDuration = "1s"
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)"]
my_bridge_task [type="bridge"
name="tgether_ispaid_el_ea"
requestData="{\\"data\\":{\\"userid\\": $(decode_cbor.userId), \\"contractId\\": $(decode_cbor.contractId), \\"amountPaid\\": $(decode_cbor.amountPaid)}}"
]
"""