-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdirectrequestV2.toml
49 lines (41 loc) · 1.89 KB
/
directrequestV2.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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
type = "directrequest"
schemaVersion = 1
name = "Arborist Direct Request V2"
externalJobID = "0badc0de-0bad-c0de-0bad-c0de0badc0de"
maxTaskDuration = "30s"
contractAddress = "0x56F67783156646Bc629fe2dF3790dEbDCBb4EdCf"
minIncomingConfirmations = 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)"]
check_data [type="ethabiencode"
abi="(bytes4 selector)"
data="{\\"selector\\": $(decode_log.callbackFunctionId)}"]
check_call [type="ethcall"
failEarly=true
extractRevertReason=true
contract="$(decode_log.callbackAddr)"
data="$(check_data)"]
send_bridge [type="bridge"
name="vmt"
timeout="30s"
requestData="{\\"data\\": {\\"rawData\\": $(check_call)}}"]
parse_proof [type="jsonparse"
path="data,proof"
data="$(send_bridge)"]
parse_trees [type="jsonparse"
path="data,newFilledSubtrees"
data="$(send_bridge)"]
encode_data [type="ethabiencode"
abi="performMassUpdate(uint256[8] memory proof, uint256[20] memory newFilledSubtrees)"
data="{ \\"proof\\": $(parse_proof), \\"newFilledSubtrees\\": $(parse_trees)}"]
submit_tree [type="ethtx"
to="$(decode_log.callbackAddr)"
data="$(encode_data)"
gasLimit=1500000]
decode_log -> check_data -> check_call -> send_bridge -> parse_proof -> encode_data
send_bridge -> parse_trees -> encode_data
encode_data -> submit_tree
"""