Outcomes
Retrieve outcomes' details
The following fields can be queried to retrieve all outcomes data:
Query
Response
query {
outcomes {
UUID
match {
UUID
createdAt
}
createdAt
response {
... on MailResponse {
messageId
}
... on WebhookResponse {
httpCode
body
}
... on ErrorResponse {
error
}
}
payload {
... on MailPayload {
to
subject
body
}
... on EventsTriggerWebhookPayload {
decoded {
method {
name
}
arguments
}
log {
address
data
topics
}
block {
number
hash
timestamp
}
transaction {
hash
}
}
... on ContractsTriggerWebhookPayload {
contract {
address
}
method{
name
}
returnedValues {
matched
all
}
block {
number
hash
timestamp
}
}
... on TransactionsTriggerWebhookPayload {
decoded {
method {
name
}
arguments
}
block {
number
hash
timestamp
}
transaction {
hash
nonce
from
to
value
gasPrice
gas
inputData
}
}
}
}
}
{
"data": {
"outcomes": [
{
"UUID": "a45cacf8-3d99-4849-969b-12847ee41bf8",
"match": {
"UUID": "f2019251-e690-4507-8e46-19fe2f6d03f4",
"createdAt": "2019-12-19 13:18:00.535264+00"
},
"createdAt": "2019-12-19 13:18:00.938119+00",
"response": {
"httpCode": 200,
"body": "200 OK"
},
"payload": {
"decoded": {
"method": {
"name": "WhitelistAdded"
},
"arguments": null
},
"log": {
"address": "0xf92c1ad75005e6436b4ee84e88cb23ed8a290988",
"data": "0x",
"topics": [
"0x4790a4adb426ca2345bb5108f6e454eae852a7bf687544cd66a7270dff3a41d6",
"0x00000000000000000000000021718c0fbd10900565fa57c76e1862cd3f6a4d8e"
]
},
"block": {
"number": 9130755,
"hash": "0xc46145c2c8548b102e8bc8cee7b07af811eff8549a70e34911f00af34b09cf17",
"timestamp": 1576761111
},
"transaction": {
"hash": "0x0021fac188954bff67de011e237236576622be8594ff04b40c2849705c92a9ea"
}
}
},
{
"UUID": "1dbe6d00-845e-4b7d-97eb-4ec7669140ce",
"match": {
"UUID": "f2019251-e690-4507-8e46-19fe2f6d03f4",
"createdAt": "2019-12-19 13:18:00.535264+00"
},
"createdAt": "2019-12-19 13:18:00.93617+00",
"response": {
"messageId": "0102016f1e4ed5d5-ac4d60ef-9df2-4b1e-a236-05af38bb3e11-000000"
},
"payload": {
"to": [
],
"subject": "WAE MATTEO - Address - Event name is: WhitelistAdded",
"body": "BlockNumber is 9130755\nBlockHash is 0xc46145c2c8548b102e8bc8cee7b07af811eff8549a70e34911f00af34b09cf17\nTransactionHash is 0x0021fac188954bff67de011e237236576622be8594ff04b40c2849705c92a9ea\nBlockTimestamp is 1576761111\n\nEvent name is: WhitelistAdded\n\nThis Event was logged by this contract: 0xf92c1ad75005e6436b4ee84e88cb23ed8a290988\n\n0x21718c0fbd10900565fa57c76e1862cd3f6a4d8e"
}
},
{
"UUID": "1c1ef495-cc75-4942-a3c8-7b017b682a88",
"match": {
"UUID": "230ad243-c085-48c8-b94f-9e1e0596dc8c",
"createdAt": "2020-01-18 14:07:01.60026+00"
},
"createdAt": "2020-01-18 14:07:02.325441+00",
"response": {
"messageId": "0102016fb8fa7e46-24fbf7fd-3a80-45ec-a4cc-b81e0e0706c7-000000"
},
"payload": {
"to": [
],
"subject": "WAC The price of ETH is > 140 on block 9305673",
"body": "BlockNumber is 9305673, The matched value is [175], which is smaller than the returned value [175]"
}
},
{
"UUID": "7994ecfb-ec19-4354-8dfc-2639d4cdba7b",
"match": {
"UUID": "e86ffa37-b697-4a78-ac05-8776049332c8",
"createdAt": "2020-01-13 04:32:10.979386+00"
},
"createdAt": "2020-01-13 04:32:11.146818+00",
"response": {
"httpCode": 404,
"body": "404 Not Found"
},
"payload": {
"decoded": {
"method": {
"name": "trade"
},
"arguments": [
{
"rs": [
[
153,
110,
25,
225,
28,
254,
25,
26,
249,
5,
234,
250,
190,
225,
162,
68,
122,
195,
186,
137,
229,
152,
143,
80,
65,
59,
116,
140,
136,
195,
96,
96
],
[
24,
219,
41,
203,
27,
216,
100,
30,
35,
41,
96,
72,
239,
52,
245,
189,
148,
50,
2,
229,
61,
171,
228,
187,
139,
8,
174,
227,
34,
27,
60,
73
],
[
158,
205,
57,
38,
26,
232,
254,
168,
6,
135,
105,
165,
3,
62,
145,
166,
47,
83,
250,
33,
201,
87,
149,
232,
243,
57,
232,
102,
61,
187,
209,
11
],
[
67,
183,
235,
141,
216,
228,
20,
170,
85,
213,
51,
254,
243,
122,
213,
192,
67,
85,
61,
244,
135,
56,
68,
68,
3,
247,
48,
206,
135,
56,
6,
157
]
],
"tradeAddresses": [
"0x0000000000000000000000000000000000000000",
"0x4a220e6096b25eadb88358cb44068a3248254675",
"0x4532bd8c2aa02cae30421f10bbabf30e029ac5b8",
"0xd39456d65cdeaeb06d9473ab9ec083c2d5ddf375"
],
"tradeValues": [
1556917910867300000,
76034996643332000000,
10000,
1578765438075,
1556917910867300000,
529,
1000000000000000,
2993629779195118
],
"v": [
28,
27
]
}
]
},
"block": {
"number": 9260274,
"hash": "0x64d8682962701f7576d707b157cb748c78841ed543ccacd6eb918837dcbefe98",
"timestamp": 1578754631
},
"transaction": {
"hash": "0x5518de3f7a6f06413cf85cae10e8887d9669e49fab4acf4835289ee1bb95da9e",
"nonce": 4576357,
"from": "0xa7a7899d944fe658c4b0a1803bab2f490bd3849e",
"to": "0x2a0c0dbecc7e4d658f48e01e3fa353f44050c208",
"value": 0,
"gasPrice": 9000000000,
"gas": 400000,
"inputData": "0xef343588000000000000000000000000000000000000000000000000159b48974db04ea00000000000000000000000000000000000000000000000041f329298afd2890000000000000000000000000000000000000000000000000000000000000027100000000000000000000000000000000000000000000000000000016f95c0cc7b000000000000000000000000000000000000000000000000159b48974db04ea0000000000000000000000000000000000000000000000000000000000000021100000000000000000000000000000000000000000000000000038d7ea4c68000000000000000000000000000000000000000000000000000000aa2b0bf93f4ee00000000000000000000000000000000000000000000000000000000000000000000000000000000000000004a220e6096b25eadb88358cb44068a32482546750000000000000000000000004532bd8c2aa02cae30421f10bbabf30e029ac5b8000000000000000000000000d39456d65cdeaeb06d9473ab9ec083c2d5ddf375000000000000000000000000000000000000000000000000000000000000001c000000000000000000000000000000000000000000000000000000000000001b996e19e11cfe191af905eafabee1a2447ac3ba89e5988f50413b748c88c3606018db29cb1bd8641e23296048ef34f5bd943202e53dabe4bb8b08aee3221b3c499ecd39261ae8fea8068769a5033e91a62f53fa21c95795e8f339e8663dbbd10b43b7eb8dd8e414aa55d533fef37ad5c043553df48738444403f730ce8738069d"
}
}
}
]
}
}
The most common scenario when it comes to querying outcomes is to fetch all the outcomes for a specific trigger. You can do just that using filters:
Query
Response
query {
outcomes(filter: {triggerUUID: {eq: "0f96098d-e505-47d7-a60b-452681523ca9"}}) {
UUID
match {
UUID
createdAt
}
createdAt
response {
... on MailResponse {
messageId
}
... on WebhookResponse {
httpCode
body
}
... on ErrorResponse {
error
}
}
payload {
... on MailPayload {
to
subject
body
}
... on EventsTriggerWebhookPayload {
decoded {
method {
name
}
arguments
}
log {
address
data
topics
}
block {
number
hash
timestamp
}
transaction {
hash
}
}
... on ContractsTriggerWebhookPayload {
contract {
address
}
method{
name
}
returnedValues {
matched
all
}
block {
number
hash
timestamp
}
}
... on TransactionsTriggerWebhookPayload {
decoded {
method {
name
}
arguments
}
block {
number
hash
timestamp
}
transaction {
hash
nonce
from
to
value
gasPrice
gas
inputData
}
}
}
}
}
{
"data": {
"outcomes": [
{
"UUID": "1c1ef495-cc75-4942-a3c8-7b017b682a88",
"match": {
"UUID": "230ad243-c085-48c8-b94f-9e1e0596dc8c",
"createdAt": "2020-01-18 14:07:01.60026+00"
},
"createdAt": "2020-01-18 14:07:02.325441+00",
"response": {
"messageId": "0102016fb8fa7e46-24fbf7fd-3a80-45ec-a4cc-b81e0e0706c7-000000"
},
"payload": {
"to": [
],
"subject": "WAC The price of ETH is > 140 on block 9305673",
"body": "BlockNumber is 9305673, The matched value is [175], which is smaller than the returned value [175]"
}
}
]
}
}
Last modified 3yr ago