otomato-sdk 1.2.0 → 1.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/examples/create-action.js +2 -2
- package/dist/examples/create-automation.js +2 -8
- package/dist/examples/create-trigger.js +2 -2
- package/dist/examples/create-workflow.js +44 -0
- package/dist/examples/load-workflow.js +16 -0
- package/dist/examples/sandbox.js +18 -0
- package/dist/src/constants/Blocks.js +422 -293
- package/dist/src/index.js +1 -1
- package/dist/src/models/Edge.js +6 -1
- package/dist/src/models/Node.js +79 -6
- package/dist/src/models/Trigger.js +6 -3
- package/dist/src/models/Workflow.js +67 -0
- package/dist/src/services/ApiService.js +24 -18
- package/dist/src/utils/typeValidator.js +2 -1
- package/dist/test/action.spec.js +20 -17
- package/dist/test/automation.spec.js +26 -25
- package/dist/test/node.spec.js +34 -30
- package/dist/test/trigger.spec.js +8 -3
- package/dist/test/typeValidator.spec.js +2 -1
- package/dist/types/examples/create-workflow.d.ts +1 -0
- package/dist/types/examples/load-workflow.d.ts +1 -0
- package/dist/types/examples/sandbox.d.ts +1 -0
- package/dist/types/src/constants/Blocks.d.ts +101 -29
- package/dist/types/src/index.d.ts +1 -1
- package/dist/types/src/models/Action.d.ts +2 -1
- package/dist/types/src/models/Edge.d.ts +3 -0
- package/dist/types/src/models/Node.d.ts +9 -2
- package/dist/types/src/models/Parameter.d.ts +1 -1
- package/dist/types/src/models/Trigger.d.ts +3 -1
- package/dist/types/src/models/Workflow.d.ts +26 -0
- package/dist/types/src/services/ApiService.d.ts +8 -3
- package/examples/create-action.ts +2 -2
- package/examples/create-trigger.ts +2 -2
- package/examples/create-workflow.ts +44 -0
- package/examples/load-workflow.ts +10 -0
- package/package.json +2 -3
- package/src/constants/Blocks.ts +422 -292
- package/src/index.ts +1 -1
- package/src/models/Action.ts +1 -1
- package/src/models/Condition.ts +5 -5
- package/src/models/Edge.ts +8 -2
- package/src/models/Node.ts +90 -10
- package/src/models/Parameter.ts +5 -5
- package/src/models/Trigger.ts +9 -5
- package/src/models/Workflow.ts +69 -0
- package/src/services/ApiService.ts +26 -19
- package/src/utils/typeValidator.ts +2 -1
- package/test/action.spec.ts +11 -9
- package/test/automation.spec.ts +27 -26
- package/test/node.spec.ts +34 -30
- package/test/trigger.spec.ts +8 -3
- package/test/typeValidator.spec.ts +2 -1
- package/examples/create-automation.ts +0 -41
- package/src/constants/json.json +0 -16
- package/src/models/Automation.ts +0 -47
|
@@ -1,391 +1,520 @@
|
|
|
1
|
-
import { CHAINS } from './chains.js';
|
|
2
1
|
const TRIGGER_TYPE = {
|
|
3
2
|
SUBSCRIPTION: 0,
|
|
4
3
|
POLLING: 1,
|
|
5
4
|
};
|
|
6
5
|
export const TRIGGERS = {
|
|
7
|
-
TOKENS: {
|
|
8
|
-
ERC20: {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
6
|
+
"TOKENS": {
|
|
7
|
+
"ERC20": {
|
|
8
|
+
"description": "The most used standard for tokens on ethereum compatible blockchains",
|
|
9
|
+
"chains": [
|
|
10
|
+
0
|
|
11
|
+
],
|
|
12
|
+
"image": "https://otomato-sdk-images.s3.eu-west-1.amazonaws.com/ethereum.webp",
|
|
13
|
+
"TRANSFER": {
|
|
14
|
+
"name": "Transfer token",
|
|
15
|
+
"description": "This block gets triggered when someone transfers the ERC20 configured in the params",
|
|
16
|
+
"type": 0,
|
|
17
|
+
"parameters": [
|
|
16
18
|
{
|
|
17
|
-
key: "chainId",
|
|
18
|
-
type: "chainId",
|
|
19
|
-
description: "Chain ID of the ETH blockchain"
|
|
19
|
+
"key": "chainId",
|
|
20
|
+
"type": "chainId",
|
|
21
|
+
"description": "Chain ID of the ETH blockchain",
|
|
22
|
+
"mandatory": true
|
|
20
23
|
},
|
|
21
24
|
{
|
|
22
|
-
key: "abiParams.
|
|
23
|
-
type: "
|
|
24
|
-
description: "
|
|
25
|
+
"key": "abiParams.from",
|
|
26
|
+
"type": "address",
|
|
27
|
+
"description": "Address that transfers the funds"
|
|
25
28
|
},
|
|
26
29
|
{
|
|
27
|
-
key: "abiParams.
|
|
28
|
-
type: "
|
|
29
|
-
description: "
|
|
30
|
+
"key": "abiParams.value",
|
|
31
|
+
"type": "uint256",
|
|
32
|
+
"description": "Amount of crypto to transfer"
|
|
30
33
|
},
|
|
31
34
|
{
|
|
32
|
-
key: "
|
|
33
|
-
type: "address",
|
|
34
|
-
description: "
|
|
35
|
-
}
|
|
36
|
-
|
|
35
|
+
"key": "abiParams.to",
|
|
36
|
+
"type": "address",
|
|
37
|
+
"description": "Address that receives the funds"
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
"key": "contractAddress",
|
|
41
|
+
"type": "erc20",
|
|
42
|
+
"description": "The contract address of the ERC20",
|
|
43
|
+
"mandatory": true
|
|
44
|
+
},
|
|
45
|
+
],
|
|
46
|
+
"blockId": 1,
|
|
47
|
+
"image": "https://otomato-sdk-images.s3.eu-west-1.amazonaws.com/ethereum.webp"
|
|
37
48
|
},
|
|
38
|
-
BALANCE: {
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
49
|
+
"BALANCE": {
|
|
50
|
+
"name": "ERC20 balance check",
|
|
51
|
+
"description": "Fetches the balance of an ERC20 and checks it against the specified condition.",
|
|
52
|
+
"type": 1,
|
|
53
|
+
"method": "function balanceOf(address account) view returns (uint256)",
|
|
54
|
+
"handler": "output => { const params=JSON.parse(output);const balance = BigInt(params)/1000000n; return Number(balance); }",
|
|
55
|
+
"parameters": [
|
|
44
56
|
{
|
|
45
|
-
key: "chainId",
|
|
46
|
-
type: "chainId",
|
|
47
|
-
description: "Chain ID of the ETH blockchain"
|
|
57
|
+
"key": "chainId",
|
|
58
|
+
"type": "chainId",
|
|
59
|
+
"description": "Chain ID of the ETH blockchain"
|
|
48
60
|
},
|
|
49
61
|
{
|
|
50
|
-
key: "abiParams.account",
|
|
51
|
-
type: "address",
|
|
52
|
-
description: "Amount of crypto to transfer"
|
|
62
|
+
"key": "abiParams.account",
|
|
63
|
+
"type": "address",
|
|
64
|
+
"description": "Amount of crypto to transfer"
|
|
53
65
|
},
|
|
54
66
|
{
|
|
55
|
-
key: "contractAddress",
|
|
56
|
-
type: "address",
|
|
57
|
-
description: "The contract address of the ERC20"
|
|
67
|
+
"key": "contractAddress",
|
|
68
|
+
"type": "address",
|
|
69
|
+
"description": "The contract address of the ERC20"
|
|
58
70
|
},
|
|
59
71
|
{
|
|
60
|
-
key: "condition",
|
|
61
|
-
type: "logic_operator",
|
|
62
|
-
description: "Logic operator used for the comparison: <, >, <=, >=, ==, ..."
|
|
72
|
+
"key": "condition",
|
|
73
|
+
"type": "logic_operator",
|
|
74
|
+
"description": "Logic operator used for the comparison: <, >, <=, >=, ==, ..."
|
|
63
75
|
},
|
|
64
|
-
// todo: it should be in the same type as the output of the function
|
|
65
76
|
{
|
|
66
|
-
key: "comparisonValue",
|
|
67
|
-
type: "any",
|
|
68
|
-
description: "The value to compare to"
|
|
77
|
+
"key": "comparisonValue",
|
|
78
|
+
"type": "any",
|
|
79
|
+
"description": "The value to compare to"
|
|
69
80
|
},
|
|
70
81
|
{
|
|
71
|
-
key: "interval",
|
|
72
|
-
type: "integer",
|
|
73
|
-
description: "The waiting time between each polling"
|
|
82
|
+
"key": "interval",
|
|
83
|
+
"type": "integer",
|
|
84
|
+
"description": "The waiting time between each polling"
|
|
74
85
|
},
|
|
75
86
|
],
|
|
87
|
+
"blockId": 5,
|
|
88
|
+
"image": "https://otomato-sdk-images.s3.eu-west-1.amazonaws.com/ethereum.webp"
|
|
76
89
|
}
|
|
77
|
-
}
|
|
90
|
+
}
|
|
78
91
|
},
|
|
79
|
-
YIELD: {
|
|
80
|
-
SPLICE_FI: {
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
92
|
+
"YIELD": {
|
|
93
|
+
"SPLICE_FI": {
|
|
94
|
+
"description": "Split any yield-bearing asset into separate yield and principal components",
|
|
95
|
+
"chains": [
|
|
96
|
+
43334
|
|
97
|
+
],
|
|
98
|
+
"image": "https://otomato-sdk-images.s3.eu-west-1.amazonaws.com/splicefi.png",
|
|
99
|
+
"SWAP": {
|
|
100
|
+
"name": "Splice Finance Swap",
|
|
101
|
+
"description": "Swap in Splice Finance",
|
|
102
|
+
"type": 0,
|
|
103
|
+
"contractAddress": "0x7A3a94AE0fC1421A3eac23eA6371036ac8d8f448",
|
|
104
|
+
"parameters": [
|
|
88
105
|
{
|
|
89
|
-
key: "abiParams.caller",
|
|
90
|
-
type: "address",
|
|
91
|
-
description: "Caller address"
|
|
106
|
+
"key": "abiParams.caller",
|
|
107
|
+
"type": "address",
|
|
108
|
+
"description": "Caller address"
|
|
92
109
|
},
|
|
93
110
|
{
|
|
94
|
-
key: "abiParams.market",
|
|
95
|
-
type: "address",
|
|
96
|
-
description: "Market address"
|
|
111
|
+
"key": "abiParams.market",
|
|
112
|
+
"type": "address",
|
|
113
|
+
"description": "Market address"
|
|
97
114
|
},
|
|
98
115
|
{
|
|
99
|
-
key: "abiParams.receiver",
|
|
100
|
-
type: "address",
|
|
101
|
-
description: "Receiver address"
|
|
116
|
+
"key": "abiParams.receiver",
|
|
117
|
+
"type": "address",
|
|
118
|
+
"description": "Receiver address"
|
|
102
119
|
},
|
|
103
120
|
{
|
|
104
|
-
key: "abiParams.netPtToAccount",
|
|
105
|
-
type: "int256",
|
|
106
|
-
description: "Net PT to account"
|
|
121
|
+
"key": "abiParams.netPtToAccount",
|
|
122
|
+
"type": "int256",
|
|
123
|
+
"description": "Net PT to account"
|
|
107
124
|
},
|
|
108
125
|
{
|
|
109
|
-
key: "abiParams.netSyToAccount",
|
|
110
|
-
type: "int256",
|
|
111
|
-
description: "Net SY to account"
|
|
112
|
-
}
|
|
113
|
-
]
|
|
126
|
+
"key": "abiParams.netSyToAccount",
|
|
127
|
+
"type": "int256",
|
|
128
|
+
"description": "Net SY to account"
|
|
129
|
+
},
|
|
130
|
+
],
|
|
131
|
+
"blockId": 2,
|
|
132
|
+
"image": "https://otomato-sdk-images.s3.eu-west-1.amazonaws.com/splicefi.png"
|
|
114
133
|
},
|
|
115
|
-
LIQUIDITY_REMOVED: {
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
parameters: [
|
|
134
|
+
"LIQUIDITY_REMOVED": {
|
|
135
|
+
"name": "Liquidity Removed",
|
|
136
|
+
"description": "Liquidity removed in Splice Finance",
|
|
137
|
+
"type": 0,
|
|
138
|
+
"contractAddress": "0x7A3a94AE0fC1421A3eac23eA6371036ac8d8f448",
|
|
139
|
+
"parameters": [
|
|
121
140
|
{
|
|
122
|
-
key: "abiParams.caller",
|
|
123
|
-
type: "address",
|
|
124
|
-
description: "Caller address"
|
|
141
|
+
"key": "abiParams.caller",
|
|
142
|
+
"type": "address",
|
|
143
|
+
"description": "Caller address"
|
|
125
144
|
},
|
|
126
145
|
{
|
|
127
|
-
key: "abiParams.market",
|
|
128
|
-
type: "address",
|
|
129
|
-
description: "Market address"
|
|
146
|
+
"key": "abiParams.market",
|
|
147
|
+
"type": "address",
|
|
148
|
+
"description": "Market address"
|
|
130
149
|
},
|
|
131
150
|
{
|
|
132
|
-
key: "abiParams.receiver",
|
|
133
|
-
type: "address",
|
|
134
|
-
description: "Receiver address"
|
|
151
|
+
"key": "abiParams.receiver",
|
|
152
|
+
"type": "address",
|
|
153
|
+
"description": "Receiver address"
|
|
135
154
|
},
|
|
136
155
|
{
|
|
137
|
-
key: "abiParams.netLpToRemove",
|
|
138
|
-
type: "uint256",
|
|
139
|
-
description: "Net LP to remove"
|
|
156
|
+
"key": "abiParams.netLpToRemove",
|
|
157
|
+
"type": "uint256",
|
|
158
|
+
"description": "Net LP to remove"
|
|
140
159
|
},
|
|
141
160
|
{
|
|
142
|
-
key: "abiParams.netPtOut",
|
|
143
|
-
type: "uint256",
|
|
144
|
-
description: "Net PT out"
|
|
161
|
+
"key": "abiParams.netPtOut",
|
|
162
|
+
"type": "uint256",
|
|
163
|
+
"description": "Net PT out"
|
|
145
164
|
},
|
|
146
165
|
{
|
|
147
|
-
key: "abiParams.netSyOut",
|
|
148
|
-
type: "uint256",
|
|
149
|
-
description: "Net SY out"
|
|
150
|
-
}
|
|
151
|
-
]
|
|
166
|
+
"key": "abiParams.netSyOut",
|
|
167
|
+
"type": "uint256",
|
|
168
|
+
"description": "Net SY out"
|
|
169
|
+
},
|
|
170
|
+
],
|
|
171
|
+
"blockId": 6,
|
|
172
|
+
"image": "https://otomato-sdk-images.s3.eu-west-1.amazonaws.com/splicefi.png"
|
|
152
173
|
},
|
|
153
|
-
MARKET_CREATION: {
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
parameters: [
|
|
174
|
+
"MARKET_CREATION": {
|
|
175
|
+
"name": "Market Creation",
|
|
176
|
+
"description": "Market creation in Splice Finance",
|
|
177
|
+
"type": 0,
|
|
178
|
+
"contractAddress": "0x7A3a94AE0fC1421A3eac23eA6371036ac8d8f448",
|
|
179
|
+
"parameters": [
|
|
159
180
|
{
|
|
160
|
-
key: "abiParams.market",
|
|
161
|
-
type: "address",
|
|
162
|
-
description: "Market address"
|
|
181
|
+
"key": "abiParams.market",
|
|
182
|
+
"type": "address",
|
|
183
|
+
"description": "Market address"
|
|
163
184
|
},
|
|
164
185
|
{
|
|
165
|
-
key: "abiParams.PT",
|
|
166
|
-
type: "address",
|
|
167
|
-
description: "PT address"
|
|
186
|
+
"key": "abiParams.PT",
|
|
187
|
+
"type": "address",
|
|
188
|
+
"description": "PT address"
|
|
168
189
|
},
|
|
169
190
|
{
|
|
170
|
-
key: "abiParams.scalarRoot",
|
|
171
|
-
type: "int256",
|
|
172
|
-
description: "Scalar root"
|
|
191
|
+
"key": "abiParams.scalarRoot",
|
|
192
|
+
"type": "int256",
|
|
193
|
+
"description": "Scalar root"
|
|
173
194
|
},
|
|
174
195
|
{
|
|
175
|
-
key: "abiParams.initialAnchor",
|
|
176
|
-
type: "int256",
|
|
177
|
-
description: "Initial anchor"
|
|
196
|
+
"key": "abiParams.initialAnchor",
|
|
197
|
+
"type": "int256",
|
|
198
|
+
"description": "Initial anchor"
|
|
178
199
|
},
|
|
179
200
|
{
|
|
180
|
-
key: "abiParams.lnFeeRateRoot",
|
|
181
|
-
type: "uint256",
|
|
182
|
-
description: "LN fee rate root"
|
|
183
|
-
}
|
|
184
|
-
]
|
|
201
|
+
"key": "abiParams.lnFeeRateRoot",
|
|
202
|
+
"type": "uint256",
|
|
203
|
+
"description": "LN fee rate root"
|
|
204
|
+
},
|
|
205
|
+
],
|
|
206
|
+
"blockId": 7,
|
|
207
|
+
"image": "https://otomato-sdk-images.s3.eu-west-1.amazonaws.com/splicefi.png"
|
|
185
208
|
},
|
|
186
|
-
INTEREST_RATE_UPDATE: {
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
parameters: [
|
|
192
|
-
{
|
|
193
|
-
key: "abiParams.timestamp",
|
|
194
|
-
type: "uint256",
|
|
195
|
-
description: "Timestamp"
|
|
196
|
-
},
|
|
197
|
-
{
|
|
198
|
-
key: "abiParams.lastLnImpliedRate",
|
|
199
|
-
type: "int256",
|
|
200
|
-
description: "Last LN implied rate"
|
|
201
|
-
},
|
|
202
|
-
{
|
|
203
|
-
key: "contractAddress",
|
|
204
|
-
type: "address",
|
|
205
|
-
description: "Contract address to monitor",
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
"
|
|
209
|
-
"
|
|
210
|
-
"
|
|
209
|
+
"INTEREST_RATE_UPDATE": {
|
|
210
|
+
"name": "Interest Rate Update",
|
|
211
|
+
"description": "Interest rate update in Splice Finance",
|
|
212
|
+
"type": 0,
|
|
213
|
+
"contractAddress": "0x7A3a94AE0fC1421A3eac23eA6371036ac8d8f448",
|
|
214
|
+
"parameters": [
|
|
215
|
+
{
|
|
216
|
+
"key": "abiParams.timestamp",
|
|
217
|
+
"type": "uint256",
|
|
218
|
+
"description": "Timestamp"
|
|
219
|
+
},
|
|
220
|
+
{
|
|
221
|
+
"key": "abiParams.lastLnImpliedRate",
|
|
222
|
+
"type": "int256",
|
|
223
|
+
"description": "Last LN implied rate"
|
|
224
|
+
},
|
|
225
|
+
{
|
|
226
|
+
"key": "contractAddress",
|
|
227
|
+
"type": "address",
|
|
228
|
+
"description": "Contract address to monitor",
|
|
229
|
+
"mandatory": true,
|
|
230
|
+
"enum": [
|
|
231
|
+
"0xDE95511418EBD8Bd36294B11C86314DdFA50e212",
|
|
232
|
+
"0x34cf9BF641bd5f34197060A3f3478a1f97f78f0a",
|
|
233
|
+
"0xb950A73Ea0842B0Cd06D0e369aE974799BB346f1",
|
|
234
|
+
"0xbF14932e1A7962C77D0b31be80075936bE1A43D4"
|
|
211
235
|
]
|
|
212
|
-
}
|
|
213
|
-
]
|
|
236
|
+
},
|
|
237
|
+
],
|
|
238
|
+
"blockId": 9,
|
|
239
|
+
"image": "https://otomato-sdk-images.s3.eu-west-1.amazonaws.com/splicefi.png"
|
|
214
240
|
}
|
|
215
241
|
}
|
|
216
242
|
},
|
|
217
|
-
LENDING: {
|
|
218
|
-
ASTARIA: {
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
243
|
+
"LENDING": {
|
|
244
|
+
"ASTARIA": {
|
|
245
|
+
"description": "Astaria is an oracle-less, intent-based, fixed-rate lending protocol supporting unlimited loan durations for any asset",
|
|
246
|
+
"chains": [
|
|
247
|
+
43334
|
|
248
|
+
],
|
|
249
|
+
"image": "https://otomato-sdk-images.s3.eu-west-1.amazonaws.com/astaria.png",
|
|
250
|
+
"LEND_RECALLED": {
|
|
251
|
+
"name": "Lend Recalled",
|
|
252
|
+
"description": "Lend recalled in Astaria",
|
|
253
|
+
"type": 0,
|
|
254
|
+
"contractAddress": "0x34cf9BF641bd5f34197060A3f3478a1f97f78f0a",
|
|
255
|
+
"parameters": [
|
|
256
|
+
{
|
|
257
|
+
"key": "abiParams.loanId",
|
|
258
|
+
"type": "uint256",
|
|
259
|
+
"description": "Loan ID"
|
|
260
|
+
},
|
|
261
|
+
{
|
|
262
|
+
"key": "abiParams.recaller",
|
|
263
|
+
"type": "address",
|
|
264
|
+
"description": "Recaller address"
|
|
265
|
+
},
|
|
266
|
+
{
|
|
267
|
+
"key": "abiParams.end",
|
|
268
|
+
"type": "uint256",
|
|
269
|
+
"description": "End time"
|
|
270
|
+
},
|
|
271
|
+
],
|
|
272
|
+
"blockId": 8,
|
|
273
|
+
"image": "https://otomato-sdk-images.s3.eu-west-1.amazonaws.com/astaria.png"
|
|
242
274
|
}
|
|
243
275
|
}
|
|
244
276
|
},
|
|
245
|
-
DEXES: {
|
|
246
|
-
ODOS: {
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
277
|
+
"DEXES": {
|
|
278
|
+
"ODOS": {
|
|
279
|
+
"description": "Smart Order Routing across multiple blockchain protocols, 700+ Liquidity Sources and thousands of token pairs, delivering ultimate savings to users",
|
|
280
|
+
"chains": [
|
|
281
|
+
43334,
|
|
282
|
+
1
|
|
283
|
+
],
|
|
284
|
+
"image": "https://otomato-sdk-images.s3.eu-west-1.amazonaws.com/odos.jpg",
|
|
285
|
+
"SWAP": {
|
|
286
|
+
"name": "Odos Swap",
|
|
287
|
+
"description": "Swap on Odos",
|
|
288
|
+
"type": 0,
|
|
289
|
+
"contractAddress": "0x7E15EB462cdc67Cf92Af1f7102465a8F8c784874",
|
|
290
|
+
"parameters": [
|
|
254
291
|
{
|
|
255
|
-
key: "chainId",
|
|
256
|
-
type: "
|
|
257
|
-
description: "Chain ID of the ETH blockchain"
|
|
292
|
+
"key": "chainId",
|
|
293
|
+
"type": "chainId",
|
|
294
|
+
"description": "Chain ID of the ETH blockchain",
|
|
295
|
+
"mandatory": true
|
|
258
296
|
},
|
|
259
297
|
{
|
|
260
|
-
key: "abiParams.sender",
|
|
261
|
-
type: "address",
|
|
262
|
-
description: "Sender address"
|
|
298
|
+
"key": "abiParams.sender",
|
|
299
|
+
"type": "address",
|
|
300
|
+
"description": "Sender address"
|
|
263
301
|
},
|
|
264
302
|
{
|
|
265
|
-
key: "abiParams.inputAmount",
|
|
266
|
-
type: "uint256",
|
|
267
|
-
description: "Input amount"
|
|
303
|
+
"key": "abiParams.inputAmount",
|
|
304
|
+
"type": "uint256",
|
|
305
|
+
"description": "Input amount"
|
|
268
306
|
},
|
|
269
307
|
{
|
|
270
|
-
key: "abiParams.inputToken",
|
|
271
|
-
type: "address",
|
|
272
|
-
description: "Input token address"
|
|
308
|
+
"key": "abiParams.inputToken",
|
|
309
|
+
"type": "address",
|
|
310
|
+
"description": "Input token address"
|
|
273
311
|
},
|
|
274
312
|
{
|
|
275
|
-
key: "abiParams.amountOut",
|
|
276
|
-
type: "uint256",
|
|
277
|
-
description: "Output amount"
|
|
313
|
+
"key": "abiParams.amountOut",
|
|
314
|
+
"type": "uint256",
|
|
315
|
+
"description": "Output amount"
|
|
278
316
|
},
|
|
279
317
|
{
|
|
280
|
-
key: "abiParams.outputToken",
|
|
281
|
-
type: "address",
|
|
282
|
-
description: "Output token address"
|
|
318
|
+
"key": "abiParams.outputToken",
|
|
319
|
+
"type": "address",
|
|
320
|
+
"description": "Output token address"
|
|
283
321
|
},
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
description: "Exchange rate"
|
|
288
|
-
}
|
|
289
|
-
]
|
|
322
|
+
],
|
|
323
|
+
"blockId": 4,
|
|
324
|
+
"image": "https://otomato-sdk-images.s3.eu-west-1.amazonaws.com/odos.jpg"
|
|
290
325
|
}
|
|
291
326
|
}
|
|
292
327
|
},
|
|
293
|
-
SOCIALS: {
|
|
294
|
-
MODE_NAME_SERVICE: {
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
328
|
+
"SOCIALS": {
|
|
329
|
+
"MODE_NAME_SERVICE": {
|
|
330
|
+
"description": "Next generation of Mode Mainnet Domains",
|
|
331
|
+
"chains": [
|
|
332
|
+
43334
|
|
333
|
+
],
|
|
334
|
+
"image": "https://otomato-sdk-images.s3.eu-west-1.amazonaws.com/modens.png",
|
|
335
|
+
"NAME_REGISTERED": {
|
|
336
|
+
"name": "Name Registered",
|
|
337
|
+
"description": "Name registered in Mode Name Service",
|
|
338
|
+
"type": 0,
|
|
339
|
+
"contractAddress": "0x2aD86eeEC513AC16804bb05310214C3Fd496835B",
|
|
340
|
+
"parameters": [
|
|
341
|
+
{
|
|
342
|
+
"key": "abiParams.id",
|
|
343
|
+
"type": "uint256",
|
|
344
|
+
"description": "ID of the name registered"
|
|
345
|
+
},
|
|
346
|
+
{
|
|
347
|
+
"key": "abiParams.owner",
|
|
348
|
+
"type": "address",
|
|
349
|
+
"description": "Owner address"
|
|
350
|
+
},
|
|
351
|
+
{
|
|
352
|
+
"key": "abiParams.expires",
|
|
353
|
+
"type": "uint256",
|
|
354
|
+
"description": "Expiration time"
|
|
355
|
+
},
|
|
356
|
+
],
|
|
357
|
+
"blockId": 3,
|
|
358
|
+
"image": "https://otomato-sdk-images.s3.eu-west-1.amazonaws.com/modens.png"
|
|
359
|
+
}
|
|
360
|
+
}
|
|
361
|
+
},
|
|
362
|
+
"PRICE_ACTION": {
|
|
363
|
+
"ON_CHAIN_PRICE_MOVEMENT": {
|
|
364
|
+
"description": "Triggers based on the movement of on-chain prices against specified currencies",
|
|
365
|
+
"chains": [
|
|
366
|
+
0
|
|
367
|
+
],
|
|
368
|
+
"image": "https://otomato-sdk-images.s3.eu-west-1.amazonaws.com/trend-up.png",
|
|
369
|
+
"PRICE_MOVEMENT_AGAINST_CURRENCY": {
|
|
370
|
+
"name": "On-Chain Price Movement Against Fiat Currency",
|
|
371
|
+
"description": "This trigger activates when the on-chain price of an asset moves against a specified currency based on the given condition.",
|
|
372
|
+
"type": 2,
|
|
373
|
+
"parameters": [
|
|
374
|
+
{
|
|
375
|
+
"key": "chainId",
|
|
376
|
+
"type": "chainId",
|
|
377
|
+
"description": "Chain ID of the blockchain to monitor"
|
|
378
|
+
},
|
|
379
|
+
{
|
|
380
|
+
"key": "comparisonValue",
|
|
381
|
+
"type": "float",
|
|
382
|
+
"description": "The price to compare against"
|
|
383
|
+
},
|
|
384
|
+
{
|
|
385
|
+
"key": "currency",
|
|
386
|
+
"type": "string",
|
|
387
|
+
"description": "The currency in which the comparison price is denominated",
|
|
388
|
+
"enum": [
|
|
389
|
+
"USD"
|
|
390
|
+
]
|
|
391
|
+
},
|
|
392
|
+
{
|
|
393
|
+
"key": "condition",
|
|
394
|
+
"type": "logic_operator",
|
|
395
|
+
"description": "The logic operator used for the comparison (e.g., >, <, >=, <=, ==, !=)"
|
|
396
|
+
},
|
|
397
|
+
{
|
|
398
|
+
"key": "contractAddress",
|
|
399
|
+
"type": "erc20",
|
|
400
|
+
"description": "The asset that you want to track"
|
|
401
|
+
},
|
|
402
|
+
],
|
|
403
|
+
"blockId": 10,
|
|
404
|
+
"image": "https://otomato-sdk-images.s3.eu-west-1.amazonaws.com/trend-up.png"
|
|
318
405
|
}
|
|
319
406
|
}
|
|
320
407
|
}
|
|
321
408
|
};
|
|
322
409
|
export const ACTIONS = {
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
name: "
|
|
329
|
-
|
|
330
|
-
|
|
410
|
+
"NOTIFICATIONS": {
|
|
411
|
+
"SLACK": {
|
|
412
|
+
"description": "Slack is a messaging app for businesses that connects people to the information they need.",
|
|
413
|
+
"image": "https://otomato-sdk-images.s3.eu-west-1.amazonaws.com/slack.png",
|
|
414
|
+
"SEND_MESSAGE": {
|
|
415
|
+
"name": "Send message",
|
|
416
|
+
"type": 0,
|
|
417
|
+
"description": "Notifies you by sending a Slack message to the channel of your choice",
|
|
418
|
+
"parameters": [
|
|
331
419
|
{
|
|
332
|
-
key: "
|
|
333
|
-
type: "
|
|
334
|
-
description: "
|
|
420
|
+
"key": "webhook",
|
|
421
|
+
"type": "url",
|
|
422
|
+
"description": "The webhook URL for the Slack channel"
|
|
335
423
|
},
|
|
336
424
|
{
|
|
337
|
-
key: "
|
|
338
|
-
type: "
|
|
339
|
-
description: "
|
|
425
|
+
"key": "message",
|
|
426
|
+
"type": "paragraph",
|
|
427
|
+
"description": "The text content to send"
|
|
340
428
|
},
|
|
429
|
+
],
|
|
430
|
+
"blockId": 100002,
|
|
431
|
+
"image": "https://otomato-sdk-images.s3.eu-west-1.amazonaws.com/slack.png"
|
|
432
|
+
}
|
|
433
|
+
},
|
|
434
|
+
"DISCORD": {
|
|
435
|
+
"description": "Discord is a communication service to talk with your favorite communities.",
|
|
436
|
+
"image": "https://otomato-sdk-images.s3.eu-west-1.amazonaws.com/discord.png",
|
|
437
|
+
"SEND_MESSAGE": {
|
|
438
|
+
"name": "Send message",
|
|
439
|
+
"type": 0,
|
|
440
|
+
"description": "Notifies you by sending a Discord message to the channel of your choice",
|
|
441
|
+
"parameters": [
|
|
341
442
|
{
|
|
342
|
-
key: "
|
|
343
|
-
type: "
|
|
344
|
-
description: "
|
|
443
|
+
"key": "webhook",
|
|
444
|
+
"type": "url",
|
|
445
|
+
"description": "The webhook URL for the Discord channel"
|
|
345
446
|
},
|
|
346
447
|
{
|
|
347
|
-
key: "
|
|
348
|
-
type: "
|
|
349
|
-
description: "The
|
|
350
|
-
}
|
|
351
|
-
]
|
|
352
|
-
|
|
448
|
+
"key": "message",
|
|
449
|
+
"type": "paragraph",
|
|
450
|
+
"description": "The text content to send"
|
|
451
|
+
},
|
|
452
|
+
],
|
|
453
|
+
"blockId": 100003,
|
|
454
|
+
"image": "https://otomato-sdk-images.s3.eu-west-1.amazonaws.com/discord.png"
|
|
455
|
+
}
|
|
353
456
|
},
|
|
457
|
+
"TELEGRAM": {
|
|
458
|
+
"description": "Telegram is a cloud-based mobile and desktop messaging app with a focus on security and speed.",
|
|
459
|
+
"image": "https://otomato-sdk-images.s3.eu-west-1.amazonaws.com/telegram.jpeg",
|
|
460
|
+
"SEND_MESSAGE": {
|
|
461
|
+
"name": "Send message",
|
|
462
|
+
"type": 0,
|
|
463
|
+
"description": "Notifies you by sending a Telegram message to the chat of your choice",
|
|
464
|
+
"parameters": [
|
|
465
|
+
{
|
|
466
|
+
"key": "webhook",
|
|
467
|
+
"type": "url",
|
|
468
|
+
"description": "The webhook URL for the Telegram bot"
|
|
469
|
+
},
|
|
470
|
+
{
|
|
471
|
+
"key": "message",
|
|
472
|
+
"type": "paragraph",
|
|
473
|
+
"description": "The text content to send"
|
|
474
|
+
},
|
|
475
|
+
],
|
|
476
|
+
"blockId": 100001,
|
|
477
|
+
"image": "https://otomato-sdk-images.s3.eu-west-1.amazonaws.com/telegram.jpeg"
|
|
478
|
+
}
|
|
479
|
+
}
|
|
354
480
|
},
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
481
|
+
"TOKENS": {
|
|
482
|
+
"ERC20": {
|
|
483
|
+
"description": "The most used standard for tokens on ethereum compatible blockchains",
|
|
484
|
+
"chains": [
|
|
485
|
+
0
|
|
486
|
+
],
|
|
487
|
+
"image": "https://otomato-sdk-images.s3.eu-west-1.amazonaws.com/ethereum.webp",
|
|
488
|
+
"TRANSFER": {
|
|
489
|
+
"name": "Transfer token",
|
|
490
|
+
"description": "Transfers an ERC20 token",
|
|
491
|
+
"type": 1,
|
|
492
|
+
"method": "Transfer(address from, address to, uint256 value)",
|
|
493
|
+
"parameters": [
|
|
494
|
+
{
|
|
495
|
+
"key": "chainId",
|
|
496
|
+
"type": "chainId",
|
|
497
|
+
"description": "Chain ID of the network"
|
|
498
|
+
},
|
|
499
|
+
{
|
|
500
|
+
"key": "abiParams.value",
|
|
501
|
+
"type": "uint256",
|
|
502
|
+
"description": "Amount of crypto to transfer"
|
|
503
|
+
},
|
|
504
|
+
{
|
|
505
|
+
"key": "abiParams.to",
|
|
506
|
+
"type": "address",
|
|
507
|
+
"description": "Address to transfer crypto to"
|
|
508
|
+
},
|
|
509
|
+
{
|
|
510
|
+
"key": "contractAddress",
|
|
511
|
+
"type": "erc20",
|
|
512
|
+
"description": "The contract address of the ERC20"
|
|
513
|
+
},
|
|
514
|
+
],
|
|
515
|
+
"blockId": 100004,
|
|
516
|
+
"image": "https://otomato-sdk-images.s3.eu-west-1.amazonaws.com/ethereum.webp"
|
|
517
|
+
}
|
|
518
|
+
}
|
|
390
519
|
}
|
|
391
520
|
};
|