Search…
Networks
where can you access data from
It is possible to use different network to access to data from different blockchains. Networks can be specified directly inside of the mutation
Currently we support the following Networks:
NetworkID
Network Name
1_eth_mainnet
Ethereum Mainnet
2_eth_rinkeby
Ethereum Rinkeby
3_xdai_mainnet
xDAI Mainnet

Examples

Obtain the updated list of supported Networks

Query
Result
1
query {
2
networks {
3
networkId
4
friendlyName
5
technology
6
network
7
rpcEndpoint
8
}
9
}
Copied!
1
{
2
"data": {
3
"networks": [
4
{
5
"networkId": "1_eth_mainnet",
6
"friendlyName": "Ethereum Mainnet",
7
"technology": "ETH",
8
"network": "Mainnet",
9
"rpcEndpoint": "foobar"
10
},
11
{
12
"networkId": "2_eth_rinkeby",
13
"friendlyName": "Ethereum Rinkeby",
14
"technology": "ETH",
15
"network": "Rinkeby",
16
"rpcEndpoint": "http://foo.bar:8545"
17
},
18
{
19
"networkId": "3_xdai_mainnet",
20
"friendlyName": "xDAI Mainnet",
21
"technology": "xDAI",
22
"network": "Mainnet",
23
"rpcEndpoint": "https://dai.poa.network"
24
}
25
]
26
}
27
}
Copied!

Specify the Network in an create mutation

Query
Result
1
mutation {
2
createContractsTrigger(input: {
3
name: "ContractsTrigger Example",
4
type: ContractsTrigger,
5
#specify the networkID of the network you want to use, if not explicited it will be used the Ethereum Mainnet by default
6
network: "3_xdai_mainnet",
7
statement: {
8
contract: {
9
address: "0x09cabec1ead1c0ba254b09efb3ee13841712be14",
10
abi: [...]
11
},
12
inputs: [
13
{
14
type: "uint256",
15
name: "eth_bought",
16
value: "1"
17
}
18
],
19
outputFilters: [
20
{
21
parameter: {
22
type: "uint256",
23
name: "out"
24
},
25
returnIndex: 0,
26
condition: {
27
attribute: "140",
28
predicate: BiggerThan
29
}
30
}
31
],
32
method: {
33
name: "getTokenToEthOutputPrice"
34
}
35
},
36
actions: [
37
{
38
type: Email,
39
attributes: {
40
body: "BlockNumber is $BlockNumber$\nBlockHash is $BlockHash$\nBlockTimestamp is $BlockTimestamp$\n\nThe contract wich originated this trigger is: $ContractAddress$\n\nAll values returned by the function: $ReturnedValuesquot;,
41
subject: "ContractsTrigger Example",
42
to: [
44
]
45
}
46
}
47
]
48
})
49
{
50
UUID
51
}
52
}
Copied!
1
{
2
"data": {
3
"createContractsTrigger": {
4
"UUID": "8b944a2f-da6b-41a6-895b-c39fcac5011e"
5
}
6
}
7
}
Copied!

Specify the Network in an update mutation

Query
Result
1
mutation {
2
updateEventsTrigger(input: {
3
UUID: "1cbfd7f3-9448-4fd2-88a3-091678f9f68b",
4
name: "New name",
5
#specify the networkID of the network you want to use, if not explicited it will be used the Ethereum Mainnet by default
6
network: "3_xdai_mainnet",
7
statement: {
8
contract: {
9
address:"0x398ec7346dcd622edc5ae82352f02be94c62d119",
10
abi: [{anonymous:false,inputs:[{indexed:false,internalType:"address",name:"previousAdmin",type:"address"},{indexed:false,internalType:"address",name:"newAdmin",type:"address"}],name:"AdminChanged",type:"event"},{anonymous:false,inputs:[{indexed:true,internalType:"address",name:"implementation",type:"address"}],name:"Upgraded",type:"event"},{payable:true,stateMutability:"payable",type:"fallback"},{constant:false,inputs:[],name:"admin",outputs:[{internalType:"address",name:"",type:"address"}],payable:false,stateMutability:"nonpayable",type:"function"},{constant:false,inputs:[{internalType:"address",name:"newAdmin",type:"address"}],name:"changeAdmin",outputs:[],payable:false,stateMutability:"nonpayable",type:"function"},{constant:false,inputs:[],name:"implementation",outputs:[{internalType:"address",name:"",type:"address"}],payable:false,stateMutability:"nonpayable",type:"function"},{constant:false,inputs:[{internalType:"address",name:"_logic",type:"address"},{internalType:"address",name:"_admin",type:"address"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"initialize",outputs:[],payable:true,stateMutability:"payable",type:"function"},{constant:false,inputs:[{internalType:"address",name:"_logic",type:"address"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"initialize",outputs:[],payable:true,stateMutability:"payable",type:"function"},{constant:false,inputs:[{internalType:"address",name:"newImplementation",type:"address"}],name:"upgradeTo",outputs:[],payable:false,stateMutability:"nonpayable",type:"function"},{constant:false,inputs:[{internalType:"address",name:"newImplementation",type:"address"},{internalType:"bytes",name:"data",type:"bytes"}],name:"upgradeToAndCall",outputs:[],payable:true,stateMutability:"payable",type:"function"}]}
11
filters: [{
12
#use the proper event type (follow the schema for further details)
13
type:CheckEventEmitted,
14
method: {
15
name:"AdminChanged"
16
}
17
}]
18
},
19
actions: [
20
{
21
type: Email,
22
attributes: {
23
subject: "Changed",
24
body: "New Body",
25
to: [
27
]
28
}
29
},
30
{
31
type: Twitter,
32
attributes: {
33
status: "New Message",
34
token: "$TwitterToken",
35
secret: "$TwitterSecret"
36
}
37
}
38
]
39
})
40
{
41
UUID
42
}
43
}
Copied!
1
{
2
"data": {
3
"updateEventsTrigger": {
4
"UUID": "8b944a2f-da6b-41a6-895b-c39fcac5011e"
5
}
6
}
7
}
Copied!