otomato-sdk 2.0.363 → 2.0.365
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/WorkflowTemplates.js +620 -3
- package/dist/src/constants/version.js +1 -1
- package/dist/src/utils/helpers.js +44 -10
- package/dist/types/examples/General/Wallet/protocol-points.d.ts +1 -0
- package/dist/types/src/constants/WorkflowTemplates.d.ts +1 -0
- package/dist/types/src/constants/version.d.ts +1 -1
- package/dist/types/src/utils/helpers.d.ts +4 -1
- package/package.json +1 -1
|
@@ -9,7 +9,8 @@ export const WORKFLOW_TEMPLATES_TAGS = {
|
|
|
9
9
|
NOTIFICATIONS: 'Notifications',
|
|
10
10
|
ABSTRACT: 'Abstract',
|
|
11
11
|
DEXES: 'Dexes',
|
|
12
|
-
LENDING: 'Lending'
|
|
12
|
+
LENDING: 'Lending',
|
|
13
|
+
HYPER_EVM: 'Hyper EVM',
|
|
13
14
|
};
|
|
14
15
|
const yieldUpdateMessage = `Daily Yield Report 🚀
|
|
15
16
|
|
|
@@ -477,12 +478,12 @@ const createTwitterAiNotificationWorkflow = (username, wfData) => {
|
|
|
477
478
|
return workflow;
|
|
478
479
|
};
|
|
479
480
|
};
|
|
480
|
-
const createTwitterAiNotificationTemplate = (id, username, wfData, thumbnail) => {
|
|
481
|
+
const createTwitterAiNotificationTemplate = (id, username, wfData, thumbnail, tags) => {
|
|
481
482
|
return {
|
|
482
483
|
'id': id,
|
|
483
484
|
'name': wfData.wfTitle,
|
|
484
485
|
'description': wfData.description,
|
|
485
|
-
'tags': [WORKFLOW_TEMPLATES_TAGS.SOCIALS, WORKFLOW_TEMPLATES_TAGS.NOTIFICATIONS],
|
|
486
|
+
'tags': [WORKFLOW_TEMPLATES_TAGS.SOCIALS, WORKFLOW_TEMPLATES_TAGS.NOTIFICATIONS, ...(tags || [])],
|
|
486
487
|
'thumbnail': thumbnail,
|
|
487
488
|
'image': [
|
|
488
489
|
TRIGGERS.SOCIALS.X.image,
|
|
@@ -757,6 +758,237 @@ const createPudgyPenguinHunterAgentWorkflow = async () => {
|
|
|
757
758
|
const workflow = new Workflow('Get notified when a Pudgy Penguins is listed', [blurListingTrigger, iexecSendWeb3TelegramAction], [edge1], DEFAULT_WORKFLOW_LOOP_SETTINGS.subscription1m20rep);
|
|
758
759
|
return workflow;
|
|
759
760
|
};
|
|
761
|
+
const createWalletPointsIncreaseWorkflow = async () => {
|
|
762
|
+
const pointsPointsMovementTrigger = new Trigger(TRIGGERS.SOCIALS.HYPER_EVM_PROTOCOLS_POINTS.ON_NEW_POINTS);
|
|
763
|
+
pointsPointsMovementTrigger.setParams('walletAddress', '0x9f5362c5ad18e5a3f9c06e9cf26d5ae0c5833f3f');
|
|
764
|
+
pointsPointsMovementTrigger.setPosition(400, 120);
|
|
765
|
+
const telegramSendMessageAction = new Action(ACTIONS.TRENDING.TELEGRAM.SEND_MESSAGE);
|
|
766
|
+
telegramSendMessageAction.setParams('message', `Wallet's points have increased: ${pointsPointsMovementTrigger.getOutputVariableName('pointsChange')}`);
|
|
767
|
+
telegramSendMessageAction.setPosition(400, 240);
|
|
768
|
+
const edge1 = new Edge({ source: pointsPointsMovementTrigger, target: telegramSendMessageAction });
|
|
769
|
+
const workflow = new Workflow('Get notified when wallet\'s points increase', [pointsPointsMovementTrigger, telegramSendMessageAction], [edge1], {
|
|
770
|
+
loopingType: WORKFLOW_LOOPING_TYPES.SUBSCRIPTION,
|
|
771
|
+
limit: 1000,
|
|
772
|
+
timeout: 31536000000
|
|
773
|
+
});
|
|
774
|
+
return workflow;
|
|
775
|
+
};
|
|
776
|
+
const createHyperbeatLendingYieldDropWorkflow = async () => {
|
|
777
|
+
const hyperlendLendingRateTrigger = new Trigger(TRIGGERS.LENDING.HYPERLEND.LENDING_RATE);
|
|
778
|
+
hyperlendLendingRateTrigger.setParams('chainId', 999);
|
|
779
|
+
hyperlendLendingRateTrigger.setParams('abiParams.asset', '0x5555555555555555555555555555555555555555');
|
|
780
|
+
hyperlendLendingRateTrigger.setParams('condition', 'gt');
|
|
781
|
+
hyperlendLendingRateTrigger.setParams('comparisonValue', 7);
|
|
782
|
+
hyperlendLendingRateTrigger.setPosition(400, 120);
|
|
783
|
+
const telegramSendMessageAction = new Action(ACTIONS.TRENDING.TELEGRAM.SEND_MESSAGE);
|
|
784
|
+
telegramSendMessageAction.setParams('message', 'Hyperlend wHYPE lending rate is above 7%');
|
|
785
|
+
telegramSendMessageAction.setPosition(400, 240);
|
|
786
|
+
const edge1 = new Edge({ source: hyperlendLendingRateTrigger, target: telegramSendMessageAction });
|
|
787
|
+
const workflow = new Workflow('Get notified when when wHYPE lending rate above 7%', [hyperlendLendingRateTrigger, telegramSendMessageAction], [edge1], null);
|
|
788
|
+
return workflow;
|
|
789
|
+
};
|
|
790
|
+
const createHyperlendHealthFactorWorkflow = async () => {
|
|
791
|
+
const hyperlendHealthFactorTrigger = new Trigger(TRIGGERS.LENDING.HYPERLEND.HEALTH_FACTOR);
|
|
792
|
+
hyperlendHealthFactorTrigger.setParams('chainId', 999);
|
|
793
|
+
hyperlendHealthFactorTrigger.setParams('abiParams.user', '');
|
|
794
|
+
hyperlendHealthFactorTrigger.setParams('condition', 'lte');
|
|
795
|
+
hyperlendHealthFactorTrigger.setParams('comparisonValue', 1.2);
|
|
796
|
+
hyperlendHealthFactorTrigger.setPosition(400, 120);
|
|
797
|
+
const telegramSendMessageAction = new Action(ACTIONS.TRENDING.TELEGRAM.SEND_MESSAGE);
|
|
798
|
+
telegramSendMessageAction.setParams('message', 'Wallet {{nodeMap.1.parameters.abi.parameters.user}}\'s health factor dropped below 1.2');
|
|
799
|
+
telegramSendMessageAction.setPosition(400, 240);
|
|
800
|
+
const edge1 = new Edge({ source: hyperlendHealthFactorTrigger, target: telegramSendMessageAction });
|
|
801
|
+
const workflow = new Workflow('Notify me when HF reach a treshold on HyperLend', [hyperlendHealthFactorTrigger, telegramSendMessageAction], [edge1], null);
|
|
802
|
+
return workflow;
|
|
803
|
+
};
|
|
804
|
+
const createHyperlendLendingYieldDropWorkflow = async () => {
|
|
805
|
+
const hyperlendLendingRateTrigger = new Trigger(TRIGGERS.LENDING.HYPERLEND.LENDING_RATE);
|
|
806
|
+
hyperlendLendingRateTrigger.setParams('chainId', 999);
|
|
807
|
+
hyperlendLendingRateTrigger.setParams('abiParams.asset', '0x5555555555555555555555555555555555555555');
|
|
808
|
+
hyperlendLendingRateTrigger.setParams('condition', 'gt');
|
|
809
|
+
hyperlendLendingRateTrigger.setParams('comparisonValue', 7);
|
|
810
|
+
hyperlendLendingRateTrigger.setPosition(400, 120);
|
|
811
|
+
const telegramSendMessageAction = new Action(ACTIONS.TRENDING.TELEGRAM.SEND_MESSAGE);
|
|
812
|
+
telegramSendMessageAction.setParams('message', 'Hyperlend wHYPE lending rate is above 7%');
|
|
813
|
+
telegramSendMessageAction.setPosition(400, 240);
|
|
814
|
+
const edge1 = new Edge({ source: hyperlendLendingRateTrigger, target: telegramSendMessageAction });
|
|
815
|
+
const workflow = new Workflow('Get notified when when wHYPE lending rate above 7%', [hyperlendLendingRateTrigger, telegramSendMessageAction], [edge1], null);
|
|
816
|
+
return workflow;
|
|
817
|
+
};
|
|
818
|
+
const createHyperlendBorrowingYieldIncreaseWorkflow = async () => {
|
|
819
|
+
const hyperlendBorrowingRatesTrigger = new Trigger(TRIGGERS.LENDING.HYPERLEND.BORROWING_RATES);
|
|
820
|
+
hyperlendBorrowingRatesTrigger.setParams('chainId', 999);
|
|
821
|
+
hyperlendBorrowingRatesTrigger.setParams('abiParams.asset', '0x5555555555555555555555555555555555555555');
|
|
822
|
+
hyperlendBorrowingRatesTrigger.setParams('condition', 'lt');
|
|
823
|
+
hyperlendBorrowingRatesTrigger.setParams('comparisonValue', 6);
|
|
824
|
+
hyperlendBorrowingRatesTrigger.setPosition(400, 120);
|
|
825
|
+
const telegramSendMessageAction = new Action(ACTIONS.TRENDING.TELEGRAM.SEND_MESSAGE);
|
|
826
|
+
telegramSendMessageAction.setParams('message', 'Hyperlend wHYPE borrowing rate is below 6%');
|
|
827
|
+
telegramSendMessageAction.setPosition(400, 240);
|
|
828
|
+
const edge1 = new Edge({ source: hyperlendBorrowingRatesTrigger, target: telegramSendMessageAction });
|
|
829
|
+
const workflow = new Workflow('Get notified when when wHYPE borrowing rate below 6%', [hyperlendBorrowingRatesTrigger, telegramSendMessageAction], [edge1], null);
|
|
830
|
+
return workflow;
|
|
831
|
+
};
|
|
832
|
+
const createPendleTokenExpiresWorkflow = async () => {
|
|
833
|
+
const hyperEvmProtocolsPointsOnNewPointsTrigger = new Trigger(TRIGGERS.SOCIALS.HYPER_EVM_PROTOCOLS_POINTS.ON_NEW_POINTS);
|
|
834
|
+
hyperEvmProtocolsPointsOnNewPointsTrigger.setParams('chainId', 999);
|
|
835
|
+
hyperEvmProtocolsPointsOnNewPointsTrigger.setParams('marketAddress', '0x97d985a71131afc02c320b636a268df34c6f42a4');
|
|
836
|
+
hyperEvmProtocolsPointsOnNewPointsTrigger.setPosition(400, 120);
|
|
837
|
+
const telegramSendMessageAction = new Action(ACTIONS.TRENDING.TELEGRAM.SEND_MESSAGE);
|
|
838
|
+
telegramSendMessageAction.setParams('message', 'LP hbHYPE market on Pendle HyperEVM expired');
|
|
839
|
+
telegramSendMessageAction.setPosition(400, 240);
|
|
840
|
+
const edge1 = new Edge({ source: hyperEvmProtocolsPointsOnNewPointsTrigger, target: telegramSendMessageAction });
|
|
841
|
+
const workflow = new Workflow('Notify me when LP hbHYPE is expired on pendle', [hyperEvmProtocolsPointsOnNewPointsTrigger, telegramSendMessageAction], [edge1], null);
|
|
842
|
+
return workflow;
|
|
843
|
+
};
|
|
844
|
+
const createPendlePtYieldIncreaseWorkflow = async () => {
|
|
845
|
+
const pendlePtImpliedYieldTrigger = new Trigger(TRIGGERS.YIELD.PENDLE.PT_IMPLIED_YIELD);
|
|
846
|
+
pendlePtImpliedYieldTrigger.setParams('chainId', 999);
|
|
847
|
+
pendlePtImpliedYieldTrigger.setParams('abiParams.marketAddress', '0x97d985a71131afc02c320b636a268df34c6f42a4');
|
|
848
|
+
pendlePtImpliedYieldTrigger.setParams('condition', 'gt');
|
|
849
|
+
pendlePtImpliedYieldTrigger.setParams('comparisonValue', 10);
|
|
850
|
+
pendlePtImpliedYieldTrigger.setPosition(400, 120);
|
|
851
|
+
const telegramSendMessageAction = new Action(ACTIONS.TRENDING.TELEGRAM.SEND_MESSAGE);
|
|
852
|
+
telegramSendMessageAction.setParams('message', 'Pendle hbHYPE\'s PT yield is above 10%');
|
|
853
|
+
telegramSendMessageAction.setPosition(400, 240);
|
|
854
|
+
const edge1 = new Edge({ source: pendlePtImpliedYieldTrigger, target: telegramSendMessageAction });
|
|
855
|
+
const workflow = new Workflow('Get notified when when hbHYPE PT yield above 10%', [pendlePtImpliedYieldTrigger, telegramSendMessageAction], [edge1], null);
|
|
856
|
+
return workflow;
|
|
857
|
+
};
|
|
858
|
+
const createPendlePtYieldDecreaseWorkflow = async () => {
|
|
859
|
+
const pendlePtImpliedYieldTrigger = new Trigger(TRIGGERS.YIELD.PENDLE.PT_IMPLIED_YIELD);
|
|
860
|
+
pendlePtImpliedYieldTrigger.setParams('chainId', 999);
|
|
861
|
+
pendlePtImpliedYieldTrigger.setParams('abiParams.marketAddress', '0x97d985a71131afc02c320b636a268df34c6f42a4');
|
|
862
|
+
pendlePtImpliedYieldTrigger.setParams('condition', 'lt');
|
|
863
|
+
pendlePtImpliedYieldTrigger.setParams('comparisonValue', 10);
|
|
864
|
+
pendlePtImpliedYieldTrigger.setPosition(400, 120);
|
|
865
|
+
const telegramSendMessageAction = new Action(ACTIONS.TRENDING.TELEGRAM.SEND_MESSAGE);
|
|
866
|
+
telegramSendMessageAction.setParams('message', 'Pendle hbHYPE\'s PT yield is below 7%');
|
|
867
|
+
telegramSendMessageAction.setPosition(400, 240);
|
|
868
|
+
const edge1 = new Edge({ source: pendlePtImpliedYieldTrigger, target: telegramSendMessageAction });
|
|
869
|
+
const workflow = new Workflow('Get notified when when hbHYPE PT yield below 7%', [pendlePtImpliedYieldTrigger, telegramSendMessageAction], [edge1], null);
|
|
870
|
+
return workflow;
|
|
871
|
+
};
|
|
872
|
+
const createPendlePtExpiresWorkflow = async () => {
|
|
873
|
+
const pendlePtExpiredTrigger = new Trigger(TRIGGERS.YIELD.PENDLE.PT_EXPIRED);
|
|
874
|
+
pendlePtExpiredTrigger.setParams('chainId', 999);
|
|
875
|
+
pendlePtExpiredTrigger.setParams('marketAddress', '0x810f9d4a751cafd5193617022b35fa0b0c166b4c');
|
|
876
|
+
pendlePtExpiredTrigger.setPosition(400, 120);
|
|
877
|
+
const telegramSendMessageAction = new Action(ACTIONS.TRENDING.TELEGRAM.SEND_MESSAGE);
|
|
878
|
+
telegramSendMessageAction.setParams('message', 'PT hbHYPE market on HyperEVM expired');
|
|
879
|
+
telegramSendMessageAction.setPosition(400, 240);
|
|
880
|
+
const edge1 = new Edge({ source: pendlePtExpiredTrigger, target: telegramSendMessageAction });
|
|
881
|
+
const workflow = new Workflow('Notify me when PT hbHYPE is expired on pendle', [pendlePtExpiredTrigger, telegramSendMessageAction], [edge1], null);
|
|
882
|
+
return workflow;
|
|
883
|
+
};
|
|
884
|
+
const createPendleYtExpiresWorkflow = async () => {
|
|
885
|
+
const pendleYtExpiredTrigger = new Trigger(TRIGGERS.YIELD.PENDLE.YT_EXPIRED);
|
|
886
|
+
pendleYtExpiredTrigger.setParams('chainId', 999);
|
|
887
|
+
pendleYtExpiredTrigger.setParams('marketAddress', '0x2b55b35d9be63d016ee902d87af29d2c4f397dc1');
|
|
888
|
+
pendleYtExpiredTrigger.setPosition(400, 120);
|
|
889
|
+
const telegramSendMessageAction = new Action(ACTIONS.TRENDING.TELEGRAM.SEND_MESSAGE);
|
|
890
|
+
telegramSendMessageAction.setParams('message', 'YT hbHYPE market on HyperEVM expired');
|
|
891
|
+
telegramSendMessageAction.setPosition(400, 240);
|
|
892
|
+
const edge1 = new Edge({ source: pendleYtExpiredTrigger, target: telegramSendMessageAction });
|
|
893
|
+
const workflow = new Workflow('Notify me when YT hbHYPE is expired on pendle', [pendleYtExpiredTrigger, telegramSendMessageAction], [edge1], null);
|
|
894
|
+
return workflow;
|
|
895
|
+
};
|
|
896
|
+
const createPendleYtLeverageIncreaseWorkflow = async () => {
|
|
897
|
+
const pendleYtImpliedYieldTrigger = new Trigger(TRIGGERS.YIELD.PENDLE.YT_LEVERAGE);
|
|
898
|
+
pendleYtImpliedYieldTrigger.setParams('chainId', 999);
|
|
899
|
+
pendleYtImpliedYieldTrigger.setParams('abiParams.marketAddress', '0x97d985a71131afc02c320b636a268df34c6f42a4');
|
|
900
|
+
pendleYtImpliedYieldTrigger.setParams('condition', 'gt');
|
|
901
|
+
pendleYtImpliedYieldTrigger.setParams('comparisonValue', 60);
|
|
902
|
+
pendleYtImpliedYieldTrigger.setPosition(400, 120);
|
|
903
|
+
const telegramSendMessageAction = new Action(ACTIONS.TRENDING.TELEGRAM.SEND_MESSAGE);
|
|
904
|
+
telegramSendMessageAction.setParams('message', 'Pendle hbHYPE\'s YT leverage is above 60');
|
|
905
|
+
telegramSendMessageAction.setPosition(400, 240);
|
|
906
|
+
const edge1 = new Edge({ source: pendleYtImpliedYieldTrigger, target: telegramSendMessageAction });
|
|
907
|
+
const workflow = new Workflow('Get notified when when hbHYPE YT leverage above 60', [pendleYtImpliedYieldTrigger, telegramSendMessageAction], [edge1], null);
|
|
908
|
+
return workflow;
|
|
909
|
+
};
|
|
910
|
+
const createPendleYtLeverageDecreaseWorkflow = async () => {
|
|
911
|
+
const pendleYtImpliedYieldTrigger = new Trigger(TRIGGERS.YIELD.PENDLE.YT_LEVERAGE);
|
|
912
|
+
pendleYtImpliedYieldTrigger.setParams('chainId', 999);
|
|
913
|
+
pendleYtImpliedYieldTrigger.setParams('abiParams.marketAddress', '0x97d985a71131afc02c320b636a268df34c6f42a4');
|
|
914
|
+
pendleYtImpliedYieldTrigger.setParams('condition', 'lt');
|
|
915
|
+
pendleYtImpliedYieldTrigger.setParams('comparisonValue', 40);
|
|
916
|
+
pendleYtImpliedYieldTrigger.setPosition(400, 120);
|
|
917
|
+
const telegramSendMessageAction = new Action(ACTIONS.TRENDING.TELEGRAM.SEND_MESSAGE);
|
|
918
|
+
telegramSendMessageAction.setParams('message', 'Pendle hbHYPE\'s YT leverage is below 40');
|
|
919
|
+
telegramSendMessageAction.setPosition(400, 240);
|
|
920
|
+
const edge1 = new Edge({ source: pendleYtImpliedYieldTrigger, target: telegramSendMessageAction });
|
|
921
|
+
const workflow = new Workflow('Get notified when when hbHYPE YT leverage below 40', [pendleYtImpliedYieldTrigger, telegramSendMessageAction], [edge1], null);
|
|
922
|
+
return workflow;
|
|
923
|
+
};
|
|
924
|
+
const createPendleLpExpiresWorkflow = async () => {
|
|
925
|
+
const pendleLpExpiredTrigger = new Trigger(TRIGGERS.YIELD.PENDLE.LP_EXPIRED);
|
|
926
|
+
pendleLpExpiredTrigger.setParams('chainId', 999);
|
|
927
|
+
pendleLpExpiredTrigger.setParams('marketAddress', '0x97d985a71131afc02c320b636a268df34c6f42a4');
|
|
928
|
+
pendleLpExpiredTrigger.setPosition(400, 120);
|
|
929
|
+
const telegramSendMessageAction = new Action(ACTIONS.TRENDING.TELEGRAM.SEND_MESSAGE);
|
|
930
|
+
telegramSendMessageAction.setParams('message', 'LP hbHYPE market on Pendle HyperEVM expired');
|
|
931
|
+
telegramSendMessageAction.setPosition(400, 240);
|
|
932
|
+
const edge1 = new Edge({ source: pendleLpExpiredTrigger, target: telegramSendMessageAction });
|
|
933
|
+
const workflow = new Workflow('Notify me when LP hbHYPE is expired on pendle', [pendleLpExpiredTrigger, telegramSendMessageAction], [edge1], null);
|
|
934
|
+
return workflow;
|
|
935
|
+
};
|
|
936
|
+
const createHyperswapOutOfRangeWorkflow = async () => {
|
|
937
|
+
const hyperswapIsInRangeTrigger = new Trigger(TRIGGERS.DEXES.HYPERSWAP.IS_IN_RANGE);
|
|
938
|
+
hyperswapIsInRangeTrigger.setParams('chainId', 999);
|
|
939
|
+
hyperswapIsInRangeTrigger.setParams('abiParams.tokenId', 146508);
|
|
940
|
+
hyperswapIsInRangeTrigger.setParams('condition', 'eq');
|
|
941
|
+
hyperswapIsInRangeTrigger.setParams('comparisonValue', false);
|
|
942
|
+
hyperswapIsInRangeTrigger.setPosition(400, 120);
|
|
943
|
+
const telegramSendMessageAction = new Action(ACTIONS.TRENDING.TELEGRAM.SEND_MESSAGE);
|
|
944
|
+
telegramSendMessageAction.setParams('message', `Hyperswap position with id ${hyperswapIsInRangeTrigger.getOutputVariableName('tokenId')} is out of range`);
|
|
945
|
+
telegramSendMessageAction.setPosition(400, 240);
|
|
946
|
+
const edge1 = new Edge({ source: hyperswapIsInRangeTrigger, target: telegramSendMessageAction });
|
|
947
|
+
const workflow = new Workflow('Notify me when Hyperswap position with id #146508 is out of range', [hyperswapIsInRangeTrigger, telegramSendMessageAction], [edge1], null);
|
|
948
|
+
return workflow;
|
|
949
|
+
};
|
|
950
|
+
const createHyperswapBackInRangeWorkflow = async () => {
|
|
951
|
+
const hyperswapIsInRangeTrigger = new Trigger(TRIGGERS.DEXES.HYPERSWAP.IS_IN_RANGE);
|
|
952
|
+
hyperswapIsInRangeTrigger.setParams('chainId', 999);
|
|
953
|
+
hyperswapIsInRangeTrigger.setParams('abiParams.tokenId', 146508);
|
|
954
|
+
hyperswapIsInRangeTrigger.setParams('condition', 'eq');
|
|
955
|
+
hyperswapIsInRangeTrigger.setParams('comparisonValue', true);
|
|
956
|
+
hyperswapIsInRangeTrigger.setPosition(400, 120);
|
|
957
|
+
const telegramSendMessageAction = new Action(ACTIONS.TRENDING.TELEGRAM.SEND_MESSAGE);
|
|
958
|
+
telegramSendMessageAction.setParams('message', `Hyperswap position with id ${hyperswapIsInRangeTrigger.getOutputVariableName('tokenId')} is out of range`);
|
|
959
|
+
telegramSendMessageAction.setPosition(400, 240);
|
|
960
|
+
const edge1 = new Edge({ source: hyperswapIsInRangeTrigger, target: telegramSendMessageAction });
|
|
961
|
+
const workflow = new Workflow('Notify me when Hyperswap position with id #146508 is out of range', [hyperswapIsInRangeTrigger, telegramSendMessageAction], [edge1], null);
|
|
962
|
+
return workflow;
|
|
963
|
+
};
|
|
964
|
+
const createProjectXOutOfRangeWorkflow = async () => {
|
|
965
|
+
const projectXIsInRangeTrigger = new Trigger(TRIGGERS.DEXES.PROJECT_X.IS_IN_RANGE);
|
|
966
|
+
projectXIsInRangeTrigger.setParams('chainId', 999);
|
|
967
|
+
projectXIsInRangeTrigger.setParams('abiParams.tokenId', 158259);
|
|
968
|
+
projectXIsInRangeTrigger.setParams('condition', 'eq');
|
|
969
|
+
projectXIsInRangeTrigger.setParams('comparisonValue', false);
|
|
970
|
+
projectXIsInRangeTrigger.setPosition(400, 120);
|
|
971
|
+
const telegramSendMessageAction = new Action(ACTIONS.TRENDING.TELEGRAM.SEND_MESSAGE);
|
|
972
|
+
telegramSendMessageAction.setParams('message', `ProjectX position with id ${projectXIsInRangeTrigger.getOutputVariableName('tokenId')} is out of range`);
|
|
973
|
+
telegramSendMessageAction.setPosition(400, 240);
|
|
974
|
+
const edge1 = new Edge({ source: projectXIsInRangeTrigger, target: telegramSendMessageAction });
|
|
975
|
+
const workflow = new Workflow('Notify me when ProjectX position with id #158259 is out of range', [projectXIsInRangeTrigger, telegramSendMessageAction], [edge1], null);
|
|
976
|
+
return workflow;
|
|
977
|
+
};
|
|
978
|
+
const createProjectXBackInRangeWorkflow = async () => {
|
|
979
|
+
const projectXIsInRangeTrigger = new Trigger(TRIGGERS.DEXES.PROJECT_X.IS_IN_RANGE);
|
|
980
|
+
projectXIsInRangeTrigger.setParams('chainId', 999);
|
|
981
|
+
projectXIsInRangeTrigger.setParams('abiParams.tokenId', 158259);
|
|
982
|
+
projectXIsInRangeTrigger.setParams('condition', 'eq');
|
|
983
|
+
projectXIsInRangeTrigger.setParams('comparisonValue', true);
|
|
984
|
+
projectXIsInRangeTrigger.setPosition(400, 120);
|
|
985
|
+
const telegramSendMessageAction = new Action(ACTIONS.TRENDING.TELEGRAM.SEND_MESSAGE);
|
|
986
|
+
telegramSendMessageAction.setParams('message', `ProjectX position with id ${projectXIsInRangeTrigger.getOutputVariableName('tokenId')} is out of range`);
|
|
987
|
+
telegramSendMessageAction.setPosition(400, 240);
|
|
988
|
+
const edge1 = new Edge({ source: projectXIsInRangeTrigger, target: telegramSendMessageAction });
|
|
989
|
+
const workflow = new Workflow('Notify me when ProjectX position with id #158259 is out of range', [projectXIsInRangeTrigger, telegramSendMessageAction], [edge1], null);
|
|
990
|
+
return workflow;
|
|
991
|
+
};
|
|
760
992
|
export const WORKFLOW_TEMPLATES = [
|
|
761
993
|
{
|
|
762
994
|
'id': 1,
|
|
@@ -1445,6 +1677,391 @@ export const WORKFLOW_TEMPLATES = [
|
|
|
1445
1677
|
],
|
|
1446
1678
|
createWorkflow: createPudgyPenguinHunterAgentWorkflow
|
|
1447
1679
|
},
|
|
1680
|
+
{
|
|
1681
|
+
'id': 45,
|
|
1682
|
+
'name': 'Get notified when I receive points on any protocols',
|
|
1683
|
+
'description': 'Get notified when I receive points on any protocols.',
|
|
1684
|
+
'tags': [
|
|
1685
|
+
WORKFLOW_TEMPLATES_TAGS.SOCIALS,
|
|
1686
|
+
WORKFLOW_TEMPLATES_TAGS.NOTIFICATIONS,
|
|
1687
|
+
WORKFLOW_TEMPLATES_TAGS.HYPER_EVM
|
|
1688
|
+
],
|
|
1689
|
+
'thumbnail': 'https://otomato-sdk-images.s3.eu-west-1.amazonaws.com/templates/dailyPoints.webp',
|
|
1690
|
+
'image': [
|
|
1691
|
+
TRIGGERS.SOCIALS.HYPER_EVM_PROTOCOLS_POINTS.image,
|
|
1692
|
+
ACTIONS.NOTIFICATIONS.TELEGRAM.SEND_MESSAGE.image
|
|
1693
|
+
],
|
|
1694
|
+
'blockIDs': [
|
|
1695
|
+
TRIGGERS.SOCIALS.HYPER_EVM_PROTOCOLS_POINTS.ON_NEW_POINTS.blockId,
|
|
1696
|
+
ACTIONS.NOTIFICATIONS.TELEGRAM.SEND_MESSAGE.blockId
|
|
1697
|
+
],
|
|
1698
|
+
createWorkflow: createWalletPointsIncreaseWorkflow
|
|
1699
|
+
},
|
|
1700
|
+
createTwitterAiNotificationTemplate(46, { display: 'Hyperbeat', tag: 'hyperbeat_fi' }, {
|
|
1701
|
+
prompt: 'the tweet mentions hearts, their token, airdrop or TGE',
|
|
1702
|
+
notification: 'Hyperbeat talks about hearts, their token, airdrop or TGE',
|
|
1703
|
+
description: 'Get notified when Hyperbeat talks about hearts, their token, airdrop or TGE.',
|
|
1704
|
+
wfTitle: 'Get notified when Hyperbeat talks about hearts, their token, airdrop or TGE',
|
|
1705
|
+
}, 'https://otomato-sdk-images.s3.eu-west-1.amazonaws.com/templates/hyperbeat.webp', [WORKFLOW_TEMPLATES_TAGS.HYPER_EVM]),
|
|
1706
|
+
createTwitterAiNotificationTemplate(47, { display: 'Hyperbeat', tag: 'hyperbeat_fi' }, {
|
|
1707
|
+
prompt: 'the tweet mentions security issues, exploit, hack, or vulnerability',
|
|
1708
|
+
notification: 'Hyperbeat tweets about security issues',
|
|
1709
|
+
description: 'Get notified when Hyperbeat tweets about security issues.',
|
|
1710
|
+
wfTitle: 'Get notified when Hyperbeat tweets about security issues',
|
|
1711
|
+
}, 'https://otomato-sdk-images.s3.eu-west-1.amazonaws.com/templates/hyperbeat.webp', [WORKFLOW_TEMPLATES_TAGS.HYPER_EVM]),
|
|
1712
|
+
{
|
|
1713
|
+
'id': 48,
|
|
1714
|
+
'name': 'Get notified when wHYPE lending rate is above 7%',
|
|
1715
|
+
'description': 'Get notified when the wHYPE lending rate exceeds 7%.',
|
|
1716
|
+
'tags': [
|
|
1717
|
+
WORKFLOW_TEMPLATES_TAGS.YIELD,
|
|
1718
|
+
WORKFLOW_TEMPLATES_TAGS.NOTIFICATIONS,
|
|
1719
|
+
WORKFLOW_TEMPLATES_TAGS.LENDING
|
|
1720
|
+
],
|
|
1721
|
+
'thumbnail': 'https://otomato-sdk-images.s3.eu-west-1.amazonaws.com/templates/hyperbeat.webp',
|
|
1722
|
+
'image': [
|
|
1723
|
+
TRIGGERS.LENDING.HYPERLEND.image,
|
|
1724
|
+
ACTIONS.NOTIFICATIONS.TELEGRAM.SEND_MESSAGE.image
|
|
1725
|
+
],
|
|
1726
|
+
'blockIDs': [
|
|
1727
|
+
TRIGGERS.LENDING.HYPERLEND.LENDING_RATE.blockId,
|
|
1728
|
+
ACTIONS.NOTIFICATIONS.TELEGRAM.SEND_MESSAGE.blockId
|
|
1729
|
+
],
|
|
1730
|
+
createWorkflow: createHyperbeatLendingYieldDropWorkflow
|
|
1731
|
+
},
|
|
1732
|
+
{
|
|
1733
|
+
'id': 49,
|
|
1734
|
+
'name': 'Get notified when Hyperlend health factor falls below 1.05',
|
|
1735
|
+
'description': 'Get notified when your Hyperlend health factor falls below 1.05',
|
|
1736
|
+
'tags': [
|
|
1737
|
+
WORKFLOW_TEMPLATES_TAGS.LENDING,
|
|
1738
|
+
WORKFLOW_TEMPLATES_TAGS.NOTIFICATIONS
|
|
1739
|
+
],
|
|
1740
|
+
'thumbnail': 'https://otomato-sdk-images.s3.eu-west-1.amazonaws.com/templates/hyperlend_health_factor.webp',
|
|
1741
|
+
'image': [
|
|
1742
|
+
ACTIONS.NOTIFICATIONS.TELEGRAM.SEND_MESSAGE.image
|
|
1743
|
+
],
|
|
1744
|
+
'blockIDs': [
|
|
1745
|
+
ACTIONS.NOTIFICATIONS.TELEGRAM.SEND_MESSAGE.blockId
|
|
1746
|
+
],
|
|
1747
|
+
createWorkflow: createHyperlendHealthFactorWorkflow
|
|
1748
|
+
},
|
|
1749
|
+
createTwitterAiNotificationTemplate(50, { display: 'Hyperlend', tag: 'HyperlendHQ' }, {
|
|
1750
|
+
prompt: 'the tweet mentions security issues, exploit, hack, or vulnerability',
|
|
1751
|
+
notification: 'Hyperlend tweets about security issues',
|
|
1752
|
+
description: 'Get notified when Hyperlend tweets about security issues.',
|
|
1753
|
+
wfTitle: 'Get notified when Hyperlend tweets about security issues',
|
|
1754
|
+
}, 'https://otomato-sdk-images.s3.eu-west-1.amazonaws.com/templates/hyperlend_x.webp', [WORKFLOW_TEMPLATES_TAGS.HYPER_EVM]),
|
|
1755
|
+
createTwitterAiNotificationTemplate(51, { display: 'Hyperlend', tag: 'HyperlendHQ' }, {
|
|
1756
|
+
prompt: 'the tweet mentions points, their token, airdrop or TGE',
|
|
1757
|
+
notification: 'Hyperlend talks about points, their token, airdrop or TGE',
|
|
1758
|
+
description: 'Get notified when Hyperlend talks about points, their token, airdrop or TGE.',
|
|
1759
|
+
wfTitle: 'Get notified when Hyperlend talks about points, their token, airdrop or TGE',
|
|
1760
|
+
}, 'https://otomato-sdk-images.s3.eu-west-1.amazonaws.com/templates/hyperlend_x.webp', [WORKFLOW_TEMPLATES_TAGS.HYPER_EVM]),
|
|
1761
|
+
{
|
|
1762
|
+
'id': 52,
|
|
1763
|
+
'name': 'Get notified when wHYPE lending rate is above 7%',
|
|
1764
|
+
'description': 'Get notified when the wHYPE lending rate on Hyperlend rises above 7%.',
|
|
1765
|
+
'tags': [
|
|
1766
|
+
WORKFLOW_TEMPLATES_TAGS.YIELD,
|
|
1767
|
+
WORKFLOW_TEMPLATES_TAGS.NOTIFICATIONS,
|
|
1768
|
+
WORKFLOW_TEMPLATES_TAGS.LENDING,
|
|
1769
|
+
WORKFLOW_TEMPLATES_TAGS.HYPER_EVM
|
|
1770
|
+
],
|
|
1771
|
+
'thumbnail': 'https://otomato-sdk-images.s3.eu-west-1.amazonaws.com/templates/hyperlend_x.webp',
|
|
1772
|
+
'image': [
|
|
1773
|
+
TRIGGERS.LENDING.HYPERLEND.image,
|
|
1774
|
+
ACTIONS.NOTIFICATIONS.TELEGRAM.SEND_MESSAGE.image
|
|
1775
|
+
],
|
|
1776
|
+
'blockIDs': [
|
|
1777
|
+
TRIGGERS.LENDING.HYPERLEND.LENDING_RATE.blockId,
|
|
1778
|
+
ACTIONS.NOTIFICATIONS.TELEGRAM.SEND_MESSAGE.blockId
|
|
1779
|
+
],
|
|
1780
|
+
createWorkflow: createHyperlendLendingYieldDropWorkflow
|
|
1781
|
+
},
|
|
1782
|
+
{
|
|
1783
|
+
'id': 53,
|
|
1784
|
+
'name': 'Get notified when wHYPE borrowing rate is below 6%',
|
|
1785
|
+
'description': 'Get notified when the wHYPE borrowing rate on Hyperlend falls below 6%.',
|
|
1786
|
+
'tags': [
|
|
1787
|
+
WORKFLOW_TEMPLATES_TAGS.YIELD,
|
|
1788
|
+
WORKFLOW_TEMPLATES_TAGS.NOTIFICATIONS,
|
|
1789
|
+
WORKFLOW_TEMPLATES_TAGS.LENDING,
|
|
1790
|
+
WORKFLOW_TEMPLATES_TAGS.HYPER_EVM
|
|
1791
|
+
],
|
|
1792
|
+
'thumbnail': 'https://otomato-sdk-images.s3.eu-west-1.amazonaws.com/templates/hyperlend_x.webp',
|
|
1793
|
+
'image': [
|
|
1794
|
+
TRIGGERS.LENDING.HYPERLEND.image,
|
|
1795
|
+
ACTIONS.NOTIFICATIONS.TELEGRAM.SEND_MESSAGE.image
|
|
1796
|
+
],
|
|
1797
|
+
'blockIDs': [
|
|
1798
|
+
TRIGGERS.LENDING.HYPERLEND.BORROWING_RATES.blockId,
|
|
1799
|
+
ACTIONS.NOTIFICATIONS.TELEGRAM.SEND_MESSAGE.blockId
|
|
1800
|
+
],
|
|
1801
|
+
createWorkflow: createHyperlendBorrowingYieldIncreaseWorkflow
|
|
1802
|
+
},
|
|
1803
|
+
{
|
|
1804
|
+
'id': 55,
|
|
1805
|
+
'name': 'Get notified when hbHYPE PT yield is above 10%',
|
|
1806
|
+
'description': 'Get notified when the hbHYPE PT yield on Pendle rises above 10%.',
|
|
1807
|
+
'tags': [
|
|
1808
|
+
WORKFLOW_TEMPLATES_TAGS.YIELD,
|
|
1809
|
+
WORKFLOW_TEMPLATES_TAGS.NOTIFICATIONS,
|
|
1810
|
+
WORKFLOW_TEMPLATES_TAGS.HYPER_EVM
|
|
1811
|
+
],
|
|
1812
|
+
'thumbnail': 'https://otomato-sdk-images.s3.eu-west-1.amazonaws.com/templates/pendle_yield.webp',
|
|
1813
|
+
'image': [
|
|
1814
|
+
TRIGGERS.YIELD.PENDLE.image,
|
|
1815
|
+
ACTIONS.NOTIFICATIONS.TELEGRAM.SEND_MESSAGE.image
|
|
1816
|
+
],
|
|
1817
|
+
'blockIDs': [
|
|
1818
|
+
TRIGGERS.YIELD.PENDLE.PT_IMPLIED_YIELD.blockId,
|
|
1819
|
+
ACTIONS.NOTIFICATIONS.TELEGRAM.SEND_MESSAGE.blockId
|
|
1820
|
+
],
|
|
1821
|
+
createWorkflow: createPendlePtYieldIncreaseWorkflow
|
|
1822
|
+
},
|
|
1823
|
+
{
|
|
1824
|
+
'id': 56,
|
|
1825
|
+
'name': 'Get notified when hbHYPE PT yield is below 7%',
|
|
1826
|
+
'description': 'Get notified when the hbHYPE PT yield on Pendle falls below 7%.',
|
|
1827
|
+
'tags': [
|
|
1828
|
+
WORKFLOW_TEMPLATES_TAGS.YIELD,
|
|
1829
|
+
WORKFLOW_TEMPLATES_TAGS.NOTIFICATIONS,
|
|
1830
|
+
WORKFLOW_TEMPLATES_TAGS.HYPER_EVM
|
|
1831
|
+
],
|
|
1832
|
+
'thumbnail': 'https://otomato-sdk-images.s3.eu-west-1.amazonaws.com/templates/pendle_yield.webp',
|
|
1833
|
+
'image': [
|
|
1834
|
+
TRIGGERS.YIELD.PENDLE.image,
|
|
1835
|
+
ACTIONS.NOTIFICATIONS.TELEGRAM.SEND_MESSAGE.image
|
|
1836
|
+
],
|
|
1837
|
+
'blockIDs': [
|
|
1838
|
+
TRIGGERS.YIELD.PENDLE.PT_IMPLIED_YIELD.blockId,
|
|
1839
|
+
ACTIONS.NOTIFICATIONS.TELEGRAM.SEND_MESSAGE.blockId
|
|
1840
|
+
],
|
|
1841
|
+
createWorkflow: createPendlePtYieldDecreaseWorkflow
|
|
1842
|
+
},
|
|
1843
|
+
{
|
|
1844
|
+
'id': 57,
|
|
1845
|
+
'name': 'Get notified when my Pendle PT tokens expire',
|
|
1846
|
+
'description': 'Get notified when my PT tokens expire on Pendle.',
|
|
1847
|
+
'tags': [
|
|
1848
|
+
WORKFLOW_TEMPLATES_TAGS.YIELD,
|
|
1849
|
+
WORKFLOW_TEMPLATES_TAGS.NOTIFICATIONS,
|
|
1850
|
+
WORKFLOW_TEMPLATES_TAGS.HYPER_EVM
|
|
1851
|
+
],
|
|
1852
|
+
'thumbnail': 'https://otomato-sdk-images.s3.eu-west-1.amazonaws.com/templates/pendle_yield.webp',
|
|
1853
|
+
'image': [
|
|
1854
|
+
TRIGGERS.YIELD.PENDLE.image,
|
|
1855
|
+
ACTIONS.NOTIFICATIONS.TELEGRAM.SEND_MESSAGE.image
|
|
1856
|
+
],
|
|
1857
|
+
'blockIDs': [
|
|
1858
|
+
TRIGGERS.YIELD.PENDLE.PT_EXPIRED.blockId,
|
|
1859
|
+
ACTIONS.NOTIFICATIONS.TELEGRAM.SEND_MESSAGE.blockId
|
|
1860
|
+
],
|
|
1861
|
+
createWorkflow: createPendlePtExpiresWorkflow
|
|
1862
|
+
},
|
|
1863
|
+
createTwitterAiNotificationTemplate(58, { display: 'Pendle', tag: 'pendle_fi' }, {
|
|
1864
|
+
prompt: 'the tweet mentions security issues, exploit, hack, or vulnerability',
|
|
1865
|
+
notification: 'Pendle tweets about security issues',
|
|
1866
|
+
description: 'Get notified when Pendle tweets about any security issues.',
|
|
1867
|
+
wfTitle: 'Get notified when Pendle tweets about any security issues',
|
|
1868
|
+
}, 'https://otomato-sdk-images.s3.eu-west-1.amazonaws.com/templates/pendle_x.webp', [WORKFLOW_TEMPLATES_TAGS.HYPER_EVM]),
|
|
1869
|
+
{
|
|
1870
|
+
'id': 59,
|
|
1871
|
+
'name': 'Get notified when my Pendle YT tokens expire',
|
|
1872
|
+
'description': 'Get notified when my YT tokens expire on Pendle.',
|
|
1873
|
+
'tags': [
|
|
1874
|
+
WORKFLOW_TEMPLATES_TAGS.YIELD,
|
|
1875
|
+
WORKFLOW_TEMPLATES_TAGS.NOTIFICATIONS,
|
|
1876
|
+
WORKFLOW_TEMPLATES_TAGS.HYPER_EVM
|
|
1877
|
+
],
|
|
1878
|
+
'thumbnail': 'https://otomato-sdk-images.s3.eu-west-1.amazonaws.com/templates/pendle_yield.webp',
|
|
1879
|
+
'image': [
|
|
1880
|
+
TRIGGERS.YIELD.PENDLE.image,
|
|
1881
|
+
ACTIONS.NOTIFICATIONS.TELEGRAM.SEND_MESSAGE.image
|
|
1882
|
+
],
|
|
1883
|
+
'blockIDs': [
|
|
1884
|
+
TRIGGERS.YIELD.PENDLE.YT_EXPIRED.blockId,
|
|
1885
|
+
ACTIONS.NOTIFICATIONS.TELEGRAM.SEND_MESSAGE.blockId
|
|
1886
|
+
],
|
|
1887
|
+
createWorkflow: createPendleYtExpiresWorkflow
|
|
1888
|
+
},
|
|
1889
|
+
{
|
|
1890
|
+
'id': 60,
|
|
1891
|
+
'name': 'Get notified when when hbHYPE YT leverage above 60',
|
|
1892
|
+
'description': 'Get notified when hbHYPE YT leverage goes above 60 on Pendle.',
|
|
1893
|
+
'tags': [
|
|
1894
|
+
WORKFLOW_TEMPLATES_TAGS.YIELD,
|
|
1895
|
+
WORKFLOW_TEMPLATES_TAGS.NOTIFICATIONS,
|
|
1896
|
+
WORKFLOW_TEMPLATES_TAGS.HYPER_EVM
|
|
1897
|
+
],
|
|
1898
|
+
'thumbnail': 'https://otomato-sdk-images.s3.eu-west-1.amazonaws.com/templates/pendle_yield.webp',
|
|
1899
|
+
'image': [
|
|
1900
|
+
TRIGGERS.YIELD.PENDLE.image,
|
|
1901
|
+
ACTIONS.NOTIFICATIONS.TELEGRAM.SEND_MESSAGE.image
|
|
1902
|
+
],
|
|
1903
|
+
'blockIDs': [
|
|
1904
|
+
TRIGGERS.YIELD.PENDLE.YT_LEVERAGE.blockId,
|
|
1905
|
+
ACTIONS.NOTIFICATIONS.TELEGRAM.SEND_MESSAGE.blockId
|
|
1906
|
+
],
|
|
1907
|
+
createWorkflow: createPendleYtLeverageIncreaseWorkflow
|
|
1908
|
+
},
|
|
1909
|
+
{
|
|
1910
|
+
'id': 61,
|
|
1911
|
+
'name': 'Get notified when when hbHYPE YT leverage below 40',
|
|
1912
|
+
'description': 'Get notified when hbHYPE YT leverage goes below 40 on Pendle.',
|
|
1913
|
+
'tags': [
|
|
1914
|
+
WORKFLOW_TEMPLATES_TAGS.YIELD,
|
|
1915
|
+
WORKFLOW_TEMPLATES_TAGS.NOTIFICATIONS,
|
|
1916
|
+
WORKFLOW_TEMPLATES_TAGS.HYPER_EVM
|
|
1917
|
+
],
|
|
1918
|
+
'thumbnail': 'https://otomato-sdk-images.s3.eu-west-1.amazonaws.com/templates/pendle_yield.webp',
|
|
1919
|
+
'image': [
|
|
1920
|
+
TRIGGERS.YIELD.PENDLE.image,
|
|
1921
|
+
ACTIONS.NOTIFICATIONS.TELEGRAM.SEND_MESSAGE.image
|
|
1922
|
+
],
|
|
1923
|
+
'blockIDs': [
|
|
1924
|
+
TRIGGERS.YIELD.PENDLE.YT_LEVERAGE.blockId,
|
|
1925
|
+
ACTIONS.NOTIFICATIONS.TELEGRAM.SEND_MESSAGE.blockId
|
|
1926
|
+
],
|
|
1927
|
+
createWorkflow: createPendleYtLeverageDecreaseWorkflow
|
|
1928
|
+
},
|
|
1929
|
+
{
|
|
1930
|
+
'id': 62,
|
|
1931
|
+
'name': 'Get notified when my Pendle LP positions expire',
|
|
1932
|
+
'description': 'Get notified when my LP positions expire on Pendle.',
|
|
1933
|
+
'tags': [
|
|
1934
|
+
WORKFLOW_TEMPLATES_TAGS.YIELD,
|
|
1935
|
+
WORKFLOW_TEMPLATES_TAGS.NOTIFICATIONS,
|
|
1936
|
+
WORKFLOW_TEMPLATES_TAGS.HYPER_EVM
|
|
1937
|
+
],
|
|
1938
|
+
'thumbnail': 'https://otomato-sdk-images.s3.eu-west-1.amazonaws.com/templates/pendle_yield.webp',
|
|
1939
|
+
'image': [
|
|
1940
|
+
TRIGGERS.YIELD.PENDLE.image,
|
|
1941
|
+
ACTIONS.NOTIFICATIONS.TELEGRAM.SEND_MESSAGE.image
|
|
1942
|
+
],
|
|
1943
|
+
'blockIDs': [
|
|
1944
|
+
TRIGGERS.YIELD.PENDLE.LP_EXPIRED.blockId,
|
|
1945
|
+
ACTIONS.NOTIFICATIONS.TELEGRAM.SEND_MESSAGE.blockId
|
|
1946
|
+
],
|
|
1947
|
+
createWorkflow: createPendleLpExpiresWorkflow
|
|
1948
|
+
},
|
|
1949
|
+
{
|
|
1950
|
+
'id': 63,
|
|
1951
|
+
'name': 'Get notified when my HyperSwap positions are out of range',
|
|
1952
|
+
'description': 'Get notified when my HyperSwap positions are out of range.',
|
|
1953
|
+
'tags': [
|
|
1954
|
+
WORKFLOW_TEMPLATES_TAGS.DEXES,
|
|
1955
|
+
WORKFLOW_TEMPLATES_TAGS.NOTIFICATIONS,
|
|
1956
|
+
WORKFLOW_TEMPLATES_TAGS.HYPER_EVM
|
|
1957
|
+
],
|
|
1958
|
+
'thumbnail': 'https://otomato-sdk-images.s3.eu-west-1.amazonaws.com/templates/hyperswap_template.webp',
|
|
1959
|
+
'image': [
|
|
1960
|
+
TRIGGERS.DEXES.HYPERSWAP.image,
|
|
1961
|
+
ACTIONS.NOTIFICATIONS.TELEGRAM.SEND_MESSAGE.image
|
|
1962
|
+
],
|
|
1963
|
+
'blockIDs': [
|
|
1964
|
+
TRIGGERS.DEXES.HYPERSWAP.IS_IN_RANGE.blockId,
|
|
1965
|
+
ACTIONS.NOTIFICATIONS.TELEGRAM.SEND_MESSAGE.blockId
|
|
1966
|
+
],
|
|
1967
|
+
createWorkflow: createHyperswapOutOfRangeWorkflow
|
|
1968
|
+
},
|
|
1969
|
+
{
|
|
1970
|
+
'id': 64,
|
|
1971
|
+
'name': 'Get notified when my HyperSwap positions are back in range',
|
|
1972
|
+
'description': 'Get notified when my HyperSwap positions are back in range.',
|
|
1973
|
+
'tags': [
|
|
1974
|
+
WORKFLOW_TEMPLATES_TAGS.DEXES,
|
|
1975
|
+
WORKFLOW_TEMPLATES_TAGS.NOTIFICATIONS,
|
|
1976
|
+
WORKFLOW_TEMPLATES_TAGS.HYPER_EVM
|
|
1977
|
+
],
|
|
1978
|
+
'thumbnail': 'https://otomato-sdk-images.s3.eu-west-1.amazonaws.com/templates/hyperswap_template.webp',
|
|
1979
|
+
'image': [
|
|
1980
|
+
TRIGGERS.DEXES.HYPERSWAP.image,
|
|
1981
|
+
ACTIONS.NOTIFICATIONS.TELEGRAM.SEND_MESSAGE.image
|
|
1982
|
+
],
|
|
1983
|
+
'blockIDs': [
|
|
1984
|
+
TRIGGERS.DEXES.HYPERSWAP.IS_IN_RANGE.blockId,
|
|
1985
|
+
ACTIONS.NOTIFICATIONS.TELEGRAM.SEND_MESSAGE.blockId
|
|
1986
|
+
],
|
|
1987
|
+
createWorkflow: createHyperswapBackInRangeWorkflow
|
|
1988
|
+
},
|
|
1989
|
+
createTwitterAiNotificationTemplate(65, { display: 'HyperSwap', tag: 'hyperswap_io' }, {
|
|
1990
|
+
prompt: 'the tweet mentions security issues, exploit, hack, or vulnerability',
|
|
1991
|
+
notification: 'HyperSwap tweets about security issues',
|
|
1992
|
+
description: 'Get notified when HyperSwap tweets about any security issues.',
|
|
1993
|
+
wfTitle: 'Get notified when HyperSwap tweets about any security issues',
|
|
1994
|
+
}, 'https://otomato-sdk-images.s3.eu-west-1.amazonaws.com/templates/hyperswap_template.webp', [WORKFLOW_TEMPLATES_TAGS.HYPER_EVM]),
|
|
1995
|
+
createTwitterAiNotificationTemplate(66, { display: 'HyperSwap', tag: 'hyperswap_io' }, {
|
|
1996
|
+
prompt: 'the tweet mentions points, their token, airdrop or TGE',
|
|
1997
|
+
notification: 'HyperSwap talks about points, their token, airdrop or TGE',
|
|
1998
|
+
description: 'Get notified when HyperSwap talks about points, their token, airdrop or TGE.',
|
|
1999
|
+
wfTitle: 'Get notified when HyperSwap talks about points, their token, airdrop or TGE',
|
|
2000
|
+
}, 'https://otomato-sdk-images.s3.eu-west-1.amazonaws.com/templates/hyperswap_template.webp', [WORKFLOW_TEMPLATES_TAGS.HYPER_EVM]),
|
|
2001
|
+
{
|
|
2002
|
+
'id': 67,
|
|
2003
|
+
'name': 'Get notified when my ProjectX positions are out of range',
|
|
2004
|
+
'description': 'Get notified when my ProjectX positions are out of range.',
|
|
2005
|
+
'tags': [
|
|
2006
|
+
WORKFLOW_TEMPLATES_TAGS.DEXES,
|
|
2007
|
+
WORKFLOW_TEMPLATES_TAGS.NOTIFICATIONS,
|
|
2008
|
+
WORKFLOW_TEMPLATES_TAGS.HYPER_EVM
|
|
2009
|
+
],
|
|
2010
|
+
'thumbnail': 'https://otomato-sdk-images.s3.eu-west-1.amazonaws.com/templates/projectx_template.webp',
|
|
2011
|
+
'image': [
|
|
2012
|
+
TRIGGERS.DEXES.PROJECT_X.image,
|
|
2013
|
+
ACTIONS.NOTIFICATIONS.TELEGRAM.SEND_MESSAGE.image
|
|
2014
|
+
],
|
|
2015
|
+
'blockIDs': [
|
|
2016
|
+
TRIGGERS.DEXES.PROJECT_X.IS_IN_RANGE.blockId,
|
|
2017
|
+
ACTIONS.NOTIFICATIONS.TELEGRAM.SEND_MESSAGE.blockId
|
|
2018
|
+
],
|
|
2019
|
+
createWorkflow: createProjectXOutOfRangeWorkflow
|
|
2020
|
+
},
|
|
2021
|
+
{
|
|
2022
|
+
'id': 68,
|
|
2023
|
+
'name': 'Get notified when my ProjectX positions are back in range',
|
|
2024
|
+
'description': 'Get notified when my ProjectX positions are back in range.',
|
|
2025
|
+
'tags': [
|
|
2026
|
+
WORKFLOW_TEMPLATES_TAGS.DEXES,
|
|
2027
|
+
WORKFLOW_TEMPLATES_TAGS.NOTIFICATIONS,
|
|
2028
|
+
WORKFLOW_TEMPLATES_TAGS.HYPER_EVM
|
|
2029
|
+
],
|
|
2030
|
+
'thumbnail': 'https://otomato-sdk-images.s3.eu-west-1.amazonaws.com/templates/projectx_template.webp',
|
|
2031
|
+
'image': [
|
|
2032
|
+
TRIGGERS.DEXES.PROJECT_X.image,
|
|
2033
|
+
ACTIONS.NOTIFICATIONS.TELEGRAM.SEND_MESSAGE.image
|
|
2034
|
+
],
|
|
2035
|
+
'blockIDs': [
|
|
2036
|
+
TRIGGERS.DEXES.PROJECT_X.IS_IN_RANGE.blockId,
|
|
2037
|
+
ACTIONS.NOTIFICATIONS.TELEGRAM.SEND_MESSAGE.blockId
|
|
2038
|
+
],
|
|
2039
|
+
createWorkflow: createProjectXBackInRangeWorkflow
|
|
2040
|
+
},
|
|
2041
|
+
createTwitterAiNotificationTemplate(69, { display: 'ProjectX', tag: 'projectx_io' }, {
|
|
2042
|
+
prompt: 'the tweet mentions security issues, exploit, hack, or vulnerability',
|
|
2043
|
+
notification: 'ProjectX tweets about security issues',
|
|
2044
|
+
description: 'Get notified when ProjectX tweets about any security issues.',
|
|
2045
|
+
wfTitle: 'Get notified when ProjectX tweets about any security issues',
|
|
2046
|
+
}, 'https://otomato-sdk-images.s3.eu-west-1.amazonaws.com/templates/projectx_template.webp', [WORKFLOW_TEMPLATES_TAGS.HYPER_EVM]),
|
|
2047
|
+
createTwitterAiNotificationTemplate(70, { display: 'ProjectX', tag: 'projectx_io' }, {
|
|
2048
|
+
prompt: 'the tweet mentions points, their token, airdrop or TGE',
|
|
2049
|
+
notification: 'ProjectX talks about points, their token, airdrop or TGE',
|
|
2050
|
+
description: 'Get notified when ProjectX talks about points, their token, airdrop or TGE.',
|
|
2051
|
+
wfTitle: 'Get notified when ProjectX talks about points, their token, airdrop or TGE',
|
|
2052
|
+
}, 'https://otomato-sdk-images.s3.eu-west-1.amazonaws.com/templates/projectx_template.webp', [WORKFLOW_TEMPLATES_TAGS.HYPER_EVM]),
|
|
2053
|
+
createTwitterAiNotificationTemplate(71, { display: 'Kinetiq', tag: 'kinetiq_fi' }, {
|
|
2054
|
+
prompt: 'the tweet mentions security issues, exploit, hack, or vulnerability',
|
|
2055
|
+
notification: 'Kinetiq tweets about security issues',
|
|
2056
|
+
description: 'Get notified when Kinetiq tweets about any security issues.',
|
|
2057
|
+
wfTitle: 'Get notified when Kinetiq tweets about any security issues',
|
|
2058
|
+
}, 'https://otomato-sdk-images.s3.eu-west-1.amazonaws.com/templates/kinetiq_template.webp', [WORKFLOW_TEMPLATES_TAGS.HYPER_EVM]),
|
|
2059
|
+
createTwitterAiNotificationTemplate(72, { display: 'Kinetiq', tag: 'kinetiq_fi' }, {
|
|
2060
|
+
prompt: 'the tweet mentions points, their token, airdrop or TGE',
|
|
2061
|
+
notification: 'Kinetiq talks about points, their token, airdrop or TGE',
|
|
2062
|
+
description: 'Get notified when Kinetiq talks about points, their token, airdrop or TGE.',
|
|
2063
|
+
wfTitle: 'Get notified when Kinetiq talks about points, their token, airdrop or TGE',
|
|
2064
|
+
}, 'https://otomato-sdk-images.s3.eu-west-1.amazonaws.com/templates/kinetiq_template.webp', [WORKFLOW_TEMPLATES_TAGS.HYPER_EVM]),
|
|
1448
2065
|
].map((template) => {
|
|
1449
2066
|
if (specialSettingTemplates.includes(template.id)) {
|
|
1450
2067
|
return {
|
|
@@ -78,9 +78,10 @@ export function getComputeERC20Variable(amount, chainId, contractAddress) {
|
|
|
78
78
|
*
|
|
79
79
|
* @param value - The number to format.
|
|
80
80
|
* @param nonZeroDecimals - The number of non-zero decimal digits to show (default is 2).
|
|
81
|
+
* @param maxLeadingZeros - The maximum number of leading zeros after decimal point before rounding (default is -1 for no limit).
|
|
81
82
|
* @returns string - The formatted number as a string.
|
|
82
83
|
*/
|
|
83
|
-
export function formatNonZeroDecimals(value, nonZeroDecimals = 2) {
|
|
84
|
+
export function formatNonZeroDecimals(value, nonZeroDecimals = 2, maxLeadingZeros = -1) {
|
|
84
85
|
if (value === 0) {
|
|
85
86
|
return "0";
|
|
86
87
|
}
|
|
@@ -104,17 +105,28 @@ export function formatNonZeroDecimals(value, nonZeroDecimals = 2) {
|
|
|
104
105
|
}
|
|
105
106
|
const integerPart = str.substring(0, decimalIndex);
|
|
106
107
|
const decimalPart = str.substring(decimalIndex + 1);
|
|
107
|
-
|
|
108
|
-
let
|
|
108
|
+
// Count leading zeros after decimal point
|
|
109
|
+
let leadingZeros = 0;
|
|
109
110
|
for (let i = 0; i < decimalPart.length; i++) {
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
nonZeroCount++;
|
|
113
|
-
if (nonZeroCount === nonZeroDecimals) {
|
|
114
|
-
break;
|
|
115
|
-
}
|
|
111
|
+
if (decimalPart[i] === '0') {
|
|
112
|
+
leadingZeros++;
|
|
116
113
|
}
|
|
114
|
+
else {
|
|
115
|
+
break;
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
// If leading zeros exceed threshold, round the number
|
|
119
|
+
if (maxLeadingZeros !== -1 && leadingZeros > maxLeadingZeros) {
|
|
120
|
+
const rounded = Math.round(absValue);
|
|
121
|
+
return sign + rounded.toString();
|
|
117
122
|
}
|
|
123
|
+
let result = integerPart + ".";
|
|
124
|
+
// Add leading zeros
|
|
125
|
+
result += decimalPart.substring(0, leadingZeros);
|
|
126
|
+
// Take up to nonZeroDecimals non-zero decimal places after leading zeros
|
|
127
|
+
const remainingDigits = decimalPart.substring(leadingZeros);
|
|
128
|
+
const maxDigits = Math.min(nonZeroDecimals, remainingDigits.length);
|
|
129
|
+
result += remainingDigits.substring(0, maxDigits);
|
|
118
130
|
// Remove trailing zeros and decimal point if needed
|
|
119
131
|
result = result.replace(/\.?0+$/, '');
|
|
120
132
|
if (result.endsWith('.')) {
|
|
@@ -123,6 +135,12 @@ export function formatNonZeroDecimals(value, nonZeroDecimals = 2) {
|
|
|
123
135
|
return sign + result;
|
|
124
136
|
}
|
|
125
137
|
export const getTokenPrice = async (chainId, contractAddress) => {
|
|
138
|
+
if (chainId === 999) {
|
|
139
|
+
const tokenPriceList = await fetch(`https://li.quest/v1/tokens?chains=999`);
|
|
140
|
+
const tokenPriceListJson = await tokenPriceList.json();
|
|
141
|
+
const tokenPrice = tokenPriceListJson.tokens?.[999]?.find((token) => token.address === contractAddress);
|
|
142
|
+
return tokenPrice?.priceUSD;
|
|
143
|
+
}
|
|
126
144
|
const tokenPrice = await fetch(`https://api.odos.xyz/pricing/token/${chainId}/${contractAddress}`);
|
|
127
145
|
const tokenPriceJson = await tokenPrice.json();
|
|
128
146
|
return tokenPriceJson?.price;
|
|
@@ -144,7 +162,8 @@ export const getETHAlternativeTokensSymbols = () => {
|
|
|
144
162
|
146: "WETH",
|
|
145
163
|
56: "ETH",
|
|
146
164
|
250: "ETH",
|
|
147
|
-
252: "frxETH"
|
|
165
|
+
252: "frxETH",
|
|
166
|
+
999: "ETH"
|
|
148
167
|
};
|
|
149
168
|
};
|
|
150
169
|
/**
|
|
@@ -436,3 +455,18 @@ export const jsonStringifyCircularObject = async (obj) => {
|
|
|
436
455
|
console.log("[obj] Could not inspect obj object due to:", err);
|
|
437
456
|
}
|
|
438
457
|
};
|
|
458
|
+
export const callWithRetry = async (callback, maxRetries = 3, retryDelayMs = 1000) => {
|
|
459
|
+
let retryCount = 0;
|
|
460
|
+
while (retryCount <= maxRetries) {
|
|
461
|
+
try {
|
|
462
|
+
return await callback();
|
|
463
|
+
}
|
|
464
|
+
catch (error) {
|
|
465
|
+
retryCount++;
|
|
466
|
+
if (retryCount >= maxRetries) {
|
|
467
|
+
throw error;
|
|
468
|
+
}
|
|
469
|
+
await new Promise(resolve => setTimeout(resolve, retryDelayMs));
|
|
470
|
+
}
|
|
471
|
+
}
|
|
472
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "2.0.
|
|
1
|
+
export declare const SDK_VERSION = "2.0.365";
|
|
2
2
|
export declare function compareVersions(v1: string, v2: string): number;
|
|
@@ -31,9 +31,10 @@ export declare function getComputeERC20Variable(amount: string, chainId: any, co
|
|
|
31
31
|
*
|
|
32
32
|
* @param value - The number to format.
|
|
33
33
|
* @param nonZeroDecimals - The number of non-zero decimal digits to show (default is 2).
|
|
34
|
+
* @param maxLeadingZeros - The maximum number of leading zeros after decimal point before rounding (default is -1 for no limit).
|
|
34
35
|
* @returns string - The formatted number as a string.
|
|
35
36
|
*/
|
|
36
|
-
export declare function formatNonZeroDecimals(value: number, nonZeroDecimals?: number): string;
|
|
37
|
+
export declare function formatNonZeroDecimals(value: number, nonZeroDecimals?: number, maxLeadingZeros?: number): string;
|
|
37
38
|
export declare const getTokenPrice: (chainId: number, contractAddress: string) => Promise<number>;
|
|
38
39
|
export declare const getETHAlternativeTokensSymbols: () => {
|
|
39
40
|
1: string;
|
|
@@ -52,6 +53,7 @@ export declare const getETHAlternativeTokensSymbols: () => {
|
|
|
52
53
|
56: string;
|
|
53
54
|
250: string;
|
|
54
55
|
252: string;
|
|
56
|
+
999: string;
|
|
55
57
|
};
|
|
56
58
|
/**
|
|
57
59
|
* Formats a period in seconds into a human-readable string with days, hours, minutes, and seconds.
|
|
@@ -122,3 +124,4 @@ export declare const getComparisonString: (condition: string, comparisonValue: s
|
|
|
122
124
|
export declare const findNewElements: (oldArray: string[], newArray: string[]) => string[];
|
|
123
125
|
export declare const createEthersContract: (chainId: number, contractAddress: string, abi: any[], rpcUrl?: string) => ethers.Contract;
|
|
124
126
|
export declare const jsonStringifyCircularObject: (obj: any) => Promise<void>;
|
|
127
|
+
export declare const callWithRetry: (callback: () => Promise<any>, maxRetries?: number, retryDelayMs?: number) => Promise<any>;
|