otomato-sdk 2.0.233 → 2.0.235

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.
@@ -138,16 +138,16 @@ export const TRIGGERS = {
138
138
  },
139
139
  "examples": [
140
140
  {
141
- "name": "Mode transfer",
142
- "description": "Gets triggered when someone transfers MODE",
141
+ "name": "WETH transfer",
142
+ "description": "Gets triggered when someone transfers WETH",
143
143
  "parameters": [
144
144
  {
145
145
  "key": "chainId",
146
- "value": 34443
146
+ "value": 8453
147
147
  },
148
148
  {
149
149
  "key": "contractAddress",
150
- "value": "0xDfc7C877a950e49D2610114102175A06C2e3167a"
150
+ "value": "0x4200000000000000000000000000000000000006"
151
151
  }
152
152
  ]
153
153
  }
@@ -272,25 +272,25 @@ export const TRIGGERS = {
272
272
  ],
273
273
  "examples": [
274
274
  {
275
- "name": "Mode balance check",
276
- "description": "Gets triggered when the MODE balance of vitalik.eth falls below 10,000",
277
- "externalVariableDescription": "Fetches the MODE balance of vitalik.eth on Mode",
275
+ "name": "Base USDC balance check",
276
+ "description": "Gets triggered when the USDC balance of vitalik.eth grows above 1,000",
277
+ "externalVariableDescription": "Fetches the USDC balance of vitalik.eth on Base",
278
278
  "parameters": [
279
279
  {
280
280
  "key": "chainId",
281
- "value": 34443
281
+ "value": 8453
282
282
  },
283
283
  {
284
284
  "key": "comparisonValue",
285
- "value": 10000
285
+ "value": 1000
286
286
  },
287
287
  {
288
288
  "key": "condition",
289
- "value": "lt"
289
+ "value": "gt"
290
290
  },
291
291
  {
292
292
  "key": "contractAddress",
293
- "value": "0xDfc7C877a950e49D2610114102175A06C2e3167a"
293
+ "value": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913"
294
294
  },
295
295
  {
296
296
  "key": "abiParams.account",
@@ -455,16 +455,16 @@ export const TRIGGERS = {
455
455
  },
456
456
  "examples": [
457
457
  {
458
- "name": "Track all MODE approvals",
458
+ "name": "Track all WETH approvals",
459
459
  "description": "Get notified whenever someone approves the use of this token.",
460
460
  "parameters": [
461
461
  {
462
462
  "key": "chainId",
463
- "value": 34443
463
+ "value": 8453
464
464
  },
465
465
  {
466
466
  "key": "contractAddress",
467
- "value": "0xDfc7C877a950e49D2610114102175A06C2e3167a"
467
+ "value": "0x4200000000000000000000000000000000000006"
468
468
  }
469
469
  ]
470
470
  },
@@ -581,43 +581,16 @@ export const TRIGGERS = {
581
581
  ]
582
582
  },
583
583
  {
584
- "name": "ETH < 2100$",
585
- "description": "Gets triggered when ETH falls below 2100$ on Base",
586
- "parameters": [
587
- {
588
- "key": "chainId",
589
- "value": 34443
590
- },
591
- {
592
- "key": "comparisonValue",
593
- "value": 2100
594
- },
595
- {
596
- "key": "currency",
597
- "value": "USD"
598
- },
599
- {
600
- "key": "condition",
601
- "value": "lt"
602
- },
603
- {
604
- "key": "contractAddress",
605
- "value": "0x4200000000000000000000000000000000000006"
606
- }
607
- ]
608
- },
609
- {
610
- "name": "MODE < 0.01$",
611
- "description": "Gets triggered when MODE falls below 0.01$ on Mode Network",
612
- "externalVariableDescription": "Fetches the current MODE price in USD on Mode",
584
+ "name": "cbBTC > 120000$",
585
+ "description": "Gets triggered when cbBTC rises above 120000$ on Base",
613
586
  "parameters": [
614
587
  {
615
588
  "key": "chainId",
616
- "value": 34443
589
+ "value": 8453
617
590
  },
618
591
  {
619
592
  "key": "comparisonValue",
620
- "value": 0.01
593
+ "value": 120000
621
594
  },
622
595
  {
623
596
  "key": "currency",
@@ -625,11 +598,11 @@ export const TRIGGERS = {
625
598
  },
626
599
  {
627
600
  "key": "condition",
628
- "value": "lt"
601
+ "value": "gt"
629
602
  },
630
603
  {
631
604
  "key": "contractAddress",
632
- "value": "0xDfc7C877a950e49D2610114102175A06C2e3167a"
605
+ "value": "0xcbb7c0000ab88b473b1f5afd9ef808440eed33bf"
633
606
  }
634
607
  ]
635
608
  }
@@ -11,17 +11,17 @@ export const WORKFLOW_TEMPLATES_TAGS = {
11
11
  LENDING: 'Lending'
12
12
  };
13
13
  const createModeTransferNotificationWorkflow = () => {
14
- const modeTransferTrigger = new Trigger(TRIGGERS.TOKENS.TRANSFER.TRANSFER);
15
- modeTransferTrigger.setChainId(CHAINS.MODE);
16
- modeTransferTrigger.setContractAddress(getTokenFromSymbol(CHAINS.MODE, 'MODE').contractAddress);
17
- modeTransferTrigger.setParams('from', '0x74B847b308BD89Ef15639E6e4a2544E4b8b8C6B4');
18
- modeTransferTrigger.setPosition(400, 120);
14
+ const cbBTCTransferTrigger = new Trigger(TRIGGERS.TOKENS.TRANSFER.TRANSFER);
15
+ cbBTCTransferTrigger.setChainId(CHAINS.BASE);
16
+ cbBTCTransferTrigger.setContractAddress(getTokenFromSymbol(CHAINS.BASE, 'cbBTC').contractAddress);
17
+ cbBTCTransferTrigger.setParams('from', '0xbbbbbbbbbb9cc5e90e3b3af64bdaf62c37eeffcb');
18
+ cbBTCTransferTrigger.setPosition(400, 120);
19
19
  const notificationAction = new Action(ACTIONS.NOTIFICATIONS.EMAIL.SEND_EMAIL);
20
- notificationAction.setParams("body", "0x74B8....C6B4 transferred $MODE");
21
- notificationAction.setParams("subject", "$MODE transfer alert");
20
+ notificationAction.setParams("body", "0xbbbb....ffcb transferred cbBTC");
21
+ notificationAction.setParams("subject", "cbBTC transfer alert");
22
22
  notificationAction.setPosition(400, 240);
23
- const edge = new Edge({ source: modeTransferTrigger, target: notificationAction });
24
- return new Workflow('MODE transfer notification', [modeTransferTrigger, notificationAction], [edge]);
23
+ const edge = new Edge({ source: cbBTCTransferTrigger, target: notificationAction });
24
+ return new Workflow('cbBTC transfer notification', [cbBTCTransferTrigger, notificationAction], [edge]);
25
25
  };
26
26
  const createETHFearAndGreedBuy = async () => {
27
27
  const trigger = new Trigger(TRIGGERS.SOCIALS.FEAR_AND_GREED.GET_FEAR_AND_GREED_INDEX);
@@ -440,8 +440,8 @@ export const WORKFLOW_TEMPLATES = [
440
440
  createWorkflow: createSusdeYieldNotification
441
441
  },
442
442
  {
443
- 'name': 'MODE transfer notification',
444
- 'description': 'Receive notifications when a top $MODE holder (0x74B8....C6B4) transfers $MODE',
443
+ 'name': 'cbBTC transfer notification',
444
+ 'description': 'Receive notifications when a top cbBTC holder (0xbbbb....ffcb) transfers cbBTC',
445
445
  'tags': [WORKFLOW_TEMPLATES_TAGS.ON_CHAIN_MONITORING, WORKFLOW_TEMPLATES_TAGS.NOTIFICATIONS],
446
446
  'thumbnail': 'https://otomato-sdk-images.s3.eu-west-1.amazonaws.com/templates/transfer-monitoring.png',
447
447
  'image': [
@@ -1,4 +1,4 @@
1
- export const SDK_VERSION = '2.0.233';
1
+ export const SDK_VERSION = '2.0.235';
2
2
  export function compareVersions(v1, v2) {
3
3
  // Split the version strings into parts
4
4
  const v1Parts = v1.split('.').map(Number);
@@ -1,2 +1,2 @@
1
- export declare const SDK_VERSION = "2.0.233";
1
+ export declare const SDK_VERSION = "2.0.235";
2
2
  export declare function compareVersions(v1: string, v2: string): number;
@@ -5,4 +5,5 @@ export interface Parameter {
5
5
  category: number;
6
6
  value?: any;
7
7
  mandatory?: boolean;
8
+ hideInUI?: boolean;
8
9
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "otomato-sdk",
3
- "version": "2.0.233",
3
+ "version": "2.0.235",
4
4
  "description": "An SDK for building and managing automations on Otomato",
5
5
  "main": "dist/src/index.js",
6
6
  "types": "dist/types/src/index.d.ts",