otomato-sdk 2.0.13 → 2.0.15

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.
Files changed (71) hide show
  1. package/dist/src/constants/Blocks.js +1102 -36
  2. package/dist/src/constants/tokens.js +1 -1
  3. package/dist/src/constants/version.js +1 -1
  4. package/dist/src/models/Node.js +0 -2
  5. package/dist/types/examples/UseCases/lending-aggregator-v2.d.ts +4 -0
  6. package/dist/types/examples/UseCases/stop-lending-aggregator.d.ts +7 -0
  7. package/dist/types/src/constants/Blocks.d.ts +480 -8
  8. package/dist/types/src/constants/version.d.ts +1 -1
  9. package/package.json +1 -1
  10. package/dist/src/constants/ActionBlocks.js +0 -321
  11. package/dist/src/models/Automation.js +0 -44
  12. package/dist/src/utils/balances/addressBalance.js +0 -177
  13. package/dist/src/utils/balances/getBalanceInUnderlying.js +0 -95
  14. package/dist/types/examples/ex.d.ts +0 -1
  15. package/dist/types/examples/lending-aggregator.d.ts +0 -1
  16. package/dist/types/examples/load-workflows.d.ts +0 -1
  17. package/dist/types/examples/protocols/aave_trigger_borrow_action_borrow.d.ts +0 -1
  18. package/dist/types/examples/protocols/aave_trigger_borrow_action_withdraw.d.ts +0 -1
  19. package/dist/types/examples/protocols/aave_trigger_supply_action_supply.d.ts +0 -1
  20. package/dist/types/examples/protocols/ionic_base_supply.d.ts +0 -1
  21. package/dist/types/examples/protocols/ionic_base_withdraw.d.ts +0 -1
  22. package/dist/types/examples/sandbox.d.ts +0 -1
  23. package/dist/types/examples/update-edge.d.ts +0 -1
  24. package/dist/types/examples/yield-comparator.d.ts +0 -1
  25. package/dist/types/src/constants/ActionBlocks.d.ts +0 -91
  26. package/dist/types/src/models/Automation.d.ts +0 -23
  27. package/dist/types/src/models/Condition.d.ts +0 -6
  28. package/dist/types/src/services/AutomationService.d.ts +0 -6
  29. package/dist/types/src/utils/balances/addressBalance.d.ts +0 -20
  30. package/dist/types/src/utils/balances/getBalanceInUnderlying.d.ts +0 -44
  31. package/dist/types/test/automation.spec.d.ts +0 -1
  32. package/dist/types/test/sessionKeyPermission.spec.d.ts +0 -1
  33. /package/dist/types/examples/{authorizations.d.ts → Core/authorizations.d.ts} +0 -0
  34. /package/dist/types/examples/{create-action.d.ts → Core/create-action.d.ts} +0 -0
  35. /package/dist/types/examples/{create-condition.d.ts → Core/create-condition.d.ts} +0 -0
  36. /package/dist/types/examples/{create-trigger-list.d.ts → Core/create-trigger-list.d.ts} +0 -0
  37. /package/dist/types/examples/{create-trigger.d.ts → Core/create-trigger.d.ts} +0 -0
  38. /package/dist/types/examples/{delete-edge.d.ts → Core/delete-edge.d.ts} +0 -0
  39. /package/dist/types/examples/{login.d.ts → Core/login.d.ts} +0 -0
  40. /package/dist/types/examples/{rpcServices.d.ts → Core/rpcServices.d.ts} +0 -0
  41. /package/dist/types/examples/{sessionKeyPermissions.d.ts → Core/sessionKeyPermissions.d.ts} +0 -0
  42. /package/dist/types/examples/{update-action.d.ts → Core/update-action.d.ts} +0 -0
  43. /package/dist/types/examples/{version.d.ts → Core/version.d.ts} +0 -0
  44. /package/dist/types/examples/{aave-trigger-borrow-action-borrow.d.ts → DeFi/AAVE/aave-trigger-borrow-action-borrow.d.ts} +0 -0
  45. /package/dist/types/examples/{aave-trigger-supply-action-supply.d.ts → DeFi/AAVE/aave-trigger-supply-action-supply.d.ts} +0 -0
  46. /package/dist/types/examples/{compound-supply-trigger-and-supply-action.d.ts → DeFi/Compound/compound-supply-trigger-and-supply-action.d.ts} +0 -0
  47. /package/dist/types/examples/{compound-withdraw-trigger-and-withdraw-action.d.ts → DeFi/Compound/compound-withdraw-trigger-and-withdraw-action.d.ts} +0 -0
  48. /package/dist/types/examples/{ionic-base-supply.d.ts → DeFi/Ionic/ionic-base-supply.d.ts} +0 -0
  49. /package/dist/types/examples/{ionic-base-withdraw.d.ts → DeFi/Ionic/ionic-base-withdraw.d.ts} +0 -0
  50. /package/dist/types/examples/{ionic-trigger-lending.d.ts → DeFi/Ionic/ionic-trigger-lending.d.ts} +0 -0
  51. /package/dist/types/examples/{ionic-trigger-withdraw.d.ts → DeFi/Ionic/ionic-trigger-withdraw.d.ts} +0 -0
  52. /package/dist/{src/models/Condition.js → types/examples/DeFi/Ironclad/ironclad-trigger-borrow-action-withdraw.d.ts} +0 -0
  53. /package/dist/{src/services/AutomationService.js → types/examples/DeFi/Ironclad/ironclad-trigger-supply-action-supply.d.ts} +0 -0
  54. /package/dist/types/examples/{moonwell-borrow-trigger-deposit-action.d.ts → DeFi/Moonwell/moonwell-borrow-trigger-deposit-action.d.ts} +0 -0
  55. /package/dist/types/examples/{moonwell-borrow.d.ts → DeFi/Moonwell/moonwell-borrow.d.ts} +0 -0
  56. /package/dist/types/examples/{moonwell-repay.d.ts → DeFi/Moonwell/moonwell-repay.d.ts} +0 -0
  57. /package/dist/types/examples/{moonwell-supply-trigger-withdraw-action.d.ts → DeFi/Moonwell/moonwell-supply-trigger-withdraw-action.d.ts} +0 -0
  58. /package/dist/types/examples/{create-odos-swap.d.ts → DeFi/Odos/create-odos-swap.d.ts} +0 -0
  59. /package/dist/types/examples/{create-automation.d.ts → UseCases/lending-aggregator-base.d.ts} +0 -0
  60. /package/dist/types/examples/{create-workflow-with-condition-and-split.d.ts → UseCases/lending-aggregator-mode.d.ts} +0 -0
  61. /package/dist/types/examples/{create-workflow-with-condition.d.ts → Workflow/create-workflow-with-condition-and-split.d.ts} +0 -0
  62. /package/dist/types/examples/{create-workflow-with-external-variable-condition.d.ts → Workflow/create-workflow-with-condition.d.ts} +0 -0
  63. /package/dist/types/examples/{create-workflow-with-notes.d.ts → Workflow/create-workflow-with-external-variable-condition.d.ts} +0 -0
  64. /package/dist/types/examples/{create-workflow-with-split.d.ts → Workflow/create-workflow-with-notes.d.ts} +0 -0
  65. /package/dist/types/examples/{create-workflow-with-variables.d.ts → Workflow/create-workflow-with-split.d.ts} +0 -0
  66. /package/dist/types/examples/{create-workflow.d.ts → Workflow/create-workflow-with-variables.d.ts} +0 -0
  67. /package/dist/types/examples/{delete-workflow.d.ts → Workflow/create-workflow.d.ts} +0 -0
  68. /package/dist/types/examples/{everyhour-ifusdc-ionic.d.ts → Workflow/delete-workflow.d.ts} +0 -0
  69. /package/dist/types/examples/{get-all-workflows-from-user.d.ts → Workflow/get-all-workflows-from-user.d.ts} +0 -0
  70. /package/dist/types/examples/{load-workflow.d.ts → Workflow/load-workflow.d.ts} +0 -0
  71. /package/dist/types/examples/{workflow-templates.d.ts → Workflow/workflow-templates.d.ts} +0 -0
