Job-Setup
Let’s create a JOB, so you can test and see if your oracle is getting interacted with external world
Create an Alarm Job in Plugin node.
Steps to create Alarm Job -
  • Login to Plugin node
  • Navigate to Jobs and click on New Job
  • Copy the job specification mentioned below
  • Paste the contents into the Json Spec field and create the job
  • Copy the newly created job ID which we will be using later
  • Submit clientcontract using xinfin.remix, if any error occurs then you can use remix.ethereum
NOTE:
1) While filling up "name", "endpoint" values, please provide the same Name value which you used for 'plugin initiators create <Name>'.
2) For the 'addresses' values you need to paste the OCA which we used in Deployment. You need to remove the 'xdc' at the starting of the OCA and replace it with '0x', and make sure there is no space left at the front or back of the OCA.
1
{
2
"initiators":[
3
{
4
"type":"external",
5
"params":{
6
"name": "xdc",
7
"body": {
8
"endpoint": "xdc",
9
"addresses": ["0xf180e56bb575806aefaf2a7616622a9fc180b51c"]
10
}
11
}
12
}
13
],
14
"tasks":[
15
{
16
"type":"sleep",
17
"confirmations":null,
18
"params":{
19
}
20
},
21
{
22
"type":"ethbool",
23
"confirmations":null,
24
"params":{
25
}
26
},
27
{
28
"type":"ethtx",
29
"confirmations":null,
30
"params":{
31
}
32
}
33
],
34
"startAt":null,
35
"endAt":null
36
}
Copied!
Here, “Sleep”, “ethbool”, “ethtx” are core-adapters,
Core adapters are the built-in functionality that every Plugin node supports. Strung together, they act as tasks that need to be performed to complete a Job. Adapters that are prefixed with “Eth” refer to tasks that post data onto the chain.
Copy link