otomato-sdk 2.0.519 → 2.0.520

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.
@@ -6340,6 +6340,169 @@ export const TRIGGERS = {
6340
6340
  "blockId": 121,
6341
6341
  "image": "https://otomato-sdk-images.s3.eu-west-1.amazonaws.com/euler.webp"
6342
6342
  }
6343
+ },
6344
+ "CONTANGO": {
6345
+ "description": "Contango is a DeFi looping protocol that automates leveraged positions across multiple money markets",
6346
+ "chains": [
6347
+ 1,
6348
+ 8453,
6349
+ 42161
6350
+ ],
6351
+ "image": "https://otomato-sdk-images.s3.eu-west-1.amazonaws.com/contango.webp",
6352
+ "HEALTH_FACTOR": {
6353
+ "name": "Contango Health Factor",
6354
+ "dynamicName": "async (env, { otomatoSDK }) => {\n const { getDynamicNameWrapperHTML, getComparisonString, getChainHTML, shortenAddress } = otomatoSDK;\n return getDynamicNameWrapperHTML(\n `If`,\n `<b>${shortenAddress(env.parameters.user)}</b>`,\n `health factor for position ${env.parameters.positionId} on ${getChainHTML(env.parameters.chainId)} ${getComparisonString(env.parameters.condition, env.parameters.comparisonValue)}`\n );\n }",
6355
+ "description": "Monitor health factor of a Contango leveraged position to prevent liquidation",
6356
+ "prototype": "contangoHealthFactor",
6357
+ "type": 6,
6358
+ "parameters": [
6359
+ {
6360
+ "key": "chainId",
6361
+ "type": "chainId",
6362
+ "description": "Chain ID of the network",
6363
+ "mandatory": true,
6364
+ "category": 0
6365
+ },
6366
+ {
6367
+ "key": "user",
6368
+ "type": "address",
6369
+ "description": "Wallet address of the position owner",
6370
+ "mandatory": true,
6371
+ "category": 0
6372
+ },
6373
+ {
6374
+ "key": "positionId",
6375
+ "type": "string",
6376
+ "description": "Contango position ID (bytes32)",
6377
+ "mandatory": true,
6378
+ "category": 0
6379
+ },
6380
+ {
6381
+ "key": "condition",
6382
+ "type": "logic_operator",
6383
+ "description": "Logic operator used for the comparison: <, >, <=, >=, ==, ...",
6384
+ "mandatory": true,
6385
+ "category": 0
6386
+ },
6387
+ {
6388
+ "key": "comparisonValue",
6389
+ "type": "float",
6390
+ "description": "Health factor threshold to compare against (e.g., 1.2)",
6391
+ "mandatory": true,
6392
+ "category": 0
6393
+ },
6394
+ ],
6395
+ "output": {
6396
+ "healthFactor": "float"
6397
+ },
6398
+ "examples": [
6399
+ {
6400
+ "name": "Health Factor below 1.5",
6401
+ "description": "Triggered when Contango position health factor drops below 1.5 on Ethereum",
6402
+ "parameters": [
6403
+ {
6404
+ "key": "chainId",
6405
+ "value": 42161
6406
+ },
6407
+ {
6408
+ "key": "user",
6409
+ "value": "0x5BDeB2152f185BF59f2dE027CBBC05355cc965Bd"
6410
+ },
6411
+ {
6412
+ "key": "positionId",
6413
+ "value": "0x55534454555344432e6e00000000000001ffffffff010000000100000000572a"
6414
+ },
6415
+ {
6416
+ "key": "condition",
6417
+ "value": "lte"
6418
+ },
6419
+ {
6420
+ "key": "comparisonValue",
6421
+ "value": 1.5
6422
+ }
6423
+ ]
6424
+ }
6425
+ ],
6426
+ "blockId": 144,
6427
+ "image": "https://otomato-sdk-images.s3.eu-west-1.amazonaws.com/contango.webp"
6428
+ },
6429
+ "NET_APY": {
6430
+ "name": "Contango Net APY",
6431
+ "dynamicName": "async (env, { otomatoSDK }) => {\n const { getDynamicNameWrapperHTML, getComparisonString, getChainHTML, shortenAddress } = otomatoSDK;\n return getDynamicNameWrapperHTML(\n `If`,\n `<b>${shortenAddress(env.parameters.user)}</b>`,\n `net APY for position ${env.parameters.positionId} on ${getChainHTML(env.parameters.chainId)} ${getComparisonString(env.parameters.condition, env.parameters.comparisonValue)}`\n );\n }",
6432
+ "description": "Monitor net APY of a Contango leveraged position",
6433
+ "prototype": "contangoNetAPY",
6434
+ "type": 6,
6435
+ "parameters": [
6436
+ {
6437
+ "key": "chainId",
6438
+ "type": "chainId",
6439
+ "description": "Chain ID of the network",
6440
+ "mandatory": true,
6441
+ "category": 0
6442
+ },
6443
+ {
6444
+ "key": "user",
6445
+ "type": "address",
6446
+ "description": "Wallet address of the position owner",
6447
+ "mandatory": true,
6448
+ "category": 0
6449
+ },
6450
+ {
6451
+ "key": "positionId",
6452
+ "type": "string",
6453
+ "description": "Contango position ID (bytes32)",
6454
+ "mandatory": true,
6455
+ "category": 0
6456
+ },
6457
+ {
6458
+ "key": "condition",
6459
+ "type": "logic_operator",
6460
+ "description": "Logic operator used for the comparison: <, >, <=, >=, ==, ...",
6461
+ "mandatory": true,
6462
+ "category": 0
6463
+ },
6464
+ {
6465
+ "key": "comparisonValue",
6466
+ "type": "float",
6467
+ "description": "Net APY percentage to compare against",
6468
+ "mandatory": true,
6469
+ "category": 0
6470
+ },
6471
+ ],
6472
+ "output": {
6473
+ "netAPY": "float"
6474
+ },
6475
+ "examples": [
6476
+ {
6477
+ "name": "Net APY above 5%",
6478
+ "description": "Triggered when Contango position net APY exceeds 5% on Ethereum",
6479
+ "parameters": [
6480
+ {
6481
+ "key": "chainId",
6482
+ "value": 42161
6483
+ },
6484
+ {
6485
+ "key": "user",
6486
+ "value": "0x5BDeB2152f185BF59f2dE027CBBC05355cc965Bd"
6487
+ },
6488
+ {
6489
+ "key": "positionId",
6490
+ "value": "0x55534454555344432e6e00000000000001ffffffff010000000100000000572a"
6491
+ },
6492
+ {
6493
+ "key": "condition",
6494
+ "value": "gt"
6495
+ },
6496
+ {
6497
+ "key": "comparisonValue",
6498
+ "value": 5
6499
+ }
6500
+ ]
6501
+ }
6502
+ ],
6503
+ "blockId": 145,
6504
+ "image": "https://otomato-sdk-images.s3.eu-west-1.amazonaws.com/contango.webp"
6505
+ }
6343
6506
  }