@@ -15,6 +15,32 @@ export const TRIGGERS = {
15
15
  "mandatory": true,
16
16
  "category": 0
17
17
  },
18
+ {
19
+ "key": "timeout",
20
+ "type": "integer",
21
+ "description": "The maximum amount of time to wait before stopping the trigger (in ms)",
22
+ "mandatory": true,
23
+ "category": 1,
24
+ "hideInUI": true,
25
+ "value": 63072000000
26
+ },
27
+ {
28
+ "key": "limit",
29
+ "type": "integer",
30
+ "description": "The maximum number of times this trigger should execute before stopping.",
31
+ "mandatory": true,
32
+ "category": 0
33
+ },
34
+ ],
35
+ "examples": [
36
+ {
37
+ "name": "Run it every day for 2 weeks",
38
+ "description": "Set the period to 1 day and the limit to 14 to execute daily for 2 weeks.",
39
+ "parameters": {
40
+ "period": 86400000,
41
+ "limit": 14
42
+ }
43
+ }
18
44
  ],
19
45
  "blockId": 18,
20
46
  "image": "https://otomato-sdk-images.s3.eu-west-1.amazonaws.com/every_hour_trigger.png"
@@ -230,6 +256,104 @@ export const TRIGGERS = {
230
256
  "image": "https://otomato-sdk-images.s3.eu-west-1.amazonaws.com/BalanceCheck.svg"
231
257
  }
232
258
  },
259
+ "APPROVAL": {
260
+ "description": "Monitors token approvals",
261
+ "chains": [
262
+ 0
263
+ ],
264
+ "image": "https://otomato-sdk-images.s3.eu-west-1.amazonaws.com/Approval.svg",
265
+ "APPROVAL": {
266
+ "name": "Token Approval",
267
+ "description": "Triggers when someone approves this token.",
268
+ "type": 0,
269
+ "output": {
270
+ "owner": "address",
271
+ "spender": "address",
272
+ "value": "uint256",
273
+ "transactionHash": "string"
274
+ },
275
+ "parameters": [
276
+ {
277
+ "key": "chainId",
278
+ "type": "chainId",
279
+ "description": "The network where the token is deployed (e.g., Ethereum or Base).",
280
+ "mandatory": true,
281
+ "category": 0
282
+ },
283
+ {
284
+ "key": "contractAddress",
285
+ "type": "erc20",
286
+ "description": "The token you want to monitor for approvals.",
287
+ "mandatory": true,
288
+ "category": 0
289
+ },
290
+ {
291
+ "key": "abiParams.owner",
292
+ "type": "address",
293
+ "description": "Filter by the wallet that approved the token",
294
+ "category": 1
295
+ },
296
+ {
297
+ "key": "abiParams.spender",
298
+ "type": "address",
299
+ "description": "Filter by the wallet that was approved to spend the token",
300
+ "category": 1
301
+ },
302
+ {
303
+ "key": "abiParams.value",
304
+ "type": "uint256",
305
+ "description": "Filter by the amount of tokens approved",
306
+ "category": 1
307
+ },
308
+ ],
309
+ "frontendHelpers": {
310
+ "output": {
311
+ "value": {
312
+ "erc20Token": {
313
+ "contractAddress": "{{parameters.contractAddress}}",
314
+ "chainId": "{{parameters.chainId}}"
315
+ }
316
+ }
317
+ }
318
+ },
319
+ "examples": [
320
+ {
321
+ "name": "Track all MODE approvals",
322
+ "description": "Get notified whenever someone approves the use of this token.",
323
+ "parameters": [
324
+ {
325
+ "key": "chainId",
326
+ "value": 34443
327
+ },
328
+ {
329
+ "key": "contractAddress",
330
+ "value": "0xDfc7C877a950e49D2610114102175A06C2e3167a"
331
+ }
332
+ ]
333
+ },
334
+ {
335
+ "name": "Track USDC approvals for a specific app",
336
+ "description": "Get notified when someone approves Uniswap to use their tokens.",
337
+ "parameters": [
338
+ {
339
+ "key": "chainId",
340
+ "value": 8453
341
+ },
342
+ {
343
+ "key": "contractAddress",
344
+ "value": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913"
345
+ },
346
+ {
347
+ "key": "abiParams.spender",
348
+ "value": "0xeC8B0F7Ffe3ae75d7FfAb09429e3675bb63503e4"
349
+ }
350
+ ]
351
+ }
352
+ ],
353
+ "blockId": 27,
354
+ "image": "https://otomato-sdk-images.s3.eu-west-1.amazonaws.com/Approval.svg"
355
+ }
356
+ },
233
357
  "ON_CHAIN_PRICE_MOVEMENT": {
234
358
  "description": "Triggers based on the movement of on-chain prices against specified currencies",
235
359
  "chains": [
@@ -1361,6 +1485,148 @@ export const TRIGGERS = {
1361
1485
  "blockId": 24,
1362
1486
  "image": "https://otomato-sdk-images.s3.eu-west-1.amazonaws.com/compound.png"
1363
1487
  }
1488
+ },
1489
+ "IRONCLAD": {
1490
+ "description": "DeFi needs safe, liquid lending markets and steady stablecoins that drives value to users. We’ve built that foundation and made it Ironclad.",
1491
+ "chains": [
1492
+ 8453,
1493
+ 34443
1494
+ ],
1495
+ "image": "https://otomato-sdk-images.s3.eu-west-1.amazonaws.com/ironclad.png",
1496
+ "LENDING_RATE": {
1497
+ "name": "Lending rate",
1498
+ "description": "Get the lending rate of any asset on Ironclad",
1499
+ "prototype": "ironcladLendingRate",
1500
+ "type": 1,
1501
+ "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)",
1502
+ "parameters": [
1503
+ {
1504
+ "key": "chainId",
1505
+ "type": "chainId",
1506
+ "description": "Chain ID of the network",
1507
+ "mandatory": true,
1508
+ "category": 0
1509
+ },
1510
+ {
1511
+ "key": "abiParams.asset",
1512
+ "type": "erc20",
1513
+ "description": "The token you want to fetch the lending rate",
1514
+ "mandatory": true,
1515
+ "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 }",
1516
+ "category": 0
1517
+ },
1518
+ {
1519
+ "key": "condition",
1520
+ "type": "logic_operator",
1521
+ "description": "Logic operator used for the comparison: <, >, <=, >=, ==, ...",
1522
+ "mandatory": true,
1523
+ "category": 0
1524
+ },
1525
+ {
1526
+ "key": "comparisonValue",
1527
+ "type": "float",
1528
+ "description": "The value to compare to",
1529
+ "mandatory": true,
1530
+ "category": 0
1531
+ },
1532
+ ],
1533
+ "output": {
1534
+ "lendingRate": "float"
1535
+ },
1536
+ "examples": [
1537
+ {
1538
+ "name": "USDT Lending Rate is above 5%",
1539
+ "description": "USDT Lending Rate is above 5%",
1540
+ "parameters": [
1541
+ {
1542
+ "key": "chainId",
1543
+ "value": 34443
1544
+ },
1545
+ {
1546
+ "key": "abiParams.asset",
1547
+ "value": "0xf0F161fDA2712DB8b566946122a5af183995e2eD"
1548
+ },
1549
+ {
1550
+ "key": "condition",
1551
+ "value": "gt"
1552
+ },
1553
+ {
1554
+ "key": "comparisonValue",
1555
+ "value": 5
1556
+ }
1557
+ ]
1558
+ }
1559
+ ],
1560
+ "blockId": 25,
1561
+ "image": "https://otomato-sdk-images.s3.eu-west-1.amazonaws.com/ironclad.png"
1562
+ },
1563
+ "BORROWING_RATES": {
1564
+ "name": "Borrowing rate",
1565
+ "description": "Get the borrowing rate of any asset on Ironclad",
1566
+ "type": 1,
1567
+ "prototype": "ironcladBorrowingRate",
1568
+ "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)",
1569
+ "parameters": [
1570
+ {
1571
+ "key": "chainId",
1572
+ "type": "chainId",
1573
+ "description": "Chain ID of the network",
1574
+ "mandatory": true,
1575
+ "category": 0
1576
+ },
1577
+ {
1578
+ "key": "abiParams.asset",
1579
+ "type": "erc20",
1580
+ "description": "The token you want to fetch the borrow rate for",
1581
+ "mandatory": true,
1582
+ "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 }",
1583
+ "category": 0
1584
+ },
1585
+ {
1586
+ "key": "condition",
1587
+ "type": "logic_operator",
1588
+ "description": "Logic operator used for the comparison: <, >, <=, >=, ==, ...",
1589
+ "mandatory": true,
1590
+ "category": 0
1591
+ },
1592
+ {
1593
+ "key": "comparisonValue",
1594
+ "type": "float",
1595
+ "description": "The value to compare to",
1596
+ "mandatory": true,
1597
+ "category": 0
1598
+ },
1599
+ ],
1600
+ "output": {
1601
+ "borrowingRate": "float"
1602
+ },
1603
+ "examples": [
1604
+ {
1605
+ "name": "USDT Borrowing Rate is above 3%",
1606
+ "description": "USDT Borrowing Rate is above 3%",
1607
+ "parameters": [
1608
+ {
1609
+ "key": "chainId",
1610
+ "value": 34443
1611
+ },
1612
+ {
1613
+ "key": "abiParams.asset",
1614
+ "value": "0xf0F161fDA2712DB8b566946122a5af183995e2eD"
1615
+ },
1616
+ {
1617
+ "key": "condition",
1618
+ "value": "gt"
1619
+ },
1620
+ {
1621
+ "key": "comparisonValue",
1622
+ "value": 3
1623
+ }
1624
+ ]
1625
+ }
1626
+ ],
1627
+ "blockId": 26,
1628
+ "image": "https://otomato-sdk-images.s3.eu-west-1.amazonaws.com/ironclad.png"
1629
+ }
1364
1630
  }
1365
1631
  },
