-
Notifications
You must be signed in to change notification settings - Fork 0
/
iob-config.toml
28 lines (26 loc) · 1.79 KB
/
iob-config.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
type = "directrequest"
schemaVersion = 1
name = "IGTokenizer-EA"
externalJobID = "969b68fc-36ab-4cdf-b262-6c42d82842eb"
forwardingAllowed = false
maxTaskDuration = "0s"
contractAddress = "0xDE6fe1bC4Dda932e0a5b557DdB10bbe5878ee752"
evmChainID = "11155111"
minIncomingConfirmations = 0
minContractPaymentLinkJuels = "0"
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="igtokenizer-ea" requestData="{\\"id\\": $(jobSpec.externalJobID), \\"data\\": { \\"postId\\": $(decode_cbor.postId), \\"hashToVerify\\": $(decode_cbor.hashToVerify)}}"]
parse [type=jsonparse path="data,result" data="$(fetch)"]
encode_data [type=ethabiencode abi="(bool result)" data="{ \\"result\\": $(parse) }"]
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="0xDE6fe1bC4Dda932e0a5b557DdB10bbe5878ee752" data="$(encode_tx)"]
decode_log -> decode_cbor -> fetch -> parse -> encode_data -> encode_tx -> submit_tx
"""