otomato-sdk 1.5.73 → 1.5.74
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.
|
@@ -707,6 +707,72 @@ export const TRIGGERS = {
|
|
|
707
707
|
},
|
|
708
708
|
"blockId": 15,
|
|
709
709
|
"image": "https://otomato-sdk-images.s3.eu-west-1.amazonaws.com/ionic.jpg"
|
|
710
|
+
},
|
|
711
|
+
"BORROWING_RATES": {
|
|
712
|
+
"name": "Borrowing rate",
|
|
713
|
+
"description": "Get the borrowing rate of any asset on Ionic",
|
|
714
|
+
"type": 1,
|
|
715
|
+
"method": "function borrowRatePerBlock() external view returns (uint256)",
|
|
716
|
+
"parameters": [
|
|
717
|
+
{
|
|
718
|
+
"key": "chainId",
|
|
719
|
+
"type": "chainId",
|
|
720
|
+
"description": "Chain ID of the network",
|
|
721
|
+
"mandatory": true,
|
|
722
|
+
"category": 0
|
|
723
|
+
},
|
|
724
|
+
{
|
|
725
|
+
"key": "token",
|
|
726
|
+
"type": "erc20",
|
|
727
|
+
"description": "The token you want to fetch the borrow rate for",
|
|
728
|
+
"mandatory": true,
|
|
729
|
+
"enum": "\n (env) => {\n if (!env.parameters.chainId)\n throw new Error('You need to provide the chainId first');\n \n const availableTokens = {\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 }",
|
|
730
|
+
"category": 0
|
|
731
|
+
},
|
|
732
|
+
{
|
|
733
|
+
"key": "condition",
|
|
734
|
+
"type": "logic_operator",
|
|
735
|
+
"description": "Logic operator used for the comparison: <, >, <=, >=, ==, ...",
|
|
736
|
+
"mandatory": true,
|
|
737
|
+
"category": 0
|
|
738
|
+
},
|
|
739
|
+
{
|
|
740
|
+
"key": "comparisonValue",
|
|
741
|
+
"type": "float",
|
|
742
|
+
"description": "The value to compare to",
|
|
743
|
+
"mandatory": true,
|
|
744
|
+
"category": 0
|
|
745
|
+
},
|
|
746
|
+
],
|
|
747
|
+
"examples": [
|
|
748
|
+
{
|
|
749
|
+
"name": "USDT Borrowing Rate is below 3%",
|
|
750
|
+
"description": "Gets triggered when the USDT borrowing rate falls below 3% on Ionic",
|
|
751
|
+
"parameters": [
|
|
752
|
+
{
|
|
753
|
+
"key": "chainId",
|
|
754
|
+
"value": 34443
|
|
755
|
+
},
|
|
756
|
+
{
|
|
757
|
+
"key": "token",
|
|
758
|
+
"value": "0xf0F161fDA2712DB8b566946122a5af183995e2eD"
|
|
759
|
+
},
|
|
760
|
+
{
|
|
761
|
+
"key": "condition",
|
|
762
|
+
"value": "lte"
|
|
763
|
+
},
|
|
764
|
+
{
|
|
765
|
+
"key": "comparisonValue",
|
|
766
|
+
"value": 3
|
|
767
|
+
}
|
|
768
|
+
]
|
|
769
|
+
}
|
|
770
|
+
],
|
|
771
|
+
"output": {
|
|
772
|
+
"borrowingRate": "float"
|
|
773
|
+
},
|
|
774
|
+
"blockId": 17,
|
|
775
|
+
"image": "https://otomato-sdk-images.s3.eu-west-1.amazonaws.com/ionic.jpg"
|
|
710
776
|
}
|
|
711
777
|
},
|
|
712
778
|
"ASTARIA": {
|
|
@@ -848,13 +914,13 @@ export const TRIGGERS = {
|
|
|
848
914
|
"key": "abiParams.sender",
|
|
849
915
|
"type": "address",
|
|
850
916
|
"description": "Sender address",
|
|
851
|
-
"category":
|
|
917
|
+
"category": 1
|
|
852
918
|
},
|
|
853
919
|
{
|
|
854
920
|
"key": "abiParams.inputAmount",
|
|
855
921
|
"type": "uint256",
|
|
856
922
|
"description": "Input amount",
|
|
857
|
-
"category":
|
|
923
|
+
"category": 1
|
|
858
924
|
},
|
|
859
925
|
{
|
|
860
926
|
"key": "abiParams.inputToken",
|
|
@@ -866,7 +932,7 @@ export const TRIGGERS = {
|
|
|
866
932
|
"key": "abiParams.amountOut",
|
|
867
933
|
"type": "uint256",
|
|
868
934
|
"description": "Output amount",
|
|
869
|
-
"category":
|
|
935
|
+
"category": 1
|
|
870
936
|
},
|
|
871
937
|
{
|
|
872
938
|
"key": "abiParams.outputToken",
|
|
@@ -1574,15 +1640,11 @@ export const ACTIONS = {
|
|
|
1574
1640
|
"category": 0
|
|
1575
1641
|
},
|
|
1576
1642
|
{
|
|
1577
|
-
"key": "
|
|
1578
|
-
"type": "
|
|
1579
|
-
"description": "
|
|
1643
|
+
"key": "contractAddress",
|
|
1644
|
+
"type": "erc20",
|
|
1645
|
+
"description": "The contract address of the ERC20",
|
|
1580
1646
|
"mandatory": true,
|
|
1581
|
-
"category": 0
|
|
1582
|
-
"erc20FormattedAmount": {
|
|
1583
|
-
"contractAddress": "{{parameters.contractAddress}}",
|
|
1584
|
-
"chain": "{{parameters.chainId}}"
|
|
1585
|
-
}
|
|
1647
|
+
"category": 0
|
|
1586
1648
|
},
|
|
1587
1649
|
{
|
|
1588
1650
|
"key": "abiParams.to",
|
|
@@ -1592,11 +1654,15 @@ export const ACTIONS = {
|
|
|
1592
1654
|
"category": 0
|
|
1593
1655
|
},
|
|
1594
1656
|
{
|
|
1595
|
-
"key": "
|
|
1596
|
-
"type": "
|
|
1597
|
-
"description": "
|
|
1657
|
+
"key": "abiParams.value",
|
|
1658
|
+
"type": "uint256",
|
|
1659
|
+
"description": "Amount of crypto to transfer",
|
|
1598
1660
|
"mandatory": true,
|
|
1599
|
-
"category": 0
|
|
1661
|
+
"category": 0,
|
|
1662
|
+
"erc20FormattedAmount": {
|
|
1663
|
+
"contractAddress": "{{parameters.contractAddress}}",
|
|
1664
|
+
"chain": "{{parameters.chainId}}"
|
|
1665
|
+
}
|
|
1600
1666
|
},
|
|
1601
1667
|
],
|
|
1602
1668
|
"checks": [
|
|
@@ -243,6 +243,29 @@ export declare const TRIGGERS: {
|
|
|
243
243
|
blockId: number;
|
|
244
244
|
image: string;
|
|
245
245
|
};
|
|
246
|
+
BORROWING_RATES: {
|
|
247
|
+
name: string;
|
|
248
|
+
description: string;
|
|
249
|
+
type: number;
|
|
250
|
+
method: string;
|
|
251
|
+
parameters: Parameter[];
|
|
252
|
+
examples: {
|
|
253
|
+
name: string;
|
|
254
|
+
description: string;
|
|
255
|
+
parameters: ({
|
|
256
|
+
key: string;
|
|
257
|
+
value: number;
|
|
258
|
+
} | {
|
|
259
|
+
key: string;
|
|
260
|
+
value: string;
|
|
261
|
+
})[];
|
|
262
|
+
}[];
|
|
263
|
+
output: {
|
|
264
|
+
borrowingRate: string;
|
|
265
|
+
};
|
|
266
|
+
blockId: number;
|
|
267
|
+
image: string;
|
|
268
|
+
};
|
|
246
269
|
};
|
|
247
270
|
ASTARIA: {
|
|
248
271
|
description: string;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "1.5.
|
|
1
|
+
export declare const SDK_VERSION = "1.5.74";
|
|
2
2
|
export declare function compareVersions(v1: string, v2: string): number;
|