1366
1632
  "DEXES": {
@@ -1440,34 +1706,599 @@ export const TRIGGERS = {
1440
1706
  "category": 0
1441
1707
  },
1442
1708
  ],
1443
- "examples": [
1444
- {
1445
- "name": "Any Odos swap",
1446
- "description": "Gets triggered when someone does a swap on Mode using Odos",
1447
- "parameters": [
1448
- {
1449
- "key": "chainId",
1450
- "value": 34443
1709
+ "examples": [
1710
+ {
1711
+ "name": "Any Odos swap",
1712
+ "description": "Gets triggered when someone does a swap on Mode using Odos",
1713
+ "parameters": [
1714
+ {
1715
+ "key": "chainId",
1716
+ "value": 34443
1717
+ }
1718
+ ]
1719
+ },
1720
+ {
1721
+ "name": "Sell ETH",
1722
+ "description": "Gets triggered when someone sells ETH on Mode using Odos",
1723
+ "parameters": [
1724
+ {
1725
+ "key": "chainId",
1726
+ "value": 34443
1727
+ },
1728
+ {
1729
+ "key": "abiParams.inputToken",
1730
+ "value": "0x4200000000000000000000000000000000000006"
1731
+ }
1732
+ ]
1733
+ }
1734
+ ],
1735
+ "blockId": 4,
1736
+ "image": "https://otomato-sdk-images.s3.eu-west-1.amazonaws.com/odos.png"
1737
+ }
1738
+ },
1739
+ "UNISWAP": {
1740
+ "description": "Monitors events on Uniswap pools",
1741
+ "chains": [
1742
+ 8453,
1743
+ 0
1744
+ ],
1745
+ "image": "https://otomato-sdk-images.s3.eu-west-1.amazonaws.com/uniswap.jpg",
1746
+ "V3_SWAP": {
1747
+ "name": "Track swaps on Uniswap V3",
1748
+ "description": "Triggers every time there is a swap on a Uniswap V3 pool.",
1749
+ "type": 0,
1750
+ "output": {
1751
+ "sender": "address",
1752
+ "recipient": "address",
1753
+ "amount0": "int256",
1754
+ "amount1": "int256",
1755
+ "sqrtPriceX96": "uint160",
1756
+ "liquidity": "uint128",
1757
+ "tick": "int24",
1758
+ "transactionHash": "string"
1759
+ },
1760
+ "parameters": [
1761
+ {
1762
+ "key": "chainId",
1763
+ "type": "chainId",
1764
+ "description": "The network to monitor swaps on (e.g., Base, Ethereum).",
1765
+ "mandatory": true,
1766
+ "category": 0
1767
+ },
1768
+ {
1769
+ "key": "contractAddress",
1770
+ "type": "address",
1771
+ "description": "The address of the Uniswap V3 pool to monitor.",
1772
+ "mandatory": true,
1773
+ "category": 0
1774
+ },
1775
+ {
1776
+ "key": "abiParams.amount0",
1777
+ "type": "int256",
1778
+ "description": "Filter by the amount of token0 swapped (exact amount).",
1779
+ "category": 1
1780
+ },
1781
+ {
1782
+ "key": "abiParams.amount1",
1783
+ "type": "int256",
1784
+ "description": "Filter by the amount of token1 swapped (exact amount).",
1785
+ "category": 1
1786
+ },
1787
+ {
1788
+ "key": "abiParams.sender",
1789
+ "type": "address",
1790
+ "description": "Filter by the address initiating the swap.",
1791
+ "category": 1
1792
+ },
1793
+ {
1794
+ "key": "abiParams.recipient",
1795
+ "type": "address",
1796
+ "description": "Filter by the address receiving the swapped tokens.",
1797
+ "category": 1
1798
+ },
1799
+ ],
1800
+ "frontendHelpers": {
1801
+ "output": {
1802
+ "amount0": {
1803
+ "erc20Token": {
1804
+ "contractAddress": "{{parameters.contractAddress}}",
1805
+ "chainId": "{{parameters.chainId}}"
1806
+ }
1807
+ },
1808
+ "amount1": {
1809
+ "erc20Token": {
1810
+ "contractAddress": "{{parameters.contractAddress}}",
1811
+ "chainId": "{{parameters.chainId}}"
1812
+ }
1813
+ }
1814
+ }
1815
+ },
1816
+ "examples": [
1817
+ {
1818
+ "name": "Monitor all swaps",
1819
+ "description": "Triggers whenever a swap occurs on a specific Uniswap V3 pool (ETH/FAI 1%).",
1820
+ "parameters": [
1821
+ {
1822
+ "key": "chainId",
1823
+ "value": 8453
1824
+ },
1825
+ {
1826
+ "key": "contractAddress",
1827
+ "value": "0x68B27E9066d3aAdC6078E17C8611b37868F96A1D"
1828
+ }
1829
+ ]
1830
+ }
1831
+ ],
1832
+ "blockId": 28,
1833
+ "image": "https://otomato-sdk-images.s3.eu-west-1.amazonaws.com/uniswap.jpg"
1834
+ },
1835
+ "V2_SWAP": {
1836
+ "name": "Track swaps on Uniswap V2",
1837
+ "description": "Triggers every time there is a swap on a Uniswap V2 pool.",
1838
+ "type": 0,
1839
+ "output": {
1840
+ "sender": "address",
1841
+ "amount0In": "uint256",
1842
+ "amount1In": "uint256",
1843
+ "amount0Out": "uint256",
1844
+ "amount1Out": "uint256",
1845
+ "to": "address",
1846
+ "transactionHash": "string"
1847
+ },
1848
+ "parameters": [
1849
+ {
1850
+ "key": "chainId",
1851
+ "type": "chainId",
1852
+ "description": "The network to monitor swaps on (e.g., Base, Ethereum).",
1853
+ "mandatory": true,
1854
+ "category": 0
1855
+ },
1856
+ {
1857
+ "key": "contractAddress",
1858
+ "type": "address",
1859
+ "description": "The address of the Uniswap V2 pool to monitor.",
1860
+ "mandatory": true,
1861
+ "category": 0
1862
+ },
1863
+ {
1864
+ "key": "abiParams.amount0In",
1865
+ "type": "uint256",
1866
+ "description": "Filter by the amount of token0 input (exact amount).",
1867
+ "category": 1
1868
+ },
1869
+ {
1870
+ "key": "abiParams.amount1In",
1871
+ "type": "uint256",
1872
+ "description": "Filter by the amount of token1 input (exact amount).",
1873
+ "category": 1
1874
+ },
1875
+ {
1876
+ "key": "abiParams.amount0Out",
1877
+ "type": "uint256",
1878
+ "description": "Filter by the amount of token0 output (exact amount).",
1879
+ "category": 1
1880
+ },
1881
+ {
1882
+ "key": "abiParams.amount1Out",
1883
+ "type": "uint256",
1884
+ "description": "Filter by the amount of token1 output (exact amount).",
1885
+ "category": 1
1886
+ },
1887
+ {
1888
+ "key": "abiParams.sender",
1889
+ "type": "address",
1890
+ "description": "Filter by the address initiating the swap.",
1891
+ "category": 1
1892
+ },
1893
+ {
1894
+ "key": "abiParams.to",
1895
+ "type": "address",
1896
+ "description": "Filter by the address receiving the swapped tokens.",
1897
+ "category": 1
1898
+ },
1899
+ ],
1900
+ "frontendHelpers": {
1901
+ "output": {
1902
+ "amount0In": {
1903
+ "erc20Token": {
1904
+ "contractAddress": "{{parameters.contractAddress}}",
1905
+ "chainId": "{{parameters.chainId}}"
1906
+ }
1907
+ },
1908
+ "amount1In": {
1909
+ "erc20Token": {
1910
+ "contractAddress": "{{parameters.contractAddress}}",
1911
+ "chainId": "{{parameters.chainId}}"
1912
+ }
1913
+ }
1914
+ }
1915
+ },
1916
+ "examples": [
1917
+ {
1918
+ "name": "Monitor all swaps",
1919
+ "description": "Triggers whenever a swap occurs on a specific Uniswap V2 pool (ETH/USDC 0.3%)",
1920
+ "parameters": [
1921
+ {
1922
+ "key": "chainId",
1923
+ "value": 8453
1924
+ },
1925
+ {
1926
+ "key": "contractAddress",
1927
+ "value": "0x88A43bbDF9D098eEC7bCEda4e2494615dfD9bB9C"
1928
+ }
1929
+ ]
1930
+ }
1931
+ ],
1932
+ "blockId": 33,
1933
+ "image": "https://otomato-sdk-images.s3.eu-west-1.amazonaws.com/uniswap.jpg"
1934
+ }
1935
+ },
1936
+ "AERODROME": {
1937
+ "description": "Monitors swaps on Aerodrome pools",
1938
+ "chains": [
1939
+ 8453
1940
+ ],
1941
+ "image": "https://otomato-sdk-images.s3.eu-west-1.amazonaws.com/aerodrome.jpg",
1942
+ "SWAP_IN_CONCENTRATED_POOL": {
1943
+ "name": "Swap in Concentrated Pool",
1944
+ "description": "Triggers every time there is a swap in an Aerodrome concentrated liquidity pool.",
1945
+ "type": 0,
1946
+ "output": {
1947
+ "sender": "address",
1948
+ "recipient": "address",
1949
+ "amount0": "int256",
1950
+ "amount1": "int256",
1951
+ "sqrtPriceX96": "uint160",
1952
+ "liquidity": "uint128",
1953
+ "tick": "int24",
1954
+ "transactionHash": "string"
1955
+ },
1956
+ "parameters": [
1957
+ {
1958
+ "key": "chainId",
1959
+ "type": "chainId",
1960
+ "description": "The network to monitor swaps on (Base).",
1961
+ "mandatory": true,
1962
+ "category": 0
1963
+ },
1964
+ {
1965
+ "key": "contractAddress",
1966
+ "type": "address",
1967
+ "description": "The address of the liquidity pool.",
1968
+ "mandatory": true,
1969
+ "category": 0
1970
+ },
1971
+ {
1972
+ "key": "abiParams.amount0",
1973
+ "type": "int256",
1974
+ "description": "Filter by the amount of token0 swapped (exact amount)",
1975
+ "category": 1
1976
+ },
1977
+ {
1978
+ "key": "abiParams.amount1",
1979
+ "type": "int256",
1980
+ "description": "Filter by the amount of token1 swapped (exact amount)",
1981
+ "category": 1
1982
+ },
1983
+ {
1984
+ "key": "abiParams.sender",
1985
+ "type": "address",
1986
+ "description": "Filter by the address initiating the swap.",
1987
+ "category": 1
1988
+ },
1989
+ {
1990
+ "key": "abiParams.recipient",
1991
+ "type": "address",
1992
+ "description": "Filter by the address receiving the swapped tokens.",
1993
+ "category": 1
1994
+ },
1995
+ ],
1996
+ "frontendHelpers": {
1997
+ "output": {
1998
+ "amount0": {
1999
+ "erc20Token": {
2000
+ "contractAddress": "{{parameters.contractAddress}}",
2001
+ "chainId": "{{parameters.chainId}}"
2002
+ }
2003
+ },
2004
+ "amount1": {
2005
+ "erc20Token": {
2006
+ "contractAddress": "{{parameters.contractAddress}}",
2007
+ "chainId": "{{parameters.chainId}}"
2008
+ }
2009
+ }
2010
+ }
2011
+ },
2012
+ "examples": [
2013
+ {
2014
+ "name": "Monitor all swaps in concentrated pool",
2015
+ "description": "Triggers whenever a swap occurs in an Aerodrome concentrated liquidity pool (WETH/USDC 0.04%)",
2016
+ "parameters": [
2017
+ {
2018
+ "key": "chainId",
2019
+ "value": 8453
2020
+ },
2021
+ {
2022
+ "key": "contractAddress",
2023
+ "value": "0xb2cc224c1c9feE385f8ad6a55b4d94E92359DC59"
2024
+ }
2025
+ ]
2026
+ }
2027
+ ],
2028
+ "blockId": 29,
2029
+ "image": "https://otomato-sdk-images.s3.eu-west-1.amazonaws.com/aerodrome.jpg"
2030
+ },
2031
+ "SWAP_IN_BASIC_POOL": {
2032
+ "name": "Swap in Basic Pool",
2033
+ "description": "Triggers every time there is a swap in an Aerodrome basic liquidity pool.",
2034
+ "type": 0,
2035
+ "output": {
2036
+ "sender": "address",
2037
+ "to": "address",
2038
+ "amount0In": "uint256",
2039
+ "amount1In": "uint256",
2040
+ "amount0Out": "uint256",
2041
+ "amount1Out": "uint256",
2042
+ "transactionHash": "string"
2043
+ },
2044
+ "parameters": [
2045
+ {
2046
+ "key": "chainId",
2047
+ "type": "chainId",
2048
+ "description": "The network to monitor swaps on (Base).",
2049
+ "mandatory": true,
2050
+ "category": 0
2051
+ },
2052
+ {
2053
+ "key": "contractAddress",
2054
+ "type": "address",
2055
+ "description": "The address of the liquidity pool.",
2056
+ "mandatory": true,
2057
+ "category": 0
2058
+ },
2059
+ {
2060
+ "key": "abiParams.amount0In",
2061
+ "type": "uint256",
2062
+ "description": "Filter by the amount of token0 input (exact amount)",
2063
+ "category": 1
2064
+ },
2065
+ {
2066
+ "key": "abiParams.amount1In",
2067
+ "type": "uint256",
2068
+ "description": "Filter by the amount of token1 input (exact amount)",
2069
+ "category": 1
2070
+ },
2071
+ {
2072
+ "key": "abiParams.amount0Out",
2073
+ "type": "uint256",
2074
+ "description": "Filter by the amount of token0 output (exact amount)",
2075
+ "category": 1
2076
+ },
2077
+ {
2078
+ "key": "abiParams.amount1Out",
2079
+ "type": "uint256",
2080
+ "description": "Filter by the amount of token1 output (exact amount)",
2081
+ "category": 1
2082
+ },
2083
+ ],
2084
+ "frontendHelpers": {
2085
+ "output": {
2086
+ "amount0In": {
2087
+ "erc20Token": {
2088
+ "contractAddress": "{{parameters.contractAddress}}",
2089
+ "chainId": "{{parameters.chainId}}"
2090
+ }
2091
+ },
2092
+ "amount1In": {
2093
+ "erc20Token": {
2094
+ "contractAddress": "{{parameters.contractAddress}}",
2095
+ "chainId": "{{parameters.chainId}}"
2096
+ }
2097
+ }
2098
+ }
2099
+ },
2100
+ "examples": [
2101
+ {
2102
+ "name": "Monitor all swaps in basic pool",
2103
+ "description": "Triggers whenever a swap occurs in an Aerodrome basic liquidity pool (USDC/AERO 0.3%)",
2104
+ "parameters": [
2105
+ {
2106
+ "key": "chainId",
2107
+ "value": 8453
2108
+ },
2109
+ {
2110
+ "key": "contractAddress",
2111
+ "value": "0x6cDcb1C4A4D1C3C6d054b27AC5B77e89eAFb971d"
2112
+ }
2113
+ ]
2114
+ }
2115
+ ],
2116
+ "blockId": 30,
2117
+ "image": "https://otomato-sdk-images.s3.eu-west-1.amazonaws.com/aerodrome.jpg"
2118
+ }
2119
+ },
2120
+ "VELODROME": {
2121
+ "description": "Monitors swaps on Velodrome pools",
2122
+ "chains": [
2123
+ 8453
2124
+ ],
2125
+ "image": "https://otomato-sdk-images.s3.eu-west-1.amazonaws.com/velodrome.jpg",
2126
+ "SWAP_IN_CONCENTRATED_POOL": {
2127
+ "name": "Swap in Concentrated Pool",
2128
+ "description": "Triggers every time there is a swap in a Velodrome concentrated liquidity pool.",
2129
+ "type": 0,
2130
+ "output": {
2131
+ "sender": "address",
2132
+ "recipient": "address",
2133
+ "amount0": "int256",
2134
+ "amount1": "int256",
2135
+ "sqrtPriceX96": "uint160",
2136
+ "liquidity": "uint128",
2137
+ "tick": "int24",
2138
+ "transactionHash": "string"
2139
+ },
2140
+ "parameters": [
2141
+ {
2142
+ "key": "chainId",
2143
+ "type": "chainId",
2144
+ "description": "The network to monitor swaps on (Base).",
2145
+ "mandatory": true,
2146
+ "category": 0
2147
+ },
2148
+ {
2149
+ "key": "contractAddress",
2150
+ "type": "address",
2151
+ "description": "The address of the liquidity pool.",
2152
+ "mandatory": true,
2153
+ "category": 0
2154
+ },
2155
+ {
2156
+ "key": "abiParams.amount0",
2157
+ "type": "int256",
2158
+ "description": "Filter by the amount of token0 swapped (exact amount).",
2159
+ "category": 1
2160
+ },
2161
+ {
2162
+ "key": "abiParams.amount1",
2163
+ "type": "int256",
2164
+ "description": "Filter by the amount of token1 swapped (exact amount).",
2165
+ "category": 1
2166
+ },
2167
+ {
2168
+ "key": "abiParams.sender",
2169
+ "type": "address",
2170
+ "description": "Filter by the address initiating the swap.",
2171
+ "category": 1
2172
+ },
2173
+ {
2174
+ "key": "abiParams.recipient",
2175
+ "type": "address",
2176
+ "description": "Filter by the address receiving the swapped tokens.",
2177
+ "category": 1
2178
+ },
2179
+ ],
2180
+ "frontendHelpers": {
2181
+ "output": {
2182
+ "amount0": {
2183
+ "erc20Token": {
2184
+ "contractAddress": "{{parameters.contractAddress}}",
2185
+ "chainId": "{{parameters.chainId}}"
2186
+ }
2187
+ },
2188
+ "amount1": {
2189
+ "erc20Token": {
2190
+ "contractAddress": "{{parameters.contractAddress}}",
2191
+ "chainId": "{{parameters.chainId}}"
2192
+ }
2193
+ }
2194
+ }
2195
+ },
2196
+ "examples": [
2197
+ {
2198
+ "name": "Monitor all swaps in concentrated pool",
2199
+ "description": "Triggers whenever a swap occurs in a Velodrome concentrated liquidity pool (WETH/MODE 0.3%).",
2200
+ "parameters": [
2201
+ {
2202
+ "key": "chainId",
2203
+ "value": 8453
2204
+ },
2205
+ {
2206
+ "key": "contractAddress",
2207
+ "value": "0x1E41CDE26b30646bb3DBBea48A63708b00470c1c"
2208
+ }
2209
+ ]
2210
+ }
2211
+ ],
2212
+ "blockId": 31,
2213
+ "image": "https://otomato-sdk-images.s3.eu-west-1.amazonaws.com/velodrome.jpg"
2214
+ },
2215
+ "SWAP_IN_BASIC_POOL": {
2216
+ "name": "Swap in Basic Pool",
2217
+ "description": "Triggers every time there is a swap in a Velodrome basic liquidity pool.",
2218
+ "type": 0,
2219
+ "output": {
2220
+ "sender": "address",
2221
+ "to": "address",
2222
+ "amount0In": "uint256",
2223
+ "amount1In": "uint256",
2224
+ "amount0Out": "uint256",
2225
+ "amount1Out": "uint256",
2226
+ "transactionHash": "string"
2227
+ },
2228
+ "parameters": [
2229
+ {
2230
+ "key": "chainId",
2231
+ "type": "chainId",
2232
+ "description": "The network to monitor swaps on (Base).",
2233
+ "mandatory": true,
2234
+ "category": 0
2235
+ },
2236
+ {
2237
+ "key": "contractAddress",
2238
+ "type": "address",
2239
+ "description": "The address of the liquidity pool.",
2240
+ "mandatory": true,
2241
+ "category": 0
2242
+ },
2243
+ {
2244
+ "key": "abiParams.amount0In",
2245
+ "type": "uint256",
2246
+ "description": "Filter by the amount of token0 input (exact amount).",
2247
+ "category": 1
2248
+ },
2249
+ {
2250
+ "key": "abiParams.amount1In",
2251
+ "type": "uint256",
2252
+ "description": "Filter by the amount of token1 input (exact amount).",
2253
+ "category": 1
2254
+ },
2255
+ {
2256
+ "key": "abiParams.amount0Out",
2257
+ "type": "uint256",
2258
+ "description": "Filter by the amount of token0 output (exact amount).",
2259
+ "category": 1
2260
+ },
2261
+ {
2262
+ "key": "abiParams.amount1Out",
2263
+ "type": "uint256",
2264
+ "description": "Filter by the amount of token1 output (exact amount).",
2265
+ "category": 1
2266
+ },
2267
+ ],
2268
+ "frontendHelpers": {
2269
+ "output": {
2270
+ "amount0In": {
2271
+ "erc20Token": {
2272
+ "contractAddress": "{{parameters.contractAddress}}",
2273
+ "chainId": "{{parameters.chainId}}"
1451
2274
  }
1452
- ]
1453
- },
2275
+ },
2276
+ "amount1In": {
2277
+ "erc20Token": {
2278
+ "contractAddress": "{{parameters.contractAddress}}",
2279
+ "chainId": "{{parameters.chainId}}"
2280
+ }
2281
+ }
2282
+ }
2283
+ },
2284
+ "examples": [
1454
2285
  {
1455
- "name": "Sell ETH",
1456
- "description": "Gets triggered when someone sells ETH on Mode using Odos",
2286
+ "name": "Monitor all swaps in basic pool",
2287
+ "description": "Triggers whenever a swap occurs in a Velodrome basic liquidity pool (WETH/MODE 0.3%).",
1457
2288
  "parameters": [
1458
2289
  {
1459
2290
  "key": "chainId",
1460
- "value": 34443
2291
+ "value": 8453
1461
2292
  },
1462
2293
  {
1463
- "key": "abiParams.inputToken",
1464
- "value": "0x4200000000000000000000000000000000000006"
2294
+ "key": "contractAddress",
2295
+ "value": "0x0fba984c97539B3fb49ACDA6973288D0EFA903DB"
1465
2296
  }
1466
2297
  ]
1467
2298
  }
1468
2299
  ],
1469
- "blockId": 4,
1470
- "image": "https://otomato-sdk-images.s3.eu-west-1.amazonaws.com/odos.png"
2300
+ "blockId": 32,
2301
+ "image": "https://otomato-sdk-images.s3.eu-west-1.amazonaws.com/velodrome.jpg"
1471
2302
  }
1472
2303
  }