6344
6507
  },
6345
6508
  "DEXES": {
@@ -1,4 +1,4 @@
1
- export const SDK_VERSION = '2.0.519';
1
+ export const SDK_VERSION = '2.0.520';
2
2
  export function compareVersions(v1, v2) {
3
3
  // Split the version strings into parts
4
4
  const v1Parts = v1.split('.').map(Number);
@@ -2442,6 +2442,59 @@ export declare const TRIGGERS: {
2442
2442
  image: string;
2443
2443
  };
2444
2444
  };
2445
+ CONTANGO: {
2446
+ description: string;
2447
+ chains: number[];
2448
+ image: string;
2449
+ HEALTH_FACTOR: {
2450
+ name: string;
2451
+ dynamicName: string;
2452
+ description: string;
2453
+ prototype: string;
2454
+ type: number;
2455
+ parameters: Parameter[];
2456
+ output: {
2457
+ healthFactor: string;
2458
+ };
2459
+ examples: {
2460
+ name: string;
2461
+ description: string;
2462
+ parameters: ({
2463
+ key: string;
2464
+ value: number;
2465
+ } | {
2466
+ key: string;
2467
+ value: string;
2468
+ })[];
2469
+ }[];
2470
+ blockId: number;
2471
+ image: string;
2472
+ };
2473
+ NET_APY: {
2474
+ name: string;
2475
+ dynamicName: string;
2476
+ description: string;
2477
+ prototype: string;
2478
+ type: number;
2479
+ parameters: Parameter[];
2480
+ output: {
2481
+ netAPY: string;
2482
+ };
2483
+ examples: {
2484
+ name: string;
2485
+ description: string;
2486
+ parameters: ({
2487
+ key: string;
2488
+ value: number;
2489
+ } | {
2490
+ key: string;
2491
+ value: string;
2492
+ })[];
2493
+ }[];
2494
+ blockId: number;
2495
+ image: string;
2496
+ };
2497
+ };
2445
2498
  };
2446
2499
  DEXES: {
2447
2500
  ODOS: {
@@ -1,2 +1,2 @@
1
- export declare const SDK_VERSION = "2.0.519";
1
+ export declare const SDK_VERSION = "2.0.520";
2
2
  export declare function compareVersions(v1: string, v2: string): number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "otomato-sdk",
3
- "version": "2.0.519",
3
+ "version": "2.0.520",
4
4
  "description": "An SDK for building and managing automations on Otomato",
5
5
  "repository": {
6
6
  "type": "git",