otomato-sdk 2.0.45 → 2.0.50
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/src/constants/Blocks.js +4595 -0
- package/dist/src/constants/WorkflowTemplates.js +322 -0
- package/dist/src/constants/chains.js +6 -0
- package/dist/src/constants/logicOperators.js +4 -0
- package/dist/src/constants/tokens.js +497 -0
- package/dist/src/constants/version.js +19 -0
- package/dist/src/index.js +26 -0
- package/dist/src/models/Action.js +75 -0
- package/dist/src/models/Authorization.js +48 -0
- package/dist/src/models/Edge.js +75 -0
- package/dist/src/models/Node.js +240 -0
- package/dist/src/models/Note.js +21 -0
- package/dist/src/models/Parameter.js +1 -0
- package/dist/src/models/SessionKeyPermission.js +1 -0
- package/dist/src/models/Trigger.js +134 -0
- package/dist/src/models/Workflow.js +448 -0
- package/dist/src/models/conditions/ConditionCheck.js +15 -0
- package/dist/src/models/conditions/ConditionGroup.js +18 -0
- package/dist/src/services/ApiService.js +132 -0
- package/dist/src/services/RpcServices.js +95 -0
- package/dist/src/utils/WorkflowNodePositioner.js +114 -0
- package/dist/src/utils/addressBalance.js +181 -0
- package/dist/src/utils/externalVariables.js +45 -0
- package/dist/src/utils/helpers.js +97 -0
- package/dist/src/utils/typeValidator.js +180 -0
- package/dist/types/src/constants/Blocks.d.ts +1 -1
- package/dist/types/src/constants/WorkflowTemplates.d.ts +2 -2
- package/dist/types/src/constants/version.d.ts +1 -1
- package/dist/types/src/index.d.ts +23 -23
- package/dist/types/src/models/Action.d.ts +2 -2
- package/dist/types/src/models/Edge.d.ts +1 -1
- package/dist/types/src/models/Node.d.ts +1 -1
- package/dist/types/src/models/Parameter.d.ts +0 -1
- package/dist/types/src/models/Trigger.d.ts +2 -2
- package/dist/types/src/models/Workflow.d.ts +4 -4
- package/dist/types/src/models/conditions/ConditionGroup.d.ts +1 -1
- package/dist/types/src/services/RpcServices.d.ts +1 -1
- package/dist/types/src/utils/WorkflowNodePositioner.d.ts +18 -15
- package/package.json +5 -17
- package/dist/bundle.js +0 -46185
- package/dist/src/constants/Blocks.d.ts +0 -2006
- package/dist/src/constants/WorkflowTemplates.d.ts +0 -43
- package/dist/src/constants/chains.d.ts +0 -6
- package/dist/src/constants/logicOperators.d.ts +0 -4
- package/dist/src/constants/tokens.d.ts +0 -26
- package/dist/src/constants/version.d.ts +0 -2
- package/dist/src/index.d.ts +0 -23
- package/dist/src/models/Action.d.ts +0 -26
- package/dist/src/models/Authorization.d.ts +0 -15
- package/dist/src/models/Edge.d.ts +0 -25
- package/dist/src/models/Node.d.ts +0 -82
- package/dist/src/models/Note.d.ts +0 -18
- package/dist/src/models/Parameter.d.ts +0 -9
- package/dist/src/models/SessionKeyPermission.d.ts +0 -6
- package/dist/src/models/Trigger.d.ts +0 -41
- package/dist/src/models/Workflow.d.ts +0 -116
- package/dist/src/models/conditions/ConditionCheck.d.ts +0 -11
- package/dist/src/models/conditions/ConditionGroup.d.ts +0 -15
- package/dist/src/services/ApiService.d.ts +0 -19
- package/dist/src/services/RpcServices.d.ts +0 -14
- package/dist/src/utils/WorkflowNodePositioner.d.ts +0 -34
- package/dist/src/utils/addressBalance.d.ts +0 -21
- package/dist/src/utils/externalVariables.d.ts +0 -14
- package/dist/src/utils/helpers.d.ts +0 -25
- package/dist/src/utils/typeValidator.d.ts +0 -18
- package/dist/types/examples/test.d.ts +0 -7
|
@@ -0,0 +1,4595 @@
|
|
|
1
|
+
export const TRIGGERS = {
|
|
2
|
+
"CORE": {
|
|
3
|
+
"EVERY_PERIOD": {
|
|
4
|
+
"description": "Triggers the workflow every period (e.g every hour)",
|
|
5
|
+
"image": "https://otomato-sdk-images.s3.eu-west-1.amazonaws.com/every_hour_trigger.png",
|
|
6
|
+
"EVERY_PERIOD": {
|
|
7
|
+
"name": "Every period",
|
|
8
|
+
"type": 4,
|
|
9
|
+
"description": "Triggers the workflow every period (e.g every hour)",
|
|
10
|
+
"parameters": [
|
|
11
|
+
{
|
|
12
|
+
"key": "period",
|
|
13
|
+
"type": "integer",
|
|
14
|
+
"description": "The period to wait between each run (in ms)",
|
|
15
|
+
"mandatory": true,
|
|
16
|
+
"minValue": 600000,
|
|
17
|
+
"category": 0
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"key": "timeout",
|
|
21
|
+
"type": "integer",
|
|
22
|
+
"description": "The maximum amount of time to wait before stopping the trigger (in ms)",
|
|
23
|
+
"mandatory": true,
|
|
24
|
+
"category": 1,
|
|
25
|
+
"hideInUI": true,
|
|
26
|
+
"value": 63072000000
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"key": "limit",
|
|
30
|
+
"type": "integer",
|
|
31
|
+
"description": "The maximum number of times this trigger should execute before stopping.",
|
|
32
|
+
"mandatory": true,
|
|
33
|
+
"category": 0
|
|
34
|
+
},
|
|
35
|
+
],
|
|
36
|
+
"examples": [
|
|
37
|
+
{
|
|
38
|
+
"name": "Run it every day for 2 weeks",
|
|
39
|
+
"description": "Set the period to 1 day and the limit to 14 to execute daily for 2 weeks.",
|
|
40
|
+
"parameters": [
|
|
41
|
+
{
|
|
42
|
+
"key": "period",
|
|
43
|
+
"value": 86400000
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
"key": "limit",
|
|
47
|
+
"value": 14
|
|
48
|
+
}
|
|
49
|
+
]
|
|
50
|
+
}
|
|
51
|
+
],
|
|
52
|
+
"blockId": 18,
|
|
53
|
+
"image": "https://otomato-sdk-images.s3.eu-west-1.amazonaws.com/every_hour_trigger.png"
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
"TOKENS": {
|
|
58
|
+
"TRANSFER": {
|
|
59
|
+
"description": "Monitors token transfers",
|
|
60
|
+
"chains": [
|
|
61
|
+
0
|
|
62
|
+
],
|
|
63
|
+
"image": "https://otomato-sdk-images.s3.eu-west-1.amazonaws.com/Transfer.svg",
|
|
64
|
+
"TRANSFER": {
|
|
65
|
+
"name": "Transfer token",
|
|
66
|
+
"description": "This block gets triggered when someone transfers the ERC20 configured in the params",
|
|
67
|
+
"type": 0,
|
|
68
|
+
"output": {
|
|
69
|
+
"value": "float",
|
|
70
|
+
"from": "address",
|
|
71
|
+
"to": "address",
|
|
72
|
+
"transactionHash": "string"
|
|
73
|
+
},
|
|
74
|
+
"parameters": [
|
|
75
|
+
{
|
|
76
|
+
"key": "chainId",
|
|
77
|
+
"type": "chainId",
|
|
78
|
+
"description": "Chain ID of the EVM blockchain",
|
|
79
|
+
"mandatory": true,
|
|
80
|
+
"category": 0
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
"key": "abiParams.from",
|
|
84
|
+
"type": "address",
|
|
85
|
+
"description": "Address that transfers the funds",
|
|
86
|
+
"category": 1
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
"key": "abiParams.value",
|
|
90
|
+
"type": "uint256",
|
|
91
|
+
"description": "Amount of crypto to transfer",
|
|
92
|
+
"category": 1,
|
|
93
|
+
"erc20FormattedAmount": {
|
|
94
|
+
"contractAddress": "{{parameters.contractAddress}}",
|
|
95
|
+
"chain": "{{parameters.chainId}}"
|
|
96
|
+
}
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
"key": "abiParams.to",
|
|
100
|
+
"type": "address",
|
|
101
|
+
"description": "Address that receives the funds",
|
|
102
|
+
"category": 1
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
"key": "contractAddress",
|
|
106
|
+
"type": "erc20",
|
|
107
|
+
"description": "The contract address of the ERC20",
|
|
108
|
+
"mandatory": true,
|
|
109
|
+
"category": 0
|
|
110
|
+
},
|
|
111
|
+
],
|
|
112
|
+
"frontendHelpers": {
|
|
113
|
+
"output": {
|
|
114
|
+
"value": {
|
|
115
|
+
"formatAmount": false,
|
|
116
|
+
"erc20Token": {
|
|
117
|
+
"contractAddress": "{{parameters.contractAddress}}",
|
|
118
|
+
"chainId": "{{parameters.chainId}}"
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
},
|
|
123
|
+
"examples": [
|
|
124
|
+
{
|
|
125
|
+
"name": "Mode transfer",
|
|
126
|
+
"description": "Gets triggered when someone transfers MODE",
|
|
127
|
+
"parameters": [
|
|
128
|
+
{
|
|
129
|
+
"key": "chainId",
|
|
130
|
+
"value": 34443
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
"key": "contractAddress",
|
|
134
|
+
"value": "0xDfc7C877a950e49D2610114102175A06C2e3167a"
|
|
135
|
+
}
|
|
136
|
+
]
|
|
137
|
+
}
|
|
138
|
+
],
|
|
139
|
+
"blockId": 1,
|
|
140
|
+
"image": "https://otomato-sdk-images.s3.eu-west-1.amazonaws.com/Transfer.svg"
|
|
141
|
+
}
|
|
142
|
+
},
|
|
143
|
+
"BALANCE": {
|
|
144
|
+
"description": "Monitors token balance of selected addresses",
|
|
145
|
+
"chains": [
|
|
146
|
+
0
|
|
147
|
+
],
|
|
148
|
+
"image": "https://otomato-sdk-images.s3.eu-west-1.amazonaws.com/BalanceCheck.svg",
|
|
149
|
+
"BALANCE": {
|
|
150
|
+
"name": "ERC20 balance check",
|
|
151
|
+
"description": "Fetches the balance of an ERC20 and checks it against the specified condition.",
|
|
152
|
+
"prototype": "erc20Balance",
|
|
153
|
+
"type": 1,
|
|
154
|
+
"method": "function balanceOf(address account) view returns (uint256)",
|
|
155
|
+
"output": {
|
|
156
|
+
"balance": "float"
|
|
157
|
+
},
|
|
158
|
+
"frontendHelpers": {
|
|
159
|
+
"output": {
|
|
160
|
+
"balance": {
|
|
161
|
+
"formatAmount": false,
|
|
162
|
+
"erc20Token": {
|
|
163
|
+
"contractAddress": "{{parameters.contractAddress}}",
|
|
164
|
+
"chainId": "{{parameters.chainId}}"
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
},
|
|
169
|
+
"parameters": [
|
|
170
|
+
{
|
|
171
|
+
"key": "chainId",
|
|
172
|
+
"type": "chainId",
|
|
173
|
+
"description": "Chain ID of the EVM blockchain",
|
|
174
|
+
"mandatory": true,
|
|
175
|
+
"category": 0
|
|
176
|
+
},
|
|
177
|
+
{
|
|
178
|
+
"key": "abiParams.account",
|
|
179
|
+
"type": "address",
|
|
180
|
+
"description": "The wallet address to check for the token balance",
|
|
181
|
+
"mandatory": true,
|
|
182
|
+
"category": 0
|
|
183
|
+
},
|
|
184
|
+
{
|
|
185
|
+
"key": "contractAddress",
|
|
186
|
+
"type": "erc20",
|
|
187
|
+
"description": "The contract address of the ERC20",
|
|
188
|
+
"mandatory": true,
|
|
189
|
+
"category": 0
|
|
190
|
+
},
|
|
191
|
+
{
|
|
192
|
+
"key": "condition",
|
|
193
|
+
"type": "logic_operator",
|
|
194
|
+
"description": "Logic operator used for the comparison: <, >, <=, >=, ==, ...",
|
|
195
|
+
"mandatory": true,
|
|
196
|
+
"category": 0
|
|
197
|
+
},
|
|
198
|
+
{
|
|
199
|
+
"key": "comparisonValue",
|
|
200
|
+
"type": "float",
|
|
201
|
+
"description": "The value to compare to",
|
|
202
|
+
"mandatory": true,
|
|
203
|
+
"category": 0
|
|
204
|
+
},
|
|
205
|
+
],
|
|
206
|
+
"examples": [
|
|
207
|
+
{
|
|
208
|
+
"name": "Mode balance check",
|
|
209
|
+
"description": "Gets triggered when the MODE balance of vitalik.eth falls below 10,000",
|
|
210
|
+
"parameters": [
|
|
211
|
+
{
|
|
212
|
+
"key": "chainId",
|
|
213
|
+
"value": 34443
|
|
214
|
+
},
|
|
215
|
+
{
|
|
216
|
+
"key": "comparisonValue",
|
|
217
|
+
"value": 10000
|
|
218
|
+
},
|
|
219
|
+
{
|
|
220
|
+
"key": "condition",
|
|
221
|
+
"value": "lt"
|
|
222
|
+
},
|
|
223
|
+
{
|
|
224
|
+
"key": "contractAddress",
|
|
225
|
+
"value": "0xDfc7C877a950e49D2610114102175A06C2e3167a"
|
|
226
|
+
},
|
|
227
|
+
{
|
|
228
|
+
"key": "abiParams.account",
|
|
229
|
+
"value": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045"
|
|
230
|
+
}
|
|
231
|
+
]
|
|
232
|
+
},
|
|
233
|
+
{
|
|
234
|
+
"name": "Binance balance check",
|
|
235
|
+
"description": "Gets triggered when the Binance hot wallet balance falls below 7B USDT",
|
|
236
|
+
"parameters": [
|
|
237
|
+
{
|
|
238
|
+
"key": "chainId",
|
|
239
|
+
"value": 1
|
|
240
|
+
},
|
|
241
|
+
{
|
|
242
|
+
"key": "comparisonValue",
|
|
243
|
+
"value": 7000000000
|
|
244
|
+
},
|
|
245
|
+
{
|
|
246
|
+
"key": "condition",
|
|
247
|
+
"value": "lt"
|
|
248
|
+
},
|
|
249
|
+
{
|
|
250
|
+
"key": "contractAddress",
|
|
251
|
+
"value": "0xdac17f958d2ee523a2206206994597c13d831ec7"
|
|
252
|
+
},
|
|
253
|
+
{
|
|
254
|
+
"key": "abiParams.account",
|
|
255
|
+
"value": "0xF977814e90dA44bFA03b6295A0616a897441aceC"
|
|
256
|
+
}
|
|
257
|
+
]
|
|
258
|
+
}
|
|
259
|
+
],
|
|
260
|
+
"blockId": 5,
|
|
261
|
+
"image": "https://otomato-sdk-images.s3.eu-west-1.amazonaws.com/BalanceCheck.svg"
|
|
262
|
+
}
|
|
263
|
+
},
|
|
264
|
+
"APPROVAL": {
|
|
265
|
+
"description": "Monitors token approvals",
|
|
266
|
+
"chains": [
|
|
267
|
+
0
|
|
268
|
+
],
|
|
269
|
+
"image": "https://otomato-sdk-images.s3.eu-west-1.amazonaws.com/approval.png",
|
|
270
|
+
"APPROVAL": {
|
|
271
|
+
"name": "Token Approval",
|
|
272
|
+
"description": "Triggers when someone approves this token.",
|
|
273
|
+
"type": 0,
|
|
274
|
+
"output": {
|
|
275
|
+
"owner": "address",
|
|
276
|
+
"spender": "address",
|
|
277
|
+
"value": "float",
|
|
278
|
+
"transactionHash": "string"
|
|
279
|
+
},
|
|
280
|
+
"parameters": [
|
|
281
|
+
{
|
|
282
|
+
"key": "chainId",
|
|
283
|
+
"type": "chainId",
|
|
284
|
+
"description": "The network where the token is deployed (e.g., Ethereum or Base).",
|
|
285
|
+
"mandatory": true,
|
|
286
|
+
"category": 0
|
|
287
|
+
},
|
|
288
|
+
{
|
|
289
|
+
"key": "contractAddress",
|
|
290
|
+
"type": "erc20",
|
|
291
|
+
"description": "The token you want to monitor for approvals.",
|
|
292
|
+
"mandatory": true,
|
|
293
|
+
"category": 0
|
|
294
|
+
},
|
|
295
|
+
{
|
|
296
|
+
"key": "abiParams.owner",
|
|
297
|
+
"type": "address",
|
|
298
|
+
"description": "Filter by the wallet that approved the token",
|
|
299
|
+
"category": 1
|
|
300
|
+
},
|
|
301
|
+
{
|
|
302
|
+
"key": "abiParams.spender",
|
|
303
|
+
"type": "address",
|
|
304
|
+
"description": "Filter by the wallet that was approved to spend the token",
|
|
305
|
+
"category": 1
|
|
306
|
+
},
|
|
307
|
+
{
|
|
308
|
+
"key": "abiParams.value",
|
|
309
|
+
"type": "uint256",
|
|
310
|
+
"description": "Filter by the amount of tokens approved",
|
|
311
|
+
"category": 1
|
|
312
|
+
},
|
|
313
|
+
],
|
|
314
|
+
"frontendHelpers": {
|
|
315
|
+
"output": {
|
|
316
|
+
"value": {
|
|
317
|
+
"formatAmount": false,
|
|
318
|
+
"erc20Token": {
|
|
319
|
+
"contractAddress": "{{parameters.contractAddress}}",
|
|
320
|
+
"chainId": "{{parameters.chainId}}"
|
|
321
|
+
}
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
},
|
|
325
|
+
"examples": [
|
|
326
|
+
{
|
|
327
|
+
"name": "Track all MODE approvals",
|
|
328
|
+
"description": "Get notified whenever someone approves the use of this token.",
|
|
329
|
+
"parameters": [
|
|
330
|
+
{
|
|
331
|
+
"key": "chainId",
|
|
332
|
+
"value": 34443
|
|
333
|
+
},
|
|
334
|
+
{
|
|
335
|
+
"key": "contractAddress",
|
|
336
|
+
"value": "0xDfc7C877a950e49D2610114102175A06C2e3167a"
|
|
337
|
+
}
|
|
338
|
+
]
|
|
339
|
+
},
|
|
340
|
+
{
|
|
341
|
+
"name": "Track USDC approvals for a specific app",
|
|
342
|
+
"description": "Get notified when someone approves Uniswap to use their tokens.",
|
|
343
|
+
"parameters": [
|
|
344
|
+
{
|
|
345
|
+
"key": "chainId",
|
|
346
|
+
"value": 8453
|
|
347
|
+
},
|
|
348
|
+
{
|
|
349
|
+
"key": "contractAddress",
|
|
350
|
+
"value": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913"
|
|
351
|
+
},
|
|
352
|
+
{
|
|
353
|
+
"key": "abiParams.spender",
|
|
354
|
+
"value": "0xeC8B0F7Ffe3ae75d7FfAb09429e3675bb63503e4"
|
|
355
|
+
}
|
|
356
|
+
]
|
|
357
|
+
}
|
|
358
|
+
],
|
|
359
|
+
"blockId": 27,
|
|
360
|
+
"image": "https://otomato-sdk-images.s3.eu-west-1.amazonaws.com/approval.png"
|
|
361
|
+
}
|
|
362
|
+
},
|
|
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
|
+
"prototype": "priceMovementAgainstCurrency",
|
|
372
|
+
"description": "This trigger activates when the on-chain price of an asset moves against a specified currency based on the given condition.",
|
|
373
|
+
"type": 2,
|
|
374
|
+
"output": {
|
|
375
|
+
"price": "float"
|
|
376
|
+
},
|
|
377
|
+
"parameters": [
|
|
378
|
+
{
|
|
379
|
+
"key": "chainId",
|
|
380
|
+
"type": "chainId",
|
|
381
|
+
"description": "Chain ID of the blockchain to monitor",
|
|
382
|
+
"mandatory": true,
|
|
383
|
+
"category": 0
|
|
384
|
+
},
|
|
385
|
+
{
|
|
386
|
+
"key": "comparisonValue",
|
|
387
|
+
"type": "float",
|
|
388
|
+
"description": "The price to compare against",
|
|
389
|
+
"mandatory": true,
|
|
390
|
+
"category": 0
|
|
391
|
+
},
|
|
392
|
+
{
|
|
393
|
+
"key": "currency",
|
|
394
|
+
"type": "string",
|
|
395
|
+
"description": "The currency in which the comparison price is denominated",
|
|
396
|
+
"enum": [
|
|
397
|
+
"USD"
|
|
398
|
+
],
|
|
399
|
+
"value": "USD",
|
|
400
|
+
"mandatory": true,
|
|
401
|
+
"category": 1
|
|
402
|
+
},
|
|
403
|
+
{
|
|
404
|
+
"key": "condition",
|
|
405
|
+
"type": "logic_operator",
|
|
406
|
+
"description": "The logic operator used for the comparison (e.g., >, <, >=, <=, ==, !=)",
|
|
407
|
+
"mandatory": true,
|
|
408
|
+
"category": 0
|
|
409
|
+
},
|
|
410
|
+
{
|
|
411
|
+
"key": "contractAddress",
|
|
412
|
+
"type": "erc20",
|
|
413
|
+
"description": "The asset that you want to track",
|
|
414
|
+
"mandatory": true,
|
|
415
|
+
"category": 0
|
|
416
|
+
},
|
|
417
|
+
],
|
|
418
|
+
"examples": [
|
|
419
|
+
{
|
|
420
|
+
"name": "ETH > 2850$",
|
|
421
|
+
"description": "Gets triggered when ETH rises above 2850$ on Mode",
|
|
422
|
+
"parameters": [
|
|
423
|
+
{
|
|
424
|
+
"key": "chainId",
|
|
425
|
+
"value": 34443
|
|
426
|
+
},
|
|
427
|
+
{
|
|
428
|
+
"key": "comparisonValue",
|
|
429
|
+
"value": 2850
|
|
430
|
+
},
|
|
431
|
+
{
|
|
432
|
+
"key": "currency",
|
|
433
|
+
"value": "USD"
|
|
434
|
+
},
|
|
435
|
+
{
|
|
436
|
+
"key": "condition",
|
|
437
|
+
"value": "gt"
|
|
438
|
+
},
|
|
439
|
+
{
|
|
440
|
+
"key": "contractAddress",
|
|
441
|
+
"value": "0x0000000000000000000000000000000000000000"
|
|
442
|
+
}
|
|
443
|
+
]
|
|
444
|
+
},
|
|
445
|
+
{
|
|
446
|
+
"name": "ETH < 2100$",
|
|
447
|
+
"description": "Gets triggered when ETH falls below 2100$ on Mode",
|
|
448
|
+
"parameters": [
|
|
449
|
+
{
|
|
450
|
+
"key": "chainId",
|
|
451
|
+
"value": 34443
|
|
452
|
+
},
|
|
453
|
+
{
|
|
454
|
+
"key": "comparisonValue",
|
|
455
|
+
"value": 2100
|
|
456
|
+
},
|
|
457
|
+
{
|
|
458
|
+
"key": "currency",
|
|
459
|
+
"value": "USD"
|
|
460
|
+
},
|
|
461
|
+
{
|
|
462
|
+
"key": "condition",
|
|
463
|
+
"value": "lt"
|
|
464
|
+
},
|
|
465
|
+
{
|
|
466
|
+
"key": "contractAddress",
|
|
467
|
+
"value": "0x0000000000000000000000000000000000000000"
|
|
468
|
+
}
|
|
469
|
+
]
|
|
470
|
+
},
|
|
471
|
+
{
|
|
472
|
+
"name": "MODE < 0.01$",
|
|
473
|
+
"description": "Gets triggered when MODE falls below 0.01$ on Mode Network",
|
|
474
|
+
"parameters": [
|
|
475
|
+
{
|
|
476
|
+
"key": "chainId",
|
|
477
|
+
"value": 34443
|
|
478
|
+
},
|
|
479
|
+
{
|
|
480
|
+
"key": "comparisonValue",
|
|
481
|
+
"value": 0.01
|
|
482
|
+
},
|
|
483
|
+
{
|
|
484
|
+
"key": "currency",
|
|
485
|
+
"value": "USD"
|
|
486
|
+
},
|
|
487
|
+
{
|
|
488
|
+
"key": "condition",
|
|
489
|
+
"value": "lt"
|
|
490
|
+
},
|
|
491
|
+
{
|
|
492
|
+
"key": "contractAddress",
|
|
493
|
+
"value": "0xDfc7C877a950e49D2610114102175A06C2e3167a"
|
|
494
|
+
}
|
|
495
|
+
]
|
|
496
|
+
}
|
|
497
|
+
],
|
|
498
|
+
"blockId": 10,
|
|
499
|
+
"image": "https://otomato-sdk-images.s3.eu-west-1.amazonaws.com/trend-up.png"
|
|
500
|
+
}
|
|
501
|
+
}
|
|
502
|
+
},
|
|
503
|
+
"YIELD": {
|
|
504
|
+
"ETHENA": {
|
|
505
|
+
"description": "Ethena is a synthetic dollar protocol built on Ethereum that provides a crypto-native solution for money not reliant on traditional banking system infrastructure",
|
|
506
|
+
"image": "https://otomato-sdk-images.s3.eu-west-1.amazonaws.com/ethena.svg",
|
|
507
|
+
"SUSDE_YIELD": {
|
|
508
|
+
"name": "sUSDE yield",
|
|
509
|
+
"description": "Fetches Ethena's sUSDE yield",
|
|
510
|
+
"type": 3,
|
|
511
|
+
"prototype": "sUSDEYield",
|
|
512
|
+
"output": {
|
|
513
|
+
"yield": "float"
|
|
514
|
+
},
|
|
515
|
+
"parameters": [
|
|
516
|
+
{
|
|
517
|
+
"key": "condition",
|
|
518
|
+
"type": "logic_operator",
|
|
519
|
+
"description": "Logic operator used for the comparison: <, >, <=, >=, ==, ...",
|
|
520
|
+
"mandatory": true,
|
|
521
|
+
"category": 0
|
|
522
|
+
},
|
|
523
|
+
{
|
|
524
|
+
"key": "comparisonValue",
|
|
525
|
+
"type": "float",
|
|
526
|
+
"description": "The value to compare to",
|
|
527
|
+
"mandatory": true,
|
|
528
|
+
"category": 0
|
|
529
|
+
},
|
|
530
|
+
],
|
|
531
|
+
"examples": [
|
|
532
|
+
{
|
|
533
|
+
"name": "Yield decreasing below 8%",
|
|
534
|
+
"description": "Gets triggered when the yield is below 8%",
|
|
535
|
+
"parameters": [
|
|
536
|
+
{
|
|
537
|
+
"key": "condition",
|
|
538
|
+
"value": "lte"
|
|
539
|
+
},
|
|
540
|
+
{
|
|
541
|
+
"key": "comparisonValue",
|
|
542
|
+
"value": 8
|
|
543
|
+
}
|
|
544
|
+
]
|
|
545
|
+
},
|
|
546
|
+
{
|
|
547
|
+
"name": "Yield increasing above 20%",
|
|
548
|
+
"description": "Gets triggered when the yield is above 20%",
|
|
549
|
+
"parameters": [
|
|
550
|
+
{
|
|
551
|
+
"key": "condition",
|
|
552
|
+
"value": "gte"
|
|
553
|
+
},
|
|
554
|
+
{
|
|
555
|
+
"key": "comparisonValue",
|
|
556
|
+
"value": 20
|
|
557
|
+
}
|
|
558
|
+
]
|
|
559
|
+
}
|
|
560
|
+
],
|
|
561
|
+
"blockId": 12,
|
|
562
|
+
"image": "https://otomato-sdk-images.s3.eu-west-1.amazonaws.com/ethena.svg"
|
|
563
|
+
},
|
|
564
|
+
"TVL": {
|
|
565
|
+
"name": "USDE supply",
|
|
566
|
+
"description": "Fetches Ethena's USDE supply",
|
|
567
|
+
"type": 1,
|
|
568
|
+
"prototype": "usdeSupply",
|
|
569
|
+
"method": "function totalSupply() public view virtual override returns (uint256)",
|
|
570
|
+
"output": {
|
|
571
|
+
"supply": "integer"
|
|
572
|
+
},
|
|
573
|
+
"contractAddress": "0x4c9edd5852cd905f086c759e8383e09bff1e68b3",
|
|
574
|
+
"chainId": 1,
|
|
575
|
+
"parameters": [
|
|
576
|
+
{
|
|
577
|
+
"key": "condition",
|
|
578
|
+
"type": "logic_operator",
|
|
579
|
+
"description": "Logic operator used for the comparison: <, >, <=, >=, ==, ...",
|
|
580
|
+
"mandatory": true,
|
|
581
|
+
"category": 0
|
|
582
|
+
},
|
|
583
|
+
{
|
|
584
|
+
"key": "comparisonValue",
|
|
585
|
+
"type": "integer",
|
|
586
|
+
"description": "The value to compare to",
|
|
587
|
+
"mandatory": true,
|
|
588
|
+
"category": 0
|
|
589
|
+
},
|
|
590
|
+
],
|
|
591
|
+
"examples": [
|
|
592
|
+
{
|
|
593
|
+
"name": "Supply above 3B$",
|
|
594
|
+
"description": "Gets triggered when the USDE supply is above 3B$",
|
|
595
|
+
"parameters": [
|
|
596
|
+
{
|
|
597
|
+
"key": "comparisonValue",
|
|
598
|
+
"value": 3000000000
|
|
599
|
+
},
|
|
600
|
+
{
|
|
601
|
+
"key": "condition",
|
|
602
|
+
"value": "gt"
|
|
603
|
+
}
|
|
604
|
+
]
|
|
605
|
+
}
|
|
606
|
+
],
|
|
607
|
+
"blockId": 13,
|
|
608
|
+
"image": "https://otomato-sdk-images.s3.eu-west-1.amazonaws.com/ethena.svg"
|
|
609
|
+
}
|
|
610
|
+
}
|
|
611
|
+
},
|
|
612
|
+
"LENDING": {
|
|
613
|
+
"IONIC": {
|
|
614
|
+
"description": "#1 money market for Yield Bearing Assets on the OP Superchain",
|
|
615
|
+
"chains": [
|
|
616
|
+
34443,
|
|
617
|
+
8453
|
|
618
|
+
],
|
|
619
|
+
"image": "https://otomato-sdk-images.s3.eu-west-1.amazonaws.com/ionic.jpg",
|
|
620
|
+
"LENDING_RATE": {
|
|
621
|
+
"name": "Lending rate",
|
|
622
|
+
"description": "Get the lending rate of any asset on Ionic",
|
|
623
|
+
"prototype": "ionicLendingRate",
|
|
624
|
+
"type": 1,
|
|
625
|
+
"method": "function supplyRatePerBlock() external view returns (uint256)",
|
|
626
|
+
"parameters": [
|
|
627
|
+
{
|
|
628
|
+
"key": "chainId",
|
|
629
|
+
"type": "chainId",
|
|
630
|
+
"description": "Chain ID of the network",
|
|
631
|
+
"mandatory": true,
|
|
632
|
+
"category": 0
|
|
633
|
+
},
|
|
634
|
+
{
|
|
635
|
+
"key": "token",
|
|
636
|
+
"type": "erc20",
|
|
637
|
+
"description": "The token you want to fetch the yield",
|
|
638
|
+
"mandatory": true,
|
|
639
|
+
"enum": "\n (env) => {\n if (!env.parameters.chainId)\n throw new Error('You need to provide the chainId first');\n \n const availableTokens = {\n \"8453\": [\n \"0x833589fcd6edb6e08f4c7c32d4f71b54bda02913\",\n \"0xc1cba3fcea344f92d9239c08c0568f6f2f0ee452\",\n \"0x4200000000000000000000000000000000000006\",\n \"0x5d3a1Ff2b6BAb83b63cd9AD0787074081a52ef34\",\n \"0xcbb7c0000ab88b473b1f5afd9ef808440eed33bf\",\n \"0x940181a94a35a4569e4529a3cdfb74e38fd98631\",\n \"0x2Ae3F1Ec7F1F5012CFEab0185bfc7aa3cf0DEc22\",\n \"0x04C0599Ae5A44757c0af6F9eC3b93da8976c150A\",\n \"0xCfA3Ef56d303AE4fAabA0592388F19d7C3399FB4\",\n \"0xCb327b99fF831bF8223cCEd12B1338FF3aA322Ff\",\n \"0xCc7FF230365bD730eE4B352cC2492CEdAC49383e\",\n \"0xaB36452DbAC151bE02b16Ca17d8919826072f64a\",\n \"0xDBFeFD2e8460a6Ee4955A68582F85708BAEA60A3\",\n \"0x59D9356E565Ab3A36dD77763Fc0d87fEaf85508C\",\n \"0x7002458B1DF59EccB57387bC79fFc7C29E22e6f7\",\n \"0x04D5ddf5f3a8939889F11E97f8c4BB48317F1938\",\n \"0xd95ca61CE9aAF2143E81Ef5462C0c2325172E028\",\n \"0xe31eE12bDFDD0573D634124611e85338e2cBF0cF\",\n \"0x9B8Df6E244526ab5F6e6400d331DB28C8fdDdb55\",\n \"0xb0505e5a99abd03d94a1169e638B78EDfEd26ea4\"\n ],\n \"34443\": [\n \"0xf0F161fDA2712DB8b566946122a5af183995e2eD\",\n \"0xd988097fb8612cc24eeC14542bC03424c656005f\",\n \"0x2416092f143378750bb29b79eD961ab195CcEea5\",\n \"0x4200000000000000000000000000000000000006\",\n \"0xcDd475325D6F564d27247D1DddBb0DAc6fA0a5CF\",\n \"0x80137510979822322193FC997d400D5A6C747bf7\",\n \"0xe7903B1F75C534Dd8159b313d92cDCfbC62cB3Cd\",\n \"0x04C0599Ae5A44757c0af6F9eC3b93da8976c150A\",\n \"0x59889b7021243dB5B1e065385F918316cD90D46c\"\n ]\n};\n const chainId = env.parameters.chainId;\n return availableTokens[chainId] || [];\n }",
|
|
640
|
+
"category": 0
|
|
641
|
+
},
|
|
642
|
+
{
|
|
643
|
+
"key": "condition",
|
|
644
|
+
"type": "logic_operator",
|
|
645
|
+
"description": "Logic operator used for the comparison: <, >, <=, >=, ==, ...",
|
|
646
|
+
"mandatory": true,
|
|
647
|
+
"category": 0
|
|
648
|
+
},
|
|
649
|
+
{
|
|
650
|
+
"key": "comparisonValue",
|
|
651
|
+
"type": "float",
|
|
652
|
+
"description": "The value to compare to",
|
|
653
|
+
"mandatory": true,
|
|
654
|
+
"category": 0
|
|
655
|
+
},
|
|
656
|
+
],
|
|
657
|
+
"examples": [
|
|
658
|
+
{
|
|
659
|
+
"name": "USDT Yield is above 5%",
|
|
660
|
+
"description": "Gets triggered when USDT yield rises above 5% on Ionic",
|
|
661
|
+
"parameters": [
|
|
662
|
+
{
|
|
663
|
+
"key": "chainId",
|
|
664
|
+
"value": 34443
|
|
665
|
+
},
|
|
666
|
+
{
|
|
667
|
+
"key": "token",
|
|
668
|
+
"value": "0xf0F161fDA2712DB8b566946122a5af183995e2eD"
|
|
669
|
+
},
|
|
670
|
+
{
|
|
671
|
+
"key": "condition",
|
|
672
|
+
"value": "gte"
|
|
673
|
+
},
|
|
674
|
+
{
|
|
675
|
+
"key": "comparisonValue",
|
|
676
|
+
"value": 5
|
|
677
|
+
}
|
|
678
|
+
]
|
|
679
|
+
}
|
|
680
|
+
],
|
|
681
|
+
"output": {
|
|
682
|
+
"lendingRate": "float"
|
|
683
|
+
},
|
|
684
|
+
"blockId": 15,
|
|
685
|
+
"image": "https://otomato-sdk-images.s3.eu-west-1.amazonaws.com/ionic.jpg"
|
|
686
|
+
},
|
|
687
|
+
"BORROWING_RATES": {
|
|
688
|
+
"name": "Borrowing rate",
|
|
689
|
+
"description": "Get the borrowing rate of any asset on Ionic",
|
|
690
|
+
"type": 1,
|
|
691
|
+
"prototype": "ionicBorrowingRate",
|
|
692
|
+
"method": "function borrowRatePerBlock() external view returns (uint256)",
|
|
693
|
+
"parameters": [
|
|
694
|
+
{
|
|
695
|
+
"key": "chainId",
|
|
696
|
+
"type": "chainId",
|
|
697
|
+
"description": "Chain ID of the network",
|
|
698
|
+
"mandatory": true,
|
|
699
|
+
"category": 0
|
|
700
|
+
},
|
|
701
|
+
{
|
|
702
|
+
"key": "token",
|
|
703
|
+
"type": "erc20",
|
|
704
|
+
"description": "The token you want to fetch the borrow rate for",
|
|
705
|
+
"mandatory": true,
|
|
706
|
+
"enum": "\n (env) => {\n if (!env.parameters.chainId)\n throw new Error('You need to provide the chainId first');\n \n const availableTokens = {\n \"8453\": [\n \"0x833589fcd6edb6e08f4c7c32d4f71b54bda02913\",\n \"0xc1cba3fcea344f92d9239c08c0568f6f2f0ee452\",\n \"0x4200000000000000000000000000000000000006\",\n \"0x5d3a1Ff2b6BAb83b63cd9AD0787074081a52ef34\",\n \"0xcbb7c0000ab88b473b1f5afd9ef808440eed33bf\",\n \"0x940181a94a35a4569e4529a3cdfb74e38fd98631\",\n \"0x2Ae3F1Ec7F1F5012CFEab0185bfc7aa3cf0DEc22\",\n \"0x04C0599Ae5A44757c0af6F9eC3b93da8976c150A\",\n \"0xCfA3Ef56d303AE4fAabA0592388F19d7C3399FB4\",\n \"0xCb327b99fF831bF8223cCEd12B1338FF3aA322Ff\",\n \"0xCc7FF230365bD730eE4B352cC2492CEdAC49383e\",\n \"0xaB36452DbAC151bE02b16Ca17d8919826072f64a\",\n \"0xDBFeFD2e8460a6Ee4955A68582F85708BAEA60A3\",\n \"0x59D9356E565Ab3A36dD77763Fc0d87fEaf85508C\",\n \"0x7002458B1DF59EccB57387bC79fFc7C29E22e6f7\",\n \"0x04D5ddf5f3a8939889F11E97f8c4BB48317F1938\",\n \"0xd95ca61CE9aAF2143E81Ef5462C0c2325172E028\",\n \"0xe31eE12bDFDD0573D634124611e85338e2cBF0cF\",\n \"0x9B8Df6E244526ab5F6e6400d331DB28C8fdDdb55\",\n \"0xb0505e5a99abd03d94a1169e638B78EDfEd26ea4\"\n ],\n \"34443\": [\n \"0xf0F161fDA2712DB8b566946122a5af183995e2eD\",\n \"0xd988097fb8612cc24eeC14542bC03424c656005f\",\n \"0x2416092f143378750bb29b79eD961ab195CcEea5\",\n \"0x4200000000000000000000000000000000000006\",\n \"0xcDd475325D6F564d27247D1DddBb0DAc6fA0a5CF\",\n \"0x80137510979822322193FC997d400D5A6C747bf7\",\n \"0xe7903B1F75C534Dd8159b313d92cDCfbC62cB3Cd\",\n \"0x04C0599Ae5A44757c0af6F9eC3b93da8976c150A\",\n \"0x59889b7021243dB5B1e065385F918316cD90D46c\"\n ]\n};\n const chainId = env.parameters.chainId;\n return availableTokens[chainId] || [];\n }",
|
|
707
|
+
"category": 0
|
|
708
|
+
},
|
|
709
|
+
{
|
|
710
|
+
"key": "condition",
|
|
711
|
+
"type": "logic_operator",
|
|
712
|
+
"description": "Logic operator used for the comparison: <, >, <=, >=, ==, ...",
|
|
713
|
+
"mandatory": true,
|
|
714
|
+
"category": 0
|
|
715
|
+
},
|
|
716
|
+
{
|
|
717
|
+
"key": "comparisonValue",
|
|
718
|
+
"type": "float",
|
|
719
|
+
"description": "The value to compare to",
|
|
720
|
+
"mandatory": true,
|
|
721
|
+
"category": 0
|
|
722
|
+
},
|
|
723
|
+
],
|
|
724
|
+
"examples": [
|
|
725
|
+
{
|
|
726
|
+
"name": "USDT Borrowing Rate is below 3%",
|
|
727
|
+
"description": "Gets triggered when the USDT borrowing rate falls below 3% on Ionic",
|
|
728
|
+
"parameters": [
|
|
729
|
+
{
|
|
730
|
+
"key": "chainId",
|
|
731
|
+
"value": 34443
|
|
732
|
+
},
|
|
733
|
+
{
|
|
734
|
+
"key": "token",
|
|
735
|
+
"value": "0xf0F161fDA2712DB8b566946122a5af183995e2eD"
|
|
736
|
+
},
|
|
737
|
+
{
|
|
738
|
+
"key": "condition",
|
|
739
|
+
"value": "lte"
|
|
740
|
+
},
|
|
741
|
+
{
|
|
742
|
+
"key": "comparisonValue",
|
|
743
|
+
"value": 3
|
|
744
|
+
}
|
|
745
|
+
]
|
|
746
|
+
}
|
|
747
|
+
],
|
|
748
|
+
"output": {
|
|
749
|
+
"borrowingRate": "float"
|
|
750
|
+
},
|
|
751
|
+
"blockId": 17,
|
|
752
|
+
"image": "https://otomato-sdk-images.s3.eu-west-1.amazonaws.com/ionic.jpg"
|
|
753
|
+
}
|
|
754
|
+
},
|
|
755
|
+
"ASTARIA": {
|
|
756
|
+
"description": "Astaria is an oracle-less, intent-based, fixed-rate lending protocol supporting unlimited loan durations for any asset",
|
|
757
|
+
"chains": [
|
|
758
|
+
34443
|
|
759
|
+
],
|
|
760
|
+
"image": "https://otomato-sdk-images.s3.eu-west-1.amazonaws.com/astaria.png",
|
|
761
|
+
"LEND_RECALLED": {
|
|
762
|
+
"name": "Lend Recalled",
|
|
763
|
+
"description": "Lend recalled in Astaria",
|
|
764
|
+
"type": 0,
|
|
765
|
+
"contractAddress": "0x0000000002546f9C641E000DD4b22875236BC147",
|
|
766
|
+
"output": {
|
|
767
|
+
"loanId": "uint256",
|
|
768
|
+
"recaller": "address",
|
|
769
|
+
"end": "uint256",
|
|
770
|
+
"transactionHash": "string"
|
|
771
|
+
},
|
|
772
|
+
"parameters": [
|
|
773
|
+
{
|
|
774
|
+
"key": "chainId",
|
|
775
|
+
"type": "chainId",
|
|
776
|
+
"description": "Chain ID of the EVM blockchain",
|
|
777
|
+
"mandatory": true,
|
|
778
|
+
"category": 0
|
|
779
|
+
},
|
|
780
|
+
{
|
|
781
|
+
"key": "abiParams.loanId",
|
|
782
|
+
"type": "uint256",
|
|
783
|
+
"description": "Loan ID",
|
|
784
|
+
"category": 0
|
|
785
|
+
},
|
|
786
|
+
{
|
|
787
|
+
"key": "abiParams.recaller",
|
|
788
|
+
"type": "address",
|
|
789
|
+
"description": "Recaller address",
|
|
790
|
+
"category": 1
|
|
791
|
+
},
|
|
792
|
+
{
|
|
793
|
+
"key": "abiParams.end",
|
|
794
|
+
"type": "uint256",
|
|
795
|
+
"description": "End time",
|
|
796
|
+
"category": 1
|
|
797
|
+
},
|
|
798
|
+
],
|
|
799
|
+
"examples": [
|
|
800
|
+
{
|
|
801
|
+
"name": "Any loan recalled",
|
|
802
|
+
"description": "Gets triggered when a loan is recalled on Mode",
|
|
803
|
+
"parameters": [
|
|
804
|
+
{
|
|
805
|
+
"key": "chainId",
|
|
806
|
+
"value": 34443
|
|
807
|
+
}
|
|
808
|
+
]
|
|
809
|
+
},
|
|
810
|
+
{
|
|
811
|
+
"name": "A specific loan recalled",
|
|
812
|
+
"description": "Gets triggered when loan #123 is recalled",
|
|
813
|
+
"parameters": [
|
|
814
|
+
{
|
|
815
|
+
"key": "chainId",
|
|
816
|
+
"value": 34443
|
|
817
|
+
},
|
|
818
|
+
{
|
|
819
|
+
"key": "abiParams.loanId",
|
|
820
|
+
"value": 123
|
|
821
|
+
}
|
|
822
|
+
]
|
|
823
|
+
},
|
|
824
|
+
{
|
|
825
|
+
"name": "Recalled by specific address",
|
|
826
|
+
"description": "Gets triggered when vitalik.eth recalls a loan",
|
|
827
|
+
"parameters": [
|
|
828
|
+
{
|
|
829
|
+
"key": "chainId",
|
|
830
|
+
"value": 34443
|
|
831
|
+
},
|
|
832
|
+
{
|
|
833
|
+
"key": "abiParams.recaller",
|
|
834
|
+
"value": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045"
|
|
835
|
+
}
|
|
836
|
+
]
|
|
837
|
+
}
|
|
838
|
+
],
|
|
839
|
+
"blockId": 8,
|
|
840
|
+
"image": "https://otomato-sdk-images.s3.eu-west-1.amazonaws.com/astaria.png"
|
|
841
|
+
}
|
|
842
|
+
},
|
|
843
|
+
"AAVE": {
|
|
844
|
+
"description": "A leading DeFi protocol enabling secure borrowing, lending, and yield generation across multiple assets.",
|
|
845
|
+
"chains": [
|
|
846
|
+
8453
|
|
847
|
+
],
|
|
848
|
+
"image": "https://otomato-sdk-images.s3.eu-west-1.amazonaws.com/aave.png",
|
|
849
|
+
"LENDING_RATE": {
|
|
850
|
+
"name": "Lending rate",
|
|
851
|
+
"description": "Get the lending rate of any asset on Aave",
|
|
852
|
+
"prototype": "aaveLendingRate",
|
|
853
|
+
"type": 1,
|
|
854
|
+
"method": "function getReserveData(address asset) external view returns (uint256 totalLiquidity, uint256 availableLiquidity, uint256 totalBorrowsStable, uint256 totalBorrowsVariable, uint256 liquidityRate, uint256 variableBorrowRate, uint256 stableBorrowRate, uint256 averageStableBorrowRate, uint256 utilizationRate, uint256 liquidityIndex, uint256 variableBorrowIndex, address aTokenAddress, uint40 lastUpdateTimestamp)",
|
|
855
|
+
"parameters": [
|
|
856
|
+
{
|
|
857
|
+
"key": "chainId",
|
|
858
|
+
"type": "chainId",
|
|
859
|
+
"description": "Chain ID of the network",
|
|
860
|
+
"mandatory": true,
|
|
861
|
+
"category": 0
|
|
862
|
+
},
|
|
863
|
+
{
|
|
864
|
+
"key": "abiParams.asset",
|
|
865
|
+
"type": "erc20",
|
|
866
|
+
"description": "The token you want to fetch the lending rate",
|
|
867
|
+
"mandatory": true,
|
|
868
|
+
"enum": "\n (env) => {\n if (!env.parameters.chainId)\n throw new Error('You need to provide the chainId first');\n\n const availableLendingTokens = {\n \"8453\": [\n \"0x4200000000000000000000000000000000000006\",\n \"0x04C0599Ae5A44757c0af6F9eC3b93da8976c150A\",\n \"0x833589fcd6edb6e08f4c7c32d4f71b54bda02913\",\n \"0xcbb7c0000ab88b473b1f5afd9ef808440eed33bf\",\n \"0xc1cba3fcea344f92d9239c08c0568f6f2f0ee452\",\n \"0x2Ae3F1Ec7F1F5012CFEab0185bfc7aa3cf0DEc22\",\n \"0xd9aAEc86B65D86f6A7B5B1b0c42FFA531710b6CA\"\n ]\n};\n return availableLendingTokens[env.parameters.chainId] || [];\n }",
|
|
869
|
+
"category": 0
|
|
870
|
+
},
|
|
871
|
+
{
|
|
872
|
+
"key": "condition",
|
|
873
|
+
"type": "logic_operator",
|
|
874
|
+
"description": "Logic operator used for the comparison: <, >, <=, >=, ==, ...",
|
|
875
|
+
"mandatory": true,
|
|
876
|
+
"category": 0
|
|
877
|
+
},
|
|
878
|
+
{
|
|
879
|
+
"key": "comparisonValue",
|
|
880
|
+
"type": "float",
|
|
881
|
+
"description": "The value to compare to",
|
|
882
|
+
"mandatory": true,
|
|
883
|
+
"category": 0
|
|
884
|
+
},
|
|
885
|
+
],
|
|
886
|
+
"output": {
|
|
887
|
+
"lendingRate": "float"
|
|
888
|
+
},
|
|
889
|
+
"examples": [
|
|
890
|
+
{
|
|
891
|
+
"name": "USDC Lending Rate is above 5%",
|
|
892
|
+
"description": "USDC Lending Rate is above 5% on Base",
|
|
893
|
+
"parameters": [
|
|
894
|
+
{
|
|
895
|
+
"key": "chainId",
|
|
896
|
+
"value": 8453
|
|
897
|
+
},
|
|
898
|
+
{
|
|
899
|
+
"key": "abiParams.asset",
|
|
900
|
+
"value": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913"
|
|
901
|
+
},
|
|
902
|
+
{
|
|
903
|
+
"key": "condition",
|
|
904
|
+
"value": "gt"
|
|
905
|
+
},
|
|
906
|
+
{
|
|
907
|
+
"key": "comparisonValue",
|
|
908
|
+
"value": 5
|
|
909
|
+
}
|
|
910
|
+
]
|
|
911
|
+
}
|
|
912
|
+
],
|
|
913
|
+
"blockId": 19,
|
|
914
|
+
"image": "https://otomato-sdk-images.s3.eu-west-1.amazonaws.com/aave.png"
|
|
915
|
+
},
|
|
916
|
+
"BORROWING_RATES": {
|
|
917
|
+
"name": "Borrowing rate",
|
|
918
|
+
"description": "Get the borrowing rate of any asset on Aave",
|
|
919
|
+
"type": 1,
|
|
920
|
+
"prototype": "aaveBorrowingRate",
|
|
921
|
+
"method": "function getReserveData(address asset) external view returns (uint256 totalLiquidity, uint256 availableLiquidity, uint256 totalBorrowsStable, uint256 totalBorrowsVariable, uint256 liquidityRate, uint256 variableBorrowRate, uint256 stableBorrowRate, uint256 averageStableBorrowRate, uint256 utilizationRate, uint256 liquidityIndex, uint256 variableBorrowIndex, address aTokenAddress, uint40 lastUpdateTimestamp)",
|
|
922
|
+
"parameters": [
|
|
923
|
+
{
|
|
924
|
+
"key": "chainId",
|
|
925
|
+
"type": "chainId",
|
|
926
|
+
"description": "Chain ID of the network",
|
|
927
|
+
"mandatory": true,
|
|
928
|
+
"category": 0
|
|
929
|
+
},
|
|
930
|
+
{
|
|
931
|
+
"key": "abiParams.asset",
|
|
932
|
+
"type": "erc20",
|
|
933
|
+
"description": "The token you want to fetch the borrow rate for",
|
|
934
|
+
"mandatory": true,
|
|
935
|
+
"enum": "\n (env) => {\n if (!env.parameters.chainId)\n throw new Error('You need to provide the chainId first');\n\n const availableLendingTokens = {\n \"8453\": [\n \"0x4200000000000000000000000000000000000006\",\n \"0x04C0599Ae5A44757c0af6F9eC3b93da8976c150A\",\n \"0x833589fcd6edb6e08f4c7c32d4f71b54bda02913\",\n \"0xcbb7c0000ab88b473b1f5afd9ef808440eed33bf\",\n \"0xc1cba3fcea344f92d9239c08c0568f6f2f0ee452\",\n \"0x2Ae3F1Ec7F1F5012CFEab0185bfc7aa3cf0DEc22\",\n \"0xd9aAEc86B65D86f6A7B5B1b0c42FFA531710b6CA\"\n ]\n};\n return availableLendingTokens[env.parameters.chainId] || [];\n }",
|
|
936
|
+
"category": 0
|
|
937
|
+
},
|
|
938
|
+
{
|
|
939
|
+
"key": "condition",
|
|
940
|
+
"type": "logic_operator",
|
|
941
|
+
"description": "Logic operator used for the comparison: <, >, <=, >=, ==, ...",
|
|
942
|
+
"mandatory": true,
|
|
943
|
+
"category": 0
|
|
944
|
+
},
|
|
945
|
+
{
|
|
946
|
+
"key": "comparisonValue",
|
|
947
|
+
"type": "float",
|
|
948
|
+
"description": "The value to compare to",
|
|
949
|
+
"mandatory": true,
|
|
950
|
+
"category": 0
|
|
951
|
+
},
|
|
952
|
+
],
|
|
953
|
+
"output": {
|
|
954
|
+
"borrowingRate": "float"
|
|
955
|
+
},
|
|
956
|
+
"examples": [
|
|
957
|
+
{
|
|
958
|
+
"name": "USDC Borrowing Rate is above 3%",
|
|
959
|
+
"description": "USDC Borrowing Rate is above 3% on Base",
|
|
960
|
+
"parameters": [
|
|
961
|
+
{
|
|
962
|
+
"key": "chainId",
|
|
963
|
+
"value": 8453
|
|
964
|
+
},
|
|
965
|
+
{
|
|
966
|
+
"key": "abiParams.asset",
|
|
967
|
+
"value": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913"
|
|
968
|
+
},
|
|
969
|
+
{
|
|
970
|
+
"key": "condition",
|
|
971
|
+
"value": "gt"
|
|
972
|
+
},
|
|
973
|
+
{
|
|
974
|
+
"key": "comparisonValue",
|
|
975
|
+
"value": 3
|
|
976
|
+
}
|
|
977
|
+
]
|
|
978
|
+
}
|
|
979
|
+
],
|
|
980
|
+
"blockId": 20,
|
|
981
|
+
"image": "https://otomato-sdk-images.s3.eu-west-1.amazonaws.com/aave.png"
|
|
982
|
+
}
|
|
983
|
+
},
|
|
984
|
+
"MOONWELL": {
|
|
985
|
+
"description": "An advanced lending and borrowing platform focused on scalable, fast blockchain networks for optimal performance.",
|
|
986
|
+
"chains": [
|
|
987
|
+
8453
|
|
988
|
+
],
|
|
989
|
+
"image": "https://otomato-sdk-images.s3.eu-west-1.amazonaws.com/moonwell.png",
|
|
990
|
+
"LENDING_RATE": {
|
|
991
|
+
"name": "Lending rate",
|
|
992
|
+
"description": "Get the lending rate of an asset on Moonwell",
|
|
993
|
+
"prototype": "moonwellLendingRate",
|
|
994
|
+
"type": 1,
|
|
995
|
+
"method": "function getMarketInfo(address token) external view returns ((address market, bool isListed, uint256 borrowCap, uint256 supplyCap, bool mintPaused, bool borrowPaused, uint256 collateralFactor, uint256 underlyingPrice, uint256 totalSupply, uint256 totalBorrows, uint256 totalReserves, uint256 cash, uint256 exchangeRate, uint256 borrowIndex, uint256 reserveFactor, uint256 borrowRate, uint256 supplyRate, (address token, uint256 supplyIncentivesPerSec, uint256 borrowIncentivesPerSec)[] incentives))",
|
|
996
|
+
"parameters": [
|
|
997
|
+
{
|
|
998
|
+
"key": "chainId",
|
|
999
|
+
"type": "chainId",
|
|
1000
|
+
"description": "Chain ID of the network",
|
|
1001
|
+
"mandatory": true,
|
|
1002
|
+
"category": 0
|
|
1003
|
+
},
|
|
1004
|
+
{
|
|
1005
|
+
"key": "asset",
|
|
1006
|
+
"type": "erc20",
|
|
1007
|
+
"description": "The token you want to fetch the yield",
|
|
1008
|
+
"mandatory": true,
|
|
1009
|
+
"enum": "\n (env) => {\n if (!env.parameters.chainId)\n throw new Error('You need to provide the chainId first');\n \n const availableTokens = {\n \"8453\": [\n \"0x833589fcd6edb6e08f4c7c32d4f71b54bda02913\",\n \"0x50c5725949A6F0c72E6C4a641F24049A917DB0Cb\",\n \"0x4200000000000000000000000000000000000006\",\n \"0x2Ae3F1Ec7F1F5012CFEab0185bfc7aa3cf0DEc22\",\n \"0xc1cba3fcea344f92d9239c08c0568f6f2f0ee452\",\n \"0xB6fe221Fe9EeF5aBa221c348bA20A1Bf5e73624c\",\n \"0x04C0599Ae5A44757c0af6F9eC3b93da8976c150A\",\n \"0x940181a94a35a4569e4529a3cdfb74e38fd98631\",\n \"0xcbb7c0000ab88b473b1f5afd9ef808440eed33bf\",\n \"0x60a3E35Cc302bFA44Cb288Bc5a4F316Fdb1adb42\",\n \"0xEDfa23602D0EC14714057867A78d01e94176BEA0\"\n ]\n};\n const chainId = env.parameters.chainId;\n return availableTokens[chainId] || [];\n }",
|
|
1010
|
+
"category": 0
|
|
1011
|
+
},
|
|
1012
|
+
{
|
|
1013
|
+
"key": "condition",
|
|
1014
|
+
"type": "logic_operator",
|
|
1015
|
+
"description": "Logic operator used for the comparison: <, >, <=, >=, ==, ...",
|
|
1016
|
+
"mandatory": true,
|
|
1017
|
+
"category": 0
|
|
1018
|
+
},
|
|
1019
|
+
{
|
|
1020
|
+
"key": "comparisonValue",
|
|
1021
|
+
"type": "float",
|
|
1022
|
+
"description": "The value to compare to",
|
|
1023
|
+
"mandatory": true,
|
|
1024
|
+
"category": 0
|
|
1025
|
+
},
|
|
1026
|
+
],
|
|
1027
|
+
"output": {
|
|
1028
|
+
"lendingRate": "float",
|
|
1029
|
+
"incentives": "[]",
|
|
1030
|
+
"underlyingPrice": "uint256",
|
|
1031
|
+
"totalSupply": "uint256",
|
|
1032
|
+
"supplyRate": "uint256",
|
|
1033
|
+
"exchangeRate": "uint256"
|
|
1034
|
+
},
|
|
1035
|
+
"examples": [
|
|
1036
|
+
{
|
|
1037
|
+
"name": "USDC Lending Rate is above 5%",
|
|
1038
|
+
"description": "USDC Lending Rate is above 5%",
|
|
1039
|
+
"parameters": [
|
|
1040
|
+
{
|
|
1041
|
+
"key": "chainId",
|
|
1042
|
+
"value": 8453
|
|
1043
|
+
},
|
|
1044
|
+
{
|
|
1045
|
+
"key": "asset",
|
|
1046
|
+
"value": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913"
|
|
1047
|
+
},
|
|
1048
|
+
{
|
|
1049
|
+
"key": "condition",
|
|
1050
|
+
"value": "gt"
|
|
1051
|
+
},
|
|
1052
|
+
{
|
|
1053
|
+
"key": "comparisonValue",
|
|
1054
|
+
"value": 5
|
|
1055
|
+
}
|
|
1056
|
+
]
|
|
1057
|
+
}
|
|
1058
|
+
],
|
|
1059
|
+
"blockId": 21,
|
|
1060
|
+
"image": "https://otomato-sdk-images.s3.eu-west-1.amazonaws.com/moonwell.png"
|
|
1061
|
+
},
|
|
1062
|
+
"BORROWING_RATES": {
|
|
1063
|
+
"name": "Borrowing rate",
|
|
1064
|
+
"description": "Get the borrowing rate of any asset on Moonwell",
|
|
1065
|
+
"type": 1,
|
|
1066
|
+
"prototype": "moonwellBorrowingRate",
|
|
1067
|
+
"method": "function getMarketInfo(address token) external view returns ((address market, bool isListed, uint256 borrowCap, uint256 supplyCap, bool mintPaused, bool borrowPaused, uint256 collateralFactor, uint256 underlyingPrice, uint256 totalSupply, uint256 totalBorrows, uint256 totalReserves, uint256 cash, uint256 exchangeRate, uint256 borrowIndex, uint256 reserveFactor, uint256 borrowRate, uint256 supplyRate, (address token, uint256 supplyIncentivesPerSec, uint256 borrowIncentivesPerSec)[] incentives))",
|
|
1068
|
+
"parameters": [
|
|
1069
|
+
{
|
|
1070
|
+
"key": "chainId",
|
|
1071
|
+
"type": "chainId",
|
|
1072
|
+
"description": "Chain ID of the network",
|
|
1073
|
+
"mandatory": true,
|
|
1074
|
+
"category": 0
|
|
1075
|
+
},
|
|
1076
|
+
{
|
|
1077
|
+
"key": "asset",
|
|
1078
|
+
"type": "erc20",
|
|
1079
|
+
"description": "The token you want to fetch the borrow rate for",
|
|
1080
|
+
"mandatory": true,
|
|
1081
|
+
"enum": "\n (env) => {\n if (!env.parameters.chainId)\n throw new Error('You need to provide the chainId first');\n \n const availableTokens = {\n \"8453\": [\n \"0x833589fcd6edb6e08f4c7c32d4f71b54bda02913\",\n \"0x50c5725949A6F0c72E6C4a641F24049A917DB0Cb\",\n \"0x4200000000000000000000000000000000000006\",\n \"0x2Ae3F1Ec7F1F5012CFEab0185bfc7aa3cf0DEc22\",\n \"0xc1cba3fcea344f92d9239c08c0568f6f2f0ee452\",\n \"0xB6fe221Fe9EeF5aBa221c348bA20A1Bf5e73624c\",\n \"0x04C0599Ae5A44757c0af6F9eC3b93da8976c150A\",\n \"0x940181a94a35a4569e4529a3cdfb74e38fd98631\",\n \"0xcbb7c0000ab88b473b1f5afd9ef808440eed33bf\",\n \"0x60a3E35Cc302bFA44Cb288Bc5a4F316Fdb1adb42\",\n \"0xEDfa23602D0EC14714057867A78d01e94176BEA0\"\n ]\n};\n const chainId = env.parameters.chainId;\n return availableTokens[chainId] || [];\n }",
|
|
1082
|
+
"category": 0
|
|
1083
|
+
},
|
|
1084
|
+
{
|
|
1085
|
+
"key": "condition",
|
|
1086
|
+
"type": "logic_operator",
|
|
1087
|
+
"description": "Logic operator used for the comparison: <, >, <=, >=, ==, ...",
|
|
1088
|
+
"mandatory": true,
|
|
1089
|
+
"category": 0
|
|
1090
|
+
},
|
|
1091
|
+
{
|
|
1092
|
+
"key": "comparisonValue",
|
|
1093
|
+
"type": "float",
|
|
1094
|
+
"description": "The value to compare to",
|
|
1095
|
+
"mandatory": true,
|
|
1096
|
+
"category": 0
|
|
1097
|
+
},
|
|
1098
|
+
],
|
|
1099
|
+
"output": {
|
|
1100
|
+
"collateralFactor": "uint256",
|
|
1101
|
+
"borrowingRate": "float",
|
|
1102
|
+
"incentives": "[]",
|
|
1103
|
+
"underlyingPrice": "uint256",
|
|
1104
|
+
"totalBorrows": "uint256",
|
|
1105
|
+
"borrowRate": "uint256"
|
|
1106
|
+
},
|
|
1107
|
+
"examples": [
|
|
1108
|
+
{
|
|
1109
|
+
"name": "USDC Borrowing Rate is above 3%",
|
|
1110
|
+
"description": "USDC Borrowing Rate is above 3%",
|
|
1111
|
+
"parameters": [
|
|
1112
|
+
{
|
|
1113
|
+
"key": "chainId",
|
|
1114
|
+
"value": 8453
|
|
1115
|
+
},
|
|
1116
|
+
{
|
|
1117
|
+
"key": "asset",
|
|
1118
|
+
"value": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913"
|
|
1119
|
+
},
|
|
1120
|
+
{
|
|
1121
|
+
"key": "condition",
|
|
1122
|
+
"value": "gt"
|
|
1123
|
+
},
|
|
1124
|
+
{
|
|
1125
|
+
"key": "comparisonValue",
|
|
1126
|
+
"value": 3
|
|
1127
|
+
}
|
|
1128
|
+
]
|
|
1129
|
+
}
|
|
1130
|
+
],
|
|
1131
|
+
"blockId": 22,
|
|
1132
|
+
"image": "https://otomato-sdk-images.s3.eu-west-1.amazonaws.com/moonwell.png"
|
|
1133
|
+
}
|
|
1134
|
+
},
|
|
1135
|
+
"COMPOUND": {
|
|
1136
|
+
"description": "Compound is an algorithmic, autonomous interest rate protocol built for developers, to unlock a universe of open financial applications.",
|
|
1137
|
+
"chains": [
|
|
1138
|
+
8453
|
|
1139
|
+
],
|
|
1140
|
+
"image": "https://otomato-sdk-images.s3.eu-west-1.amazonaws.com/compound.png",
|
|
1141
|
+
"LENDING_RATE": {
|
|
1142
|
+
"name": "Lending rate",
|
|
1143
|
+
"description": "Get the lending rate of any asset on Compound",
|
|
1144
|
+
"prototype": "compoundLendingRate",
|
|
1145
|
+
"type": 1,
|
|
1146
|
+
"method": "function getSupplyRate(uint utilization) public view returns ((uint256 supplyRate))",
|
|
1147
|
+
"parameters": [
|
|
1148
|
+
{
|
|
1149
|
+
"key": "chainId",
|
|
1150
|
+
"type": "chainId",
|
|
1151
|
+
"description": "Chain ID of the network",
|
|
1152
|
+
"mandatory": true,
|
|
1153
|
+
"category": 0
|
|
1154
|
+
},
|
|
1155
|
+
{
|
|
1156
|
+
"key": "token",
|
|
1157
|
+
"type": "erc20",
|
|
1158
|
+
"description": "The token you want to fetch the yield",
|
|
1159
|
+
"mandatory": true,
|
|
1160
|
+
"enum": "\n (env) => {\n if (!env.parameters.chainId)\n throw new Error('You need to provide the chainId first');\n \n const availableTokens = {\n \"8453\": [\n \"0x833589fcd6edb6e08f4c7c32d4f71b54bda02913\",\n \"0x4200000000000000000000000000000000000006\",\n \"0x940181a94a35a4569e4529a3cdfb74e38fd98631\",\n \"0xd9aAEc86B65D86f6A7B5B1b0c42FFA531710b6CA\"\n ]\n};\n const chainId = env.parameters.chainId;\n return availableTokens[chainId] || [];\n }",
|
|
1161
|
+
"category": 0
|
|
1162
|
+
},
|
|
1163
|
+
{
|
|
1164
|
+
"key": "abiParams.utilization",
|
|
1165
|
+
"type": "uint32",
|
|
1166
|
+
"description": "The utilization",
|
|
1167
|
+
"category": 0,
|
|
1168
|
+
"hideInUI": true
|
|
1169
|
+
},
|
|
1170
|
+
{
|
|
1171
|
+
"key": "condition",
|
|
1172
|
+
"type": "logic_operator",
|
|
1173
|
+
"description": "Logic operator used for the comparison: <, >, <=, >=, ==, ...",
|
|
1174
|
+
"mandatory": true,
|
|
1175
|
+
"category": 0
|
|
1176
|
+
},
|
|
1177
|
+
{
|
|
1178
|
+
"key": "comparisonValue",
|
|
1179
|
+
"type": "float",
|
|
1180
|
+
"description": "The value to compare to",
|
|
1181
|
+
"mandatory": true,
|
|
1182
|
+
"category": 0
|
|
1183
|
+
},
|
|
1184
|
+
],
|
|
1185
|
+
"examples": [
|
|
1186
|
+
{
|
|
1187
|
+
"name": "USDC Yield is above 5%",
|
|
1188
|
+
"description": "Gets triggered when USDC yield rises above 5% on Compound",
|
|
1189
|
+
"parameters": [
|
|
1190
|
+
{
|
|
1191
|
+
"key": "chainId",
|
|
1192
|
+
"value": 8453
|
|
1193
|
+
},
|
|
1194
|
+
{
|
|
1195
|
+
"key": "token",
|
|
1196
|
+
"value": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913"
|
|
1197
|
+
},
|
|
1198
|
+
{
|
|
1199
|
+
"key": "condition",
|
|
1200
|
+
"value": "gt"
|
|
1201
|
+
},
|
|
1202
|
+
{
|
|
1203
|
+
"key": "comparisonValue",
|
|
1204
|
+
"value": 5
|
|
1205
|
+
}
|
|
1206
|
+
]
|
|
1207
|
+
}
|
|
1208
|
+
],
|
|
1209
|
+
"output": {
|
|
1210
|
+
"lendingRate": "float",
|
|
1211
|
+
"supplyRate": "uint256"
|
|
1212
|
+
},
|
|
1213
|
+
"blockId": 23,
|
|
1214
|
+
"image": "https://otomato-sdk-images.s3.eu-west-1.amazonaws.com/compound.png"
|
|
1215
|
+
},
|
|
1216
|
+
"BORROWING_RATES": {
|
|
1217
|
+
"name": "Borrowing rate",
|
|
1218
|
+
"description": "Get the borrowing rate of any asset on Compound",
|
|
1219
|
+
"type": 1,
|
|
1220
|
+
"prototype": "compoundBorrowingRate",
|
|
1221
|
+
"method": "function getBorrowRate(uint utilization) public view returns ((uint256 borrowRate))",
|
|
1222
|
+
"parameters": [
|
|
1223
|
+
{
|
|
1224
|
+
"key": "chainId",
|
|
1225
|
+
"type": "chainId",
|
|
1226
|
+
"description": "Chain ID of the network",
|
|
1227
|
+
"mandatory": true,
|
|
1228
|
+
"category": 0
|
|
1229
|
+
},
|
|
1230
|
+
{
|
|
1231
|
+
"key": "token",
|
|
1232
|
+
"type": "erc20",
|
|
1233
|
+
"description": "The token you want to fetch the borrow rate for",
|
|
1234
|
+
"mandatory": true,
|
|
1235
|
+
"enum": "\n (env) => {\n if (!env.parameters.chainId)\n throw new Error('You need to provide the chainId first');\n \n const availableTokens = {\n \"8453\": [\n \"0x833589fcd6edb6e08f4c7c32d4f71b54bda02913\",\n \"0x4200000000000000000000000000000000000006\",\n \"0x940181a94a35a4569e4529a3cdfb74e38fd98631\",\n \"0xd9aAEc86B65D86f6A7B5B1b0c42FFA531710b6CA\"\n ]\n};\n const chainId = env.parameters.chainId;\n return availableTokens[chainId] || [];\n }",
|
|
1236
|
+
"category": 0
|
|
1237
|
+
},
|
|
1238
|
+
{
|
|
1239
|
+
"key": "abiParams.utilization",
|
|
1240
|
+
"type": "uint32",
|
|
1241
|
+
"description": "The utilization",
|
|
1242
|
+
"category": 0,
|
|
1243
|
+
"hideInUI": true
|
|
1244
|
+
},
|
|
1245
|
+
{
|
|
1246
|
+
"key": "condition",
|
|
1247
|
+
"type": "logic_operator",
|
|
1248
|
+
"description": "Logic operator used for the comparison: <, >, <=, >=, ==, ...",
|
|
1249
|
+
"mandatory": true,
|
|
1250
|
+
"category": 0
|
|
1251
|
+
},
|
|
1252
|
+
{
|
|
1253
|
+
"key": "comparisonValue",
|
|
1254
|
+
"type": "float",
|
|
1255
|
+
"description": "The value to compare to",
|
|
1256
|
+
"mandatory": true,
|
|
1257
|
+
"category": 0
|
|
1258
|
+
},
|
|
1259
|
+
],
|
|
1260
|
+
"examples": [
|
|
1261
|
+
{
|
|
1262
|
+
"name": "USDC Borrowing Rate is below 10%",
|
|
1263
|
+
"description": "Gets triggered when the USDC borrowing rate falls below 10% on Compound",
|
|
1264
|
+
"parameters": [
|
|
1265
|
+
{
|
|
1266
|
+
"key": "chainId",
|
|
1267
|
+
"value": 8453
|
|
1268
|
+
},
|
|
1269
|
+
{
|
|
1270
|
+
"key": "token",
|
|
1271
|
+
"value": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913"
|
|
1272
|
+
},
|
|
1273
|
+
{
|
|
1274
|
+
"key": "condition",
|
|
1275
|
+
"value": "lt"
|
|
1276
|
+
},
|
|
1277
|
+
{
|
|
1278
|
+
"key": "comparisonValue",
|
|
1279
|
+
"value": 10
|
|
1280
|
+
}
|
|
1281
|
+
]
|
|
1282
|
+
}
|
|
1283
|
+
],
|
|
1284
|
+
"output": {
|
|
1285
|
+
"borrowingRate": "float",
|
|
1286
|
+
"borrowRate": "uint256"
|
|
1287
|
+
},
|
|
1288
|
+
"blockId": 24,
|
|
1289
|
+
"image": "https://otomato-sdk-images.s3.eu-west-1.amazonaws.com/compound.png"
|
|
1290
|
+
}
|
|
1291
|
+
},
|
|
1292
|
+
"IRONCLAD": {
|
|
1293
|
+
"description": "DeFi needs safe, liquid lending markets and steady stablecoins that drives value to users. We’ve built that foundation and made it Ironclad.",
|
|
1294
|
+
"chains": [
|
|
1295
|
+
8453,
|
|
1296
|
+
34443
|
|
1297
|
+
],
|
|
1298
|
+
"image": "https://otomato-sdk-images.s3.eu-west-1.amazonaws.com/ironclad.png",
|
|
1299
|
+
"LENDING_RATE": {
|
|
1300
|
+
"name": "Lending rate",
|
|
1301
|
+
"description": "Get the lending rate of any asset on Ironclad",
|
|
1302
|
+
"prototype": "ironcladLendingRate",
|
|
1303
|
+
"type": 1,
|
|
1304
|
+
"method": "function getReserveData(address asset) external view returns ((uint256 data) configuration, uint128 liquidityIndex, uint128 variableBorrowIndex, uint128 currentLiquidityRate, uint128 currentVariableBorrowRate, uint128 currentStableBorrowRate, uint40 lastUpdateTimestamp, address aTokenAddress, address stableDebtTokenAddress, address variableDebtTokenAddress, address interestRateStrategyAddress, uint8 id)",
|
|
1305
|
+
"parameters": [
|
|
1306
|
+
{
|
|
1307
|
+
"key": "chainId",
|
|
1308
|
+
"type": "chainId",
|
|
1309
|
+
"description": "Chain ID of the network",
|
|
1310
|
+
"mandatory": true,
|
|
1311
|
+
"category": 0
|
|
1312
|
+
},
|
|
1313
|
+
{
|
|
1314
|
+
"key": "abiParams.asset",
|
|
1315
|
+
"type": "erc20",
|
|
1316
|
+
"description": "The token you want to fetch the lending rate",
|
|
1317
|
+
"mandatory": true,
|
|
1318
|
+
"enum": "\n (env) => {\n if (!env.parameters.chainId)\n throw new Error('You need to provide the chainId first');\n\n const availableLendingTokens = {\n \"8453\": [\n \"0x940181a94a35a4569e4529a3cdfb74e38fd98631\",\n \"0xcbb7c0000ab88b473b1f5afd9ef808440eed33bf\",\n \"0x2Ae3F1Ec7F1F5012CFEab0185bfc7aa3cf0DEc22\",\n \"0x50c5725949A6F0c72E6C4a641F24049A917DB0Cb\",\n \"0x4200000000000000000000000000000000000006\",\n \"0xd9aAEc86B65D86f6A7B5B1b0c42FFA531710b6CA\",\n \"0x833589fcd6edb6e08f4c7c32d4f71b54bda02913\"\n ],\n \"34443\": [\n \"0xd988097fb8612cc24eeC14542bC03424c656005f\",\n \"0xf0F161fDA2712DB8b566946122a5af183995e2eD\",\n \"0x4200000000000000000000000000000000000006\",\n \"0x2416092f143378750bb29b79eD961ab195CcEea5\",\n \"0x4200000000000000000000000000000000000006\",\n \"0xe7903B1F75C534Dd8159b313d92cDCfbC62cB3Cd\",\n \"0x59889b7021243dB5B1e065385F918316cD90D46c\",\n \"0x04C0599Ae5A44757c0af6F9eC3b93da8976c150A\",\n \"0xDfc7C877a950e49D2610114102175A06C2e3167a\"\n ]\n};\n return availableLendingTokens[env.parameters.chainId] || [];\n }",
|
|
1319
|
+
"category": 0
|
|
1320
|
+
},
|
|
1321
|
+
{
|
|
1322
|
+
"key": "condition",
|
|
1323
|
+
"type": "logic_operator",
|
|
1324
|
+
"description": "Logic operator used for the comparison: <, >, <=, >=, ==, ...",
|
|
1325
|
+
"mandatory": true,
|
|
1326
|
+
"category": 0
|
|
1327
|
+
},
|
|
1328
|
+
{
|
|
1329
|
+
"key": "comparisonValue",
|
|
1330
|
+
"type": "float",
|
|
1331
|
+
"description": "The value to compare to",
|
|
1332
|
+
"mandatory": true,
|
|
1333
|
+
"category": 0
|
|
1334
|
+
},
|
|
1335
|
+
],
|
|
1336
|
+
"output": {
|
|
1337
|
+
"lendingRate": "float"
|
|
1338
|
+
},
|
|
1339
|
+
"examples": [
|
|
1340
|
+
{
|
|
1341
|
+
"name": "USDT Lending Rate is above 5%",
|
|
1342
|
+
"description": "USDT Lending Rate is above 5%",
|
|
1343
|
+
"parameters": [
|
|
1344
|
+
{
|
|
1345
|
+
"key": "chainId",
|
|
1346
|
+
"value": 34443
|
|
1347
|
+
},
|
|
1348
|
+
{
|
|
1349
|
+
"key": "abiParams.asset",
|
|
1350
|
+
"value": "0xf0F161fDA2712DB8b566946122a5af183995e2eD"
|
|
1351
|
+
},
|
|
1352
|
+
{
|
|
1353
|
+
"key": "condition",
|
|
1354
|
+
"value": "gt"
|
|
1355
|
+
},
|
|
1356
|
+
{
|
|
1357
|
+
"key": "comparisonValue",
|
|
1358
|
+
"value": 5
|
|
1359
|
+
}
|
|
1360
|
+
]
|
|
1361
|
+
}
|
|
1362
|
+
],
|
|
1363
|
+
"blockId": 25,
|
|
1364
|
+
"image": "https://otomato-sdk-images.s3.eu-west-1.amazonaws.com/ironclad.png"
|
|
1365
|
+
},
|
|
1366
|
+
"BORROWING_RATES": {
|
|
1367
|
+
"name": "Borrowing rate",
|
|
1368
|
+
"description": "Get the borrowing rate of any asset on Ironclad",
|
|
1369
|
+
"type": 1,
|
|
1370
|
+
"prototype": "ironcladBorrowingRate",
|
|
1371
|
+
"method": "function getReserveData(address asset) external view returns ((uint256 data) configuration, uint128 liquidityIndex, uint128 variableBorrowIndex, uint128 currentLiquidityRate, uint128 currentVariableBorrowRate, uint128 currentStableBorrowRate, uint40 lastUpdateTimestamp, address aTokenAddress, address stableDebtTokenAddress, address variableDebtTokenAddress, address interestRateStrategyAddress, uint8 id)",
|
|
1372
|
+
"parameters": [
|
|
1373
|
+
{
|
|
1374
|
+
"key": "chainId",
|
|
1375
|
+
"type": "chainId",
|
|
1376
|
+
"description": "Chain ID of the network",
|
|
1377
|
+
"mandatory": true,
|
|
1378
|
+
"category": 0
|
|
1379
|
+
},
|
|
1380
|
+
{
|
|
1381
|
+
"key": "abiParams.asset",
|
|
1382
|
+
"type": "erc20",
|
|
1383
|
+
"description": "The token you want to fetch the borrow rate for",
|
|
1384
|
+
"mandatory": true,
|
|
1385
|
+
"enum": "\n (env) => {\n if (!env.parameters.chainId)\n throw new Error('You need to provide the chainId first');\n\n const availableLendingTokens = {\n \"8453\": [\n \"0x940181a94a35a4569e4529a3cdfb74e38fd98631\",\n \"0xcbb7c0000ab88b473b1f5afd9ef808440eed33bf\",\n \"0x2Ae3F1Ec7F1F5012CFEab0185bfc7aa3cf0DEc22\",\n \"0x50c5725949A6F0c72E6C4a641F24049A917DB0Cb\",\n \"0x4200000000000000000000000000000000000006\",\n \"0xd9aAEc86B65D86f6A7B5B1b0c42FFA531710b6CA\",\n \"0x833589fcd6edb6e08f4c7c32d4f71b54bda02913\"\n ],\n \"34443\": [\n \"0xd988097fb8612cc24eeC14542bC03424c656005f\",\n \"0xf0F161fDA2712DB8b566946122a5af183995e2eD\",\n \"0x4200000000000000000000000000000000000006\",\n \"0x2416092f143378750bb29b79eD961ab195CcEea5\",\n \"0x4200000000000000000000000000000000000006\",\n \"0xe7903B1F75C534Dd8159b313d92cDCfbC62cB3Cd\",\n \"0x59889b7021243dB5B1e065385F918316cD90D46c\",\n \"0x04C0599Ae5A44757c0af6F9eC3b93da8976c150A\",\n \"0xDfc7C877a950e49D2610114102175A06C2e3167a\"\n ]\n};\n return availableLendingTokens[env.parameters.chainId] || [];\n }",
|
|
1386
|
+
"category": 0
|
|
1387
|
+
},
|
|
1388
|
+
{
|
|
1389
|
+
"key": "condition",
|
|
1390
|
+
"type": "logic_operator",
|
|
1391
|
+
"description": "Logic operator used for the comparison: <, >, <=, >=, ==, ...",
|
|
1392
|
+
"mandatory": true,
|
|
1393
|
+
"category": 0
|
|
1394
|
+
},
|
|
1395
|
+
{
|
|
1396
|
+
"key": "comparisonValue",
|
|
1397
|
+
"type": "float",
|
|
1398
|
+
"description": "The value to compare to",
|
|
1399
|
+
"mandatory": true,
|
|
1400
|
+
"category": 0
|
|
1401
|
+
},
|
|
1402
|
+
],
|
|
1403
|
+
"output": {
|
|
1404
|
+
"borrowingRate": "float"
|
|
1405
|
+
},
|
|
1406
|
+
"examples": [
|
|
1407
|
+
{
|
|
1408
|
+
"name": "USDT Borrowing Rate is above 3%",
|
|
1409
|
+
"description": "USDT Borrowing Rate is above 3%",
|
|
1410
|
+
"parameters": [
|
|
1411
|
+
{
|
|
1412
|
+
"key": "chainId",
|
|
1413
|
+
"value": 34443
|
|
1414
|
+
},
|
|
1415
|
+
{
|
|
1416
|
+
"key": "abiParams.asset",
|
|
1417
|
+
"value": "0xf0F161fDA2712DB8b566946122a5af183995e2eD"
|
|
1418
|
+
},
|
|
1419
|
+
{
|
|
1420
|
+
"key": "condition",
|
|
1421
|
+
"value": "gt"
|
|
1422
|
+
},
|
|
1423
|
+
{
|
|
1424
|
+
"key": "comparisonValue",
|
|
1425
|
+
"value": 3
|
|
1426
|
+
}
|
|
1427
|
+
]
|
|
1428
|
+
}
|
|
1429
|
+
],
|
|
1430
|
+
"blockId": 26,
|
|
1431
|
+
"image": "https://otomato-sdk-images.s3.eu-west-1.amazonaws.com/ironclad.png"
|
|
1432
|
+
}
|
|
1433
|
+
}
|
|
1434
|
+
},
|
|
1435
|
+
"DEXES": {
|
|
1436
|
+
"ODOS": {
|
|
1437
|
+
"description": "Smart Order Routing across multiple blockchain protocols, 700+ Liquidity Sources and thousands of token pairs, delivering ultimate savings to users",
|
|
1438
|
+
"chains": [
|
|
1439
|
+
34443,
|
|
1440
|
+
1,
|
|
1441
|
+
8453
|
|
1442
|
+
],
|
|
1443
|
+
"image": "https://otomato-sdk-images.s3.eu-west-1.amazonaws.com/odos.png",
|
|
1444
|
+
"SWAP": {
|
|
1445
|
+
"name": "Odos Swap",
|
|
1446
|
+
"description": "Swap on Odos",
|
|
1447
|
+
"type": 0,
|
|
1448
|
+
"output": {
|
|
1449
|
+
"sender": "address",
|
|
1450
|
+
"inputAmount": "float",
|
|
1451
|
+
"inputToken": "erc20",
|
|
1452
|
+
"amountOut": "float",
|
|
1453
|
+
"outputToken": "erc20",
|
|
1454
|
+
"exchangeRate": "float",
|
|
1455
|
+
"transactionHash": "string"
|
|
1456
|
+
},
|
|
1457
|
+
"frontendHelpers": {
|
|
1458
|
+
"output": {
|
|
1459
|
+
"inputAmount": {
|
|
1460
|
+
"formatAmount": false,
|
|
1461
|
+
"erc20Token": {
|
|
1462
|
+
"contractAddress": "{{output.inputToken}}",
|
|
1463
|
+
"chainId": "{{parameters.chainId}}"
|
|
1464
|
+
}
|
|
1465
|
+
},
|
|
1466
|
+
"amountOut": {
|
|
1467
|
+
"formatAmount": false,
|
|
1468
|
+
"erc20Token": {
|
|
1469
|
+
"contractAddress": "{{output.outputToken}}",
|
|
1470
|
+
"chainId": "{{parameters.chainId}}"
|
|
1471
|
+
}
|
|
1472
|
+
}
|
|
1473
|
+
}
|
|
1474
|
+
},
|
|
1475
|
+
"parameters": [
|
|
1476
|
+
{
|
|
1477
|
+
"key": "chainId",
|
|
1478
|
+
"type": "chainId",
|
|
1479
|
+
"description": "Chain ID of the EVM blockchain",
|
|
1480
|
+
"mandatory": true,
|
|
1481
|
+
"category": 0
|
|
1482
|
+
},
|
|
1483
|
+
{
|
|
1484
|
+
"key": "abiParams.sender",
|
|
1485
|
+
"type": "address",
|
|
1486
|
+
"description": "Sender address",
|
|
1487
|
+
"category": 1
|
|
1488
|
+
},
|
|
1489
|
+
{
|
|
1490
|
+
"key": "abiParams.inputAmount",
|
|
1491
|
+
"type": "uint256",
|
|
1492
|
+
"description": "Input amount",
|
|
1493
|
+
"category": 1
|
|
1494
|
+
},
|
|
1495
|
+
{
|
|
1496
|
+
"key": "abiParams.inputToken",
|
|
1497
|
+
"type": "erc20",
|
|
1498
|
+
"description": "Input token address",
|
|
1499
|
+
"category": 0
|
|
1500
|
+
},
|
|
1501
|
+
{
|
|
1502
|
+
"key": "abiParams.amountOut",
|
|
1503
|
+
"type": "uint256",
|
|
1504
|
+
"description": "Output amount",
|
|
1505
|
+
"category": 1
|
|
1506
|
+
},
|
|
1507
|
+
{
|
|
1508
|
+
"key": "abiParams.outputToken",
|
|
1509
|
+
"type": "erc20",
|
|
1510
|
+
"description": "Output token address",
|
|
1511
|
+
"category": 0
|
|
1512
|
+
},
|
|
1513
|
+
],
|
|
1514
|
+
"examples": [
|
|
1515
|
+
{
|
|
1516
|
+
"name": "Any Odos swap",
|
|
1517
|
+
"description": "Gets triggered when someone does a swap on Mode using Odos",
|
|
1518
|
+
"parameters": [
|
|
1519
|
+
{
|
|
1520
|
+
"key": "chainId",
|
|
1521
|
+
"value": 34443
|
|
1522
|
+
}
|
|
1523
|
+
]
|
|
1524
|
+
},
|
|
1525
|
+
{
|
|
1526
|
+
"name": "Sell ETH",
|
|
1527
|
+
"description": "Gets triggered when someone sells ETH on Mode using Odos",
|
|
1528
|
+
"parameters": [
|
|
1529
|
+
{
|
|
1530
|
+
"key": "chainId",
|
|
1531
|
+
"value": 34443
|
|
1532
|
+
},
|
|
1533
|
+
{
|
|
1534
|
+
"key": "abiParams.inputToken",
|
|
1535
|
+
"value": "0x4200000000000000000000000000000000000006"
|
|
1536
|
+
}
|
|
1537
|
+
]
|
|
1538
|
+
}
|
|
1539
|
+
],
|
|
1540
|
+
"blockId": 4,
|
|
1541
|
+
"image": "https://otomato-sdk-images.s3.eu-west-1.amazonaws.com/odos.png"
|
|
1542
|
+
}
|
|
1543
|
+
},
|
|
1544
|
+
"UNISWAP": {
|
|
1545
|
+
"description": "Monitors events on Uniswap pools",
|
|
1546
|
+
"chains": [
|
|
1547
|
+
8453,
|
|
1548
|
+
0
|
|
1549
|
+
],
|
|
1550
|
+
"image": "https://otomato-sdk-images.s3.eu-west-1.amazonaws.com/uniswap.jpg",
|
|
1551
|
+
"V3_SWAP": {
|
|
1552
|
+
"name": "Track swaps on Uniswap V3",
|
|
1553
|
+
"description": "Triggers every time there is a swap on a Uniswap V3 pool.",
|
|
1554
|
+
"type": 0,
|
|
1555
|
+
"output": {
|
|
1556
|
+
"sender": "address",
|
|
1557
|
+
"recipient": "address",
|
|
1558
|
+
"amount0": "int256",
|
|
1559
|
+
"amount1": "int256",
|
|
1560
|
+
"sqrtPriceX96": "uint160",
|
|
1561
|
+
"liquidity": "uint128",
|
|
1562
|
+
"tick": "int24",
|
|
1563
|
+
"transactionHash": "string"
|
|
1564
|
+
},
|
|
1565
|
+
"parameters": [
|
|
1566
|
+
{
|
|
1567
|
+
"key": "chainId",
|
|
1568
|
+
"type": "chainId",
|
|
1569
|
+
"description": "The network to monitor swaps on (e.g., Base, Ethereum).",
|
|
1570
|
+
"mandatory": true,
|
|
1571
|
+
"category": 0
|
|
1572
|
+
},
|
|
1573
|
+
{
|
|
1574
|
+
"key": "contractAddress",
|
|
1575
|
+
"type": "address",
|
|
1576
|
+
"description": "The address of the Uniswap V3 pool to monitor.",
|
|
1577
|
+
"mandatory": true,
|
|
1578
|
+
"category": 0
|
|
1579
|
+
},
|
|
1580
|
+
{
|
|
1581
|
+
"key": "abiParams.amount0",
|
|
1582
|
+
"type": "int256",
|
|
1583
|
+
"description": "Filter by the amount of token0 swapped (exact amount).",
|
|
1584
|
+
"category": 1
|
|
1585
|
+
},
|
|
1586
|
+
{
|
|
1587
|
+
"key": "abiParams.amount1",
|
|
1588
|
+
"type": "int256",
|
|
1589
|
+
"description": "Filter by the amount of token1 swapped (exact amount).",
|
|
1590
|
+
"category": 1
|
|
1591
|
+
},
|
|
1592
|
+
{
|
|
1593
|
+
"key": "abiParams.sender",
|
|
1594
|
+
"type": "address",
|
|
1595
|
+
"description": "Filter by the address initiating the swap.",
|
|
1596
|
+
"category": 1
|
|
1597
|
+
},
|
|
1598
|
+
{
|
|
1599
|
+
"key": "abiParams.recipient",
|
|
1600
|
+
"type": "address",
|
|
1601
|
+
"description": "Filter by the address receiving the swapped tokens.",
|
|
1602
|
+
"category": 1
|
|
1603
|
+
},
|
|
1604
|
+
],
|
|
1605
|
+
"frontendHelpers": {
|
|
1606
|
+
"output": {
|
|
1607
|
+
"amount0": {
|
|
1608
|
+
"erc20Token": {
|
|
1609
|
+
"contractAddress": "{{parameters.contractAddress}}",
|
|
1610
|
+
"chainId": "{{parameters.chainId}}"
|
|
1611
|
+
}
|
|
1612
|
+
},
|
|
1613
|
+
"amount1": {
|
|
1614
|
+
"erc20Token": {
|
|
1615
|
+
"contractAddress": "{{parameters.contractAddress}}",
|
|
1616
|
+
"chainId": "{{parameters.chainId}}"
|
|
1617
|
+
}
|
|
1618
|
+
}
|
|
1619
|
+
}
|
|
1620
|
+
},
|
|
1621
|
+
"examples": [
|
|
1622
|
+
{
|
|
1623
|
+
"name": "Monitor all swaps",
|
|
1624
|
+
"description": "Triggers whenever a swap occurs on a specific Uniswap V3 pool (ETH/FAI 1%).",
|
|
1625
|
+
"parameters": [
|
|
1626
|
+
{
|
|
1627
|
+
"key": "chainId",
|
|
1628
|
+
"value": 8453
|
|
1629
|
+
},
|
|
1630
|
+
{
|
|
1631
|
+
"key": "contractAddress",
|
|
1632
|
+
"value": "0x68B27E9066d3aAdC6078E17C8611b37868F96A1D"
|
|
1633
|
+
}
|
|
1634
|
+
]
|
|
1635
|
+
}
|
|
1636
|
+
],
|
|
1637
|
+
"blockId": 28,
|
|
1638
|
+
"image": "https://otomato-sdk-images.s3.eu-west-1.amazonaws.com/uniswap.jpg"
|
|
1639
|
+
},
|
|
1640
|
+
"V2_SWAP": {
|
|
1641
|
+
"name": "Track swaps on Uniswap V2",
|
|
1642
|
+
"description": "Triggers every time there is a swap on a Uniswap V2 pool.",
|
|
1643
|
+
"type": 0,
|
|
1644
|
+
"output": {
|
|
1645
|
+
"sender": "address",
|
|
1646
|
+
"amount0In": "uint256",
|
|
1647
|
+
"amount1In": "uint256",
|
|
1648
|
+
"amount0Out": "uint256",
|
|
1649
|
+
"amount1Out": "uint256",
|
|
1650
|
+
"to": "address",
|
|
1651
|
+
"transactionHash": "string"
|
|
1652
|
+
},
|
|
1653
|
+
"parameters": [
|
|
1654
|
+
{
|
|
1655
|
+
"key": "chainId",
|
|
1656
|
+
"type": "chainId",
|
|
1657
|
+
"description": "The network to monitor swaps on (e.g., Base, Ethereum).",
|
|
1658
|
+
"mandatory": true,
|
|
1659
|
+
"category": 0
|
|
1660
|
+
},
|
|
1661
|
+
{
|
|
1662
|
+
"key": "contractAddress",
|
|
1663
|
+
"type": "address",
|
|
1664
|
+
"description": "The address of the Uniswap V2 pool to monitor.",
|
|
1665
|
+
"mandatory": true,
|
|
1666
|
+
"category": 0
|
|
1667
|
+
},
|
|
1668
|
+
{
|
|
1669
|
+
"key": "abiParams.amount0In",
|
|
1670
|
+
"type": "uint256",
|
|
1671
|
+
"description": "Filter by the amount of token0 input (exact amount).",
|
|
1672
|
+
"category": 1
|
|
1673
|
+
},
|
|
1674
|
+
{
|
|
1675
|
+
"key": "abiParams.amount1In",
|
|
1676
|
+
"type": "uint256",
|
|
1677
|
+
"description": "Filter by the amount of token1 input (exact amount).",
|
|
1678
|
+
"category": 1
|
|
1679
|
+
},
|
|
1680
|
+
{
|
|
1681
|
+
"key": "abiParams.amount0Out",
|
|
1682
|
+
"type": "uint256",
|
|
1683
|
+
"description": "Filter by the amount of token0 output (exact amount).",
|
|
1684
|
+
"category": 1
|
|
1685
|
+
},
|
|
1686
|
+
{
|
|
1687
|
+
"key": "abiParams.amount1Out",
|
|
1688
|
+
"type": "uint256",
|
|
1689
|
+
"description": "Filter by the amount of token1 output (exact amount).",
|
|
1690
|
+
"category": 1
|
|
1691
|
+
},
|
|
1692
|
+
{
|
|
1693
|
+
"key": "abiParams.sender",
|
|
1694
|
+
"type": "address",
|
|
1695
|
+
"description": "Filter by the address initiating the swap.",
|
|
1696
|
+
"category": 1
|
|
1697
|
+
},
|
|
1698
|
+
{
|
|
1699
|
+
"key": "abiParams.to",
|
|
1700
|
+
"type": "address",
|
|
1701
|
+
"description": "Filter by the address receiving the swapped tokens.",
|
|
1702
|
+
"category": 1
|
|
1703
|
+
},
|
|
1704
|
+
],
|
|
1705
|
+
"frontendHelpers": {
|
|
1706
|
+
"output": {
|
|
1707
|
+
"amount0In": {
|
|
1708
|
+
"erc20Token": {
|
|
1709
|
+
"contractAddress": "{{parameters.contractAddress}}",
|
|
1710
|
+
"chainId": "{{parameters.chainId}}"
|
|
1711
|
+
}
|
|
1712
|
+
},
|
|
1713
|
+
"amount1In": {
|
|
1714
|
+
"erc20Token": {
|
|
1715
|
+
"contractAddress": "{{parameters.contractAddress}}",
|
|
1716
|
+
"chainId": "{{parameters.chainId}}"
|
|
1717
|
+
}
|
|
1718
|
+
}
|
|
1719
|
+
}
|
|
1720
|
+
},
|
|
1721
|
+
"examples": [
|
|
1722
|
+
{
|
|
1723
|
+
"name": "Monitor all swaps",
|
|
1724
|
+
"description": "Triggers whenever a swap occurs on a specific Uniswap V2 pool (ETH/USDC 0.3%)",
|
|
1725
|
+
"parameters": [
|
|
1726
|
+
{
|
|
1727
|
+
"key": "chainId",
|
|
1728
|
+
"value": 8453
|
|
1729
|
+
},
|
|
1730
|
+
{
|
|
1731
|
+
"key": "contractAddress",
|
|
1732
|
+
"value": "0x88A43bbDF9D098eEC7bCEda4e2494615dfD9bB9C"
|
|
1733
|
+
}
|
|
1734
|
+
]
|
|
1735
|
+
}
|
|
1736
|
+
],
|
|
1737
|
+
"blockId": 33,
|
|
1738
|
+
"image": "https://otomato-sdk-images.s3.eu-west-1.amazonaws.com/uniswap.jpg"
|
|
1739
|
+
}
|
|
1740
|
+
},
|
|
1741
|
+
"AERODROME": {
|
|
1742
|
+
"description": "Monitors swaps on Aerodrome pools",
|
|
1743
|
+
"chains": [
|
|
1744
|
+
8453
|
|
1745
|
+
],
|
|
1746
|
+
"image": "https://otomato-sdk-images.s3.eu-west-1.amazonaws.com/aerodrome.jpg",
|
|
1747
|
+
"SWAP_IN_CONCENTRATED_POOL": {
|
|
1748
|
+
"name": "Swap in Concentrated Pool",
|
|
1749
|
+
"description": "Triggers every time there is a swap in an Aerodrome concentrated liquidity pool.",
|
|
1750
|
+
"type": 0,
|
|
1751
|
+
"output": {
|
|
1752
|
+
"sender": "address",
|
|
1753
|
+
"recipient": "address",
|
|
1754
|
+
"amount0": "int256",
|
|
1755
|
+
"amount1": "int256",
|
|
1756
|
+
"sqrtPriceX96": "uint160",
|
|
1757
|
+
"liquidity": "uint128",
|
|
1758
|
+
"tick": "int24",
|
|
1759
|
+
"transactionHash": "string"
|
|
1760
|
+
},
|
|
1761
|
+
"parameters": [
|
|
1762
|
+
{
|
|
1763
|
+
"key": "chainId",
|
|
1764
|
+
"type": "chainId",
|
|
1765
|
+
"description": "The network to monitor swaps on (Base).",
|
|
1766
|
+
"mandatory": true,
|
|
1767
|
+
"category": 0
|
|
1768
|
+
},
|
|
1769
|
+
{
|
|
1770
|
+
"key": "contractAddress",
|
|
1771
|
+
"type": "address",
|
|
1772
|
+
"description": "The address of the liquidity pool.",
|
|
1773
|
+
"mandatory": true,
|
|
1774
|
+
"category": 0
|
|
1775
|
+
},
|
|
1776
|
+
{
|
|
1777
|
+
"key": "abiParams.amount0",
|
|
1778
|
+
"type": "int256",
|
|
1779
|
+
"description": "Filter by the amount of token0 swapped (exact amount)",
|
|
1780
|
+
"category": 1
|
|
1781
|
+
},
|
|
1782
|
+
{
|
|
1783
|
+
"key": "abiParams.amount1",
|
|
1784
|
+
"type": "int256",
|
|
1785
|
+
"description": "Filter by the amount of token1 swapped (exact amount)",
|
|
1786
|
+
"category": 1
|
|
1787
|
+
},
|
|
1788
|
+
{
|
|
1789
|
+
"key": "abiParams.sender",
|
|
1790
|
+
"type": "address",
|
|
1791
|
+
"description": "Filter by the address initiating the swap.",
|
|
1792
|
+
"category": 1
|
|
1793
|
+
},
|
|
1794
|
+
{
|
|
1795
|
+
"key": "abiParams.recipient",
|
|
1796
|
+
"type": "address",
|
|
1797
|
+
"description": "Filter by the address receiving the swapped tokens.",
|
|
1798
|
+
"category": 1
|
|
1799
|
+
},
|
|
1800
|
+
],
|
|
1801
|
+
"frontendHelpers": {
|
|
1802
|
+
"output": {
|
|
1803
|
+
"amount0": {
|
|
1804
|
+
"erc20Token": {
|
|
1805
|
+
"contractAddress": "{{parameters.contractAddress}}",
|
|
1806
|
+
"chainId": "{{parameters.chainId}}"
|
|
1807
|
+
}
|
|
1808
|
+
},
|
|
1809
|
+
"amount1": {
|
|
1810
|
+
"erc20Token": {
|
|
1811
|
+
"contractAddress": "{{parameters.contractAddress}}",
|
|
1812
|
+
"chainId": "{{parameters.chainId}}"
|
|
1813
|
+
}
|
|
1814
|
+
}
|
|
1815
|
+
}
|
|
1816
|
+
},
|
|
1817
|
+
"examples": [
|
|
1818
|
+
{
|
|
1819
|
+
"name": "Monitor all swaps in concentrated pool",
|
|
1820
|
+
"description": "Triggers whenever a swap occurs in an Aerodrome concentrated liquidity pool (WETH/USDC 0.04%)",
|
|
1821
|
+
"parameters": [
|
|
1822
|
+
{
|
|
1823
|
+
"key": "chainId",
|
|
1824
|
+
"value": 8453
|
|
1825
|
+
},
|
|
1826
|
+
{
|
|
1827
|
+
"key": "contractAddress",
|
|
1828
|
+
"value": "0xb2cc224c1c9feE385f8ad6a55b4d94E92359DC59"
|
|
1829
|
+
}
|
|
1830
|
+
]
|
|
1831
|
+
}
|
|
1832
|
+
],
|
|
1833
|
+
"blockId": 29,
|
|
1834
|
+
"image": "https://otomato-sdk-images.s3.eu-west-1.amazonaws.com/aerodrome.jpg"
|
|
1835
|
+
},
|
|
1836
|
+
"SWAP_IN_BASIC_POOL": {
|
|
1837
|
+
"name": "Swap in Basic Pool",
|
|
1838
|
+
"description": "Triggers every time there is a swap in an Aerodrome basic liquidity pool.",
|
|
1839
|
+
"type": 0,
|
|
1840
|
+
"output": {
|
|
1841
|
+
"sender": "address",
|
|
1842
|
+
"to": "address",
|
|
1843
|
+
"amount0In": "uint256",
|
|
1844
|
+
"amount1In": "uint256",
|
|
1845
|
+
"amount0Out": "uint256",
|
|
1846
|
+
"amount1Out": "uint256",
|
|
1847
|
+
"transactionHash": "string"
|
|
1848
|
+
},
|
|
1849
|
+
"parameters": [
|
|
1850
|
+
{
|
|
1851
|
+
"key": "chainId",
|
|
1852
|
+
"type": "chainId",
|
|
1853
|
+
"description": "The network to monitor swaps on (Base).",
|
|
1854
|
+
"mandatory": true,
|
|
1855
|
+
"category": 0
|
|
1856
|
+
},
|
|
1857
|
+
{
|
|
1858
|
+
"key": "contractAddress",
|
|
1859
|
+
"type": "address",
|
|
1860
|
+
"description": "The address of the liquidity pool.",
|
|
1861
|
+
"mandatory": true,
|
|
1862
|
+
"category": 0
|
|
1863
|
+
},
|
|
1864
|
+
{
|
|
1865
|
+
"key": "abiParams.amount0In",
|
|
1866
|
+
"type": "uint256",
|
|
1867
|
+
"description": "Filter by the amount of token0 input (exact amount)",
|
|
1868
|
+
"category": 1
|
|
1869
|
+
},
|
|
1870
|
+
{
|
|
1871
|
+
"key": "abiParams.amount1In",
|
|
1872
|
+
"type": "uint256",
|
|
1873
|
+
"description": "Filter by the amount of token1 input (exact amount)",
|
|
1874
|
+
"category": 1
|
|
1875
|
+
},
|
|
1876
|
+
{
|
|
1877
|
+
"key": "abiParams.amount0Out",
|
|
1878
|
+
"type": "uint256",
|
|
1879
|
+
"description": "Filter by the amount of token0 output (exact amount)",
|
|
1880
|
+
"category": 1
|
|
1881
|
+
},
|
|
1882
|
+
{
|
|
1883
|
+
"key": "abiParams.amount1Out",
|
|
1884
|
+
"type": "uint256",
|
|
1885
|
+
"description": "Filter by the amount of token1 output (exact amount)",
|
|
1886
|
+
"category": 1
|
|
1887
|
+
},
|
|
1888
|
+
],
|
|
1889
|
+
"frontendHelpers": {
|
|
1890
|
+
"output": {
|
|
1891
|
+
"amount0In": {
|
|
1892
|
+
"erc20Token": {
|
|
1893
|
+
"contractAddress": "{{parameters.contractAddress}}",
|
|
1894
|
+
"chainId": "{{parameters.chainId}}"
|
|
1895
|
+
}
|
|
1896
|
+
},
|
|
1897
|
+
"amount1In": {
|
|
1898
|
+
"erc20Token": {
|
|
1899
|
+
"contractAddress": "{{parameters.contractAddress}}",
|
|
1900
|
+
"chainId": "{{parameters.chainId}}"
|
|
1901
|
+
}
|
|
1902
|
+
}
|
|
1903
|
+
}
|
|
1904
|
+
},
|
|
1905
|
+
"examples": [
|
|
1906
|
+
{
|
|
1907
|
+
"name": "Monitor all swaps in basic pool",
|
|
1908
|
+
"description": "Triggers whenever a swap occurs in an Aerodrome basic liquidity pool (USDC/AERO 0.3%)",
|
|
1909
|
+
"parameters": [
|
|
1910
|
+
{
|
|
1911
|
+
"key": "chainId",
|
|
1912
|
+
"value": 8453
|
|
1913
|
+
},
|
|
1914
|
+
{
|
|
1915
|
+
"key": "contractAddress",
|
|
1916
|
+
"value": "0x6cDcb1C4A4D1C3C6d054b27AC5B77e89eAFb971d"
|
|
1917
|
+
}
|
|
1918
|
+
]
|
|
1919
|
+
}
|
|
1920
|
+
],
|
|
1921
|
+
"blockId": 30,
|
|
1922
|
+
"image": "https://otomato-sdk-images.s3.eu-west-1.amazonaws.com/aerodrome.jpg"
|
|
1923
|
+
}
|
|
1924
|
+
},
|
|
1925
|
+
"VELODROME": {
|
|
1926
|
+
"description": "Monitors swaps on Velodrome pools",
|
|
1927
|
+
"chains": [
|
|
1928
|
+
8453
|
|
1929
|
+
],
|
|
1930
|
+
"image": "https://otomato-sdk-images.s3.eu-west-1.amazonaws.com/velodrome.jpg",
|
|
1931
|
+
"SWAP_IN_CONCENTRATED_POOL": {
|
|
1932
|
+
"name": "Swap in Concentrated Pool",
|
|
1933
|
+
"description": "Triggers every time there is a swap in a Velodrome concentrated liquidity pool.",
|
|
1934
|
+
"type": 0,
|
|
1935
|
+
"output": {
|
|
1936
|
+
"sender": "address",
|
|
1937
|
+
"recipient": "address",
|
|
1938
|
+
"amount0": "int256",
|
|
1939
|
+
"amount1": "int256",
|
|
1940
|
+
"sqrtPriceX96": "uint160",
|
|
1941
|
+
"liquidity": "uint128",
|
|
1942
|
+
"tick": "int24",
|
|
1943
|
+
"transactionHash": "string"
|
|
1944
|
+
},
|
|
1945
|
+
"parameters": [
|
|
1946
|
+
{
|
|
1947
|
+
"key": "chainId",
|
|
1948
|
+
"type": "chainId",
|
|
1949
|
+
"description": "The network to monitor swaps on (Base).",
|
|
1950
|
+
"mandatory": true,
|
|
1951
|
+
"category": 0
|
|
1952
|
+
},
|
|
1953
|
+
{
|
|
1954
|
+
"key": "contractAddress",
|
|
1955
|
+
"type": "address",
|
|
1956
|
+
"description": "The address of the liquidity pool.",
|
|
1957
|
+
"mandatory": true,
|
|
1958
|
+
"category": 0
|
|
1959
|
+
},
|
|
1960
|
+
{
|
|
1961
|
+
"key": "abiParams.amount0",
|
|
1962
|
+
"type": "int256",
|
|
1963
|
+
"description": "Filter by the amount of token0 swapped (exact amount).",
|
|
1964
|
+
"category": 1
|
|
1965
|
+
},
|
|
1966
|
+
{
|
|
1967
|
+
"key": "abiParams.amount1",
|
|
1968
|
+
"type": "int256",
|
|
1969
|
+
"description": "Filter by the amount of token1 swapped (exact amount).",
|
|
1970
|
+
"category": 1
|
|
1971
|
+
},
|
|
1972
|
+
{
|
|
1973
|
+
"key": "abiParams.sender",
|
|
1974
|
+
"type": "address",
|
|
1975
|
+
"description": "Filter by the address initiating the swap.",
|
|
1976
|
+
"category": 1
|
|
1977
|
+
},
|
|
1978
|
+
{
|
|
1979
|
+
"key": "abiParams.recipient",
|
|
1980
|
+
"type": "address",
|
|
1981
|
+
"description": "Filter by the address receiving the swapped tokens.",
|
|
1982
|
+
"category": 1
|
|
1983
|
+
},
|
|
1984
|
+
],
|
|
1985
|
+
"frontendHelpers": {
|
|
1986
|
+
"output": {
|
|
1987
|
+
"amount0": {
|
|
1988
|
+
"erc20Token": {
|
|
1989
|
+
"contractAddress": "{{parameters.contractAddress}}",
|
|
1990
|
+
"chainId": "{{parameters.chainId}}"
|
|
1991
|
+
}
|
|
1992
|
+
},
|
|
1993
|
+
"amount1": {
|
|
1994
|
+
"erc20Token": {
|
|
1995
|
+
"contractAddress": "{{parameters.contractAddress}}",
|
|
1996
|
+
"chainId": "{{parameters.chainId}}"
|
|
1997
|
+
}
|
|
1998
|
+
}
|
|
1999
|
+
}
|
|
2000
|
+
},
|
|
2001
|
+
"examples": [
|
|
2002
|
+
{
|
|
2003
|
+
"name": "Monitor all swaps in concentrated pool",
|
|
2004
|
+
"description": "Triggers whenever a swap occurs in a Velodrome concentrated liquidity pool (WETH/MODE 0.3%).",
|
|
2005
|
+
"parameters": [
|
|
2006
|
+
{
|
|
2007
|
+
"key": "chainId",
|
|
2008
|
+
"value": 8453
|
|
2009
|
+
},
|
|
2010
|
+
{
|
|
2011
|
+
"key": "contractAddress",
|
|
2012
|
+
"value": "0x1E41CDE26b30646bb3DBBea48A63708b00470c1c"
|
|
2013
|
+
}
|
|
2014
|
+
]
|
|
2015
|
+
}
|
|
2016
|
+
],
|
|
2017
|
+
"blockId": 31,
|
|
2018
|
+
"image": "https://otomato-sdk-images.s3.eu-west-1.amazonaws.com/velodrome.jpg"
|
|
2019
|
+
},
|
|
2020
|
+
"SWAP_IN_BASIC_POOL": {
|
|
2021
|
+
"name": "Swap in Basic Pool",
|
|
2022
|
+
"description": "Triggers every time there is a swap in a Velodrome basic liquidity pool.",
|
|
2023
|
+
"type": 0,
|
|
2024
|
+
"output": {
|
|
2025
|
+
"sender": "address",
|
|
2026
|
+
"to": "address",
|
|
2027
|
+
"amount0In": "uint256",
|
|
2028
|
+
"amount1In": "uint256",
|
|
2029
|
+
"amount0Out": "uint256",
|
|
2030
|
+
"amount1Out": "uint256",
|
|
2031
|
+
"transactionHash": "string"
|
|
2032
|
+
},
|
|
2033
|
+
"parameters": [
|
|
2034
|
+
{
|
|
2035
|
+
"key": "chainId",
|
|
2036
|
+
"type": "chainId",
|
|
2037
|
+
"description": "The network to monitor swaps on (Base).",
|
|
2038
|
+
"mandatory": true,
|
|
2039
|
+
"category": 0
|
|
2040
|
+
},
|
|
2041
|
+
{
|
|
2042
|
+
"key": "contractAddress",
|
|
2043
|
+
"type": "address",
|
|
2044
|
+
"description": "The address of the liquidity pool.",
|
|
2045
|
+
"mandatory": true,
|
|
2046
|
+
"category": 0
|
|
2047
|
+
},
|
|
2048
|
+
{
|
|
2049
|
+
"key": "abiParams.amount0In",
|
|
2050
|
+
"type": "uint256",
|
|
2051
|
+
"description": "Filter by the amount of token0 input (exact amount).",
|
|
2052
|
+
"category": 1
|
|
2053
|
+
},
|
|
2054
|
+
{
|
|
2055
|
+
"key": "abiParams.amount1In",
|
|
2056
|
+
"type": "uint256",
|
|
2057
|
+
"description": "Filter by the amount of token1 input (exact amount).",
|
|
2058
|
+
"category": 1
|
|
2059
|
+
},
|
|
2060
|
+
{
|
|
2061
|
+
"key": "abiParams.amount0Out",
|
|
2062
|
+
"type": "uint256",
|
|
2063
|
+
"description": "Filter by the amount of token0 output (exact amount).",
|
|
2064
|
+
"category": 1
|
|
2065
|
+
},
|
|
2066
|
+
{
|
|
2067
|
+
"key": "abiParams.amount1Out",
|
|
2068
|
+
"type": "uint256",
|
|
2069
|
+
"description": "Filter by the amount of token1 output (exact amount).",
|
|
2070
|
+
"category": 1
|
|
2071
|
+
},
|
|
2072
|
+
],
|
|
2073
|
+
"frontendHelpers": {
|
|
2074
|
+
"output": {
|
|
2075
|
+
"amount0In": {
|
|
2076
|
+
"erc20Token": {
|
|
2077
|
+
"contractAddress": "{{parameters.contractAddress}}",
|
|
2078
|
+
"chainId": "{{parameters.chainId}}"
|
|
2079
|
+
}
|
|
2080
|
+
},
|
|
2081
|
+
"amount1In": {
|
|
2082
|
+
"erc20Token": {
|
|
2083
|
+
"contractAddress": "{{parameters.contractAddress}}",
|
|
2084
|
+
"chainId": "{{parameters.chainId}}"
|
|
2085
|
+
}
|
|
2086
|
+
}
|
|
2087
|
+
}
|
|
2088
|
+
},
|
|
2089
|
+
"examples": [
|
|
2090
|
+
{
|
|
2091
|
+
"name": "Monitor all swaps in basic pool",
|
|
2092
|
+
"description": "Triggers whenever a swap occurs in a Velodrome basic liquidity pool (WETH/MODE 0.3%).",
|
|
2093
|
+
"parameters": [
|
|
2094
|
+
{
|
|
2095
|
+
"key": "chainId",
|
|
2096
|
+
"value": 8453
|
|
2097
|
+
},
|
|
2098
|
+
{
|
|
2099
|
+
"key": "contractAddress",
|
|
2100
|
+
"value": "0x0fba984c97539B3fb49ACDA6973288D0EFA903DB"
|
|
2101
|
+
}
|
|
2102
|
+
]
|
|
2103
|
+
}
|
|
2104
|
+
],
|
|
2105
|
+
"blockId": 32,
|
|
2106
|
+
"image": "https://otomato-sdk-images.s3.eu-west-1.amazonaws.com/velodrome.jpg"
|
|
2107
|
+
}
|
|
2108
|
+
}
|
|
2109
|
+
},
|
|
2110
|
+
"SOCIALS": {
|
|
2111
|
+
"MODE_NAME_SERVICE": {
|
|
2112
|
+
"description": "Next generation of Mode Mainnet Domains",
|
|
2113
|
+
"chains": [
|
|
2114
|
+
34443
|
|
2115
|
+
],
|
|
2116
|
+
"image": "https://otomato-sdk-images.s3.eu-west-1.amazonaws.com/modens.png",
|
|
2117
|
+
"NAME_REGISTERED": {
|
|
2118
|
+
"name": "Name Registered",
|
|
2119
|
+
"description": "Name registered in Mode Name Service",
|
|
2120
|
+
"type": 0,
|
|
2121
|
+
"contractAddress": "0x2aD86eeEC513AC16804bb05310214C3Fd496835B",
|
|
2122
|
+
"output": {
|
|
2123
|
+
"id": "uint256",
|
|
2124
|
+
"owner": "address",
|
|
2125
|
+
"expires": "uint256",
|
|
2126
|
+
"transactionHash": "string"
|
|
2127
|
+
},
|
|
2128
|
+
"parameters": [
|
|
2129
|
+
{
|
|
2130
|
+
"key": "abiParams.id",
|
|
2131
|
+
"type": "uint256",
|
|
2132
|
+
"description": "ID of the name registered",
|
|
2133
|
+
"category": 1
|
|
2134
|
+
},
|
|
2135
|
+
{
|
|
2136
|
+
"key": "abiParams.owner",
|
|
2137
|
+
"type": "address",
|
|
2138
|
+
"description": "Owner address",
|
|
2139
|
+
"category": 1
|
|
2140
|
+
},
|
|
2141
|
+
{
|
|
2142
|
+
"key": "abiParams.expires",
|
|
2143
|
+
"type": "uint256",
|
|
2144
|
+
"description": "Expiration time",
|
|
2145
|
+
"category": 1
|
|
2146
|
+
},
|
|
2147
|
+
],
|
|
2148
|
+
"examples": [],
|
|
2149
|
+
"blockId": 3,
|
|
2150
|
+
"image": "https://otomato-sdk-images.s3.eu-west-1.amazonaws.com/modens.png"
|
|
2151
|
+
}
|
|
2152
|
+
},
|
|
2153
|
+
"FEAR_AND_GREED": {
|
|
2154
|
+
"description": "Fetches the Fear and Greed Index",
|
|
2155
|
+
"tags": {},
|
|
2156
|
+
"image": "https://otomato-sdk-images.s3.eu-west-1.amazonaws.com/fearAndGreed.png",
|
|
2157
|
+
"GET_FEAR_AND_GREED_INDEX": {
|
|
2158
|
+
"name": "Fear and Greed Index",
|
|
2159
|
+
"description": "Fetches the Fear and Greed Index from the specified API and processes the result.",
|
|
2160
|
+
"prototype": "btcFearAndGreed",
|
|
2161
|
+
"type": 3,
|
|
2162
|
+
"output": {
|
|
2163
|
+
"value": "integer"
|
|
2164
|
+
},
|
|
2165
|
+
"parameters": [
|
|
2166
|
+
{
|
|
2167
|
+
"key": "condition",
|
|
2168
|
+
"type": "logic_operator",
|
|
2169
|
+
"description": "Logic operator used for the comparison: <, >, <=, >=, ==, ...",
|
|
2170
|
+
"mandatory": true,
|
|
2171
|
+
"category": 0
|
|
2172
|
+
},
|
|
2173
|
+
{
|
|
2174
|
+
"key": "comparisonValue",
|
|
2175
|
+
"type": "integer",
|
|
2176
|
+
"description": "The value to compare to",
|
|
2177
|
+
"mandatory": true,
|
|
2178
|
+
"category": 0
|
|
2179
|
+
},
|
|
2180
|
+
],
|
|
2181
|
+
"examples": [
|
|
2182
|
+
{
|
|
2183
|
+
"name": "Market in extreme fear",
|
|
2184
|
+
"description": "Gets triggered when the index is below 20",
|
|
2185
|
+
"parameters": [
|
|
2186
|
+
{
|
|
2187
|
+
"key": "condition",
|
|
2188
|
+
"value": "lte"
|
|
2189
|
+
},
|
|
2190
|
+
{
|
|
2191
|
+
"key": "comparisonValue",
|
|
2192
|
+
"value": 20
|
|
2193
|
+
}
|
|
2194
|
+
]
|
|
2195
|
+
},
|
|
2196
|
+
{
|
|
2197
|
+
"name": "Market in greed",
|
|
2198
|
+
"description": "Gets triggered when the index is above 65",
|
|
2199
|
+
"parameters": [
|
|
2200
|
+
{
|
|
2201
|
+
"key": "condition",
|
|
2202
|
+
"value": "gte"
|
|
2203
|
+
},
|
|
2204
|
+
{
|
|
2205
|
+
"key": "comparisonValue",
|
|
2206
|
+
"value": 65
|
|
2207
|
+
}
|
|
2208
|
+
]
|
|
2209
|
+
}
|
|
2210
|
+
],
|
|
2211
|
+
"blockId": 11,
|
|
2212
|
+
"image": "https://otomato-sdk-images.s3.eu-west-1.amazonaws.com/fearAndGreed.png"
|
|
2213
|
+
}
|
|
2214
|
+
},
|
|
2215
|
+
"X": {
|
|
2216
|
+
"description": "X, formerly known as Twitter, is a social media platform that allows users to share short messages, photos, videos, and more.",
|
|
2217
|
+
"tags": {},
|
|
2218
|
+
"image": "https://otomato-sdk-images.s3.eu-west-1.amazonaws.com/x.webp",
|
|
2219
|
+
"X_POST_TRIGGER": {
|
|
2220
|
+
"name": "X Post Trigger",
|
|
2221
|
+
"description": "Track an account activity via their posts",
|
|
2222
|
+
"type": 5,
|
|
2223
|
+
"output": {
|
|
2224
|
+
"tweetContent": "string",
|
|
2225
|
+
"tweetURL": "string",
|
|
2226
|
+
"timestamp": "string",
|
|
2227
|
+
"account": "string"
|
|
2228
|
+
},
|
|
2229
|
+
"parameters": [
|
|
2230
|
+
{
|
|
2231
|
+
"key": "username",
|
|
2232
|
+
"type": "string",
|
|
2233
|
+
"description": "Username of the twitter account you want to track",
|
|
2234
|
+
"mandatory": true,
|
|
2235
|
+
"category": 0
|
|
2236
|
+
},
|
|
2237
|
+
{
|
|
2238
|
+
"key": "includeRetweets",
|
|
2239
|
+
"type": "string",
|
|
2240
|
+
"description": "Toggle trigger if it is retweet",
|
|
2241
|
+
"category": 0,
|
|
2242
|
+
"default": "false",
|
|
2243
|
+
"value": "false"
|
|
2244
|
+
},
|
|
2245
|
+
],
|
|
2246
|
+
"examples": [
|
|
2247
|
+
{
|
|
2248
|
+
"name": "GCR tweets",
|
|
2249
|
+
"description": "Gets triggered when GCR tweets something",
|
|
2250
|
+
"parameters": [
|
|
2251
|
+
{
|
|
2252
|
+
"key": "username",
|
|
2253
|
+
"value": "GiganticRebirth"
|
|
2254
|
+
},
|
|
2255
|
+
{
|
|
2256
|
+
"key": "includeRetweets",
|
|
2257
|
+
"value": false
|
|
2258
|
+
}
|
|
2259
|
+
]
|
|
2260
|
+
}
|
|
2261
|
+
],
|
|
2262
|
+
"blockId": 34,
|
|
2263
|
+
"image": "https://otomato-sdk-images.s3.eu-west-1.amazonaws.com/x.webp"
|
|
2264
|
+
}
|
|
2265
|
+
}
|
|
2266
|
+
},
|
|
2267
|
+
"ETFS": {
|
|
2268
|
+
"IBIT": {
|
|
2269
|
+
"description": "IBIT is Blackrock's Bitcoin ETF",
|
|
2270
|
+
"image": "https://otomato-sdk-images.s3.eu-west-1.amazonaws.com/blackrock.jpeg",
|
|
2271
|
+
"AUM": {
|
|
2272
|
+
"name": "Assets under management",
|
|
2273
|
+
"description": "Fetches IBIT net assets (USD)",
|
|
2274
|
+
"prototype": "ibitAum",
|
|
2275
|
+
"type": 3,
|
|
2276
|
+
"output": {
|
|
2277
|
+
"asset_under_management": "integer"
|
|
2278
|
+
},
|
|
2279
|
+
"parameters": [
|
|
2280
|
+
{
|
|
2281
|
+
"key": "condition",
|
|
2282
|
+
"type": "logic_operator",
|
|
2283
|
+
"description": "Logic operator used for the comparison: <, >, <=, >=, ==, ...",
|
|
2284
|
+
"mandatory": true,
|
|
2285
|
+
"category": 0
|
|
2286
|
+
},
|
|
2287
|
+
{
|
|
2288
|
+
"key": "comparisonValue",
|
|
2289
|
+
"type": "integer",
|
|
2290
|
+
"description": "The value to compare to",
|
|
2291
|
+
"mandatory": true,
|
|
2292
|
+
"category": 0
|
|
2293
|
+
},
|
|
2294
|
+
],
|
|
2295
|
+
"examples": [
|
|
2296
|
+
{
|
|
2297
|
+
"name": "AUM above 30B$",
|
|
2298
|
+
"description": "Gets triggered when the assets under management are above 30B$",
|
|
2299
|
+
"parameters": [
|
|
2300
|
+
{
|
|
2301
|
+
"key": "condition",
|
|
2302
|
+
"value": "gte"
|
|
2303
|
+
},
|
|
2304
|
+
{
|
|
2305
|
+
"key": "comparisonValue",
|
|
2306
|
+
"value": 30000000000
|
|
2307
|
+
}
|
|
2308
|
+
]
|
|
2309
|
+
},
|
|
2310
|
+
{
|
|
2311
|
+
"name": "AUM below 15B$",
|
|
2312
|
+
"description": "Gets triggered when the assets under management are below 15B$",
|
|
2313
|
+
"parameters": [
|
|
2314
|
+
{
|
|
2315
|
+
"key": "condition",
|
|
2316
|
+
"value": "lt"
|
|
2317
|
+
},
|
|
2318
|
+
{
|
|
2319
|
+
"key": "comparisonValue",
|
|
2320
|
+
"value": 15000000000
|
|
2321
|
+
}
|
|
2322
|
+
]
|
|
2323
|
+
}
|
|
2324
|
+
],
|
|
2325
|
+
"blockId": 14,
|
|
2326
|
+
"image": "https://otomato-sdk-images.s3.eu-west-1.amazonaws.com/blackrock.jpeg"
|
|
2327
|
+
}
|
|
2328
|
+
}
|
|
2329
|
+
},
|
|
2330
|
+
"NFTS": {
|
|
2331
|
+
"BLUR": {
|
|
2332
|
+
"description": "Get real-time NFT listings",
|
|
2333
|
+
"chains": [
|
|
2334
|
+
1
|
|
2335
|
+
],
|
|
2336
|
+
"image": "https://otomato-sdk-images.s3.eu-west-1.amazonaws.com/blur.jpg",
|
|
2337
|
+
"LISTING": {
|
|
2338
|
+
"name": "NFT Listing",
|
|
2339
|
+
"description": "Subscribe to live NFT listing events based on filters.",
|
|
2340
|
+
"type": 5,
|
|
2341
|
+
"parameters": [
|
|
2342
|
+
{
|
|
2343
|
+
"key": "contract",
|
|
2344
|
+
"type": "address",
|
|
2345
|
+
"description": "The NFT collection to monitor.",
|
|
2346
|
+
"mandatory": true,
|
|
2347
|
+
"category": 0
|
|
2348
|
+
},
|
|
2349
|
+
{
|
|
2350
|
+
"key": "price",
|
|
2351
|
+
"type": "float",
|
|
2352
|
+
"description": "Maximum price filter for the listings (in ETH). The workflow won't be triggered if a NFT that matches the other criterias is listed above this defined price limit.",
|
|
2353
|
+
"mandatory": false,
|
|
2354
|
+
"category": 1
|
|
2355
|
+
},
|
|
2356
|
+
{
|
|
2357
|
+
"key": "traits",
|
|
2358
|
+
"description": "Trait-based filters. For example, you can only monitor punks with specific traits you are interested in.",
|
|
2359
|
+
"mandatory": false,
|
|
2360
|
+
"category": 1
|
|
2361
|
+
},
|
|
2362
|
+
],
|
|
2363
|
+
"output": {
|
|
2364
|
+
"listingId": "string",
|
|
2365
|
+
"tokenId": "string",
|
|
2366
|
+
"price": "float",
|
|
2367
|
+
"source": "string",
|
|
2368
|
+
"imageUrl": "string",
|
|
2369
|
+
"attributes": "array"
|
|
2370
|
+
},
|
|
2371
|
+
"examples": [
|
|
2372
|
+
{
|
|
2373
|
+
"name": "Monitor Pudgy listings",
|
|
2374
|
+
"description": "Subscribe to Pudgy Penguins listings with a pineapple suit and blue background filtered for prices below 30 ETH.",
|
|
2375
|
+
"parameters": [
|
|
2376
|
+
{
|
|
2377
|
+
"key": "contract",
|
|
2378
|
+
"value": "0xbd3531da5cf5857e7cfaa92426877b022e612cf8"
|
|
2379
|
+
},
|
|
2380
|
+
{
|
|
2381
|
+
"key": "price",
|
|
2382
|
+
"value": 30
|
|
2383
|
+
},
|
|
2384
|
+
{
|
|
2385
|
+
"key": "traits",
|
|
2386
|
+
"value": "{\"Background\":[\"Blue\"],\"Body\":[\"Pineapple Suit\"]}"
|
|
2387
|
+
}
|
|
2388
|
+
]
|
|
2389
|
+
}
|
|
2390
|
+
],
|
|
2391
|
+
"blockId": 35,
|
|
2392
|
+
"image": "https://otomato-sdk-images.s3.eu-west-1.amazonaws.com/blur.jpg"
|
|
2393
|
+
}
|
|
2394
|
+
}
|
|
2395
|
+
},
|
|
2396
|
+
"PRE_MARKET": {
|
|
2397
|
+
"WHALES_MARKET": {
|
|
2398
|
+
"description": "Trade Airdrop allocations and points",
|
|
2399
|
+
"chains": [
|
|
2400
|
+
1
|
|
2401
|
+
],
|
|
2402
|
+
"image": "https://otomato-sdk-images.s3.eu-west-1.amazonaws.com/whalesmarket.png"
|
|
2403
|
+
}
|
|
2404
|
+
},
|
|
2405
|
+
"TECHNICAL": {
|
|
2406
|
+
"GAS": {
|
|
2407
|
+
"description": "Monitors Ethereum gas prices",
|
|
2408
|
+
"image": "https://otomato-sdk-images.s3.eu-west-1.amazonaws.com/gas.svg",
|
|
2409
|
+
"GAS_API": {
|
|
2410
|
+
"name": "Ethereum Gas Price Monitor",
|
|
2411
|
+
"description": "Monitors Ethereum gas prices and triggers when the gas price meets the defined condition.",
|
|
2412
|
+
"prototype": "mainnetGasPrice",
|
|
2413
|
+
"type": 3,
|
|
2414
|
+
"output": {
|
|
2415
|
+
"gasPrice": "float"
|
|
2416
|
+
},
|
|
2417
|
+
"parameters": [
|
|
2418
|
+
{
|
|
2419
|
+
"key": "condition",
|
|
2420
|
+
"type": "logic_operator",
|
|
2421
|
+
"description": "The logical operator to compare the gas price, such as <, >, <=, >=, ==, etc.",
|
|
2422
|
+
"mandatory": true,
|
|
2423
|
+
"category": 0
|
|
2424
|
+
},
|
|
2425
|
+
{
|
|
2426
|
+
"key": "comparisonValue",
|
|
2427
|
+
"type": "float",
|
|
2428
|
+
"description": "The gas price value to compare against (in Gwei).",
|
|
2429
|
+
"mandatory": true,
|
|
2430
|
+
"category": 0
|
|
2431
|
+
},
|
|
2432
|
+
],
|
|
2433
|
+
"examples": [
|
|
2434
|
+
{
|
|
2435
|
+
"name": "Gas Price Below 6 Gwei",
|
|
2436
|
+
"description": "Triggers when the gas price is below 6 Gwei.",
|
|
2437
|
+
"parameters": [
|
|
2438
|
+
{
|
|
2439
|
+
"key": "condition",
|
|
2440
|
+
"value": "lte"
|
|
2441
|
+
},
|
|
2442
|
+
{
|
|
2443
|
+
"key": "comparisonValue",
|
|
2444
|
+
"value": "6"
|
|
2445
|
+
}
|
|
2446
|
+
]
|
|
2447
|
+
},
|
|
2448
|
+
{
|
|
2449
|
+
"name": "Gas Price Below 12 Gwei",
|
|
2450
|
+
"description": "Triggers when the gas price is below 12 Gwei.",
|
|
2451
|
+
"parameters": [
|
|
2452
|
+
{
|
|
2453
|
+
"key": "condition",
|
|
2454
|
+
"value": "lte"
|
|
2455
|
+
},
|
|
2456
|
+
{
|
|
2457
|
+
"key": "comparisonValue",
|
|
2458
|
+
"value": "12"
|
|
2459
|
+
}
|
|
2460
|
+
]
|
|
2461
|
+
},
|
|
2462
|
+
{
|
|
2463
|
+
"name": "Gas Price Above 40 Gwei",
|
|
2464
|
+
"description": "Triggers when the gas price exceeds 40 Gwei.",
|
|
2465
|
+
"parameters": [
|
|
2466
|
+
{
|
|
2467
|
+
"key": "condition",
|
|
2468
|
+
"value": "gte"
|
|
2469
|
+
},
|
|
2470
|
+
{
|
|
2471
|
+
"key": "comparisonValue",
|
|
2472
|
+
"value": "40"
|
|
2473
|
+
}
|
|
2474
|
+
]
|
|
2475
|
+
}
|
|
2476
|
+
],
|
|
2477
|
+
"blockId": 16,
|
|
2478
|
+
"image": "https://otomato-sdk-images.s3.eu-west-1.amazonaws.com/gas.svg"
|
|
2479
|
+
}
|
|
2480
|
+
}
|
|
2481
|
+
}
|
|
2482
|
+
};
|
|
2483
|
+
export const ACTIONS = {
|
|
2484
|
+
"CORE": {
|
|
2485
|
+
"EMPTYBLOCK": {
|
|
2486
|
+
"image": "",
|
|
2487
|
+
"description": "",
|
|
2488
|
+
"chains": [],
|
|
2489
|
+
"EMPTYBLOCK": {
|
|
2490
|
+
"name": "Empty block",
|
|
2491
|
+
"description": "This block is just used in the app while waiting for the user to choose an actual block.",
|
|
2492
|
+
"type": 2,
|
|
2493
|
+
"checks": [],
|
|
2494
|
+
"output": {},
|
|
2495
|
+
"parameters": [],
|
|
2496
|
+
"examples": [],
|
|
2497
|
+
"blockId": 0,
|
|
2498
|
+
"image": ""
|
|
2499
|
+
}
|
|
2500
|
+
},
|
|
2501
|
+
"DELAY": {
|
|
2502
|
+
"description": "Set of functions to delay the executions of the following blocks.",
|
|
2503
|
+
"image": "https://otomato-sdk-images.s3.eu-west-1.amazonaws.com/delay.png",
|
|
2504
|
+
"WAIT_FOR": {
|
|
2505
|
+
"name": "Wait for",
|
|
2506
|
+
"type": 2,
|
|
2507
|
+
"description": "Wait before executing the following blocks",
|
|
2508
|
+
"output": {
|
|
2509
|
+
"message": "string"
|
|
2510
|
+
},
|
|
2511
|
+
"parameters": [
|
|
2512
|
+
{
|
|
2513
|
+
"key": "time",
|
|
2514
|
+
"type": "string",
|
|
2515
|
+
"description": "The time to wait (in seconds)",
|
|
2516
|
+
"mandatory": true,
|
|
2517
|
+
"category": 0
|
|
2518
|
+
},
|
|
2519
|
+
],
|
|
2520
|
+
"examples": [
|
|
2521
|
+
{
|
|
2522
|
+
"name": "Wait 1 hour",
|
|
2523
|
+
"description": "Wait for an hour before executing the next block",
|
|
2524
|
+
"parameters": [
|
|
2525
|
+
{
|
|
2526
|
+
"key": "time",
|
|
2527
|
+
"value": "3600000"
|
|
2528
|
+
}
|
|
2529
|
+
]
|
|
2530
|
+
}
|
|
2531
|
+
],
|
|
2532
|
+
"blockId": 100010,
|
|
2533
|
+
"image": "https://otomato-sdk-images.s3.eu-west-1.amazonaws.com/delay.png"
|
|
2534
|
+
},
|
|
2535
|
+
"WAIT_UNTIL": {
|
|
2536
|
+
"name": "Wait until",
|
|
2537
|
+
"type": 2,
|
|
2538
|
+
"description": "Wait before executing the following blocks",
|
|
2539
|
+
"output": {
|
|
2540
|
+
"message": "string"
|
|
2541
|
+
},
|
|
2542
|
+
"parameters": [
|
|
2543
|
+
{
|
|
2544
|
+
"key": "until",
|
|
2545
|
+
"type": "string",
|
|
2546
|
+
"description": "The date to wait for (UTC timestamp in milliseconds)",
|
|
2547
|
+
"mandatory": true,
|
|
2548
|
+
"category": 0
|
|
2549
|
+
},
|
|
2550
|
+
],
|
|
2551
|
+
"examples": [
|
|
2552
|
+
{
|
|
2553
|
+
"name": "Wait until a specific date",
|
|
2554
|
+
"description": "Wait until 00:00 (UTC) Friday 23rd of August 2024",
|
|
2555
|
+
"parameters": [
|
|
2556
|
+
{
|
|
2557
|
+
"key": "until",
|
|
2558
|
+
"value": "1724371200000"
|
|
2559
|
+
}
|
|
2560
|
+
]
|
|
2561
|
+
}
|
|
2562
|
+
],
|
|
2563
|
+
"blockId": 100011,
|
|
2564
|
+
"image": "https://otomato-sdk-images.s3.eu-west-1.amazonaws.com/delay.png"
|
|
2565
|
+
}
|
|
2566
|
+
},
|
|
2567
|
+
"SWAP": {
|
|
2568
|
+
"description": "Swap two assets using the best market rates accross multiple pools",
|
|
2569
|
+
"image": "https://otomato-sdk-images.s3.eu-west-1.amazonaws.com/swap.png",
|
|
2570
|
+
"chains": [
|
|
2571
|
+
34443
|
|
2572
|
+
],
|
|
2573
|
+
"SWAP": {
|
|
2574
|
+
"name": "Swap",
|
|
2575
|
+
"description": "Swap two assets using the best market rates accross multiple pools",
|
|
2576
|
+
"type": 1,
|
|
2577
|
+
"requiredApprovals": [
|
|
2578
|
+
{
|
|
2579
|
+
"address": "{{parameters.tokenIn}}",
|
|
2580
|
+
"amount": "{{parameters.amount}}",
|
|
2581
|
+
"to": "{{before.contractAddress}}"
|
|
2582
|
+
}
|
|
2583
|
+
],
|
|
2584
|
+
"checks": [
|
|
2585
|
+
{
|
|
2586
|
+
"type": 0,
|
|
2587
|
+
"chainId": "{{parameters.chainId}}",
|
|
2588
|
+
"contractAddress": "{{parameters.tokenIn}}",
|
|
2589
|
+
"amount": "{{parameters.amount}}"
|
|
2590
|
+
}
|
|
2591
|
+
],
|
|
2592
|
+
"output": {
|
|
2593
|
+
"amountIn": "uint256",
|
|
2594
|
+
"tokenIn": "erc20",
|
|
2595
|
+
"amountOut": "uint256",
|
|
2596
|
+
"tokenOut": "erc20",
|
|
2597
|
+
"transactionHash": "string"
|
|
2598
|
+
},
|
|
2599
|
+
"frontendHelpers": {
|
|
2600
|
+
"output": {
|
|
2601
|
+
"amountIn": {
|
|
2602
|
+
"erc20Token": {
|
|
2603
|
+
"contractAddress": "{{output.tokenIn}}",
|
|
2604
|
+
"chainId": "{{parameters.chainId}}"
|
|
2605
|
+
}
|
|
2606
|
+
},
|
|
2607
|
+
"amountOut": {
|
|
2608
|
+
"erc20Token": {
|
|
2609
|
+
"contractAddress": "{{output.tokenOut}}",
|
|
2610
|
+
"chainId": "{{parameters.chainId}}"
|
|
2611
|
+
}
|
|
2612
|
+
}
|
|
2613
|
+
}
|
|
2614
|
+
},
|
|
2615
|
+
"parameters": [
|
|
2616
|
+
{
|
|
2617
|
+
"key": "chainId",
|
|
2618
|
+
"type": "chainId",
|
|
2619
|
+
"description": "Chain ID of the network",
|
|
2620
|
+
"mandatory": true,
|
|
2621
|
+
"category": 0
|
|
2622
|
+
},
|
|
2623
|
+
{
|
|
2624
|
+
"key": "tokenIn",
|
|
2625
|
+
"type": "erc20",
|
|
2626
|
+
"description": "Token to sell",
|
|
2627
|
+
"mandatory": true,
|
|
2628
|
+
"category": 0
|
|
2629
|
+
},
|
|
2630
|
+
{
|
|
2631
|
+
"key": "tokenOut",
|
|
2632
|
+
"type": "erc20",
|
|
2633
|
+
"description": "Token to buy",
|
|
2634
|
+
"mandatory": true,
|
|
2635
|
+
"category": 0
|
|
2636
|
+
},
|
|
2637
|
+
{
|
|
2638
|
+
"key": "amount",
|
|
2639
|
+
"type": "uint256",
|
|
2640
|
+
"description": "Amount to sell",
|
|
2641
|
+
"mandatory": true,
|
|
2642
|
+
"category": 0,
|
|
2643
|
+
"erc20FormattedAmount": {
|
|
2644
|
+
"contractAddress": "{{parameters.tokenIn}}",
|
|
2645
|
+
"chain": "{{parameters.chainId}}"
|
|
2646
|
+
}
|
|
2647
|
+
},
|
|
2648
|
+
{
|
|
2649
|
+
"key": "slippage",
|
|
2650
|
+
"type": "percentage",
|
|
2651
|
+
"description": "The maximum allowable difference between the expected price and the actual price at the time of execution, expressed as a percentage. This protects the transaction from significant price fluctuations.",
|
|
2652
|
+
"value": 1,
|
|
2653
|
+
"mandatory": true,
|
|
2654
|
+
"category": 1
|
|
2655
|
+
},
|
|
2656
|
+
],
|
|
2657
|
+
"examples": [
|
|
2658
|
+
{
|
|
2659
|
+
"name": "Swap USDC to WETH",
|
|
2660
|
+
"description": "Swap 100 USDC to WETH on Mode Network using Odos",
|
|
2661
|
+
"parameters": [
|
|
2662
|
+
{
|
|
2663
|
+
"key": "chainId",
|
|
2664
|
+
"value": 34443
|
|
2665
|
+
},
|
|
2666
|
+
{
|
|
2667
|
+
"key": "tokenIn",
|
|
2668
|
+
"value": "0xd988097fb8612cc24eeC14542bC03424c656005f"
|
|
2669
|
+
},
|
|
2670
|
+
{
|
|
2671
|
+
"key": "tokenOut",
|
|
2672
|
+
"value": "0x4200000000000000000000000000000000000006"
|
|
2673
|
+
},
|
|
2674
|
+
{
|
|
2675
|
+
"key": "amount",
|
|
2676
|
+
"value": "100000000n"
|
|
2677
|
+
},
|
|
2678
|
+
{
|
|
2679
|
+
"key": "slippage",
|
|
2680
|
+
"value": 1
|
|
2681
|
+
}
|
|
2682
|
+
]
|
|
2683
|
+
}
|
|
2684
|
+
],
|
|
2685
|
+
"permissions": {
|
|
2686
|
+
"chainId": "{{parameters.chainId}}",
|
|
2687
|
+
"approvedTargets": [
|
|
2688
|
+
"{{before.contractAddress}}",
|
|
2689
|
+
"{{parameters.tokenIn}}"
|
|
2690
|
+
],
|
|
2691
|
+
"label": [
|
|
2692
|
+
"Swap {{tokenSymbol({{parameters.chainId}}, {{parameters.tokenIn}})}} to {{tokenSymbol({{parameters.chainId}}, {{parameters.tokenOut}})}}"
|
|
2693
|
+
],
|
|
2694
|
+
"labelNotAuthorized": [
|
|
2695
|
+
"Transfer ETH"
|
|
2696
|
+
]
|
|
2697
|
+
},
|
|
2698
|
+
"blockId": 100013,
|
|
2699
|
+
"image": "https://otomato-sdk-images.s3.eu-west-1.amazonaws.com/swap.png"
|
|
2700
|
+
}
|
|
2701
|
+
},
|
|
2702
|
+
"CONDITION": {
|
|
2703
|
+
"description": "Checks for a condition before proceeding",
|
|
2704
|
+
"image": "https://otomato-sdk-images.s3.eu-west-1.amazonaws.com/if.png",
|
|
2705
|
+
"IF": {
|
|
2706
|
+
"name": "Condition",
|
|
2707
|
+
"type": 5,
|
|
2708
|
+
"description": "Checks for a condition before proceeding",
|
|
2709
|
+
"parameters": [
|
|
2710
|
+
{
|
|
2711
|
+
"key": "logic",
|
|
2712
|
+
"type": "and_or",
|
|
2713
|
+
"description": "",
|
|
2714
|
+
"mandatory": true,
|
|
2715
|
+
"category": 0
|
|
2716
|
+
},
|
|
2717
|
+
{
|
|
2718
|
+
"key": "groups",
|
|
2719
|
+
"type": "condition_groups",
|
|
2720
|
+
"description": "",
|
|
2721
|
+
"mandatory": true,
|
|
2722
|
+
"category": 0
|
|
2723
|
+
},
|
|
2724
|
+
],
|
|
2725
|
+
"examples": [],
|
|
2726
|
+
"blockId": 100016,
|
|
2727
|
+
"image": "https://otomato-sdk-images.s3.eu-west-1.amazonaws.com/if.png"
|
|
2728
|
+
}
|
|
2729
|
+
},
|
|
2730
|
+
"SPLIT": {
|
|
2731
|
+
"description": "Split a branch in multiple ones to parallelized executions",
|
|
2732
|
+
"image": "https://otomato-sdk-images.s3.eu-west-1.amazonaws.com/split.png",
|
|
2733
|
+
"SPLIT": {
|
|
2734
|
+
"name": "Split",
|
|
2735
|
+
"type": 4,
|
|
2736
|
+
"description": "Split a branch in multiple ones to parallelized executions",
|
|
2737
|
+
"parameters": [],
|
|
2738
|
+
"examples": [],
|
|
2739
|
+
"blockId": 100015,
|
|
2740
|
+
"image": "https://otomato-sdk-images.s3.eu-west-1.amazonaws.com/split.png"
|
|
2741
|
+
}
|
|
2742
|
+
}
|
|
2743
|
+
},
|
|
2744
|
+
"NOTIFICATIONS": {
|
|
2745
|
+
"EMAIL": {
|
|
2746
|
+
"description": "Sends an email to the specified recipient",
|
|
2747
|
+
"image": "https://otomato-sdk-images.s3.eu-west-1.amazonaws.com/email.png",
|
|
2748
|
+
"SEND_EMAIL": {
|
|
2749
|
+
"name": "Send email",
|
|
2750
|
+
"type": 3,
|
|
2751
|
+
"description": "Sends an email to the specified recipient",
|
|
2752
|
+
"output": {
|
|
2753
|
+
"message": "string"
|
|
2754
|
+
},
|
|
2755
|
+
"parameters": [
|
|
2756
|
+
{
|
|
2757
|
+
"key": "to",
|
|
2758
|
+
"type": "email",
|
|
2759
|
+
"description": "The recipient's email address",
|
|
2760
|
+
"mandatory": true,
|
|
2761
|
+
"category": 0
|
|
2762
|
+
},
|
|
2763
|
+
{
|
|
2764
|
+
"key": "subject",
|
|
2765
|
+
"type": "string",
|
|
2766
|
+
"description": "The subject of the email",
|
|
2767
|
+
"mandatory": true,
|
|
2768
|
+
"category": 0
|
|
2769
|
+
},
|
|
2770
|
+
{
|
|
2771
|
+
"key": "body",
|
|
2772
|
+
"type": "paragraph",
|
|
2773
|
+
"description": "The body content of the email",
|
|
2774
|
+
"mandatory": true,
|
|
2775
|
+
"category": 0
|
|
2776
|
+
},
|
|
2777
|
+
],
|
|
2778
|
+
"examples": [
|
|
2779
|
+
{
|
|
2780
|
+
"name": "Basic notification",
|
|
2781
|
+
"description": "Notify you that the flow has been triggered",
|
|
2782
|
+
"parameters": [
|
|
2783
|
+
{
|
|
2784
|
+
"key": "to",
|
|
2785
|
+
"value": "your-email@gmail.com"
|
|
2786
|
+
},
|
|
2787
|
+
{
|
|
2788
|
+
"key": "subject",
|
|
2789
|
+
"value": "Workflow triggered"
|
|
2790
|
+
},
|
|
2791
|
+
{
|
|
2792
|
+
"key": "body",
|
|
2793
|
+
"value": "Your workflow has been triggered! Go to https://app.otomato.xyz/execution-history to see its execution details"
|
|
2794
|
+
}
|
|
2795
|
+
]
|
|
2796
|
+
}
|
|
2797
|
+
],
|
|
2798
|
+
"blockId": 100014,
|
|
2799
|
+
"image": "https://otomato-sdk-images.s3.eu-west-1.amazonaws.com/email.png"
|
|
2800
|
+
}
|
|
2801
|
+
},
|
|
2802
|
+
"SLACK": {
|
|
2803
|
+
"description": "Slack is a messaging app for businesses that connects people to the information they need.",
|
|
2804
|
+
"image": "https://otomato-sdk-images.s3.eu-west-1.amazonaws.com/slack.png",
|
|
2805
|
+
"SEND_MESSAGE": {
|
|
2806
|
+
"name": "Send message",
|
|
2807
|
+
"type": 0,
|
|
2808
|
+
"description": "Notifies you by sending a Slack message to the channel of your choice",
|
|
2809
|
+
"output": {
|
|
2810
|
+
"message": "string"
|
|
2811
|
+
},
|
|
2812
|
+
"parameters": [
|
|
2813
|
+
{
|
|
2814
|
+
"key": "webhook",
|
|
2815
|
+
"type": "url",
|
|
2816
|
+
"description": "The webhook URL for the Slack channel (e.g https://hooks.slack.com/services/T087SUVQ0DA/B07DEEGF9PK/FKkRaqagLR)",
|
|
2817
|
+
"mandatory": true,
|
|
2818
|
+
"private": true,
|
|
2819
|
+
"category": 0
|
|
2820
|
+
},
|
|
2821
|
+
{
|
|
2822
|
+
"key": "message",
|
|
2823
|
+
"type": "paragraph",
|
|
2824
|
+
"description": "The text content to send",
|
|
2825
|
+
"mandatory": true,
|
|
2826
|
+
"category": 0
|
|
2827
|
+
},
|
|
2828
|
+
],
|
|
2829
|
+
"template": {
|
|
2830
|
+
"url": "{{webhook}}",
|
|
2831
|
+
"body": {
|
|
2832
|
+
"text": "{{message}}"
|
|
2833
|
+
}
|
|
2834
|
+
},
|
|
2835
|
+
"examples": [],
|
|
2836
|
+
"blockId": 100002,
|
|
2837
|
+
"image": "https://otomato-sdk-images.s3.eu-west-1.amazonaws.com/slack.png"
|
|
2838
|
+
}
|
|
2839
|
+
},
|
|
2840
|
+
"DISCORD": {
|
|
2841
|
+
"description": "Discord is a communication service to talk with your favorite communities.",
|
|
2842
|
+
"image": "https://otomato-sdk-images.s3.eu-west-1.amazonaws.com/discord.png",
|
|
2843
|
+
"SEND_MESSAGE": {
|
|
2844
|
+
"name": "Send message",
|
|
2845
|
+
"type": 0,
|
|
2846
|
+
"description": "Notifies you by sending a Discord message to the channel of your choice",
|
|
2847
|
+
"output": {
|
|
2848
|
+
"message": "string"
|
|
2849
|
+
},
|
|
2850
|
+
"parameters": [
|
|
2851
|
+
{
|
|
2852
|
+
"key": "webhook",
|
|
2853
|
+
"type": "url",
|
|
2854
|
+
"description": "The webhook URL for the Discord channel",
|
|
2855
|
+
"mandatory": true,
|
|
2856
|
+
"private": true,
|
|
2857
|
+
"category": 0
|
|
2858
|
+
},
|
|
2859
|
+
{
|
|
2860
|
+
"key": "message",
|
|
2861
|
+
"type": "paragraph",
|
|
2862
|
+
"description": "The text content to send",
|
|
2863
|
+
"mandatory": true,
|
|
2864
|
+
"category": 0
|
|
2865
|
+
},
|
|
2866
|
+
],
|
|
2867
|
+
"template": {
|
|
2868
|
+
"url": "{{webhook}}",
|
|
2869
|
+
"body": {
|
|
2870
|
+
"content": "{{message}}"
|
|
2871
|
+
}
|
|
2872
|
+
},
|
|
2873
|
+
"examples": [
|
|
2874
|
+
{
|
|
2875
|
+
"name": "Basic notification",
|
|
2876
|
+
"description": "Notify you that the flow has been triggered on the otomato discord",
|
|
2877
|
+
"parameters": [
|
|
2878
|
+
{
|
|
2879
|
+
"key": "webhook",
|
|
2880
|
+
"value": "https://discord.com/api/webhooks/1303000202818621542/Wv7pGzZ8ZNGBk38uPJ5u4NPhghbARwKHXw3RN3QAKax6jKH85XOggRFFbGoDLI_sWSpt"
|
|
2881
|
+
},
|
|
2882
|
+
{
|
|
2883
|
+
"key": "message",
|
|
2884
|
+
"value": "Your workflow has been triggered! Go to https://app.otomato.xyz/execution-history to see its execution details"
|
|
2885
|
+
}
|
|
2886
|
+
]
|
|
2887
|
+
}
|
|
2888
|
+
],
|
|
2889
|
+
"blockId": 100003,
|
|
2890
|
+
"image": "https://otomato-sdk-images.s3.eu-west-1.amazonaws.com/discord.png"
|
|
2891
|
+
}
|
|
2892
|
+
},
|
|
2893
|
+
"TELEGRAM": {
|
|
2894
|
+
"description": "Telegram is a cloud-based mobile and desktop messaging app with a focus on security and speed.",
|
|
2895
|
+
"image": "https://otomato-sdk-images.s3.eu-west-1.amazonaws.com/telegram.jpeg"
|
|
2896
|
+
}
|
|
2897
|
+
},
|
|
2898
|
+
"TOKENS": {
|
|
2899
|
+
"TRANSFER": {
|
|
2900
|
+
"description": "Transfer token",
|
|
2901
|
+
"chains": [
|
|
2902
|
+
34443
|
|
2903
|
+
],
|
|
2904
|
+
"image": "https://otomato-sdk-images.s3.eu-west-1.amazonaws.com/Transfer.svg",
|
|
2905
|
+
"TRANSFER": {
|
|
2906
|
+
"name": "Transfer token",
|
|
2907
|
+
"description": "Transfers an ERC20 token",
|
|
2908
|
+
"type": 1,
|
|
2909
|
+
"method": "function transfer(address to, uint256 value)",
|
|
2910
|
+
"output": {
|
|
2911
|
+
"transactionHash": "string"
|
|
2912
|
+
},
|
|
2913
|
+
"parameters": [
|
|
2914
|
+
{
|
|
2915
|
+
"key": "chainId",
|
|
2916
|
+
"type": "chainId",
|
|
2917
|
+
"description": "Chain ID of the network",
|
|
2918
|
+
"mandatory": true,
|
|
2919
|
+
"category": 0
|
|
2920
|
+
},
|
|
2921
|
+
{
|
|
2922
|
+
"key": "contractAddress",
|
|
2923
|
+
"type": "erc20",
|
|
2924
|
+
"description": "The contract address of the ERC20",
|
|
2925
|
+
"mandatory": true,
|
|
2926
|
+
"category": 0
|
|
2927
|
+
},
|
|
2928
|
+
{
|
|
2929
|
+
"key": "abiParams.to",
|
|
2930
|
+
"type": "address",
|
|
2931
|
+
"description": "Address to transfer crypto to",
|
|
2932
|
+
"mandatory": true,
|
|
2933
|
+
"category": 0
|
|
2934
|
+
},
|
|
2935
|
+
{
|
|
2936
|
+
"key": "abiParams.value",
|
|
2937
|
+
"type": "uint256",
|
|
2938
|
+
"description": "Amount of crypto to transfer",
|
|
2939
|
+
"mandatory": true,
|
|
2940
|
+
"category": 0,
|
|
2941
|
+
"erc20FormattedAmount": {
|
|
2942
|
+
"contractAddress": "{{parameters.contractAddress}}",
|
|
2943
|
+
"chain": "{{parameters.chainId}}"
|
|
2944
|
+
}
|
|
2945
|
+
},
|
|
2946
|
+
],
|
|
2947
|
+
"checks": [
|
|
2948
|
+
{
|
|
2949
|
+
"type": 0,
|
|
2950
|
+
"chainId": "{{parameters.chainId}}",
|
|
2951
|
+
"contractAddress": "{{parameters.contractAddress}}",
|
|
2952
|
+
"amount": "{{parameters.abi.parameters.value}}"
|
|
2953
|
+
}
|
|
2954
|
+
],
|
|
2955
|
+
"examples": [
|
|
2956
|
+
{
|
|
2957
|
+
"name": "Transfer USDC",
|
|
2958
|
+
"description": "Transfer 100 USDC to vitalik.eth on Mode",
|
|
2959
|
+
"parameters": [
|
|
2960
|
+
{
|
|
2961
|
+
"key": "chainId",
|
|
2962
|
+
"value": 34443
|
|
2963
|
+
},
|
|
2964
|
+
{
|
|
2965
|
+
"key": "abiParams.value",
|
|
2966
|
+
"value": "100000000n"
|
|
2967
|
+
},
|
|
2968
|
+
{
|
|
2969
|
+
"key": "abiParams.to",
|
|
2970
|
+
"value": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045"
|
|
2971
|
+
},
|
|
2972
|
+
{
|
|
2973
|
+
"key": "contractAddress",
|
|
2974
|
+
"value": "0xd988097fb8612cc24eeC14542bC03424c656005f"
|
|
2975
|
+
}
|
|
2976
|
+
]
|
|
2977
|
+
}
|
|
2978
|
+
],
|
|
2979
|
+
"permissions": {
|
|
2980
|
+
"chainId": "{{parameters.chainId}}",
|
|
2981
|
+
"approvedTargets": [
|
|
2982
|
+
"{{parameters.contractAddress}}"
|
|
2983
|
+
],
|
|
2984
|
+
"label": [
|
|
2985
|
+
"Transfer {{tokenSymbol({{parameters.chainId}}, {{parameters.contractAddress}})}}"
|
|
2986
|
+
],
|
|
2987
|
+
"labelNotAuthorized": [
|
|
2988
|
+
"Transfer {{otherTokenSymbol({{parameters.chainId}}, {{parameters.contractAddress}})}}"
|
|
2989
|
+
]
|
|
2990
|
+
},
|
|
2991
|
+
"blockId": 100004,
|
|
2992
|
+
"image": "https://otomato-sdk-images.s3.eu-west-1.amazonaws.com/Transfer.svg"
|
|
2993
|
+
}
|
|
2994
|
+
}
|
|
2995
|
+
},
|
|
2996
|
+
"LENDING": {
|
|
2997
|
+
"IONIC": {
|
|
2998
|
+
"description": "#1 money market for Yield Bearing Assets on the OP Superchain",
|
|
2999
|
+
"chains": [
|
|
3000
|
+
34443,
|
|
3001
|
+
8453
|
|
3002
|
+
],
|
|
3003
|
+
"image": "https://otomato-sdk-images.s3.eu-west-1.amazonaws.com/ionic.jpg",
|
|
3004
|
+
"DEPOSIT": {
|
|
3005
|
+
"name": "Supply asset to Ionic",
|
|
3006
|
+
"description": "Deposit token in any Ionic lending pool",
|
|
3007
|
+
"type": 1,
|
|
3008
|
+
"method": "function mint(uint256 amount) public returns (uint256)",
|
|
3009
|
+
"parameters": [
|
|
3010
|
+
{
|
|
3011
|
+
"key": "chainId",
|
|
3012
|
+
"type": "chainId",
|
|
3013
|
+
"description": "Chain ID of the network",
|
|
3014
|
+
"mandatory": true,
|
|
3015
|
+
"category": 0
|
|
3016
|
+
},
|
|
3017
|
+
{
|
|
3018
|
+
"key": "tokenToDeposit",
|
|
3019
|
+
"type": "erc20",
|
|
3020
|
+
"description": "The token to deposit",
|
|
3021
|
+
"mandatory": true,
|
|
3022
|
+
"enum": "\n (env) => {\n if (!env.parameters.chainId)\n throw new Error('You need to provide the chainId first');\n \n const availableTokens = {\n \"8453\": [\n \"0x833589fcd6edb6e08f4c7c32d4f71b54bda02913\",\n \"0xc1cba3fcea344f92d9239c08c0568f6f2f0ee452\",\n \"0x4200000000000000000000000000000000000006\",\n \"0x5d3a1Ff2b6BAb83b63cd9AD0787074081a52ef34\",\n \"0xcbb7c0000ab88b473b1f5afd9ef808440eed33bf\",\n \"0x940181a94a35a4569e4529a3cdfb74e38fd98631\",\n \"0x2Ae3F1Ec7F1F5012CFEab0185bfc7aa3cf0DEc22\",\n \"0x04C0599Ae5A44757c0af6F9eC3b93da8976c150A\",\n \"0xCfA3Ef56d303AE4fAabA0592388F19d7C3399FB4\",\n \"0xCb327b99fF831bF8223cCEd12B1338FF3aA322Ff\",\n \"0xCc7FF230365bD730eE4B352cC2492CEdAC49383e\",\n \"0xaB36452DbAC151bE02b16Ca17d8919826072f64a\",\n \"0xDBFeFD2e8460a6Ee4955A68582F85708BAEA60A3\",\n \"0x59D9356E565Ab3A36dD77763Fc0d87fEaf85508C\",\n \"0x7002458B1DF59EccB57387bC79fFc7C29E22e6f7\",\n \"0x04D5ddf5f3a8939889F11E97f8c4BB48317F1938\",\n \"0xd95ca61CE9aAF2143E81Ef5462C0c2325172E028\",\n \"0xe31eE12bDFDD0573D634124611e85338e2cBF0cF\",\n \"0x9B8Df6E244526ab5F6e6400d331DB28C8fdDdb55\",\n \"0xb0505e5a99abd03d94a1169e638B78EDfEd26ea4\"\n ],\n \"34443\": [\n \"0xf0F161fDA2712DB8b566946122a5af183995e2eD\",\n \"0xd988097fb8612cc24eeC14542bC03424c656005f\",\n \"0x2416092f143378750bb29b79eD961ab195CcEea5\",\n \"0x4200000000000000000000000000000000000006\",\n \"0xcDd475325D6F564d27247D1DddBb0DAc6fA0a5CF\",\n \"0x80137510979822322193FC997d400D5A6C747bf7\",\n \"0xe7903B1F75C534Dd8159b313d92cDCfbC62cB3Cd\",\n \"0x04C0599Ae5A44757c0af6F9eC3b93da8976c150A\",\n \"0x59889b7021243dB5B1e065385F918316cD90D46c\"\n ]\n};\n const chainId = env.parameters.chainId;\n return availableTokens[chainId] || [];\n }",
|
|
3023
|
+
"category": 0
|
|
3024
|
+
},
|
|
3025
|
+
{
|
|
3026
|
+
"key": "abiParams.amount",
|
|
3027
|
+
"type": "uint256",
|
|
3028
|
+
"description": "Amount of crypto to deposit",
|
|
3029
|
+
"mandatory": true,
|
|
3030
|
+
"category": 0,
|
|
3031
|
+
"erc20FormattedAmount": {
|
|
3032
|
+
"contractAddress": "{{parameters.tokenToDeposit}}",
|
|
3033
|
+
"chain": "{{parameters.chainId}}"
|
|
3034
|
+
}
|
|
3035
|
+
},
|
|
3036
|
+
],
|
|
3037
|
+
"examples": [
|
|
3038
|
+
{
|
|
3039
|
+
"name": "Deposit 100 USDT",
|
|
3040
|
+
"description": "Lend 100 USDT on Ionic on Mode",
|
|
3041
|
+
"parameters": [
|
|
3042
|
+
{
|
|
3043
|
+
"key": "chainId",
|
|
3044
|
+
"value": 34443
|
|
3045
|
+
},
|
|
3046
|
+
{
|
|
3047
|
+
"key": "abiParams.amount",
|
|
3048
|
+
"value": "100000000n"
|
|
3049
|
+
},
|
|
3050
|
+
{
|
|
3051
|
+
"key": "tokenToDeposit",
|
|
3052
|
+
"value": "0xf0F161fDA2712DB8b566946122a5af183995e2eD"
|
|
3053
|
+
}
|
|
3054
|
+
]
|
|
3055
|
+
}
|
|
3056
|
+
],
|
|
3057
|
+
"checks": [
|
|
3058
|
+
{
|
|
3059
|
+
"type": 0,
|
|
3060
|
+
"chainId": "{{parameters.chainId}}",
|
|
3061
|
+
"contractAddress": "{{parameters.tokenToDeposit}}",
|
|
3062
|
+
"amount": "{{parameters.abi.parameters.amount}}"
|
|
3063
|
+
}
|
|
3064
|
+
],
|
|
3065
|
+
"requiredApprovals": [
|
|
3066
|
+
{
|
|
3067
|
+
"address": "{{parameters.tokenToDeposit}}",
|
|
3068
|
+
"amount": "{{parameters.abi.parameters.amount}}",
|
|
3069
|
+
"to": "{{before.contractAddress}}"
|
|
3070
|
+
}
|
|
3071
|
+
],
|
|
3072
|
+
"output": {
|
|
3073
|
+
"transactionHash": "string"
|
|
3074
|
+
},
|
|
3075
|
+
"permissions": {
|
|
3076
|
+
"chainId": "{{parameters.chainId}}",
|
|
3077
|
+
"approvedTargets": [
|
|
3078
|
+
"{{parameters.tokenToDeposit}}",
|
|
3079
|
+
"{{before.contractAddress}}"
|
|
3080
|
+
],
|
|
3081
|
+
"label": [
|
|
3082
|
+
"Deposit {{tokenSymbol({{parameters.chainId}}, {{parameters.tokenToDeposit}})}} on IONIC"
|
|
3083
|
+
],
|
|
3084
|
+
"labelNotAuthorized": [
|
|
3085
|
+
"Transfer {{tokenSymbol({{parameters.chainId}}, {{parameters.tokenToDeposit}})}}"
|
|
3086
|
+
]
|
|
3087
|
+
},
|
|
3088
|
+
"batchWith": [
|
|
3089
|
+
{
|
|
3090
|
+
"id": 100012,
|
|
3091
|
+
"type": 0,
|
|
3092
|
+
"conditions": [],
|
|
3093
|
+
"parameters": {
|
|
3094
|
+
"chainId": "{{parameters.chainId}}",
|
|
3095
|
+
"abi": {
|
|
3096
|
+
"parameters": {
|
|
3097
|
+
"tokens": [
|
|
3098
|
+
"{{before.contractAddress}}"
|
|
3099
|
+
]
|
|
3100
|
+
}
|
|
3101
|
+
}
|
|
3102
|
+
}
|
|
3103
|
+
}
|
|
3104
|
+
],
|
|
3105
|
+
"blockId": 100006,
|
|
3106
|
+
"image": "https://otomato-sdk-images.s3.eu-west-1.amazonaws.com/ionic.jpg"
|
|
3107
|
+
},
|
|
3108
|
+
"WITHDRAW": {
|
|
3109
|
+
"name": "Withdraw Asset from Ionic",
|
|
3110
|
+
"description": "Withdraw token deposited in any lending pool",
|
|
3111
|
+
"type": 1,
|
|
3112
|
+
"method": "function redeemUnderlying(uint256 amount) public returns (uint256)",
|
|
3113
|
+
"parameters": [
|
|
3114
|
+
{
|
|
3115
|
+
"key": "chainId",
|
|
3116
|
+
"type": "chainId",
|
|
3117
|
+
"description": "Chain ID of the network",
|
|
3118
|
+
"mandatory": true,
|
|
3119
|
+
"category": 0
|
|
3120
|
+
},
|
|
3121
|
+
{
|
|
3122
|
+
"key": "tokenToWithdraw",
|
|
3123
|
+
"type": "erc20",
|
|
3124
|
+
"description": "The token to withdraw",
|
|
3125
|
+
"mandatory": true,
|
|
3126
|
+
"enum": "\n (env) => {\n if (!env.parameters.chainId)\n throw new Error('You need to provide the chainId first');\n \n const availableTokens = {\n \"8453\": [\n \"0x833589fcd6edb6e08f4c7c32d4f71b54bda02913\",\n \"0xc1cba3fcea344f92d9239c08c0568f6f2f0ee452\",\n \"0x4200000000000000000000000000000000000006\",\n \"0x5d3a1Ff2b6BAb83b63cd9AD0787074081a52ef34\",\n \"0xcbb7c0000ab88b473b1f5afd9ef808440eed33bf\",\n \"0x940181a94a35a4569e4529a3cdfb74e38fd98631\",\n \"0x2Ae3F1Ec7F1F5012CFEab0185bfc7aa3cf0DEc22\",\n \"0x04C0599Ae5A44757c0af6F9eC3b93da8976c150A\",\n \"0xCfA3Ef56d303AE4fAabA0592388F19d7C3399FB4\",\n \"0xCb327b99fF831bF8223cCEd12B1338FF3aA322Ff\",\n \"0xCc7FF230365bD730eE4B352cC2492CEdAC49383e\",\n \"0xaB36452DbAC151bE02b16Ca17d8919826072f64a\",\n \"0xDBFeFD2e8460a6Ee4955A68582F85708BAEA60A3\",\n \"0x59D9356E565Ab3A36dD77763Fc0d87fEaf85508C\",\n \"0x7002458B1DF59EccB57387bC79fFc7C29E22e6f7\",\n \"0x04D5ddf5f3a8939889F11E97f8c4BB48317F1938\",\n \"0xd95ca61CE9aAF2143E81Ef5462C0c2325172E028\",\n \"0xe31eE12bDFDD0573D634124611e85338e2cBF0cF\",\n \"0x9B8Df6E244526ab5F6e6400d331DB28C8fdDdb55\",\n \"0xb0505e5a99abd03d94a1169e638B78EDfEd26ea4\"\n ],\n \"34443\": [\n \"0xf0F161fDA2712DB8b566946122a5af183995e2eD\",\n \"0xd988097fb8612cc24eeC14542bC03424c656005f\",\n \"0x2416092f143378750bb29b79eD961ab195CcEea5\",\n \"0x4200000000000000000000000000000000000006\",\n \"0xcDd475325D6F564d27247D1DddBb0DAc6fA0a5CF\",\n \"0x80137510979822322193FC997d400D5A6C747bf7\",\n \"0xe7903B1F75C534Dd8159b313d92cDCfbC62cB3Cd\",\n \"0x04C0599Ae5A44757c0af6F9eC3b93da8976c150A\",\n \"0x59889b7021243dB5B1e065385F918316cD90D46c\"\n ]\n};\n const chainId = env.parameters.chainId;\n return availableTokens[chainId] || [];\n }",
|
|
3127
|
+
"category": 0
|
|
3128
|
+
},
|
|
3129
|
+
{
|
|
3130
|
+
"key": "abiParams.amount",
|
|
3131
|
+
"type": "uint256",
|
|
3132
|
+
"description": "Amount of crypto to withdraw",
|
|
3133
|
+
"mandatory": true,
|
|
3134
|
+
"category": 0,
|
|
3135
|
+
"erc20FormattedAmount": {
|
|
3136
|
+
"contractAddress": "{{before.contractAddress}}",
|
|
3137
|
+
"chain": "{{parameters.chainId}}"
|
|
3138
|
+
}
|
|
3139
|
+
},
|
|
3140
|
+
],
|
|
3141
|
+
"examples": [
|
|
3142
|
+
{
|
|
3143
|
+
"name": "Withdraw 100 USDT",
|
|
3144
|
+
"description": "Withdraw 100 USDT on Ionic on Mode",
|
|
3145
|
+
"parameters": [
|
|
3146
|
+
{
|
|
3147
|
+
"key": "chainId",
|
|
3148
|
+
"value": 34443
|
|
3149
|
+
},
|
|
3150
|
+
{
|
|
3151
|
+
"key": "abiParams.amount",
|
|
3152
|
+
"value": "100000000n"
|
|
3153
|
+
},
|
|
3154
|
+
{
|
|
3155
|
+
"key": "tokenToWithdraw",
|
|
3156
|
+
"value": "0xf0F161fDA2712DB8b566946122a5af183995e2eD"
|
|
3157
|
+
}
|
|
3158
|
+
]
|
|
3159
|
+
},
|
|
3160
|
+
{
|
|
3161
|
+
"name": "Withdraw all",
|
|
3162
|
+
"description": "Withdraw all supplied amount of an asset",
|
|
3163
|
+
"parameters": [
|
|
3164
|
+
{
|
|
3165
|
+
"key": "chainId",
|
|
3166
|
+
"value": 8453
|
|
3167
|
+
},
|
|
3168
|
+
{
|
|
3169
|
+
"key": "abiParams.amount",
|
|
3170
|
+
"value": "115792089237316195423570985008687907853269984665640564039457584007913129639935n"
|
|
3171
|
+
}
|
|
3172
|
+
]
|
|
3173
|
+
}
|
|
3174
|
+
],
|
|
3175
|
+
"requiredApprovals": [],
|
|
3176
|
+
"output": {
|
|
3177
|
+
"transactionHash": "string"
|
|
3178
|
+
},
|
|
3179
|
+
"permissions": {
|
|
3180
|
+
"chainId": "{{parameters.chainId}}",
|
|
3181
|
+
"approvedTargets": [
|
|
3182
|
+
"{{before.contractAddress}}"
|
|
3183
|
+
],
|
|
3184
|
+
"label": [
|
|
3185
|
+
"Withdraw {{tokenSymbol({{parameters.chainId}}, {{parameters.tokenToWithdraw}})}} from IONIC"
|
|
3186
|
+
],
|
|
3187
|
+
"labelNotAuthorized": [
|
|
3188
|
+
"Transfer {{tokenSymbol({{parameters.chainId}}, {{parameters.tokenToWithdraw}})}}"
|
|
3189
|
+
]
|
|
3190
|
+
},
|
|
3191
|
+
"checks": [
|
|
3192
|
+
{
|
|
3193
|
+
"type": 0,
|
|
3194
|
+
"chainId": "{{parameters.chainId}}",
|
|
3195
|
+
"contractAddress": "{{before.contractAddress}}",
|
|
3196
|
+
"amount": "{{parameters.abi.parameters.amount}}"
|
|
3197
|
+
}
|
|
3198
|
+
],
|
|
3199
|
+
"blockId": 100007,
|
|
3200
|
+
"image": "https://otomato-sdk-images.s3.eu-west-1.amazonaws.com/ionic.jpg"
|
|
3201
|
+
},
|
|
3202
|
+
"BORROW": {
|
|
3203
|
+
"name": "Borrow asset",
|
|
3204
|
+
"description": "Borrow any token against your collateral",
|
|
3205
|
+
"type": 1,
|
|
3206
|
+
"method": "function borrow(uint256 amount) external returns (uint256)",
|
|
3207
|
+
"parameters": [
|
|
3208
|
+
{
|
|
3209
|
+
"key": "chainId",
|
|
3210
|
+
"type": "chainId",
|
|
3211
|
+
"description": "Chain ID of the network",
|
|
3212
|
+
"mandatory": true,
|
|
3213
|
+
"category": 0
|
|
3214
|
+
},
|
|
3215
|
+
{
|
|
3216
|
+
"key": "tokenToBorrow",
|
|
3217
|
+
"type": "erc20",
|
|
3218
|
+
"description": "The token to borrow",
|
|
3219
|
+
"mandatory": true,
|
|
3220
|
+
"enum": "\n (env) => {\n if (!env.parameters.chainId)\n throw new Error('You need to provide the chainId first');\n \n const availableTokens = {\n \"8453\": [\n \"0x833589fcd6edb6e08f4c7c32d4f71b54bda02913\",\n \"0xc1cba3fcea344f92d9239c08c0568f6f2f0ee452\",\n \"0x4200000000000000000000000000000000000006\",\n \"0x5d3a1Ff2b6BAb83b63cd9AD0787074081a52ef34\",\n \"0xcbb7c0000ab88b473b1f5afd9ef808440eed33bf\",\n \"0x940181a94a35a4569e4529a3cdfb74e38fd98631\",\n \"0x2Ae3F1Ec7F1F5012CFEab0185bfc7aa3cf0DEc22\",\n \"0x04C0599Ae5A44757c0af6F9eC3b93da8976c150A\",\n \"0xCfA3Ef56d303AE4fAabA0592388F19d7C3399FB4\",\n \"0xCb327b99fF831bF8223cCEd12B1338FF3aA322Ff\",\n \"0xCc7FF230365bD730eE4B352cC2492CEdAC49383e\",\n \"0xaB36452DbAC151bE02b16Ca17d8919826072f64a\",\n \"0xDBFeFD2e8460a6Ee4955A68582F85708BAEA60A3\",\n \"0x59D9356E565Ab3A36dD77763Fc0d87fEaf85508C\",\n \"0x7002458B1DF59EccB57387bC79fFc7C29E22e6f7\",\n \"0x04D5ddf5f3a8939889F11E97f8c4BB48317F1938\",\n \"0xd95ca61CE9aAF2143E81Ef5462C0c2325172E028\",\n \"0xe31eE12bDFDD0573D634124611e85338e2cBF0cF\",\n \"0x9B8Df6E244526ab5F6e6400d331DB28C8fdDdb55\",\n \"0xb0505e5a99abd03d94a1169e638B78EDfEd26ea4\"\n ],\n \"34443\": [\n \"0xf0F161fDA2712DB8b566946122a5af183995e2eD\",\n \"0xd988097fb8612cc24eeC14542bC03424c656005f\",\n \"0x2416092f143378750bb29b79eD961ab195CcEea5\",\n \"0x4200000000000000000000000000000000000006\",\n \"0xcDd475325D6F564d27247D1DddBb0DAc6fA0a5CF\",\n \"0x80137510979822322193FC997d400D5A6C747bf7\",\n \"0xe7903B1F75C534Dd8159b313d92cDCfbC62cB3Cd\",\n \"0x04C0599Ae5A44757c0af6F9eC3b93da8976c150A\",\n \"0x59889b7021243dB5B1e065385F918316cD90D46c\"\n ]\n};\n const chainId = env.parameters.chainId;\n return availableTokens[chainId] || [];\n }",
|
|
3221
|
+
"category": 0
|
|
3222
|
+
},
|
|
3223
|
+
{
|
|
3224
|
+
"key": "abiParams.amount",
|
|
3225
|
+
"type": "uint256",
|
|
3226
|
+
"description": "Amount of crypto to borrow",
|
|
3227
|
+
"mandatory": true,
|
|
3228
|
+
"category": 0,
|
|
3229
|
+
"erc20FormattedAmount": {
|
|
3230
|
+
"contractAddress": "{{parameters.tokenToBorrow}}",
|
|
3231
|
+
"chain": "{{parameters.chainId}}"
|
|
3232
|
+
}
|
|
3233
|
+
},
|
|
3234
|
+
],
|
|
3235
|
+
"examples": [
|
|
3236
|
+
{
|
|
3237
|
+
"name": "Borrow 100 USDT",
|
|
3238
|
+
"description": "Borrow 100 USDT on Ionic on Mode",
|
|
3239
|
+
"parameters": [
|
|
3240
|
+
{
|
|
3241
|
+
"key": "chainId",
|
|
3242
|
+
"value": 34443
|
|
3243
|
+
},
|
|
3244
|
+
{
|
|
3245
|
+
"key": "abiParams.amount",
|
|
3246
|
+
"value": "100000000n"
|
|
3247
|
+
},
|
|
3248
|
+
{
|
|
3249
|
+
"key": "tokenToBorrow",
|
|
3250
|
+
"value": "0xf0F161fDA2712DB8b566946122a5af183995e2eD"
|
|
3251
|
+
}
|
|
3252
|
+
]
|
|
3253
|
+
}
|
|
3254
|
+
],
|
|
3255
|
+
"requiredApprovals": [],
|
|
3256
|
+
"output": {
|
|
3257
|
+
"transactionHash": "string"
|
|
3258
|
+
},
|
|
3259
|
+
"permissions": {
|
|
3260
|
+
"chainId": "{{parameters.chainId}}",
|
|
3261
|
+
"approvedTargets": [
|
|
3262
|
+
"{{before.contractAddress}}"
|
|
3263
|
+
],
|
|
3264
|
+
"label": [
|
|
3265
|
+
"Borrow {{tokenSymbol({{parameters.chainId}}, {{parameters.tokenToBorrow}})}} on IONIC"
|
|
3266
|
+
],
|
|
3267
|
+
"labelNotAuthorized": [
|
|
3268
|
+
"Transfer {{tokenSymbol({{parameters.chainId}}, {{parameters.tokenToBorrow}})}}"
|
|
3269
|
+
]
|
|
3270
|
+
},
|
|
3271
|
+
"blockId": 100008,
|
|
3272
|
+
"image": "https://otomato-sdk-images.s3.eu-west-1.amazonaws.com/ionic.jpg"
|
|
3273
|
+
},
|
|
3274
|
+
"REPAY": {
|
|
3275
|
+
"name": "Repay asset",
|
|
3276
|
+
"description": "Repay a token that you borrowed",
|
|
3277
|
+
"type": 1,
|
|
3278
|
+
"method": "function repayBorrow(uint256 amount) external returns (uint256)",
|
|
3279
|
+
"parameters": [
|
|
3280
|
+
{
|
|
3281
|
+
"key": "chainId",
|
|
3282
|
+
"type": "chainId",
|
|
3283
|
+
"description": "Chain ID of the network",
|
|
3284
|
+
"mandatory": true,
|
|
3285
|
+
"category": 0
|
|
3286
|
+
},
|
|
3287
|
+
{
|
|
3288
|
+
"key": "tokenToRepay",
|
|
3289
|
+
"type": "erc20",
|
|
3290
|
+
"description": "The token to repay",
|
|
3291
|
+
"mandatory": true,
|
|
3292
|
+
"enum": "\n (env) => {\n if (!env.parameters.chainId)\n throw new Error('You need to provide the chainId first');\n \n const availableTokens = {\n \"8453\": [\n \"0x833589fcd6edb6e08f4c7c32d4f71b54bda02913\",\n \"0xc1cba3fcea344f92d9239c08c0568f6f2f0ee452\",\n \"0x4200000000000000000000000000000000000006\",\n \"0x5d3a1Ff2b6BAb83b63cd9AD0787074081a52ef34\",\n \"0xcbb7c0000ab88b473b1f5afd9ef808440eed33bf\",\n \"0x940181a94a35a4569e4529a3cdfb74e38fd98631\",\n \"0x2Ae3F1Ec7F1F5012CFEab0185bfc7aa3cf0DEc22\",\n \"0x04C0599Ae5A44757c0af6F9eC3b93da8976c150A\",\n \"0xCfA3Ef56d303AE4fAabA0592388F19d7C3399FB4\",\n \"0xCb327b99fF831bF8223cCEd12B1338FF3aA322Ff\",\n \"0xCc7FF230365bD730eE4B352cC2492CEdAC49383e\",\n \"0xaB36452DbAC151bE02b16Ca17d8919826072f64a\",\n \"0xDBFeFD2e8460a6Ee4955A68582F85708BAEA60A3\",\n \"0x59D9356E565Ab3A36dD77763Fc0d87fEaf85508C\",\n \"0x7002458B1DF59EccB57387bC79fFc7C29E22e6f7\",\n \"0x04D5ddf5f3a8939889F11E97f8c4BB48317F1938\",\n \"0xd95ca61CE9aAF2143E81Ef5462C0c2325172E028\",\n \"0xe31eE12bDFDD0573D634124611e85338e2cBF0cF\",\n \"0x9B8Df6E244526ab5F6e6400d331DB28C8fdDdb55\",\n \"0xb0505e5a99abd03d94a1169e638B78EDfEd26ea4\"\n ],\n \"34443\": [\n \"0xf0F161fDA2712DB8b566946122a5af183995e2eD\",\n \"0xd988097fb8612cc24eeC14542bC03424c656005f\",\n \"0x2416092f143378750bb29b79eD961ab195CcEea5\",\n \"0x4200000000000000000000000000000000000006\",\n \"0xcDd475325D6F564d27247D1DddBb0DAc6fA0a5CF\",\n \"0x80137510979822322193FC997d400D5A6C747bf7\",\n \"0xe7903B1F75C534Dd8159b313d92cDCfbC62cB3Cd\",\n \"0x04C0599Ae5A44757c0af6F9eC3b93da8976c150A\",\n \"0x59889b7021243dB5B1e065385F918316cD90D46c\"\n ]\n};\n const chainId = env.parameters.chainId;\n return availableTokens[chainId] || [];\n }",
|
|
3293
|
+
"category": 0
|
|
3294
|
+
},
|
|
3295
|
+
{
|
|
3296
|
+
"key": "abiParams.amount",
|
|
3297
|
+
"type": "uint256",
|
|
3298
|
+
"description": "Amount of crypto to repay",
|
|
3299
|
+
"mandatory": true,
|
|
3300
|
+
"category": 0,
|
|
3301
|
+
"erc20FormattedAmount": {
|
|
3302
|
+
"contractAddress": "{{parameters.tokenToRepay}}",
|
|
3303
|
+
"chain": "{{parameters.chainId}}"
|
|
3304
|
+
}
|
|
3305
|
+
},
|
|
3306
|
+
],
|
|
3307
|
+
"checks": [
|
|
3308
|
+
{
|
|
3309
|
+
"type": 0,
|
|
3310
|
+
"chainId": "{{parameters.chainId}}",
|
|
3311
|
+
"contractAddress": "{{parameters.tokenToRepay}}",
|
|
3312
|
+
"amount": "{{parameters.abi.parameters.amount}}"
|
|
3313
|
+
}
|
|
3314
|
+
],
|
|
3315
|
+
"examples": [
|
|
3316
|
+
{
|
|
3317
|
+
"name": "Repay 100 USDT",
|
|
3318
|
+
"description": "Repay 100 USDT on Ionic on Mode",
|
|
3319
|
+
"parameters": [
|
|
3320
|
+
{
|
|
3321
|
+
"key": "chainId",
|
|
3322
|
+
"value": 34443
|
|
3323
|
+
},
|
|
3324
|
+
{
|
|
3325
|
+
"key": "abiParams.amount",
|
|
3326
|
+
"value": "100000000n"
|
|
3327
|
+
},
|
|
3328
|
+
{
|
|
3329
|
+
"key": "tokenToRepay",
|
|
3330
|
+
"value": "0xf0F161fDA2712DB8b566946122a5af183995e2eD"
|
|
3331
|
+
}
|
|
3332
|
+
]
|
|
3333
|
+
}
|
|
3334
|
+
],
|
|
3335
|
+
"requiredApprovals": [
|
|
3336
|
+
{
|
|
3337
|
+
"address": "{{parameters.tokenToRepay}}",
|
|
3338
|
+
"amount": "{{parameters.abi.parameters.amount}}",
|
|
3339
|
+
"to": "{{before.contractAddress}}"
|
|
3340
|
+
}
|
|
3341
|
+
],
|
|
3342
|
+
"output": {
|
|
3343
|
+
"transactionHash": "string"
|
|
3344
|
+
},
|
|
3345
|
+
"permissions": {
|
|
3346
|
+
"chainId": "{{parameters.chainId}}",
|
|
3347
|
+
"approvedTargets": [
|
|
3348
|
+
"{{before.contractAddress}}",
|
|
3349
|
+
"{{parameters.tokenToRepay}}"
|
|
3350
|
+
],
|
|
3351
|
+
"label": [
|
|
3352
|
+
"Repay {{tokenSymbol({{parameters.chainId}}, {{parameters.tokenToRepay}})}} on IONIC"
|
|
3353
|
+
],
|
|
3354
|
+
"labelNotAuthorized": [
|
|
3355
|
+
"Transfer {{tokenSymbol({{parameters.chainId}}, {{parameters.tokenToRepay}})}}"
|
|
3356
|
+
]
|
|
3357
|
+
},
|
|
3358
|
+
"blockId": 100009,
|
|
3359
|
+
"image": "https://otomato-sdk-images.s3.eu-west-1.amazonaws.com/ionic.jpg"
|
|
3360
|
+
},
|
|
3361
|
+
"ENABLE_COLLATERAL": {
|
|
3362
|
+
"showInUI": false,
|
|
3363
|
+
"name": "Enable collaterals",
|
|
3364
|
+
"description": "Enable collateral to be able to borrow against it.",
|
|
3365
|
+
"type": 1,
|
|
3366
|
+
"method": "function enterMarkets(address[] tokens) returns (uint256[])",
|
|
3367
|
+
"parameters": [
|
|
3368
|
+
{
|
|
3369
|
+
"key": "chainId",
|
|
3370
|
+
"type": "chainId",
|
|
3371
|
+
"description": "Chain ID of the network",
|
|
3372
|
+
"mandatory": true,
|
|
3373
|
+
"category": 0
|
|
3374
|
+
},
|
|
3375
|
+
{
|
|
3376
|
+
"key": "abiParams.tokens",
|
|
3377
|
+
"type": "addresses_array",
|
|
3378
|
+
"description": "List of collaterals",
|
|
3379
|
+
"mandatory": true,
|
|
3380
|
+
"category": 0
|
|
3381
|
+
},
|
|
3382
|
+
],
|
|
3383
|
+
"examples": [],
|
|
3384
|
+
"permissions": {
|
|
3385
|
+
"chainId": "{{parameters.chainId}}",
|
|
3386
|
+
"approvedTargets": [
|
|
3387
|
+
"{{before.contractAddress}}"
|
|
3388
|
+
],
|
|
3389
|
+
"label": [
|
|
3390
|
+
"Enable {{tokenSymbol({{parameters.chainId}}, {{parameters.abi.parameters.tokens[0]}})}} as collateral on IONIC"
|
|
3391
|
+
],
|
|
3392
|
+
"labelNotAuthorized": [
|
|
3393
|
+
"Transfer {{tokenSymbol({{parameters.chainId}}, {{parameters.abi.parameters.tokens[0]}})}}"
|
|
3394
|
+
]
|
|
3395
|
+
},
|
|
3396
|
+
"blockId": 100012,
|
|
3397
|
+
"image": "https://otomato-sdk-images.s3.eu-west-1.amazonaws.com/ionic.jpg"
|
|
3398
|
+
}
|
|
3399
|
+
},
|
|
3400
|
+
"AAVE": {
|
|
3401
|
+
"description": "A leading DeFi protocol enabling secure borrowing, lending, and yield generation across multiple assets.",
|
|
3402
|
+
"chains": [
|
|
3403
|
+
8453,
|
|
3404
|
+
534352
|
|
3405
|
+
],
|
|
3406
|
+
"image": "https://otomato-sdk-images.s3.eu-west-1.amazonaws.com/aave.png",
|
|
3407
|
+
"SUPPLY": {
|
|
3408
|
+
"name": "Supply asset to Aave",
|
|
3409
|
+
"description": "Supply an asset to AAVE",
|
|
3410
|
+
"type": 1,
|
|
3411
|
+
"method": "function supply(address asset, uint256 amount, address onBehalfOf, uint16 referralCode)",
|
|
3412
|
+
"parameters": [
|
|
3413
|
+
{
|
|
3414
|
+
"key": "chainId",
|
|
3415
|
+
"type": "chainId",
|
|
3416
|
+
"description": "Chain ID of the network",
|
|
3417
|
+
"mandatory": true,
|
|
3418
|
+
"category": 0
|
|
3419
|
+
},
|
|
3420
|
+
{
|
|
3421
|
+
"key": "abiParams.asset",
|
|
3422
|
+
"type": "erc20",
|
|
3423
|
+
"description": "The token to supply",
|
|
3424
|
+
"mandatory": true,
|
|
3425
|
+
"enum": "\n (env) => {\n if (!env.parameters.chainId)\n throw new Error('You need to provide the chainId first');\n\n const availableLendingTokens = {\n \"8453\": [\n \"0x4200000000000000000000000000000000000006\",\n \"0x04C0599Ae5A44757c0af6F9eC3b93da8976c150A\",\n \"0x833589fcd6edb6e08f4c7c32d4f71b54bda02913\",\n \"0xcbb7c0000ab88b473b1f5afd9ef808440eed33bf\",\n \"0xc1cba3fcea344f92d9239c08c0568f6f2f0ee452\",\n \"0x2Ae3F1Ec7F1F5012CFEab0185bfc7aa3cf0DEc22\",\n \"0xd9aAEc86B65D86f6A7B5B1b0c42FFA531710b6CA\"\n ]\n};\n return availableLendingTokens[env.parameters.chainId] || [];\n }",
|
|
3426
|
+
"category": 0
|
|
3427
|
+
},
|
|
3428
|
+
{
|
|
3429
|
+
"key": "abiParams.amount",
|
|
3430
|
+
"type": "uint256",
|
|
3431
|
+
"description": "The amount of the asset to supply",
|
|
3432
|
+
"mandatory": true,
|
|
3433
|
+
"category": 0,
|
|
3434
|
+
"erc20FormattedAmount": {
|
|
3435
|
+
"contractAddress": "{{parameters.abi.parameters.asset}}",
|
|
3436
|
+
"chain": "{{parameters.chainId}}"
|
|
3437
|
+
}
|
|
3438
|
+
},
|
|
3439
|
+
{
|
|
3440
|
+
"key": "abiParams.onBehalfOf",
|
|
3441
|
+
"type": "address",
|
|
3442
|
+
"description": "The address to receive aTokens",
|
|
3443
|
+
"hideInUI": true,
|
|
3444
|
+
"category": 1
|
|
3445
|
+
},
|
|
3446
|
+
{
|
|
3447
|
+
"key": "abiParams.referralCode",
|
|
3448
|
+
"type": "uint16",
|
|
3449
|
+
"description": "Referral code (use 0, as inactive)",
|
|
3450
|
+
"hideInUI": true,
|
|
3451
|
+
"category": 1,
|
|
3452
|
+
"value": 0
|
|
3453
|
+
},
|
|
3454
|
+
],
|
|
3455
|
+
"requiredApprovals": [
|
|
3456
|
+
{
|
|
3457
|
+
"address": "{{parameters.abi.parameters.asset}}",
|
|
3458
|
+
"amount": "{{parameters.abi.parameters.amount}}",
|
|
3459
|
+
"to": "{{before.contractAddress}}"
|
|
3460
|
+
}
|
|
3461
|
+
],
|
|
3462
|
+
"checks": [
|
|
3463
|
+
{
|
|
3464
|
+
"type": 0,
|
|
3465
|
+
"chainId": "{{parameters.chainId}}",
|
|
3466
|
+
"contractAddress": "{{parameters.abi.parameters.asset}}",
|
|
3467
|
+
"amount": "{{parameters.abi.parameters.amount}}"
|
|
3468
|
+
}
|
|
3469
|
+
],
|
|
3470
|
+
"examples": [
|
|
3471
|
+
{
|
|
3472
|
+
"name": "Supply USDC",
|
|
3473
|
+
"description": "Supply 100 USDC to Aave on the Base network",
|
|
3474
|
+
"parameters": [
|
|
3475
|
+
{
|
|
3476
|
+
"key": "chainId",
|
|
3477
|
+
"value": 8453
|
|
3478
|
+
},
|
|
3479
|
+
{
|
|
3480
|
+
"key": "abiParams.asset",
|
|
3481
|
+
"value": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913"
|
|
3482
|
+
},
|
|
3483
|
+
{
|
|
3484
|
+
"key": "abiParams.amount",
|
|
3485
|
+
"value": "100000000n"
|
|
3486
|
+
},
|
|
3487
|
+
{
|
|
3488
|
+
"key": "abiParams.onBehalfOf",
|
|
3489
|
+
"value": ""
|
|
3490
|
+
},
|
|
3491
|
+
{
|
|
3492
|
+
"key": "abiParams.referralCode",
|
|
3493
|
+
"value": 0
|
|
3494
|
+
}
|
|
3495
|
+
]
|
|
3496
|
+
}
|
|
3497
|
+
],
|
|
3498
|
+
"output": {
|
|
3499
|
+
"transactionHash": "string"
|
|
3500
|
+
},
|
|
3501
|
+
"permissions": {
|
|
3502
|
+
"chainId": "{{parameters.chainId}}",
|
|
3503
|
+
"approvedTargets": [
|
|
3504
|
+
"{{parameters.abi.parameters.asset}}",
|
|
3505
|
+
"{{before.contractAddress}}"
|
|
3506
|
+
],
|
|
3507
|
+
"label": [
|
|
3508
|
+
"Supply {{tokenSymbol({{parameters.chainId}}, {{parameters.abi.parameters.asset}})}} on Aave"
|
|
3509
|
+
],
|
|
3510
|
+
"labelNotAuthorized": [
|
|
3511
|
+
"Transfer {{tokenSymbol({{parameters.chainId}}, {{parameters.abi.parameters.asset}})}}"
|
|
3512
|
+
]
|
|
3513
|
+
},
|
|
3514
|
+
"blockId": 100020,
|
|
3515
|
+
"image": "https://otomato-sdk-images.s3.eu-west-1.amazonaws.com/aave.png"
|
|
3516
|
+
},
|
|
3517
|
+
"WITHDRAW": {
|
|
3518
|
+
"name": "Withdraw Asset from Aave",
|
|
3519
|
+
"description": "Withdraw a supplied asset from the Aave pool.",
|
|
3520
|
+
"type": 1,
|
|
3521
|
+
"method": "function withdraw(address asset, uint256 amount, address to) returns (uint256)",
|
|
3522
|
+
"parameters": [
|
|
3523
|
+
{
|
|
3524
|
+
"key": "chainId",
|
|
3525
|
+
"type": "chainId",
|
|
3526
|
+
"description": "Chain ID of the network",
|
|
3527
|
+
"mandatory": true,
|
|
3528
|
+
"category": 0
|
|
3529
|
+
},
|
|
3530
|
+
{
|
|
3531
|
+
"key": "abiParams.asset",
|
|
3532
|
+
"type": "erc20",
|
|
3533
|
+
"description": "The address of the asset to withdraw",
|
|
3534
|
+
"mandatory": true,
|
|
3535
|
+
"enum": "\n (env) => {\n if (!env.parameters.chainId)\n throw new Error('You need to provide the chainId first');\n\n const availableLendingTokens = {\n \"8453\": [\n \"0x4200000000000000000000000000000000000006\",\n \"0x04C0599Ae5A44757c0af6F9eC3b93da8976c150A\",\n \"0x833589fcd6edb6e08f4c7c32d4f71b54bda02913\",\n \"0xcbb7c0000ab88b473b1f5afd9ef808440eed33bf\",\n \"0xc1cba3fcea344f92d9239c08c0568f6f2f0ee452\",\n \"0x2Ae3F1Ec7F1F5012CFEab0185bfc7aa3cf0DEc22\",\n \"0xd9aAEc86B65D86f6A7B5B1b0c42FFA531710b6CA\"\n ]\n};\n return availableLendingTokens[env.parameters.chainId] || [];\n }",
|
|
3536
|
+
"category": 0
|
|
3537
|
+
},
|
|
3538
|
+
{
|
|
3539
|
+
"key": "abiParams.amount",
|
|
3540
|
+
"type": "uint256",
|
|
3541
|
+
"description": "The amount of the asset to withdraw. Use type(uint).max for full balance.",
|
|
3542
|
+
"mandatory": true,
|
|
3543
|
+
"category": 0,
|
|
3544
|
+
"erc20FormattedAmount": {
|
|
3545
|
+
"contractAddress": "{{parameters.abi.parameters.asset}}",
|
|
3546
|
+
"chain": "{{parameters.chainId}}"
|
|
3547
|
+
},
|
|
3548
|
+
"default": "type(uint256).max"
|
|
3549
|
+
},
|
|
3550
|
+
{
|
|
3551
|
+
"key": "abiParams.to",
|
|
3552
|
+
"type": "address",
|
|
3553
|
+
"description": "The address to receive the withdrawn asset",
|
|
3554
|
+
"category": 0,
|
|
3555
|
+
"hideInUI": true
|
|
3556
|
+
},
|
|
3557
|
+
],
|
|
3558
|
+
"examples": [
|
|
3559
|
+
{
|
|
3560
|
+
"name": "Withdraw USDC",
|
|
3561
|
+
"description": "Withdraw 10 USDC from Aave on the Base network",
|
|
3562
|
+
"parameters": [
|
|
3563
|
+
{
|
|
3564
|
+
"key": "chainId",
|
|
3565
|
+
"value": 8453
|
|
3566
|
+
},
|
|
3567
|
+
{
|
|
3568
|
+
"key": "abiParams.asset",
|
|
3569
|
+
"value": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913"
|
|
3570
|
+
},
|
|
3571
|
+
{
|
|
3572
|
+
"key": "abiParams.amount",
|
|
3573
|
+
"value": "10000000n"
|
|
3574
|
+
},
|
|
3575
|
+
{
|
|
3576
|
+
"key": "abiParams.to",
|
|
3577
|
+
"value": ""
|
|
3578
|
+
}
|
|
3579
|
+
]
|
|
3580
|
+
},
|
|
3581
|
+
{
|
|
3582
|
+
"name": "Withdraw all",
|
|
3583
|
+
"description": "Withdraw all supplied amount of an asset",
|
|
3584
|
+
"parameters": [
|
|
3585
|
+
{
|
|
3586
|
+
"key": "chainId",
|
|
3587
|
+
"value": 8453
|
|
3588
|
+
},
|
|
3589
|
+
{
|
|
3590
|
+
"key": "abiParams.amount",
|
|
3591
|
+
"value": "115792089237316195423570985008687907853269984665640564039457584007913129639935n"
|
|
3592
|
+
},
|
|
3593
|
+
{
|
|
3594
|
+
"key": "abiParams.to",
|
|
3595
|
+
"value": ""
|
|
3596
|
+
}
|
|
3597
|
+
]
|
|
3598
|
+
}
|
|
3599
|
+
],
|
|
3600
|
+
"output": {
|
|
3601
|
+
"transactionHash": "string"
|
|
3602
|
+
},
|
|
3603
|
+
"permissions": {
|
|
3604
|
+
"chainId": "{{parameters.chainId}}",
|
|
3605
|
+
"approvedTargets": [
|
|
3606
|
+
"{{parameters.abi.parameters.asset}}",
|
|
3607
|
+
"{{before.contractAddress}}"
|
|
3608
|
+
],
|
|
3609
|
+
"label": [
|
|
3610
|
+
"Withdraw {{tokenSymbol({{parameters.chainId}}, {{parameters.abi.parameters.asset}})}} from Aave"
|
|
3611
|
+
],
|
|
3612
|
+
"labelNotAuthorized": [
|
|
3613
|
+
"Transfer {{tokenSymbol({{parameters.chainId}}, {{parameters.abi.parameters.asset}})}}"
|
|
3614
|
+
]
|
|
3615
|
+
},
|
|
3616
|
+
"checks": [
|
|
3617
|
+
{
|
|
3618
|
+
"type": 0,
|
|
3619
|
+
"chainId": "{{parameters.chainId}}",
|
|
3620
|
+
"contractAddress": "{{before.aaveToken}}",
|
|
3621
|
+
"amount": "{{parameters.abi.parameters.amount}}"
|
|
3622
|
+
}
|
|
3623
|
+
],
|
|
3624
|
+
"blockId": 100021,
|
|
3625
|
+
"image": "https://otomato-sdk-images.s3.eu-west-1.amazonaws.com/aave.png"
|
|
3626
|
+
}
|
|
3627
|
+
},
|
|
3628
|
+
"MOONWELL": {
|
|
3629
|
+
"description": "An advanced lending and borrowing platform focused on scalable, fast blockchain networks for optimal performance.",
|
|
3630
|
+
"chains": [
|
|
3631
|
+
8453
|
|
3632
|
+
],
|
|
3633
|
+
"image": "https://otomato-sdk-images.s3.eu-west-1.amazonaws.com/moonwell.png",
|
|
3634
|
+
"DEPOSIT": {
|
|
3635
|
+
"name": "Supply asset to Moonwell",
|
|
3636
|
+
"description": "Deposit token in any Moonwell lending pool",
|
|
3637
|
+
"type": 1,
|
|
3638
|
+
"method": "function mint(uint256 amount) external returns (uint256)",
|
|
3639
|
+
"parameters": [
|
|
3640
|
+
{
|
|
3641
|
+
"key": "chainId",
|
|
3642
|
+
"type": "chainId",
|
|
3643
|
+
"description": "Chain ID of the network",
|
|
3644
|
+
"mandatory": true,
|
|
3645
|
+
"category": 0
|
|
3646
|
+
},
|
|
3647
|
+
{
|
|
3648
|
+
"key": "tokenToDeposit",
|
|
3649
|
+
"type": "erc20",
|
|
3650
|
+
"description": "The token to deposit",
|
|
3651
|
+
"mandatory": true,
|
|
3652
|
+
"enum": "\n (env) => {\n if (!env.parameters.chainId)\n throw new Error('You need to provide the chainId first');\n \n const availableTokens = {\n \"8453\": [\n \"0x833589fcd6edb6e08f4c7c32d4f71b54bda02913\",\n \"0x50c5725949A6F0c72E6C4a641F24049A917DB0Cb\",\n \"0x4200000000000000000000000000000000000006\",\n \"0x2Ae3F1Ec7F1F5012CFEab0185bfc7aa3cf0DEc22\",\n \"0xc1cba3fcea344f92d9239c08c0568f6f2f0ee452\",\n \"0xB6fe221Fe9EeF5aBa221c348bA20A1Bf5e73624c\",\n \"0x04C0599Ae5A44757c0af6F9eC3b93da8976c150A\",\n \"0x940181a94a35a4569e4529a3cdfb74e38fd98631\",\n \"0xcbb7c0000ab88b473b1f5afd9ef808440eed33bf\",\n \"0x60a3E35Cc302bFA44Cb288Bc5a4F316Fdb1adb42\",\n \"0xEDfa23602D0EC14714057867A78d01e94176BEA0\"\n ]\n};\n const chainId = env.parameters.chainId;\n return availableTokens[chainId] || [];\n }",
|
|
3653
|
+
"category": 0
|
|
3654
|
+
},
|
|
3655
|
+
{
|
|
3656
|
+
"key": "abiParams.amount",
|
|
3657
|
+
"type": "uint256",
|
|
3658
|
+
"description": "Amount of token to deposit",
|
|
3659
|
+
"mandatory": true,
|
|
3660
|
+
"category": 0,
|
|
3661
|
+
"erc20FormattedAmount": {
|
|
3662
|
+
"contractAddress": "{{parameters.tokenToDeposit}}",
|
|
3663
|
+
"chain": "{{parameters.chainId}}"
|
|
3664
|
+
}
|
|
3665
|
+
},
|
|
3666
|
+
],
|
|
3667
|
+
"checks": [
|
|
3668
|
+
{
|
|
3669
|
+
"type": 0,
|
|
3670
|
+
"chainId": "{{parameters.chainId}}",
|
|
3671
|
+
"contractAddress": "{{parameters.tokenToDeposit}}",
|
|
3672
|
+
"amount": "{{parameters.abi.parameters.amount}}"
|
|
3673
|
+
}
|
|
3674
|
+
],
|
|
3675
|
+
"requiredApprovals": [
|
|
3676
|
+
{
|
|
3677
|
+
"address": "{{parameters.tokenToDeposit}}",
|
|
3678
|
+
"amount": "{{parameters.abi.parameters.amount}}",
|
|
3679
|
+
"to": "{{before.contractAddress}}"
|
|
3680
|
+
}
|
|
3681
|
+
],
|
|
3682
|
+
"output": {
|
|
3683
|
+
"transactionHash": "string"
|
|
3684
|
+
},
|
|
3685
|
+
"permissions": {
|
|
3686
|
+
"chainId": "{{parameters.chainId}}",
|
|
3687
|
+
"approvedTargets": [
|
|
3688
|
+
"{{parameters.tokenToDeposit}}",
|
|
3689
|
+
"{{before.contractAddress}}"
|
|
3690
|
+
],
|
|
3691
|
+
"label": [
|
|
3692
|
+
"Deposit {{tokenSymbol({{parameters.chainId}}, {{parameters.tokenToDeposit}})}} on MOONWELL"
|
|
3693
|
+
],
|
|
3694
|
+
"labelNotAuthorized": [
|
|
3695
|
+
"Transfer {{tokenSymbol({{parameters.chainId}}, {{parameters.tokenToDeposit}})}}"
|
|
3696
|
+
]
|
|
3697
|
+
},
|
|
3698
|
+
"batchWith": [
|
|
3699
|
+
{
|
|
3700
|
+
"id": 100026,
|
|
3701
|
+
"type": 0,
|
|
3702
|
+
"conditions": [],
|
|
3703
|
+
"parameters": {
|
|
3704
|
+
"chainId": "{{parameters.chainId}}",
|
|
3705
|
+
"abi": {
|
|
3706
|
+
"parameters": {
|
|
3707
|
+
"tokens": [
|
|
3708
|
+
"{{before.contractAddress}}"
|
|
3709
|
+
]
|
|
3710
|
+
}
|
|
3711
|
+
}
|
|
3712
|
+
}
|
|
3713
|
+
}
|
|
3714
|
+
],
|
|
3715
|
+
"examples": [
|
|
3716
|
+
{
|
|
3717
|
+
"name": "Deposit 100 USDC",
|
|
3718
|
+
"description": "Lend 100 USDC on Moonwell on Base",
|
|
3719
|
+
"parameters": [
|
|
3720
|
+
{
|
|
3721
|
+
"key": "chainId",
|
|
3722
|
+
"value": 8453
|
|
3723
|
+
},
|
|
3724
|
+
{
|
|
3725
|
+
"key": "abiParams.amount",
|
|
3726
|
+
"value": "100000000n"
|
|
3727
|
+
},
|
|
3728
|
+
{
|
|
3729
|
+
"key": "tokenToDeposit",
|
|
3730
|
+
"value": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913"
|
|
3731
|
+
}
|
|
3732
|
+
]
|
|
3733
|
+
}
|
|
3734
|
+
],
|
|
3735
|
+
"blockId": 100022,
|
|
3736
|
+
"image": "https://otomato-sdk-images.s3.eu-west-1.amazonaws.com/moonwell.png"
|
|
3737
|
+
},
|
|
3738
|
+
"WITHDRAW": {
|
|
3739
|
+
"name": "Withdraw asset from Ionic",
|
|
3740
|
+
"description": "Withdraw token deposited in any lending pool",
|
|
3741
|
+
"type": 1,
|
|
3742
|
+
"method": "function redeemUnderlying(uint256 amount) external returns (uint256)",
|
|
3743
|
+
"parameters": [
|
|
3744
|
+
{
|
|
3745
|
+
"key": "chainId",
|
|
3746
|
+
"type": "chainId",
|
|
3747
|
+
"description": "Chain ID of the network",
|
|
3748
|
+
"mandatory": true,
|
|
3749
|
+
"category": 0
|
|
3750
|
+
},
|
|
3751
|
+
{
|
|
3752
|
+
"key": "tokenToWithdraw",
|
|
3753
|
+
"type": "erc20",
|
|
3754
|
+
"description": "The token to withdraw",
|
|
3755
|
+
"mandatory": true,
|
|
3756
|
+
"enum": "\n (env) => {\n if (!env.parameters.chainId)\n throw new Error('You need to provide the chainId first');\n \n const availableTokens = {\n \"8453\": [\n \"0x833589fcd6edb6e08f4c7c32d4f71b54bda02913\",\n \"0x50c5725949A6F0c72E6C4a641F24049A917DB0Cb\",\n \"0x4200000000000000000000000000000000000006\",\n \"0x2Ae3F1Ec7F1F5012CFEab0185bfc7aa3cf0DEc22\",\n \"0xc1cba3fcea344f92d9239c08c0568f6f2f0ee452\",\n \"0xB6fe221Fe9EeF5aBa221c348bA20A1Bf5e73624c\",\n \"0x04C0599Ae5A44757c0af6F9eC3b93da8976c150A\",\n \"0x940181a94a35a4569e4529a3cdfb74e38fd98631\",\n \"0xcbb7c0000ab88b473b1f5afd9ef808440eed33bf\",\n \"0x60a3E35Cc302bFA44Cb288Bc5a4F316Fdb1adb42\",\n \"0xEDfa23602D0EC14714057867A78d01e94176BEA0\"\n ]\n};\n const chainId = env.parameters.chainId;\n return availableTokens[chainId] || [];\n }",
|
|
3757
|
+
"category": 0
|
|
3758
|
+
},
|
|
3759
|
+
{
|
|
3760
|
+
"key": "abiParams.amount",
|
|
3761
|
+
"type": "uint256",
|
|
3762
|
+
"description": "Amount of token to withdraw",
|
|
3763
|
+
"mandatory": true,
|
|
3764
|
+
"category": 0,
|
|
3765
|
+
"erc20FormattedAmount": {
|
|
3766
|
+
"contractAddress": "{{parameters.tokenToWithdraw}}",
|
|
3767
|
+
"chain": "{{parameters.chainId}}"
|
|
3768
|
+
}
|
|
3769
|
+
},
|
|
3770
|
+
],
|
|
3771
|
+
"examples": [
|
|
3772
|
+
{
|
|
3773
|
+
"name": "Withdraw 100 USDC",
|
|
3774
|
+
"description": "Withdraw 100 USDC on Moonwell on Base",
|
|
3775
|
+
"parameters": [
|
|
3776
|
+
{
|
|
3777
|
+
"key": "chainId",
|
|
3778
|
+
"value": 8453
|
|
3779
|
+
},
|
|
3780
|
+
{
|
|
3781
|
+
"key": "abiParams.amount",
|
|
3782
|
+
"value": "100000000n"
|
|
3783
|
+
},
|
|
3784
|
+
{
|
|
3785
|
+
"key": "tokenToWithdraw",
|
|
3786
|
+
"value": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913"
|
|
3787
|
+
}
|
|
3788
|
+
]
|
|
3789
|
+
},
|
|
3790
|
+
{
|
|
3791
|
+
"name": "Withdraw all",
|
|
3792
|
+
"description": "Withdraw all supplied amount of an asset",
|
|
3793
|
+
"parameters": [
|
|
3794
|
+
{
|
|
3795
|
+
"key": "chainId",
|
|
3796
|
+
"value": 8453
|
|
3797
|
+
},
|
|
3798
|
+
{
|
|
3799
|
+
"key": "abiParams.amount",
|
|
3800
|
+
"value": "115792089237316195423570985008687907853269984665640564039457584007913129639935n"
|
|
3801
|
+
}
|
|
3802
|
+
]
|
|
3803
|
+
}
|
|
3804
|
+
],
|
|
3805
|
+
"requiredApprovals": [],
|
|
3806
|
+
"output": {
|
|
3807
|
+
"transactionHash": "string"
|
|
3808
|
+
},
|
|
3809
|
+
"permissions": {
|
|
3810
|
+
"chainId": "{{parameters.chainId}}",
|
|
3811
|
+
"approvedTargets": [
|
|
3812
|
+
"{{before.contractAddress}}"
|
|
3813
|
+
],
|
|
3814
|
+
"label": [
|
|
3815
|
+
"Withdraw {{tokenSymbol({{parameters.chainId}}, {{parameters.tokenToWithdraw}})}} from MOONWELL"
|
|
3816
|
+
],
|
|
3817
|
+
"labelNotAuthorized": [
|
|
3818
|
+
"Transfer {{tokenSymbol({{parameters.chainId}}, {{parameters.tokenToWithdraw}})}}"
|
|
3819
|
+
]
|
|
3820
|
+
},
|
|
3821
|
+
"checks": [
|
|
3822
|
+
{
|
|
3823
|
+
"type": 0,
|
|
3824
|
+
"chainId": "{{parameters.chainId}}",
|
|
3825
|
+
"contractAddress": "{{before.contractAddress}}",
|
|
3826
|
+
"amount": "{{parameters.abi.parameters.amount}}"
|
|
3827
|
+
}
|
|
3828
|
+
],
|
|
3829
|
+
"blockId": 100023,
|
|
3830
|
+
"image": "https://otomato-sdk-images.s3.eu-west-1.amazonaws.com/moonwell.png"
|
|
3831
|
+
},
|
|
3832
|
+
"BORROW": {
|
|
3833
|
+
"name": "Borrow asset",
|
|
3834
|
+
"description": "Borrow any token against your collateral",
|
|
3835
|
+
"type": 1,
|
|
3836
|
+
"method": "function borrow(uint256 amount) external returns (uint256)",
|
|
3837
|
+
"parameters": [
|
|
3838
|
+
{
|
|
3839
|
+
"key": "chainId",
|
|
3840
|
+
"type": "chainId",
|
|
3841
|
+
"description": "Chain ID of the network",
|
|
3842
|
+
"mandatory": true,
|
|
3843
|
+
"category": 0
|
|
3844
|
+
},
|
|
3845
|
+
{
|
|
3846
|
+
"key": "tokenToBorrow",
|
|
3847
|
+
"type": "erc20",
|
|
3848
|
+
"description": "The token to borrow",
|
|
3849
|
+
"mandatory": true,
|
|
3850
|
+
"enum": "\n (env) => {\n if (!env.parameters.chainId)\n throw new Error('You need to provide the chainId first');\n \n const availableTokens = {\n \"8453\": [\n \"0x833589fcd6edb6e08f4c7c32d4f71b54bda02913\",\n \"0x50c5725949A6F0c72E6C4a641F24049A917DB0Cb\",\n \"0x4200000000000000000000000000000000000006\",\n \"0x2Ae3F1Ec7F1F5012CFEab0185bfc7aa3cf0DEc22\",\n \"0xc1cba3fcea344f92d9239c08c0568f6f2f0ee452\",\n \"0xB6fe221Fe9EeF5aBa221c348bA20A1Bf5e73624c\",\n \"0x04C0599Ae5A44757c0af6F9eC3b93da8976c150A\",\n \"0x940181a94a35a4569e4529a3cdfb74e38fd98631\",\n \"0xcbb7c0000ab88b473b1f5afd9ef808440eed33bf\",\n \"0x60a3E35Cc302bFA44Cb288Bc5a4F316Fdb1adb42\",\n \"0xEDfa23602D0EC14714057867A78d01e94176BEA0\"\n ]\n};\n const chainId = env.parameters.chainId;\n return availableTokens[chainId] || [];\n }",
|
|
3851
|
+
"category": 0
|
|
3852
|
+
},
|
|
3853
|
+
{
|
|
3854
|
+
"key": "abiParams.amount",
|
|
3855
|
+
"type": "uint256",
|
|
3856
|
+
"description": "Amount of crypto to borrow",
|
|
3857
|
+
"mandatory": true,
|
|
3858
|
+
"category": 0,
|
|
3859
|
+
"erc20FormattedAmount": {
|
|
3860
|
+
"contractAddress": "{{parameters.tokenToBorrow}}",
|
|
3861
|
+
"chain": "{{parameters.chainId}}"
|
|
3862
|
+
}
|
|
3863
|
+
},
|
|
3864
|
+
],
|
|
3865
|
+
"examples": [
|
|
3866
|
+
{
|
|
3867
|
+
"name": "Borrow 100 USDC",
|
|
3868
|
+
"description": "Borrow 100 USDC on Moonwell on Base",
|
|
3869
|
+
"parameters": [
|
|
3870
|
+
{
|
|
3871
|
+
"key": "chainId",
|
|
3872
|
+
"value": 8453
|
|
3873
|
+
},
|
|
3874
|
+
{
|
|
3875
|
+
"key": "abiParams.amount",
|
|
3876
|
+
"value": "100000000n"
|
|
3877
|
+
},
|
|
3878
|
+
{
|
|
3879
|
+
"key": "tokenToBorrow",
|
|
3880
|
+
"value": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913"
|
|
3881
|
+
}
|
|
3882
|
+
]
|
|
3883
|
+
}
|
|
3884
|
+
],
|
|
3885
|
+
"requiredApprovals": [],
|
|
3886
|
+
"output": {
|
|
3887
|
+
"transactionHash": "string"
|
|
3888
|
+
},
|
|
3889
|
+
"permissions": {
|
|
3890
|
+
"chainId": "{{parameters.chainId}}",
|
|
3891
|
+
"approvedTargets": [
|
|
3892
|
+
"{{before.contractAddress}}"
|
|
3893
|
+
],
|
|
3894
|
+
"label": [
|
|
3895
|
+
"Borrow {{tokenSymbol({{parameters.chainId}}, {{parameters.tokenToBorrow}})}} on MOONWELL"
|
|
3896
|
+
],
|
|
3897
|
+
"labelNotAuthorized": [
|
|
3898
|
+
"Transfer {{tokenSymbol({{parameters.chainId}}, {{parameters.tokenToBorrow}})}}"
|
|
3899
|
+
]
|
|
3900
|
+
},
|
|
3901
|
+
"blockId": 100024,
|
|
3902
|
+
"image": "https://otomato-sdk-images.s3.eu-west-1.amazonaws.com/moonwell.png"
|
|
3903
|
+
},
|
|
3904
|
+
"REPAY": {
|
|
3905
|
+
"name": "Repay asset",
|
|
3906
|
+
"description": "Repay a token that you borrowed",
|
|
3907
|
+
"type": 1,
|
|
3908
|
+
"method": "function repayBorrow(uint256 amount) external returns (uint256)",
|
|
3909
|
+
"parameters": [
|
|
3910
|
+
{
|
|
3911
|
+
"key": "chainId",
|
|
3912
|
+
"type": "chainId",
|
|
3913
|
+
"description": "Chain ID of the network",
|
|
3914
|
+
"mandatory": true,
|
|
3915
|
+
"category": 0
|
|
3916
|
+
},
|
|
3917
|
+
{
|
|
3918
|
+
"key": "tokenToRepay",
|
|
3919
|
+
"type": "erc20",
|
|
3920
|
+
"description": "The token to repay",
|
|
3921
|
+
"mandatory": true,
|
|
3922
|
+
"enum": "\n (env) => {\n if (!env.parameters.chainId)\n throw new Error('You need to provide the chainId first');\n \n const availableTokens = {\n \"8453\": [\n \"0x833589fcd6edb6e08f4c7c32d4f71b54bda02913\",\n \"0x50c5725949A6F0c72E6C4a641F24049A917DB0Cb\",\n \"0x4200000000000000000000000000000000000006\",\n \"0x2Ae3F1Ec7F1F5012CFEab0185bfc7aa3cf0DEc22\",\n \"0xc1cba3fcea344f92d9239c08c0568f6f2f0ee452\",\n \"0xB6fe221Fe9EeF5aBa221c348bA20A1Bf5e73624c\",\n \"0x04C0599Ae5A44757c0af6F9eC3b93da8976c150A\",\n \"0x940181a94a35a4569e4529a3cdfb74e38fd98631\",\n \"0xcbb7c0000ab88b473b1f5afd9ef808440eed33bf\",\n \"0x60a3E35Cc302bFA44Cb288Bc5a4F316Fdb1adb42\",\n \"0xEDfa23602D0EC14714057867A78d01e94176BEA0\"\n ]\n};\n const chainId = env.parameters.chainId;\n return availableTokens[chainId] || [];\n }",
|
|
3923
|
+
"category": 0
|
|
3924
|
+
},
|
|
3925
|
+
{
|
|
3926
|
+
"key": "abiParams.amount",
|
|
3927
|
+
"type": "uint256",
|
|
3928
|
+
"description": "Amount of crypto to repay",
|
|
3929
|
+
"mandatory": true,
|
|
3930
|
+
"category": 0,
|
|
3931
|
+
"erc20FormattedAmount": {
|
|
3932
|
+
"contractAddress": "{{parameters.tokenToRepay}}",
|
|
3933
|
+
"chain": "{{parameters.chainId}}"
|
|
3934
|
+
}
|
|
3935
|
+
},
|
|
3936
|
+
],
|
|
3937
|
+
"checks": [
|
|
3938
|
+
{
|
|
3939
|
+
"type": 0,
|
|
3940
|
+
"chainId": "{{parameters.chainId}}",
|
|
3941
|
+
"contractAddress": "{{parameters.tokenToRepay}}",
|
|
3942
|
+
"amount": "{{parameters.abi.parameters.amount}}"
|
|
3943
|
+
}
|
|
3944
|
+
],
|
|
3945
|
+
"examples": [
|
|
3946
|
+
{
|
|
3947
|
+
"name": "Repay 100 USDC",
|
|
3948
|
+
"description": "Repay 100 USDC on Moonwell on Base",
|
|
3949
|
+
"parameters": [
|
|
3950
|
+
{
|
|
3951
|
+
"key": "chainId",
|
|
3952
|
+
"value": 8453
|
|
3953
|
+
},
|
|
3954
|
+
{
|
|
3955
|
+
"key": "abiParams.amount",
|
|
3956
|
+
"value": "100000000n"
|
|
3957
|
+
},
|
|
3958
|
+
{
|
|
3959
|
+
"key": "tokenToRepay",
|
|
3960
|
+
"value": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913"
|
|
3961
|
+
}
|
|
3962
|
+
]
|
|
3963
|
+
}
|
|
3964
|
+
],
|
|
3965
|
+
"requiredApprovals": [
|
|
3966
|
+
{
|
|
3967
|
+
"address": "{{parameters.tokenToRepay}}",
|
|
3968
|
+
"amount": "{{parameters.abi.parameters.amount}}",
|
|
3969
|
+
"to": "{{before.contractAddress}}"
|
|
3970
|
+
}
|
|
3971
|
+
],
|
|
3972
|
+
"output": {
|
|
3973
|
+
"transactionHash": "string"
|
|
3974
|
+
},
|
|
3975
|
+
"permissions": {
|
|
3976
|
+
"chainId": "{{parameters.chainId}}",
|
|
3977
|
+
"approvedTargets": [
|
|
3978
|
+
"{{before.contractAddress}}",
|
|
3979
|
+
"{{parameters.tokenToRepay}}"
|
|
3980
|
+
],
|
|
3981
|
+
"label": [
|
|
3982
|
+
"Repay {{tokenSymbol({{parameters.chainId}}, {{parameters.tokenToRepay}})}} on MOONWELL"
|
|
3983
|
+
],
|
|
3984
|
+
"labelNotAuthorized": [
|
|
3985
|
+
"Transfer {{tokenSymbol({{parameters.chainId}}, {{parameters.tokenToRepay}})}}"
|
|
3986
|
+
]
|
|
3987
|
+
},
|
|
3988
|
+
"blockId": 100025,
|
|
3989
|
+
"image": "https://otomato-sdk-images.s3.eu-west-1.amazonaws.com/moonwell.png"
|
|
3990
|
+
},
|
|
3991
|
+
"ENABLE_COLLATERAL": {
|
|
3992
|
+
"showInUI": false,
|
|
3993
|
+
"name": "Enable collaterals",
|
|
3994
|
+
"description": "Enable collateral to be able to borrow against it.",
|
|
3995
|
+
"type": 1,
|
|
3996
|
+
"method": "function enterMarkets(address[] tokens) returns (uint256[])",
|
|
3997
|
+
"parameters": [
|
|
3998
|
+
{
|
|
3999
|
+
"key": "chainId",
|
|
4000
|
+
"type": "chainId",
|
|
4001
|
+
"description": "Chain ID of the network",
|
|
4002
|
+
"mandatory": true,
|
|
4003
|
+
"category": 0
|
|
4004
|
+
},
|
|
4005
|
+
{
|
|
4006
|
+
"key": "abiParams.tokens",
|
|
4007
|
+
"type": "addresses_array",
|
|
4008
|
+
"description": "List of collaterals",
|
|
4009
|
+
"mandatory": true,
|
|
4010
|
+
"category": 0
|
|
4011
|
+
},
|
|
4012
|
+
],
|
|
4013
|
+
"examples": [],
|
|
4014
|
+
"permissions": {
|
|
4015
|
+
"chainId": "{{parameters.chainId}}",
|
|
4016
|
+
"approvedTargets": [
|
|
4017
|
+
"{{before.contractAddress}}"
|
|
4018
|
+
],
|
|
4019
|
+
"label": [
|
|
4020
|
+
"Enable {{tokenSymbol({{parameters.chainId}}, {{parameters.abi.parameters.tokens[0]}})}} as collateral on MOONWELL"
|
|
4021
|
+
],
|
|
4022
|
+
"labelNotAuthorized": [
|
|
4023
|
+
"Transfer {{tokenSymbol({{parameters.chainId}}, {{parameters.abi.parameters.tokens[0]}})}}"
|
|
4024
|
+
]
|
|
4025
|
+
},
|
|
4026
|
+
"blockId": 100026,
|
|
4027
|
+
"image": "https://otomato-sdk-images.s3.eu-west-1.amazonaws.com/moonwell.png"
|
|
4028
|
+
}
|
|
4029
|
+
},
|
|
4030
|
+
"COMPOUND": {
|
|
4031
|
+
"description": "Compound is an algorithmic, autonomous interest rate protocol built for developers, to unlock a universe of open financial applications.",
|
|
4032
|
+
"chains": [
|
|
4033
|
+
8453
|
|
4034
|
+
],
|
|
4035
|
+
"image": "https://otomato-sdk-images.s3.eu-west-1.amazonaws.com/compound.png",
|
|
4036
|
+
"DEPOSIT": {
|
|
4037
|
+
"name": "Supply asset to Compound",
|
|
4038
|
+
"description": "Deposit token in any Compound lending pool",
|
|
4039
|
+
"type": 1,
|
|
4040
|
+
"method": "function supply(address asset, uint amount)",
|
|
4041
|
+
"parameters": [
|
|
4042
|
+
{
|
|
4043
|
+
"key": "chainId",
|
|
4044
|
+
"type": "chainId",
|
|
4045
|
+
"description": "Chain ID of the network",
|
|
4046
|
+
"mandatory": true,
|
|
4047
|
+
"category": 0
|
|
4048
|
+
},
|
|
4049
|
+
{
|
|
4050
|
+
"key": "abiParams.asset",
|
|
4051
|
+
"type": "erc20",
|
|
4052
|
+
"description": "The token to deposit",
|
|
4053
|
+
"mandatory": true,
|
|
4054
|
+
"enum": "\n (env) => {\n if (!env.parameters.chainId)\n throw new Error('You need to provide the chainId first');\n \n const availableTokens = {\n \"8453\": [\n \"0x833589fcd6edb6e08f4c7c32d4f71b54bda02913\",\n \"0x4200000000000000000000000000000000000006\",\n \"0x940181a94a35a4569e4529a3cdfb74e38fd98631\",\n \"0xd9aAEc86B65D86f6A7B5B1b0c42FFA531710b6CA\"\n ]\n};\n const chainId = env.parameters.chainId;\n return availableTokens[chainId] || [];\n }",
|
|
4055
|
+
"category": 0
|
|
4056
|
+
},
|
|
4057
|
+
{
|
|
4058
|
+
"key": "abiParams.amount",
|
|
4059
|
+
"type": "uint256",
|
|
4060
|
+
"description": "Amount of crypto to deposit",
|
|
4061
|
+
"mandatory": true,
|
|
4062
|
+
"category": 0,
|
|
4063
|
+
"erc20FormattedAmount": {
|
|
4064
|
+
"contractAddress": "{{parameters.abi.parameters.asset}}",
|
|
4065
|
+
"chain": "{{parameters.chainId}}"
|
|
4066
|
+
}
|
|
4067
|
+
},
|
|
4068
|
+
],
|
|
4069
|
+
"examples": [
|
|
4070
|
+
{
|
|
4071
|
+
"name": "Deposit 100 USDC",
|
|
4072
|
+
"description": "Lend 100 USDC on Compound on Base",
|
|
4073
|
+
"parameters": [
|
|
4074
|
+
{
|
|
4075
|
+
"key": "chainId",
|
|
4076
|
+
"value": 8453
|
|
4077
|
+
},
|
|
4078
|
+
{
|
|
4079
|
+
"key": "abiParams.amount",
|
|
4080
|
+
"value": "100000000n"
|
|
4081
|
+
},
|
|
4082
|
+
{
|
|
4083
|
+
"key": "abiParams.asset",
|
|
4084
|
+
"value": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913"
|
|
4085
|
+
}
|
|
4086
|
+
]
|
|
4087
|
+
}
|
|
4088
|
+
],
|
|
4089
|
+
"checks": [
|
|
4090
|
+
{
|
|
4091
|
+
"type": 0,
|
|
4092
|
+
"chainId": "{{parameters.chainId}}",
|
|
4093
|
+
"contractAddress": "{{parameters.abi.parameters.asset}}",
|
|
4094
|
+
"amount": "{{parameters.abi.parameters.amount}}"
|
|
4095
|
+
}
|
|
4096
|
+
],
|
|
4097
|
+
"requiredApprovals": [
|
|
4098
|
+
{
|
|
4099
|
+
"address": "{{parameters.abi.parameters.asset}}",
|
|
4100
|
+
"amount": "{{parameters.abi.parameters.amount}}",
|
|
4101
|
+
"to": "{{before.contractAddress}}"
|
|
4102
|
+
}
|
|
4103
|
+
],
|
|
4104
|
+
"output": {
|
|
4105
|
+
"transactionHash": "string"
|
|
4106
|
+
},
|
|
4107
|
+
"permissions": {
|
|
4108
|
+
"chainId": "{{parameters.chainId}}",
|
|
4109
|
+
"approvedTargets": [
|
|
4110
|
+
"{{parameters.abi.parameters.asset}}",
|
|
4111
|
+
"{{before.contractAddress}}"
|
|
4112
|
+
],
|
|
4113
|
+
"label": [
|
|
4114
|
+
"Deposit {{tokenSymbol({{parameters.chainId}}, {{parameters.abi.parameters.asset}})}} on COMPOUND"
|
|
4115
|
+
],
|
|
4116
|
+
"labelNotAuthorized": [
|
|
4117
|
+
"Transfer {{tokenSymbol({{parameters.chainId}}, {{parameters.abi.parameters.asset}})}}"
|
|
4118
|
+
]
|
|
4119
|
+
},
|
|
4120
|
+
"blockId": 100027,
|
|
4121
|
+
"image": "https://otomato-sdk-images.s3.eu-west-1.amazonaws.com/compound.png"
|
|
4122
|
+
},
|
|
4123
|
+
"WITHDRAW": {
|
|
4124
|
+
"name": "Withdraw Asset from Compound",
|
|
4125
|
+
"description": "Withdraw token deposited in any lending pool",
|
|
4126
|
+
"type": 1,
|
|
4127
|
+
"method": "function withdraw(address asset, uint amount)",
|
|
4128
|
+
"parameters": [
|
|
4129
|
+
{
|
|
4130
|
+
"key": "chainId",
|
|
4131
|
+
"type": "chainId",
|
|
4132
|
+
"description": "Chain ID of the network",
|
|
4133
|
+
"mandatory": true,
|
|
4134
|
+
"category": 0
|
|
4135
|
+
},
|
|
4136
|
+
{
|
|
4137
|
+
"key": "abiParams.asset",
|
|
4138
|
+
"type": "erc20",
|
|
4139
|
+
"description": "The token to withdraw",
|
|
4140
|
+
"mandatory": true,
|
|
4141
|
+
"enum": "\n (env) => {\n if (!env.parameters.chainId)\n throw new Error('You need to provide the chainId first');\n \n const availableTokens = {\n \"8453\": [\n \"0x833589fcd6edb6e08f4c7c32d4f71b54bda02913\",\n \"0x4200000000000000000000000000000000000006\",\n \"0x940181a94a35a4569e4529a3cdfb74e38fd98631\",\n \"0xd9aAEc86B65D86f6A7B5B1b0c42FFA531710b6CA\"\n ]\n};\n const chainId = env.parameters.chainId;\n return availableTokens[chainId] || [];\n }",
|
|
4142
|
+
"category": 0
|
|
4143
|
+
},
|
|
4144
|
+
{
|
|
4145
|
+
"key": "abiParams.amount",
|
|
4146
|
+
"type": "uint256",
|
|
4147
|
+
"description": "Amount of crypto to withdraw",
|
|
4148
|
+
"mandatory": true,
|
|
4149
|
+
"category": 0,
|
|
4150
|
+
"erc20FormattedAmount": {
|
|
4151
|
+
"contractAddress": "{{parameters.abi.parameters.asset}}",
|
|
4152
|
+
"chain": "{{parameters.chainId}}"
|
|
4153
|
+
}
|
|
4154
|
+
},
|
|
4155
|
+
],
|
|
4156
|
+
"checks": [
|
|
4157
|
+
{
|
|
4158
|
+
"type": 0,
|
|
4159
|
+
"chainId": "{{parameters.chainId}}",
|
|
4160
|
+
"contractAddress": "{{before.contractAddress}}",
|
|
4161
|
+
"amount": "{{parameters.abi.parameters.amount}}"
|
|
4162
|
+
}
|
|
4163
|
+
],
|
|
4164
|
+
"examples": [
|
|
4165
|
+
{
|
|
4166
|
+
"name": "Withdraw 100 USDC",
|
|
4167
|
+
"description": "Withdraw 100 USDC on Compound on Base",
|
|
4168
|
+
"parameters": [
|
|
4169
|
+
{
|
|
4170
|
+
"key": "chainId",
|
|
4171
|
+
"value": 8453
|
|
4172
|
+
},
|
|
4173
|
+
{
|
|
4174
|
+
"key": "abiParams.amount",
|
|
4175
|
+
"value": "100000000n"
|
|
4176
|
+
},
|
|
4177
|
+
{
|
|
4178
|
+
"key": "abiParams.asset",
|
|
4179
|
+
"value": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913"
|
|
4180
|
+
}
|
|
4181
|
+
]
|
|
4182
|
+
},
|
|
4183
|
+
{
|
|
4184
|
+
"name": "Withdraw all",
|
|
4185
|
+
"description": "Withdraw all supplied amount of an asset",
|
|
4186
|
+
"parameters": [
|
|
4187
|
+
{
|
|
4188
|
+
"key": "chainId",
|
|
4189
|
+
"value": 8453
|
|
4190
|
+
},
|
|
4191
|
+
{
|
|
4192
|
+
"key": "abiParams.amount",
|
|
4193
|
+
"value": "115792089237316195423570985008687907853269984665640564039457584007913129639935n"
|
|
4194
|
+
}
|
|
4195
|
+
]
|
|
4196
|
+
}
|
|
4197
|
+
],
|
|
4198
|
+
"requiredApprovals": [],
|
|
4199
|
+
"output": {
|
|
4200
|
+
"transactionHash": "string"
|
|
4201
|
+
},
|
|
4202
|
+
"permissions": {
|
|
4203
|
+
"chainId": "{{parameters.chainId}}",
|
|
4204
|
+
"approvedTargets": [
|
|
4205
|
+
"{{parameters.abi.parameters.asset}}",
|
|
4206
|
+
"{{before.contractAddress}}"
|
|
4207
|
+
],
|
|
4208
|
+
"label": [
|
|
4209
|
+
"Withdraw {{tokenSymbol({{parameters.chainId}}, {{parameters.abi.parameters.asset}})}} from COMPOUND"
|
|
4210
|
+
],
|
|
4211
|
+
"labelNotAuthorized": [
|
|
4212
|
+
"Transfer {{tokenSymbol({{parameters.chainId}}, {{parameters.abi.parameters.asset}})}}"
|
|
4213
|
+
]
|
|
4214
|
+
},
|
|
4215
|
+
"blockId": 100028,
|
|
4216
|
+
"image": "https://otomato-sdk-images.s3.eu-west-1.amazonaws.com/compound.png"
|
|
4217
|
+
}
|
|
4218
|
+
},
|
|
4219
|
+
"IRONCLAD": {
|
|
4220
|
+
"description": "DeFi needs safe, liquid lending markets and steady stablecoins that drives value to users. We've built that foundation and made it Ironclad.",
|
|
4221
|
+
"chains": [
|
|
4222
|
+
8453,
|
|
4223
|
+
34443
|
|
4224
|
+
],
|
|
4225
|
+
"image": "https://otomato-sdk-images.s3.eu-west-1.amazonaws.com/ironclad.png",
|
|
4226
|
+
"SUPPLY": {
|
|
4227
|
+
"name": "Supply Asset to Ironclad",
|
|
4228
|
+
"description": "Supply an asset to ironclad",
|
|
4229
|
+
"type": 1,
|
|
4230
|
+
"method": "function deposit(address asset, uint256 amount, address onBehalfOf, uint16 referralCode)",
|
|
4231
|
+
"parameters": [
|
|
4232
|
+
{
|
|
4233
|
+
"key": "chainId",
|
|
4234
|
+
"type": "chainId",
|
|
4235
|
+
"description": "Chain ID of the network",
|
|
4236
|
+
"mandatory": true,
|
|
4237
|
+
"category": 0
|
|
4238
|
+
},
|
|
4239
|
+
{
|
|
4240
|
+
"key": "abiParams.asset",
|
|
4241
|
+
"type": "erc20",
|
|
4242
|
+
"description": "The token to supply",
|
|
4243
|
+
"mandatory": true,
|
|
4244
|
+
"enum": "\n (env) => {\n if (!env.parameters.chainId)\n throw new Error('You need to provide the chainId first');\n\n const availableLendingTokens = {\n \"8453\": [\n \"0x940181a94a35a4569e4529a3cdfb74e38fd98631\",\n \"0xcbb7c0000ab88b473b1f5afd9ef808440eed33bf\",\n \"0x2Ae3F1Ec7F1F5012CFEab0185bfc7aa3cf0DEc22\",\n \"0x50c5725949A6F0c72E6C4a641F24049A917DB0Cb\",\n \"0x4200000000000000000000000000000000000006\",\n \"0xd9aAEc86B65D86f6A7B5B1b0c42FFA531710b6CA\",\n \"0x833589fcd6edb6e08f4c7c32d4f71b54bda02913\"\n ],\n \"34443\": [\n \"0xd988097fb8612cc24eeC14542bC03424c656005f\",\n \"0xf0F161fDA2712DB8b566946122a5af183995e2eD\",\n \"0x4200000000000000000000000000000000000006\",\n \"0x2416092f143378750bb29b79eD961ab195CcEea5\",\n \"0x4200000000000000000000000000000000000006\",\n \"0xe7903B1F75C534Dd8159b313d92cDCfbC62cB3Cd\",\n \"0x59889b7021243dB5B1e065385F918316cD90D46c\",\n \"0x04C0599Ae5A44757c0af6F9eC3b93da8976c150A\",\n \"0xDfc7C877a950e49D2610114102175A06C2e3167a\"\n ]\n};\n return availableLendingTokens[env.parameters.chainId] || [];\n }",
|
|
4245
|
+
"category": 0
|
|
4246
|
+
},
|
|
4247
|
+
{
|
|
4248
|
+
"key": "abiParams.amount",
|
|
4249
|
+
"type": "uint256",
|
|
4250
|
+
"description": "The amount of the asset to supply",
|
|
4251
|
+
"mandatory": true,
|
|
4252
|
+
"category": 0,
|
|
4253
|
+
"erc20FormattedAmount": {
|
|
4254
|
+
"contractAddress": "{{parameters.abi.parameters.asset}}",
|
|
4255
|
+
"chain": "{{parameters.chainId}}"
|
|
4256
|
+
}
|
|
4257
|
+
},
|
|
4258
|
+
{
|
|
4259
|
+
"key": "abiParams.onBehalfOf",
|
|
4260
|
+
"type": "address",
|
|
4261
|
+
"description": "The address to receive aTokens",
|
|
4262
|
+
"hideInUI": true,
|
|
4263
|
+
"category": 1
|
|
4264
|
+
},
|
|
4265
|
+
{
|
|
4266
|
+
"key": "abiParams.referralCode",
|
|
4267
|
+
"type": "uint16",
|
|
4268
|
+
"description": "Referral code (use 0, as inactive)",
|
|
4269
|
+
"hideInUI": true,
|
|
4270
|
+
"category": 1,
|
|
4271
|
+
"value": 0
|
|
4272
|
+
},
|
|
4273
|
+
],
|
|
4274
|
+
"requiredApprovals": [
|
|
4275
|
+
{
|
|
4276
|
+
"address": "{{parameters.abi.parameters.asset}}",
|
|
4277
|
+
"amount": "{{parameters.abi.parameters.amount}}",
|
|
4278
|
+
"to": "{{before.contractAddress}}"
|
|
4279
|
+
}
|
|
4280
|
+
],
|
|
4281
|
+
"checks": [
|
|
4282
|
+
{
|
|
4283
|
+
"type": 0,
|
|
4284
|
+
"chainId": "{{parameters.chainId}}",
|
|
4285
|
+
"contractAddress": "{{parameters.abi.parameters.asset}}",
|
|
4286
|
+
"amount": "{{parameters.abi.parameters.amount}}"
|
|
4287
|
+
}
|
|
4288
|
+
],
|
|
4289
|
+
"examples": [
|
|
4290
|
+
{
|
|
4291
|
+
"name": "Supply USDC",
|
|
4292
|
+
"description": "Supply 100 USDC to Ironclad on the Mode network",
|
|
4293
|
+
"parameters": [
|
|
4294
|
+
{
|
|
4295
|
+
"key": "chainId",
|
|
4296
|
+
"value": 34443
|
|
4297
|
+
},
|
|
4298
|
+
{
|
|
4299
|
+
"key": "abiParams.asset",
|
|
4300
|
+
"value": "0xd988097fb8612cc24eeC14542bC03424c656005f"
|
|
4301
|
+
},
|
|
4302
|
+
{
|
|
4303
|
+
"key": "abiParams.amount",
|
|
4304
|
+
"value": "100000000n"
|
|
4305
|
+
},
|
|
4306
|
+
{
|
|
4307
|
+
"key": "abiParams.onBehalfOf",
|
|
4308
|
+
"value": ""
|
|
4309
|
+
},
|
|
4310
|
+
{
|
|
4311
|
+
"key": "abiParams.referralCode",
|
|
4312
|
+
"value": 0
|
|
4313
|
+
}
|
|
4314
|
+
]
|
|
4315
|
+
}
|
|
4316
|
+
],
|
|
4317
|
+
"output": {
|
|
4318
|
+
"transactionHash": "string"
|
|
4319
|
+
},
|
|
4320
|
+
"permissions": {
|
|
4321
|
+
"chainId": "{{parameters.chainId}}",
|
|
4322
|
+
"approvedTargets": [
|
|
4323
|
+
"{{parameters.abi.parameters.asset}}",
|
|
4324
|
+
"{{before.contractAddress}}"
|
|
4325
|
+
],
|
|
4326
|
+
"label": [
|
|
4327
|
+
"Supply {{tokenSymbol({{parameters.chainId}}, {{parameters.abi.parameters.asset}})}} on Ironclad"
|
|
4328
|
+
],
|
|
4329
|
+
"labelNotAuthorized": [
|
|
4330
|
+
"Transfer {{tokenSymbol({{parameters.chainId}}, {{parameters.abi.parameters.asset}})}}"
|
|
4331
|
+
]
|
|
4332
|
+
},
|
|
4333
|
+
"blockId": 100029,
|
|
4334
|
+
"image": "https://otomato-sdk-images.s3.eu-west-1.amazonaws.com/ironclad.png"
|
|
4335
|
+
},
|
|
4336
|
+
"WITHDRAW": {
|
|
4337
|
+
"name": "Withdraw Asset from Ironclad",
|
|
4338
|
+
"description": "Withdraw a supplied asset from the Ironclad pool.",
|
|
4339
|
+
"type": 1,
|
|
4340
|
+
"method": "function withdraw(address asset, uint256 amount, address to) returns (uint256)",
|
|
4341
|
+
"parameters": [
|
|
4342
|
+
{
|
|
4343
|
+
"key": "chainId",
|
|
4344
|
+
"type": "chainId",
|
|
4345
|
+
"description": "Chain ID of the network",
|
|
4346
|
+
"mandatory": true,
|
|
4347
|
+
"category": 0
|
|
4348
|
+
},
|
|
4349
|
+
{
|
|
4350
|
+
"key": "abiParams.asset",
|
|
4351
|
+
"type": "erc20",
|
|
4352
|
+
"description": "The address of the asset to withdraw",
|
|
4353
|
+
"mandatory": true,
|
|
4354
|
+
"enum": "\n (env) => {\n if (!env.parameters.chainId)\n throw new Error('You need to provide the chainId first');\n\n const availableLendingTokens = {\n \"8453\": [\n \"0x940181a94a35a4569e4529a3cdfb74e38fd98631\",\n \"0xcbb7c0000ab88b473b1f5afd9ef808440eed33bf\",\n \"0x2Ae3F1Ec7F1F5012CFEab0185bfc7aa3cf0DEc22\",\n \"0x50c5725949A6F0c72E6C4a641F24049A917DB0Cb\",\n \"0x4200000000000000000000000000000000000006\",\n \"0xd9aAEc86B65D86f6A7B5B1b0c42FFA531710b6CA\",\n \"0x833589fcd6edb6e08f4c7c32d4f71b54bda02913\"\n ],\n \"34443\": [\n \"0xd988097fb8612cc24eeC14542bC03424c656005f\",\n \"0xf0F161fDA2712DB8b566946122a5af183995e2eD\",\n \"0x4200000000000000000000000000000000000006\",\n \"0x2416092f143378750bb29b79eD961ab195CcEea5\",\n \"0x4200000000000000000000000000000000000006\",\n \"0xe7903B1F75C534Dd8159b313d92cDCfbC62cB3Cd\",\n \"0x59889b7021243dB5B1e065385F918316cD90D46c\",\n \"0x04C0599Ae5A44757c0af6F9eC3b93da8976c150A\",\n \"0xDfc7C877a950e49D2610114102175A06C2e3167a\"\n ]\n};\n return availableLendingTokens[env.parameters.chainId] || [];\n }",
|
|
4355
|
+
"category": 0
|
|
4356
|
+
},
|
|
4357
|
+
{
|
|
4358
|
+
"key": "abiParams.amount",
|
|
4359
|
+
"type": "uint256",
|
|
4360
|
+
"description": "The amount of the asset to withdraw. Use type(uint).max for full balance.",
|
|
4361
|
+
"mandatory": true,
|
|
4362
|
+
"category": 0,
|
|
4363
|
+
"erc20FormattedAmount": {
|
|
4364
|
+
"contractAddress": "{{parameters.abi.parameters.asset}}",
|
|
4365
|
+
"chain": "{{parameters.chainId}}"
|
|
4366
|
+
},
|
|
4367
|
+
"default": "type(uint256).max"
|
|
4368
|
+
},
|
|
4369
|
+
{
|
|
4370
|
+
"key": "abiParams.to",
|
|
4371
|
+
"type": "address",
|
|
4372
|
+
"description": "The address to receive the withdrawn asset",
|
|
4373
|
+
"category": 0,
|
|
4374
|
+
"hideInUI": true
|
|
4375
|
+
},
|
|
4376
|
+
],
|
|
4377
|
+
"examples": [
|
|
4378
|
+
{
|
|
4379
|
+
"name": "Withdraw USDC",
|
|
4380
|
+
"description": "Withdraw 10 USDC from Ironclad on the Mode network",
|
|
4381
|
+
"parameters": [
|
|
4382
|
+
{
|
|
4383
|
+
"key": "chainId",
|
|
4384
|
+
"value": 34443
|
|
4385
|
+
},
|
|
4386
|
+
{
|
|
4387
|
+
"key": "abiParams.asset",
|
|
4388
|
+
"value": "0xd988097fb8612cc24eeC14542bC03424c656005f"
|
|
4389
|
+
},
|
|
4390
|
+
{
|
|
4391
|
+
"key": "abiParams.amount",
|
|
4392
|
+
"value": "10000000n"
|
|
4393
|
+
},
|
|
4394
|
+
{
|
|
4395
|
+
"key": "abiParams.to",
|
|
4396
|
+
"value": ""
|
|
4397
|
+
}
|
|
4398
|
+
]
|
|
4399
|
+
},
|
|
4400
|
+
{
|
|
4401
|
+
"name": "Withdraw all",
|
|
4402
|
+
"description": "Withdraw all supplied amount of an asset",
|
|
4403
|
+
"parameters": [
|
|
4404
|
+
{
|
|
4405
|
+
"key": "chainId",
|
|
4406
|
+
"value": 8453
|
|
4407
|
+
},
|
|
4408
|
+
{
|
|
4409
|
+
"key": "abiParams.amount",
|
|
4410
|
+
"value": "115792089237316195423570985008687907853269984665640564039457584007913129639935n"
|
|
4411
|
+
},
|
|
4412
|
+
{
|
|
4413
|
+
"key": "abiParams.to",
|
|
4414
|
+
"value": ""
|
|
4415
|
+
}
|
|
4416
|
+
]
|
|
4417
|
+
}
|
|
4418
|
+
],
|
|
4419
|
+
"output": {
|
|
4420
|
+
"transactionHash": "string"
|
|
4421
|
+
},
|
|
4422
|
+
"permissions": {
|
|
4423
|
+
"chainId": "{{parameters.chainId}}",
|
|
4424
|
+
"approvedTargets": [
|
|
4425
|
+
"{{parameters.abi.parameters.asset}}",
|
|
4426
|
+
"{{before.contractAddress}}"
|
|
4427
|
+
],
|
|
4428
|
+
"label": [
|
|
4429
|
+
"Withdraw {{tokenSymbol({{parameters.chainId}}, {{parameters.abi.parameters.asset}})}} from Ironclad"
|
|
4430
|
+
],
|
|
4431
|
+
"labelNotAuthorized": [
|
|
4432
|
+
"Transfer {{tokenSymbol({{parameters.chainId}}, {{parameters.abi.parameters.asset}})}}"
|
|
4433
|
+
]
|
|
4434
|
+
},
|
|
4435
|
+
"checks": [
|
|
4436
|
+
{
|
|
4437
|
+
"type": 0,
|
|
4438
|
+
"chainId": "{{parameters.chainId}}",
|
|
4439
|
+
"contractAddress": "{{before.ironcladToken}}",
|
|
4440
|
+
"amount": "{{parameters.abi.parameters.amount}}"
|
|
4441
|
+
}
|
|
4442
|
+
],
|
|
4443
|
+
"blockId": 100030,
|
|
4444
|
+
"image": "https://otomato-sdk-images.s3.eu-west-1.amazonaws.com/ironclad.png"
|
|
4445
|
+
}
|
|
4446
|
+
}
|
|
4447
|
+
},
|
|
4448
|
+
"SWAP": {
|
|
4449
|
+
"ODOS": {
|
|
4450
|
+
"description": "Smart Order Routing across multiple blockchain protocols, 700+ Liquidity Sources and thousands of token pairs, delivering ultimate savings to users",
|
|
4451
|
+
"chains": [
|
|
4452
|
+
34443,
|
|
4453
|
+
8453
|
|
4454
|
+
],
|
|
4455
|
+
"image": "https://otomato-sdk-images.s3.eu-west-1.amazonaws.com/odos.png",
|
|
4456
|
+
"SWAP": {
|
|
4457
|
+
"name": "Odos swap",
|
|
4458
|
+
"description": "Swap on Odos to get the best market rates accross multiple pools",
|
|
4459
|
+
"type": 1,
|
|
4460
|
+
"requiredApprovals": [
|
|
4461
|
+
{
|
|
4462
|
+
"address": "{{parameters.tokenIn}}",
|
|
4463
|
+
"amount": "{{parameters.amount}}",
|
|
4464
|
+
"to": "{{before.contractAddress}}"
|
|
4465
|
+
}
|
|
4466
|
+
],
|
|
4467
|
+
"checks": [
|
|
4468
|
+
{
|
|
4469
|
+
"type": 0,
|
|
4470
|
+
"chainId": "{{parameters.chainId}}",
|
|
4471
|
+
"contractAddress": "{{parameters.tokenIn}}",
|
|
4472
|
+
"amount": "{{parameters.amount}}"
|
|
4473
|
+
}
|
|
4474
|
+
],
|
|
4475
|
+
"output": {
|
|
4476
|
+
"amountIn": "uint256",
|
|
4477
|
+
"tokenIn": "erc20",
|
|
4478
|
+
"amountOut": "uint256",
|
|
4479
|
+
"tokenOut": "erc20",
|
|
4480
|
+
"transactionHash": "string"
|
|
4481
|
+
},
|
|
4482
|
+
"frontendHelpers": {
|
|
4483
|
+
"output": {
|
|
4484
|
+
"amountIn": {
|
|
4485
|
+
"erc20Token": {
|
|
4486
|
+
"contractAddress": "{{output.tokenIn}}",
|
|
4487
|
+
"chainId": "{{parameters.chainId}}"
|
|
4488
|
+
}
|
|
4489
|
+
},
|
|
4490
|
+
"amountOut": {
|
|
4491
|
+
"erc20Token": {
|
|
4492
|
+
"contractAddress": "{{output.tokenOut}}",
|
|
4493
|
+
"chainId": "{{parameters.chainId}}"
|
|
4494
|
+
}
|
|
4495
|
+
}
|
|
4496
|
+
}
|
|
4497
|
+
},
|
|
4498
|
+
"parameters": [
|
|
4499
|
+
{
|
|
4500
|
+
"key": "chainId",
|
|
4501
|
+
"type": "chainId",
|
|
4502
|
+
"description": "Chain ID of the network",
|
|
4503
|
+
"mandatory": true,
|
|
4504
|
+
"category": 0
|
|
4505
|
+
},
|
|
4506
|
+
{
|
|
4507
|
+
"key": "tokenIn",
|
|
4508
|
+
"type": "erc20",
|
|
4509
|
+
"description": "Token to sell",
|
|
4510
|
+
"mandatory": true,
|
|
4511
|
+
"category": 0
|
|
4512
|
+
},
|
|
4513
|
+
{
|
|
4514
|
+
"key": "tokenOut",
|
|
4515
|
+
"type": "erc20",
|
|
4516
|
+
"description": "Token to buy",
|
|
4517
|
+
"mandatory": true,
|
|
4518
|
+
"category": 0
|
|
4519
|
+
},
|
|
4520
|
+
{
|
|
4521
|
+
"key": "amount",
|
|
4522
|
+
"type": "uint256",
|
|
4523
|
+
"description": "Amount to sell",
|
|
4524
|
+
"mandatory": true,
|
|
4525
|
+
"category": 0,
|
|
4526
|
+
"erc20FormattedAmount": {
|
|
4527
|
+
"contractAddress": "{{parameters.tokenIn}}",
|
|
4528
|
+
"chain": "{{parameters.chainId}}"
|
|
4529
|
+
}
|
|
4530
|
+
},
|
|
4531
|
+
{
|
|
4532
|
+
"key": "slippage",
|
|
4533
|
+
"type": "percentage",
|
|
4534
|
+
"description": "The maximum allowable difference between the expected price and the actual price at the time of execution, expressed as a percentage. This protects the transaction from significant price fluctuations.",
|
|
4535
|
+
"value": 1,
|
|
4536
|
+
"mandatory": true,
|
|
4537
|
+
"category": 1
|
|
4538
|
+
},
|
|
4539
|
+
],
|
|
4540
|
+
"examples": [
|
|
4541
|
+
{
|
|
4542
|
+
"name": "Swap USDC to WETH",
|
|
4543
|
+
"description": "Swap 100 USDC to WETH on Mode Network using Odos",
|
|
4544
|
+
"parameters": [
|
|
4545
|
+
{
|
|
4546
|
+
"key": "chainId",
|
|
4547
|
+
"value": 34443
|
|
4548
|
+
},
|
|
4549
|
+
{
|
|
4550
|
+
"key": "tokenIn",
|
|
4551
|
+
"value": "0xd988097fb8612cc24eeC14542bC03424c656005f"
|
|
4552
|
+
},
|
|
4553
|
+
{
|
|
4554
|
+
"key": "tokenOut",
|
|
4555
|
+
"value": "0x4200000000000000000000000000000000000006"
|
|
4556
|
+
},
|
|
4557
|
+
{
|
|
4558
|
+
"key": "amount",
|
|
4559
|
+
"value": "100000000n"
|
|
4560
|
+
},
|
|
4561
|
+
{
|
|
4562
|
+
"key": "slippage",
|
|
4563
|
+
"value": 1
|
|
4564
|
+
}
|
|
4565
|
+
]
|
|
4566
|
+
}
|
|
4567
|
+
],
|
|
4568
|
+
"permissions": {
|
|
4569
|
+
"chainId": "{{parameters.chainId}}",
|
|
4570
|
+
"approvedTargets": [
|
|
4571
|
+
"{{before.contractAddress}}",
|
|
4572
|
+
"{{parameters.tokenIn}}"
|
|
4573
|
+
],
|
|
4574
|
+
"label": [
|
|
4575
|
+
"Swap {{tokenSymbol({{parameters.chainId}}, {{parameters.tokenIn}})}} to {{tokenSymbol({{parameters.chainId}}, {{parameters.tokenOut}})}}"
|
|
4576
|
+
],
|
|
4577
|
+
"labelNotAuthorized": [
|
|
4578
|
+
"Transfer ETH"
|
|
4579
|
+
]
|
|
4580
|
+
},
|
|
4581
|
+
"blockId": 100005,
|
|
4582
|
+
"image": "https://otomato-sdk-images.s3.eu-west-1.amazonaws.com/odos.png"
|
|
4583
|
+
}
|
|
4584
|
+
}
|
|
4585
|
+
},
|
|
4586
|
+
"NFTS": {
|
|
4587
|
+
"BLUR": {
|
|
4588
|
+
"description": "The NFT marketplace for pro traders",
|
|
4589
|
+
"chains": [
|
|
4590
|
+
1
|
|
4591
|
+
],
|
|
4592
|
+
"image": "https://otomato-sdk-images.s3.eu-west-1.amazonaws.com/blur.jpg"
|
|
4593
|
+
}
|
|
4594
|
+
}
|
|
4595
|
+
};
|