1473
2304
  },
@@ -1923,6 +2754,7 @@ export const ACTIONS = {
1923
2754
  }
1924
2755
  ],
1925
2756
  "permissions": {
2757
+ "chainId": "{{parameters.chainId}}",
1926
2758
  "approvedTargets": [
1927
2759
  "{{before.contractAddress}}",
1928
2760
  "{{parameters.tokenIn}}"
@@ -2203,6 +3035,7 @@ export const ACTIONS = {
2203
3035
  }
2204
3036
  ],
2205
3037
  "permissions": {
3038
+ "chainId": "{{parameters.chainId}}",
2206
3039
  "approvedTargets": [
2207
3040
  "{{parameters.contractAddress}}"
2208
3041
  ],
@@ -2298,6 +3131,7 @@ export const ACTIONS = {
2298
3131
  "transactionHash": "string"
2299
3132
  },
2300
3133
  "permissions": {
3134
+ "chainId": "{{parameters.chainId}}",
2301
3135
  "approvedTargets": [
2302
3136
  "{{parameters.tokenToDeposit}}",
2303
3137
  "{{before.contractAddress}}"
@@ -2312,14 +3146,14 @@ export const ACTIONS = {
2312
3146
  "batchWith": [
2313
3147
  {
2314
3148
  "id": 100012,
2315
- "type": 1,
3149
+ "type": 0,
2316
3150
  "conditions": [],
2317
3151
  "parameters": {
2318
3152
  "chainId": "{{parameters.chainId}}",
2319
3153
  "abi": {
2320
3154
  "parameters": {
2321
3155
  "tokens": [
2322
- "{{parameters.tokenToDeposit}}"
3156
+ "{{before.contractAddress}}"
2323
3157
  ]
2324
3158
  }
2325
3159
  }
@@ -2357,7 +3191,7 @@ export const ACTIONS = {
2357
3191
  "mandatory": true,
2358
3192
  "category": 0,
2359
3193
  "erc20FormattedAmount": {
2360
- "contractAddress": "{{parameters.tokenToWithdraw}}",
3194
+ "contractAddress": "{{before.contractAddress}}",
2361
3195
  "chain": "{{parameters.chainId}}"
2362
3196
  }
2363
3197
  },
@@ -2401,6 +3235,7 @@ export const ACTIONS = {
2401
3235
  "transactionHash": "string"
2402
3236
  },
2403
3237
  "permissions": {
3238
+ "chainId": "{{parameters.chainId}}",
2404
3239
  "approvedTargets": [
2405
3240
  "{{before.contractAddress}}"
2406
3241
  ],
@@ -2480,6 +3315,7 @@ export const ACTIONS = {
2480
3315
  "transactionHash": "string"
2481
3316
  },
2482
3317
  "permissions": {
3318
+ "chainId": "{{parameters.chainId}}",
2483
3319
  "approvedTargets": [
2484
3320
  "{{before.contractAddress}}"
2485
3321
  ],
@@ -2490,14 +3326,6 @@ export const ACTIONS = {
2490
3326
  "Transfer {{tokenSymbol({{parameters.chainId}}, {{parameters.tokenToBorrow}})}}"
2491
3327
  ]
2492
3328
  },
2493
- "checks": [
2494
- {
2495
- "type": 0,
2496
- "chainId": "{{parameters.chainId}}",
2497
- "contractAddress": "{{before.contractAddress}}",
2498
- "amount": "{{parameters.abi.parameters.amount}}"
2499
- }
2500
- ],
2501
3329
  "blockId": 100008,
2502
3330
  "image": "https://otomato-sdk-images.s3.eu-west-1.amazonaws.com/ionic.jpg"
2503
3331
  },
@@ -2573,6 +3401,7 @@ export const ACTIONS = {
2573
3401
  "transactionHash": "string"
2574
3402
  },
2575
3403
  "permissions": {
3404
+ "chainId": "{{parameters.chainId}}",
2576
3405
  "approvedTargets": [
2577
3406
  "{{before.contractAddress}}"
2578
3407
  ],
@@ -2592,7 +3421,6 @@ export const ACTIONS = {
2592
3421
  "description": "Enable collateral to be able to borrow against it.",
2593
3422
  "type": 1,
2594
3423
  "method": "function enterMarkets(address[] tokens) returns (uint256[])",
2595
- "contractAddress": "0xFB3323E24743Caf4ADD0fDCCFB268565c0685556",
2596
3424
  "parameters": [
2597
3425
  {
2598
3426
  "key": "chainId",
@@ -2611,8 +3439,9 @@ export const ACTIONS = {
2611
3439
  ],
2612
3440
  "examples": [],
2613
3441
  "permissions": {
3442
+ "chainId": "{{parameters.chainId}}",
2614
3443
  "approvedTargets": [
2615
- "0xFB3323E24743Caf4ADD0fDCCFB268565c0685556"
3444
+ "{{before.contractAddress}}"
2616
3445
  ],
2617
3446
  "label": [
2618
3447
  "Enable {{tokenSymbol({{parameters.chainId}}, {{parameters.abi.parameters.tokens[0]}})}} as collateral on IONIC"
@@ -2689,7 +3518,6 @@ export const ACTIONS = {
2689
3518
  "key": "abiParams.referralCode",
2690
3519
  "type": "uint16",
2691
3520
  "description": "Referral code (use 0, as inactive)",
2692
- "mandatory": true,
2693
3521
  "hideInUI": true,
2694
3522
  "category": 1,
2695
3523
  "value": 0
@@ -2742,6 +3570,7 @@ export const ACTIONS = {
2742
3570
  "transactionHash": "string"
2743
3571
  },
2744
3572
  "permissions": {
3573
+ "chainId": "{{parameters.chainId}}",
2745
3574
  "approvedTargets": [
2746
3575
  "{{parameters.abi.parameters.asset}}",
2747
3576
  "{{before.contractAddress}}"
@@ -2840,10 +3669,10 @@ export const ACTIONS = {
2840
3669
  }
2841
3670
  ],
2842
3671
  "output": {
2843
- "transactionHash": "string",
2844
- "amountWithdrawn": "uint256"
3672
+ "transactionHash": "string"
2845
3673
  },
2846
3674
  "permissions": {
3675
+ "chainId": "{{parameters.chainId}}",
2847
3676
  "approvedTargets": [
2848
3677
  "{{parameters.abi.parameters.asset}}",
2849
3678
  "{{before.contractAddress}}"
@@ -2925,6 +3754,7 @@ export const ACTIONS = {
2925
3754
  "transactionHash": "string"
2926
3755
  },
2927
3756
  "permissions": {
3757
+ "chainId": "{{parameters.chainId}}",
2928
3758
  "approvedTargets": [
2929
3759
  "{{parameters.tokenToDeposit}}",
2930
3760
  "{{before.contractAddress}}"
@@ -2939,14 +3769,14 @@ export const ACTIONS = {
2939
3769
  "batchWith": [
2940
3770
  {
2941
3771
  "id": 100026,
2942
- "type": 1,
3772
+ "type": 0,
2943
3773
  "conditions": [],
2944
3774
  "parameters": {
2945
3775
  "chainId": "{{parameters.chainId}}",
2946
3776
  "abi": {
2947
3777
  "parameters": {
2948
3778
  "tokens": [
2949
- "{{parameters.tokenToDeposit}}"
3779
+ "{{before.contractAddress}}"
2950
3780
  ]
2951
3781
  }
2952
3782
  }
@@ -3048,6 +3878,7 @@ export const ACTIONS = {
3048
3878
  "transactionHash": "string"
3049
3879
  },
3050
3880
  "permissions": {
3881
+ "chainId": "{{parameters.chainId}}",
3051
3882
  "approvedTargets": [
3052
3883
  "{{before.contractAddress}}"
3053
3884
  ],
@@ -3127,6 +3958,7 @@ export const ACTIONS = {
3127
3958
  "transactionHash": "string"
3128
3959
  },
3129
3960
  "permissions": {
3961
+ "chainId": "{{parameters.chainId}}",
3130
3962
  "approvedTargets": [
3131
3963
  "{{before.contractAddress}}"
3132
3964
  ],
@@ -3212,8 +4044,10 @@ export const ACTIONS = {
3212
4044
  "transactionHash": "string"
3213
4045
  },
3214
4046
  "permissions": {
4047
+ "chainId": "{{parameters.chainId}}",
3215
4048
  "approvedTargets": [
3216
- "{{before.contractAddress}}"
4049
+ "{{before.contractAddress}}",
4050
+ "{{parameters.tokenToRepay}}"
3217
4051
  ],
3218
4052
  "label": [
3219
4053
  "Repay {{tokenSymbol({{parameters.chainId}}, {{parameters.tokenToRepay}})}} on MOONWELL"
@@ -3249,6 +4083,7 @@ export const ACTIONS = {
3249
4083
  ],
3250
4084
  "examples": [],
3251
4085
  "permissions": {
4086
+ "chainId": "{{parameters.chainId}}",
3252
4087
  "approvedTargets": [
3253
4088
  "{{before.contractAddress}}"
3254
4089
  ],
@@ -3341,6 +4176,7 @@ export const ACTIONS = {
3341
4176
  "transactionHash": "string"
3342
4177
  },
3343
4178
  "permissions": {
4179
+ "chainId": "{{parameters.chainId}}",
3344
4180
  "approvedTargets": [
3345
4181
  "{{parameters.abi.parameters.asset}}",
3346
4182
  "{{before.contractAddress}}"
@@ -3435,6 +4271,7 @@ export const ACTIONS = {
3435
4271
  "transactionHash": "string"
3436
4272
  },
3437
4273
  "permissions": {
4274
+ "chainId": "{{parameters.chainId}}",
3438
4275
  "approvedTargets": [
3439
4276
  "{{parameters.abi.parameters.asset}}",
3440
4277
  "{{before.contractAddress}}"
@@ -3449,6 +4286,234 @@ export const ACTIONS = {
3449
4286
  "blockId": 100028,
3450
4287
  "image": "https://otomato-sdk-images.s3.eu-west-1.amazonaws.com/compound.png"
3451
4288
  }
4289
+ },
4290
+ "IRONCLAD": {
4291
+ "description": "DeFi needs safe, liquid lending markets and steady stablecoins that drives value to users. We've built that foundation and made it Ironclad.",
4292
+ "chains": [
4293
+ 8453,
4294
+ 34443
4295
+ ],
4296
+ "image": "https://otomato-sdk-images.s3.eu-west-1.amazonaws.com/ironclad.png",
4297
+ "SUPPLY": {
4298
+ "name": "Supply Asset to Ironclad",
4299
+ "description": "Supply an asset to ironclad",
4300
+ "type": 1,
4301
+ "method": "function deposit(address asset, uint256 amount, address onBehalfOf, uint16 referralCode)",
4302
+ "parameters": [
4303
+ {
4304
+ "key": "chainId",
4305
+ "type": "chainId",
4306
+ "description": "Chain ID of the network",
4307
+ "mandatory": true,
4308
+ "category": 0
4309
+ },
4310
+ {
4311
+ "key": "abiParams.asset",
4312
+ "type": "erc20",
4313
+ "description": "The token to supply",
4314
+ "mandatory": true,
4315
+ "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 }",
4316
+ "category": 0
4317
+ },
4318
+ {
4319
+ "key": "abiParams.amount",
4320
+ "type": "uint256",
4321
+ "description": "The amount of the asset to supply",
4322
+ "mandatory": true,
4323
+ "category": 0,
4324
+ "erc20FormattedAmount": {
4325
+ "contractAddress": "{{parameters.abi.parameters.asset}}",
4326
+ "chain": "{{parameters.chainId}}"
4327
+ }
4328
+ },
4329
+ {
4330
+ "key": "abiParams.onBehalfOf",
4331
+ "type": "address",
4332
+ "description": "The address to receive aTokens",
4333
+ "hideInUI": true,
4334
+ "category": 1
4335
+ },
4336
+ {
4337
+ "key": "abiParams.referralCode",
4338
+ "type": "uint16",
4339
+ "description": "Referral code (use 0, as inactive)",
4340
+ "hideInUI": true,
4341
+ "category": 1,
4342
+ "value": 0
4343
+ },
4344
+ ],
4345
+ "requiredApprovals": [
4346
+ {
4347
+ "address": "{{parameters.abi.parameters.asset}}",
4348
+ "amount": "{{parameters.abi.parameters.amount}}",
4349
+ "to": "{{before.contractAddress}}"
4350
+ }
4351
+ ],
4352
+ "checks": [
4353
+ {
4354
+ "type": 0,
4355
+ "chainId": "{{parameters.chainId}}",
4356
+ "contractAddress": "{{parameters.abi.parameters.asset}}",
4357
+ "amount": "{{parameters.abi.parameters.amount}}"
4358
+ }
4359
+ ],
4360
+ "examples": [
4361
+ {
4362
+ "name": "Supply USDC",
4363
+ "description": "Supply 100 USDC to Ironclad on the Mode network",
4364
+ "parameters": [
4365
+ {
4366
+ "key": "chainId",
4367
+ "value": 34443
4368
+ },
4369
+ {
4370
+ "key": "abiParams.asset",
4371
+ "value": "0xd988097fb8612cc24eeC14542bC03424c656005f"
4372
+ },
4373
+ {
4374
+ "key": "abiParams.amount",
4375
+ "value": "100000000n"
4376
+ },
4377
+ {
4378
+ "key": "abiParams.onBehalfOf",
4379
+ "value": ""
4380
+ },
4381
+ {
4382
+ "key": "abiParams.referralCode",
4383
+ "value": 0
4384
+ }
4385
+ ]
4386
+ }
4387
+ ],
4388
+ "output": {
4389
+ "transactionHash": "string"
4390
+ },
4391
+ "permissions": {
4392
+ "chainId": "{{parameters.chainId}}",
4393
+ "approvedTargets": [
4394
+ "{{parameters.abi.parameters.asset}}",
4395
+ "{{before.contractAddress}}"
4396
+ ],
4397
+ "label": [
4398
+ "Supply {{tokenSymbol({{parameters.chainId}}, {{parameters.abi.parameters.asset}})}} on Ironclad"
4399
+ ],
4400
+ "labelNotAuthorized": [
4401
+ "Transfer {{tokenSymbol({{parameters.chainId}}, {{parameters.abi.parameters.asset}})}}"
4402
+ ]
4403
+ },
4404
+ "blockId": 100029,
4405
+ "image": "https://otomato-sdk-images.s3.eu-west-1.amazonaws.com/ironclad.png"
4406
+ },
4407
+ "WITHDRAW": {
4408
+ "name": "Withdraw Asset from Ironclad",
4409
+ "description": "Withdraw a supplied asset from the Ironclad pool.",
4410
+ "type": 1,
4411
+ "method": "function withdraw(address asset, uint256 amount, address to) returns (uint256)",
4412
+ "parameters": [
4413
+ {
4414
+ "key": "chainId",
4415
+ "type": "chainId",
4416
+ "description": "Chain ID of the network",
4417
+ "mandatory": true,
4418
+ "category": 0
4419
+ },
4420
+ {
4421
+ "key": "abiParams.asset",
4422
+ "type": "erc20",
4423
+ "description": "The address of the asset to withdraw",
4424
+ "mandatory": true,
4425
+ "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 }",
4426
+ "category": 0
4427
+ },
4428
+ {
4429
+ "key": "abiParams.amount",
4430
+ "type": "uint256",
4431
+ "description": "The amount of the asset to withdraw. Use type(uint).max for full balance.",
4432
+ "mandatory": true,
4433
+ "category": 0,
4434
+ "erc20FormattedAmount": {
4435
+ "contractAddress": "{{parameters.abi.parameters.asset}}",
4436
+ "chain": "{{parameters.chainId}}"
4437
+ },
4438
+ "default": "type(uint256).max"
4439
+ },
4440
+ {
4441
+ "key": "abiParams.to",
4442
+ "type": "address",
4443
+ "description": "The address to receive the withdrawn asset",
4444
+ "category": 0,
4445
+ "hideInUI": true
4446
+ },
4447
+ ],
4448
+ "examples": [
4449
+ {
4450
+ "name": "Withdraw USDC",
4451
+ "description": "Withdraw 10 USDC from Ironclad on the Mode network",
4452
+ "parameters": [
4453
+ {
4454
+ "key": "chainId",
4455
+ "value": 34443
4456
+ },
4457
+ {
4458
+ "key": "abiParams.asset",
4459
+ "value": "0xd988097fb8612cc24eeC14542bC03424c656005f"
4460
+ },
4461
+ {
4462
+ "key": "abiParams.amount",
4463
+ "value": "10000000n"
4464
+ },
4465
+ {
4466
+ "key": "abiParams.to",
4467
+ "value": ""
4468
+ }
4469
+ ]
4470
+ },
4471
+ {
4472
+ "name": "Withdraw all",
4473
+ "description": "Withdraw all supplied amount of an asset",
4474
+ "parameters": [
4475
+ {
4476
+ "key": "chainId",
4477
+ "value": 8453
4478
+ },
4479
+ {
4480
+ "key": "abiParams.amount",
4481
+ "value": "115792089237316195423570985008687907853269984665640564039457584007913129639935n"
4482
+ },
4483
+ {
4484
+ "key": "abiParams.to",
4485
+ "value": ""
4486
+ }
4487
+ ]
4488
+ }
4489
+ ],
4490
+ "output": {
4491
+ "transactionHash": "string"
4492
+ },
4493
+ "permissions": {
4494
+ "chainId": "{{parameters.chainId}}",
4495
+ "approvedTargets": [
4496
+ "{{parameters.abi.parameters.asset}}",
4497
+ "{{before.contractAddress}}"
4498
+ ],
4499
+ "label": [
4500
+ "Withdraw {{tokenSymbol({{parameters.chainId}}, {{parameters.abi.parameters.asset}})}} from Ironclad"
4501
+ ],
4502
+ "labelNotAuthorized": [
4503
+ "Transfer {{tokenSymbol({{parameters.chainId}}, {{parameters.abi.parameters.asset}})}}"
4504
+ ]
4505
+ },
4506
+ "checks": [
4507
+ {
4508
+ "type": 0,
4509
+ "chainId": "{{parameters.chainId}}",
4510
+ "contractAddress": "{{before.ironcladToken}}",
4511
+ "amount": "{{parameters.abi.parameters.amount}}"
4512
+ }
4513
+ ],
4514
+ "blockId": 100030,
4515
+ "image": "https://otomato-sdk-images.s3.eu-west-1.amazonaws.com/ironclad.png"
4516
+ }
3452
4517
  }
3453
4518
  },
3454
4519
  "SWAP": {
@@ -3572,6 +4637,7 @@ export const ACTIONS = {
3572
4637
  }
3573
4638
  ],
3574
4639
  "permissions": {
4640
+ "chainId": "{{parameters.chainId}}",
3575
4641
  "approvedTargets": [
3576
4642
  "{{before.contractAddress}}",
3577
4643
  "{{parameters.tokenIn}}"