diff --git a/Projects/Governance/Icons/Programs/liquidity-programs.png b/Projects/Governance/Icons/Programs/liquidity-programs.png new file mode 100644 index 000000000..c4998af5e Binary files /dev/null and b/Projects/Governance/Icons/Programs/liquidity-programs.png differ diff --git a/Projects/Governance/Plugins/Pools/Superalgos.json b/Projects/Governance/Plugins/Pools/Superalgos.json index 8b6432ce9..05e5ef9da 100644 --- a/Projects/Governance/Plugins/Pools/Superalgos.json +++ b/Projects/Governance/Plugins/Pools/Superalgos.json @@ -1064,7 +1064,7 @@ "floatingObject": { "isPinned": false, "isFrozen": false, - "isCollapsed": false, + "isCollapsed": true, "angleToParent": 1, "distanceToParent": 3, "arrangementStyle": 0 diff --git a/Projects/Governance/Plugins/User-Profiles/Luis-Fernando-Molina.json b/Projects/Governance/Plugins/User-Profiles/Luis-Fernando-Molina.json index 9913b4a51..e82f447cf 100644 --- a/Projects/Governance/Plugins/User-Profiles/Luis-Fernando-Molina.json +++ b/Projects/Governance/Plugins/User-Profiles/Luis-Fernando-Molina.json @@ -127,8 +127,8 @@ "id": "f4d39b02-4324-438d-9f74-2bea2b7272ef", "savedPayload": { "position": { - "x": 37976.33557568774, - "y": 18557.294901687517 + "x": 37950, + "y": 18540.192378864667 }, "targetPosition": { "x": 37800, @@ -516,8 +516,8 @@ "id": "b6e3c87d-a11b-4b2a-b6a6-edc96375f5da", "savedPayload": { "position": { - "x": 38085.31695488855, - "y": 18707.294901687517 + "x": 38059.80762113533, + "y": 18650 }, "targetPosition": { "x": 37800, @@ -565,12 +565,12 @@ "id": "2571cea1-2b6d-40f5-9331-8786bf57c184", "savedPayload": { "position": { - "x": 38901.29354317829, - "y": 18645.29319603238 + "x": 38799.585369022054, + "y": 18312.54666533391 }, "targetPosition": { - "x": 38678.35009553507, - "y": 18846.03237794004 + "x": 38649.585369022054, + "y": 18572.354286469243 }, "floatingObject": { "isPinned": false, @@ -653,23 +653,33 @@ "referenceParentCombinedNodePath": [ [ "Superalgos", - "Pools" + "Pools", + "Governance", + "6f0aed87-db13-4818-bfe6-68abc463ebec" ], [ "Governance Programs", - "Pool Class" + "Pool Class", + "Governance", + "4fbb05ee-d7a0-43a7-9983-9fae7a7e4848" ], [ "Community Building Programs", - "Pool Class" + "Pool Class", + "Governance", + "ef1d7fc5-c776-4af7-8ae6-86a3445dca4b" ], [ "Referrals Program", - "Pool Class" + "Pool Class", + "Governance", + "9f94d0e0-ddf7-4e04-8a3c-9485c09e079d" ], [ "Referrals Rewards", - "Pool" + "Pool", + "Governance", + "2e9dff69-e407-4ccb-9a42-e4a476e28d7c" ] ] } @@ -708,23 +718,33 @@ "referenceParentCombinedNodePath": [ [ "Superalgos", - "Pools" + "Pools", + "Governance", + "6f0aed87-db13-4818-bfe6-68abc463ebec" ], [ "Governance Programs", - "Pool Class" + "Pool Class", + "Governance", + "4fbb05ee-d7a0-43a7-9983-9fae7a7e4848" ], [ "Community Building Programs", - "Pool Class" + "Pool Class", + "Governance", + "ef1d7fc5-c776-4af7-8ae6-86a3445dca4b" ], [ "Referrals Program", - "Pool Class" + "Pool Class", + "Governance", + "9f94d0e0-ddf7-4e04-8a3c-9485c09e079d" ], [ "Referrals Bonus", - "Pool" + "Pool", + "Governance", + "af1984a3-465b-48ed-9944-c101a8ed376c" ] ] } @@ -762,19 +782,27 @@ "referenceParentCombinedNodePath": [ [ "Superalgos", - "Pools" + "Pools", + "Governance", + "6f0aed87-db13-4818-bfe6-68abc463ebec" ], [ "Governance Programs", - "Pool Class" + "Pool Class", + "Governance", + "4fbb05ee-d7a0-43a7-9983-9fae7a7e4848" ], [ "Community Building Programs", - "Pool Class" + "Pool Class", + "Governance", + "ef1d7fc5-c776-4af7-8ae6-86a3445dca4b" ], [ "Referrals Program", - "Pool Class" + "Pool Class", + "Governance", + "9f94d0e0-ddf7-4e04-8a3c-9485c09e079d" ] ] } @@ -820,23 +848,33 @@ "referenceParentCombinedNodePath": [ [ "Superalgos", - "Pools" + "Pools", + "Governance", + "6f0aed87-db13-4818-bfe6-68abc463ebec" ], [ "Governance Programs", - "Pool Class" + "Pool Class", + "Governance", + "4fbb05ee-d7a0-43a7-9983-9fae7a7e4848" ], [ "Community Building Programs", - "Pool Class" + "Pool Class", + "Governance", + "ef1d7fc5-c776-4af7-8ae6-86a3445dca4b" ], [ "Support Program", - "Pool Class" + "Pool Class", + "Governance", + "174e7d3b-fe3c-4fb1-825c-4ea488d82171" ], [ "Support Rewards", - "Pool" + "Pool", + "Governance", + "c41497c5-7440-4ebd-aabb-fbc3d022136b" ] ] } @@ -875,23 +913,33 @@ "referenceParentCombinedNodePath": [ [ "Superalgos", - "Pools" + "Pools", + "Governance", + "6f0aed87-db13-4818-bfe6-68abc463ebec" ], [ "Governance Programs", - "Pool Class" + "Pool Class", + "Governance", + "4fbb05ee-d7a0-43a7-9983-9fae7a7e4848" ], [ "Community Building Programs", - "Pool Class" + "Pool Class", + "Governance", + "ef1d7fc5-c776-4af7-8ae6-86a3445dca4b" ], [ "Support Program", - "Pool Class" + "Pool Class", + "Governance", + "174e7d3b-fe3c-4fb1-825c-4ea488d82171" ], [ "Support Bonus", - "Pool" + "Pool", + "Governance", + "6625953a-6026-4686-9091-2796fd08b9a7" ] ] } @@ -929,19 +977,27 @@ "referenceParentCombinedNodePath": [ [ "Superalgos", - "Pools" + "Pools", + "Governance", + "6f0aed87-db13-4818-bfe6-68abc463ebec" ], [ "Governance Programs", - "Pool Class" + "Pool Class", + "Governance", + "4fbb05ee-d7a0-43a7-9983-9fae7a7e4848" ], [ "Community Building Programs", - "Pool Class" + "Pool Class", + "Governance", + "ef1d7fc5-c776-4af7-8ae6-86a3445dca4b" ], [ "Support Program", - "Pool Class" + "Pool Class", + "Governance", + "174e7d3b-fe3c-4fb1-825c-4ea488d82171" ] ] } @@ -987,23 +1043,33 @@ "referenceParentCombinedNodePath": [ [ "Superalgos", - "Pools" + "Pools", + "Governance", + "6f0aed87-db13-4818-bfe6-68abc463ebec" ], [ "Governance Programs", - "Pool Class" + "Pool Class", + "Governance", + "4fbb05ee-d7a0-43a7-9983-9fae7a7e4848" ], [ "Community Building Programs", - "Pool Class" + "Pool Class", + "Governance", + "ef1d7fc5-c776-4af7-8ae6-86a3445dca4b" ], [ "Mentorship Program", - "Pool Class" + "Pool Class", + "Governance", + "8b3714a0-3bf2-491e-8ffc-9c4286446382" ], [ "Mentorship Rewards", - "Pool" + "Pool", + "Governance", + "53ddcc36-f693-4193-8284-999a88f1c944" ] ] } @@ -1042,23 +1108,33 @@ "referenceParentCombinedNodePath": [ [ "Superalgos", - "Pools" + "Pools", + "Governance", + "6f0aed87-db13-4818-bfe6-68abc463ebec" ], [ "Governance Programs", - "Pool Class" + "Pool Class", + "Governance", + "4fbb05ee-d7a0-43a7-9983-9fae7a7e4848" ], [ "Community Building Programs", - "Pool Class" + "Pool Class", + "Governance", + "ef1d7fc5-c776-4af7-8ae6-86a3445dca4b" ], [ "Mentorship Program", - "Pool Class" + "Pool Class", + "Governance", + "8b3714a0-3bf2-491e-8ffc-9c4286446382" ], [ "Mentorship Bonus", - "Pool" + "Pool", + "Governance", + "ff1e4a84-3363-4348-ad15-31a34898fa82" ] ] } @@ -1096,19 +1172,27 @@ "referenceParentCombinedNodePath": [ [ "Superalgos", - "Pools" + "Pools", + "Governance", + "6f0aed87-db13-4818-bfe6-68abc463ebec" ], [ "Governance Programs", - "Pool Class" + "Pool Class", + "Governance", + "4fbb05ee-d7a0-43a7-9983-9fae7a7e4848" ], [ "Community Building Programs", - "Pool Class" + "Pool Class", + "Governance", + "ef1d7fc5-c776-4af7-8ae6-86a3445dca4b" ], [ "Mentorship Program", - "Pool Class" + "Pool Class", + "Governance", + "8b3714a0-3bf2-491e-8ffc-9c4286446382" ] ] } @@ -1147,15 +1231,21 @@ "referenceParentCombinedNodePath": [ [ "Superalgos", - "Pools" + "Pools", + "Governance", + "6f0aed87-db13-4818-bfe6-68abc463ebec" ], [ "Governance Programs", - "Pool Class" + "Pool Class", + "Governance", + "4fbb05ee-d7a0-43a7-9983-9fae7a7e4848" ], [ "Community Building Programs", - "Pool Class" + "Pool Class", + "Governance", + "ef1d7fc5-c776-4af7-8ae6-86a3445dca4b" ] ] } @@ -1207,23 +1297,33 @@ "referenceParentCombinedNodePath": [ [ "Superalgos", - "Pools" + "Pools", + "Governance", + "6f0aed87-db13-4818-bfe6-68abc463ebec" ], [ "Governance Programs", - "Pool Class" + "Pool Class", + "Governance", + "4fbb05ee-d7a0-43a7-9983-9fae7a7e4848" ], [ "Onboarding Programs", - "Pool Class" + "Pool Class", + "Governance", + "e6e1e943-9d14-40ea-9adf-b110a9309e3a" ], [ "Airdrop Program", - "Pool Class" + "Pool Class", + "Governance", + "5332a29f-2139-4dd9-aa77-f87fcbf513df" ], [ "Airdrop Rewards", - "Pool" + "Pool", + "Governance", + "0e10c82f-94b3-4f39-b673-15eaf0551df4" ] ] } @@ -1261,19 +1361,27 @@ "referenceParentCombinedNodePath": [ [ "Superalgos", - "Pools" + "Pools", + "Governance", + "6f0aed87-db13-4818-bfe6-68abc463ebec" ], [ "Governance Programs", - "Pool Class" + "Pool Class", + "Governance", + "4fbb05ee-d7a0-43a7-9983-9fae7a7e4848" ], [ "Onboarding Programs", - "Pool Class" + "Pool Class", + "Governance", + "e6e1e943-9d14-40ea-9adf-b110a9309e3a" ], [ "Airdrop Program", - "Pool Class" + "Pool Class", + "Governance", + "5332a29f-2139-4dd9-aa77-f87fcbf513df" ] ] } @@ -1319,23 +1427,33 @@ "referenceParentCombinedNodePath": [ [ "Superalgos", - "Pools" + "Pools", + "Governance", + "6f0aed87-db13-4818-bfe6-68abc463ebec" ], [ "Governance Programs", - "Pool Class" + "Pool Class", + "Governance", + "4fbb05ee-d7a0-43a7-9983-9fae7a7e4848" ], [ "Onboarding Programs", - "Pool Class" + "Pool Class", + "Governance", + "e6e1e943-9d14-40ea-9adf-b110a9309e3a" ], [ "Github Prgoram", - "Pool Class" + "Pool Class", + "Governance", + "e4daed5d-1c83-4f64-a504-3aef7d73e688" ], [ "Github Rewards", - "Pool" + "Pool", + "Governance", + "8829c80f-028b-4315-85a1-82ad502f0687" ] ] } @@ -1373,19 +1491,27 @@ "referenceParentCombinedNodePath": [ [ "Superalgos", - "Pools" + "Pools", + "Governance", + "6f0aed87-db13-4818-bfe6-68abc463ebec" ], [ "Governance Programs", - "Pool Class" + "Pool Class", + "Governance", + "4fbb05ee-d7a0-43a7-9983-9fae7a7e4848" ], [ "Onboarding Programs", - "Pool Class" + "Pool Class", + "Governance", + "e6e1e943-9d14-40ea-9adf-b110a9309e3a" ], [ "Github Prgoram", - "Pool Class" + "Pool Class", + "Governance", + "e4daed5d-1c83-4f64-a504-3aef7d73e688" ] ] } @@ -1424,15 +1550,21 @@ "referenceParentCombinedNodePath": [ [ "Superalgos", - "Pools" + "Pools", + "Governance", + "6f0aed87-db13-4818-bfe6-68abc463ebec" ], [ "Governance Programs", - "Pool Class" + "Pool Class", + "Governance", + "4fbb05ee-d7a0-43a7-9983-9fae7a7e4848" ], [ "Onboarding Programs", - "Pool Class" + "Pool Class", + "Governance", + "e6e1e943-9d14-40ea-9adf-b110a9309e3a" ] ] } @@ -1484,23 +1616,33 @@ "referenceParentCombinedNodePath": [ [ "Superalgos", - "Pools" + "Pools", + "Governance", + "6f0aed87-db13-4818-bfe6-68abc463ebec" ], [ "Governance Programs", - "Pool Class" + "Pool Class", + "Governance", + "4fbb05ee-d7a0-43a7-9983-9fae7a7e4848" ], [ "Incentives for Voting", - "Pool Class" + "Pool Class", + "Governance", + "1f9590c2-e166-482c-8400-ba64e39f0934" ], [ "Voting Program", - "Pool Class" + "Pool Class", + "Governance", + "80d4f08f-bb7f-48a2-9cef-be12befcac2e" ], [ "Voting Bonus", - "Pool" + "Pool", + "Governance", + "9eb846a4-effb-4380-9487-1a82011b0488" ] ] } @@ -1538,19 +1680,27 @@ "referenceParentCombinedNodePath": [ [ "Superalgos", - "Pools" + "Pools", + "Governance", + "6f0aed87-db13-4818-bfe6-68abc463ebec" ], [ "Governance Programs", - "Pool Class" + "Pool Class", + "Governance", + "4fbb05ee-d7a0-43a7-9983-9fae7a7e4848" ], [ "Incentives for Voting", - "Pool Class" + "Pool Class", + "Governance", + "1f9590c2-e166-482c-8400-ba64e39f0934" ], [ "Voting Program", - "Pool Class" + "Pool Class", + "Governance", + "80d4f08f-bb7f-48a2-9cef-be12befcac2e" ] ] } @@ -1589,15 +1739,21 @@ "referenceParentCombinedNodePath": [ [ "Superalgos", - "Pools" + "Pools", + "Governance", + "6f0aed87-db13-4818-bfe6-68abc463ebec" ], [ "Governance Programs", - "Pool Class" + "Pool Class", + "Governance", + "4fbb05ee-d7a0-43a7-9983-9fae7a7e4848" ], [ "Incentives for Voting", - "Pool Class" + "Pool Class", + "Governance", + "1f9590c2-e166-482c-8400-ba64e39f0934" ] ] } @@ -1649,23 +1805,33 @@ "referenceParentCombinedNodePath": [ [ "Superalgos", - "Pools" + "Pools", + "Governance", + "6f0aed87-db13-4818-bfe6-68abc463ebec" ], [ "Governance Programs", - "Pool Class" + "Pool Class", + "Governance", + "4fbb05ee-d7a0-43a7-9983-9fae7a7e4848" ], [ "Incentives for Providing Liquidity to SA Markets", - "Pool Class" + "Pool Class", + "Governance", + "00bbb418-2315-4845-aa39-8362489a360b" ], [ "Liquidity Program", - "Pool Class" + "Pool Class", + "Governance", + "477faa7a-da4f-4949-9439-a2475ed683de" ], [ "Liquidity Rewards BTCB", - "Pool" + "Pool", + "Governance", + "a7651e92-ab96-49fc-af9c-f936682dd7a4" ] ] } @@ -1704,23 +1870,33 @@ "referenceParentCombinedNodePath": [ [ "Superalgos", - "Pools" + "Pools", + "Governance", + "6f0aed87-db13-4818-bfe6-68abc463ebec" ], [ "Governance Programs", - "Pool Class" + "Pool Class", + "Governance", + "4fbb05ee-d7a0-43a7-9983-9fae7a7e4848" ], [ "Incentives for Providing Liquidity to SA Markets", - "Pool Class" + "Pool Class", + "Governance", + "00bbb418-2315-4845-aa39-8362489a360b" ], [ "Liquidity Program", - "Pool Class" + "Pool Class", + "Governance", + "477faa7a-da4f-4949-9439-a2475ed683de" ], [ "Liquidity Rewards BNB", - "Pool" + "Pool", + "Governance", + "e7c21a28-fea6-48cc-a97c-cc43470bb2fc" ] ] } @@ -1759,23 +1935,33 @@ "referenceParentCombinedNodePath": [ [ "Superalgos", - "Pools" + "Pools", + "Governance", + "6f0aed87-db13-4818-bfe6-68abc463ebec" ], [ "Governance Programs", - "Pool Class" + "Pool Class", + "Governance", + "4fbb05ee-d7a0-43a7-9983-9fae7a7e4848" ], [ "Incentives for Providing Liquidity to SA Markets", - "Pool Class" + "Pool Class", + "Governance", + "00bbb418-2315-4845-aa39-8362489a360b" ], [ "Liquidity Program", - "Pool Class" + "Pool Class", + "Governance", + "477faa7a-da4f-4949-9439-a2475ed683de" ], [ "Liquidity Rewards BUSD", - "Pool" + "Pool", + "Governance", + "962d9bc1-4e54-463c-86ae-43aec1db0f0f" ] ] } @@ -1813,19 +1999,27 @@ "referenceParentCombinedNodePath": [ [ "Superalgos", - "Pools" + "Pools", + "Governance", + "6f0aed87-db13-4818-bfe6-68abc463ebec" ], [ "Governance Programs", - "Pool Class" + "Pool Class", + "Governance", + "4fbb05ee-d7a0-43a7-9983-9fae7a7e4848" ], [ "Incentives for Providing Liquidity to SA Markets", - "Pool Class" + "Pool Class", + "Governance", + "00bbb418-2315-4845-aa39-8362489a360b" ], [ "Liquidity Program", - "Pool Class" + "Pool Class", + "Governance", + "477faa7a-da4f-4949-9439-a2475ed683de" ] ] } @@ -1864,15 +2058,21 @@ "referenceParentCombinedNodePath": [ [ "Superalgos", - "Pools" + "Pools", + "Governance", + "6f0aed87-db13-4818-bfe6-68abc463ebec" ], [ "Governance Programs", - "Pool Class" + "Pool Class", + "Governance", + "4fbb05ee-d7a0-43a7-9983-9fae7a7e4848" ], [ "Incentives for Providing Liquidity to SA Markets", - "Pool Class" + "Pool Class", + "Governance", + "00bbb418-2315-4845-aa39-8362489a360b" ] ] } @@ -1924,23 +2124,33 @@ "referenceParentCombinedNodePath": [ [ "Superalgos", - "Pools" + "Pools", + "Governance", + "6f0aed87-db13-4818-bfe6-68abc463ebec" ], [ "Governance Programs", - "Pool Class" + "Pool Class", + "Governance", + "4fbb05ee-d7a0-43a7-9983-9fae7a7e4848" ], [ "Incentives for Staking & Delegating SA Tokens", - "Pool Class" + "Pool Class", + "Governance", + "64cda2cd-270e-4046-ac3f-5cf9188113c2" ], [ "Staking Program", - "Pool Class" + "Pool Class", + "Governance", + "68e3f570-4156-4be6-8881-c526a06f85d0" ], [ "Staking Rewards", - "Pool" + "Pool", + "Governance", + "d2cf4c65-b4bd-4fa8-b0da-f73a38b8419a" ] ] } @@ -1978,19 +2188,27 @@ "referenceParentCombinedNodePath": [ [ "Superalgos", - "Pools" + "Pools", + "Governance", + "6f0aed87-db13-4818-bfe6-68abc463ebec" ], [ "Governance Programs", - "Pool Class" + "Pool Class", + "Governance", + "4fbb05ee-d7a0-43a7-9983-9fae7a7e4848" ], [ "Incentives for Staking & Delegating SA Tokens", - "Pool Class" + "Pool Class", + "Governance", + "64cda2cd-270e-4046-ac3f-5cf9188113c2" ], [ "Staking Program", - "Pool Class" + "Pool Class", + "Governance", + "68e3f570-4156-4be6-8881-c526a06f85d0" ] ] } @@ -2036,23 +2254,33 @@ "referenceParentCombinedNodePath": [ [ "Superalgos", - "Pools" + "Pools", + "Governance", + "6f0aed87-db13-4818-bfe6-68abc463ebec" ], [ "Governance Programs", - "Pool Class" + "Pool Class", + "Governance", + "4fbb05ee-d7a0-43a7-9983-9fae7a7e4848" ], [ "Incentives for Staking & Delegating SA Tokens", - "Pool Class" + "Pool Class", + "Governance", + "64cda2cd-270e-4046-ac3f-5cf9188113c2" ], [ "Delegation Program", - "Pool Class" + "Pool Class", + "Governance", + "f09429a2-3f6c-4210-bb73-0c8efd254c82" ], [ "Delegation Bonus", - "Pool" + "Pool", + "Governance", + "24e62dd3-4d7b-4eba-b401-493c155d85d0" ] ] } @@ -2090,19 +2318,27 @@ "referenceParentCombinedNodePath": [ [ "Superalgos", - "Pools" + "Pools", + "Governance", + "6f0aed87-db13-4818-bfe6-68abc463ebec" ], [ "Governance Programs", - "Pool Class" + "Pool Class", + "Governance", + "4fbb05ee-d7a0-43a7-9983-9fae7a7e4848" ], [ "Incentives for Staking & Delegating SA Tokens", - "Pool Class" + "Pool Class", + "Governance", + "64cda2cd-270e-4046-ac3f-5cf9188113c2" ], [ "Delegation Program", - "Pool Class" + "Pool Class", + "Governance", + "f09429a2-3f6c-4210-bb73-0c8efd254c82" ] ] } @@ -2141,15 +2377,21 @@ "referenceParentCombinedNodePath": [ [ "Superalgos", - "Pools" + "Pools", + "Governance", + "6f0aed87-db13-4818-bfe6-68abc463ebec" ], [ "Governance Programs", - "Pool Class" + "Pool Class", + "Governance", + "4fbb05ee-d7a0-43a7-9983-9fae7a7e4848" ], [ "Incentives for Staking & Delegating SA Tokens", - "Pool Class" + "Pool Class", + "Governance", + "64cda2cd-270e-4046-ac3f-5cf9188113c2" ] ] } @@ -2188,11 +2430,15 @@ "referenceParentCombinedNodePath": [ [ "Superalgos", - "Pools" + "Pools", + "Governance", + "6f0aed87-db13-4818-bfe6-68abc463ebec" ], [ "Governance Programs", - "Pool Class" + "Pool Class", + "Governance", + "4fbb05ee-d7a0-43a7-9983-9fae7a7e4848" ] ] } @@ -2238,15 +2484,21 @@ "referenceParentCombinedNodePath": [ [ "Superalgos", - "Pools" + "Pools", + "Governance", + "6f0aed87-db13-4818-bfe6-68abc463ebec" ], [ "Positions, Assets & Features", - "Pool Class" + "Pool Class", + "Governance", + "b27df32a-70f3-470b-b8bb-471c156b0c30" ], [ "Positions", - "Pool" + "Pool", + "Governance", + "a289d3a4-bd49-467b-b8d9-d0ba1152a131" ] ] } @@ -2285,15 +2537,21 @@ "referenceParentCombinedNodePath": [ [ "Superalgos", - "Pools" + "Pools", + "Governance", + "6f0aed87-db13-4818-bfe6-68abc463ebec" ], [ "Positions, Assets & Features", - "Pool Class" + "Pool Class", + "Governance", + "b27df32a-70f3-470b-b8bb-471c156b0c30" ], [ "Assets", - "Pool" + "Pool", + "Governance", + "16a7dd84-e3e8-4118-a17d-ac227e55ff92" ] ] } @@ -2332,15 +2590,21 @@ "referenceParentCombinedNodePath": [ [ "Superalgos", - "Pools" + "Pools", + "Governance", + "6f0aed87-db13-4818-bfe6-68abc463ebec" ], [ "Positions, Assets & Features", - "Pool Class" + "Pool Class", + "Governance", + "b27df32a-70f3-470b-b8bb-471c156b0c30" ], [ "Features", - "Pool" + "Pool", + "Governance", + "4b7384bc-93ba-454f-9de8-1add9c4d84ce" ] ] } @@ -2378,11 +2642,15 @@ "referenceParentCombinedNodePath": [ [ "Superalgos", - "Pools" + "Pools", + "Governance", + "6f0aed87-db13-4818-bfe6-68abc463ebec" ], [ "Positions, Assets & Features", - "Pool Class" + "Pool Class", + "Governance", + "b27df32a-70f3-470b-b8bb-471c156b0c30" ] ] } @@ -2395,12 +2663,12 @@ "id": "800e3388-1ea6-40ee-ace5-1811a3373e39", "savedPayload": { "position": { - "x": 39257.11133064376, - "y": 18876.363969007194 + "x": 39209.39299015739, + "y": 18422.354286469243 }, "targetPosition": { - "x": 38963.66705042362, - "y": 18938.73747625252 + "x": 38949.585369022054, + "y": 18572.354286469243 }, "floatingObject": { "isPinned": false, @@ -11049,12 +11317,12 @@ "id": "aa848510-1260-46ed-a855-6c0fb9dca9eb", "savedPayload": { "position": { - "x": 39164.406232331276, - "y": 19161.68092389574 + "x": 39209.39299015739, + "y": 18722.354286469243 }, "targetPosition": { - "x": 38963.66705042362, - "y": 18938.73747625252 + "x": 38949.585369022054, + "y": 18572.354286469243 }, "floatingObject": { "isPinned": false, @@ -11090,12 +11358,12 @@ "id": "1d398124-3f36-40a1-8b3b-6c77ad489b92", "savedPayload": { "position": { - "x": 38963.66705042362, - "y": 18938.73747625252 + "x": 38949.585369022054, + "y": 18572.354286469243 }, "targetPosition": { - "x": 38678.35009553507, - "y": 18846.03237794004 + "x": 38649.585369022054, + "y": 18572.354286469243 }, "floatingObject": { "isPinned": false, @@ -11116,12 +11384,12 @@ "id": "2b8d3ce7-515c-44ad-8d80-3c2be6d7736f", "savedPayload": { "position": { - "x": 38678.35009553507, - "y": 18846.03237794004 + "x": 38649.585369022054, + "y": 18572.354286469243 }, "targetPosition": { - "x": 38384.90581531492, - "y": 18908.405885185366 + "x": 38389.77774788672, + "y": 18722.354286469243 }, "floatingObject": { "isPinned": false, @@ -11144,12 +11412,12 @@ "id": "e9c0e495-7985-4381-bf75-865d87289038", "savedPayload": { "position": { - "x": 38670.22277020347, - "y": 19001.11098349785 + "x": 38689.77774788672, + "y": 18722.354286469243 }, "targetPosition": { - "x": 38384.90581531492, - "y": 18908.405885185366 + "x": 38389.77774788672, + "y": 18722.354286469243 }, "floatingObject": { "isPinned": false, @@ -11167,12 +11435,12 @@ "id": "d5ed432e-78bf-432e-be3b-8649932f7a65", "savedPayload": { "position": { - "x": 38384.90581531492, - "y": 18908.405885185366 + "x": 38389.77774788672, + "y": 18722.354286469243 }, "targetPosition": { - "x": 38085.31695488855, - "y": 18892.705098312483 + "x": 38100, + "y": 18800 }, "floatingObject": { "isPinned": false, @@ -11205,12 +11473,12 @@ "id": "b09bc246-6593-4061-ac8a-b52670694e8e", "savedPayload": { "position": { - "x": 38622.235080160724, - "y": 19148.801907129473 + "x": 38689.77774788672, + "y": 18877.645713530757 }, "targetPosition": { - "x": 38336.918125272176, - "y": 19056.09680881699 + "x": 38389.77774788672, + "y": 18877.645713530757 }, "floatingObject": { "isPinned": false, @@ -11233,12 +11501,12 @@ "id": "5011109c-3f87-471a-b786-5fd371f53853", "savedPayload": { "position": { - "x": 38537.657307179834, - "y": 19279.04025646021 + "x": 38649.585369022054, + "y": 19027.645713530757 }, "targetPosition": { - "x": 38336.918125272176, - "y": 19056.09680881699 + "x": 38389.77774788672, + "y": 18877.645713530757 }, "floatingObject": { "isPinned": false, @@ -11256,12 +11524,12 @@ "id": "796dd30f-c90d-4b8d-a63d-89867347407b", "savedPayload": { "position": { - "x": 38336.918125272176, - "y": 19056.09680881699 + "x": 38389.77774788672, + "y": 18877.645713530757 }, "targetPosition": { - "x": 38085.31695488855, - "y": 18892.705098312483 + "x": 38100, + "y": 18800 }, "floatingObject": { "isPinned": false, @@ -11279,8 +11547,8 @@ "id": "bb390957-b8a2-4a8a-9fbf-963ea20f6eaf", "savedPayload": { "position": { - "x": 38085.31695488855, - "y": 18892.705098312483 + "x": 38100, + "y": 18800 }, "targetPosition": { "x": 37800, @@ -11289,7 +11557,7 @@ "floatingObject": { "isPinned": false, "isFrozen": false, - "isCollapsed": false, + "isCollapsed": true, "angleToParent": 2, "distanceToParent": 3, "arrangementStyle": 0 @@ -11316,12 +11584,12 @@ "id": "23c23b71-1431-4cca-a80e-bb5c7242be9f", "savedPayload": { "position": { - "x": 38442.62315256192, - "y": 19420.297332942388 + "x": 38579.422863406, + "y": 19250 }, "targetPosition": { - "x": 38209.47936412483, - "y": 19231.501215627435 + "x": 38319.615242270665, + "y": 19100 }, "floatingObject": { "isPinned": false, @@ -11339,67 +11607,12 @@ "id": "90659303-924d-4404-9b1d-ea3180add4ef", "savedPayload": { "position": { - "x": 38209.47936412483, - "y": 19231.501215627435 + "x": 38319.615242270665, + "y": 19100 }, "targetPosition": { - "x": 37976.33557568774, - "y": 19042.705098312483 - }, - "floatingObject": { - "isPinned": false, - "isFrozen": false, - "isCollapsed": false, - "angleToParent": 3, - "distanceToParent": 3, - "arrangementStyle": 0 - }, - "uiObject": { - "isRunning": false - } - } - }, - "liquidityProgram": { - "type": "Liquidity Program", - "name": "New Liquidity Program", - "config": "{}", - "project": "Governance", - "tokensAwarded": { - "type": "Tokens Awarded", - "name": "New Tokens Awarded", - "project": "Governance", - "id": "c2eabbab-aa7a-4971-8664-cb306b5cc5fd", - "savedPayload": { - "position": { - "x": 38191.356345414926, - "y": 19602.8533542108 - }, - "targetPosition": { - "x": 38083.845960551334, - "y": 19322.779226261642 - }, - "floatingObject": { - "isPinned": false, - "isFrozen": false, - "isCollapsed": false, - "angleToParent": 2, - "distanceToParent": 3, - "arrangementStyle": 0 - }, - "uiObject": { - "isRunning": false - } - } - }, - "id": "6f6d522c-ad61-426a-8fbc-7eb19b0c4a3e", - "savedPayload": { - "position": { - "x": 38083.845960551334, - "y": 19322.779226261642 - }, - "targetPosition": { - "x": 37976.33557568774, - "y": 19042.705098312483 + "x": 38059.80762113533, + "y": 18950 }, "floatingObject": { "isPinned": false, @@ -11417,8 +11630,203 @@ "id": "ed112539-01ea-4937-85cf-69612ee6115d", "savedPayload": { "position": { - "x": 37976.33557568774, - "y": 19042.705098312483 + "x": 38059.80762113533, + "y": 18950 + }, + "targetPosition": { + "x": 37800, + "y": 18800 + }, + "floatingObject": { + "isPinned": false, + "isFrozen": false, + "isCollapsed": true, + "angleToParent": 2, + "distanceToParent": 3, + "arrangementStyle": 0 + }, + "uiObject": { + "isRunning": false + } + } + }, + "liquidityPrograms": { + "type": "Liquidity Programs", + "name": "New Liquidity Programs", + "config": "{}", + "project": "Governance", + "liquidityProgram": [ + { + "type": "Liquidity Program", + "name": "BTCB", + "config": "{\n \"asset\": \"BTCB\"\n}", + "project": "Governance", + "tokensAwarded": { + "type": "Tokens Awarded", + "name": "New Tokens Awarded", + "project": "Governance", + "id": "5fd55dc1-69c8-473e-9d3d-b39b58818b07", + "savedPayload": { + "position": { + "x": 38426.01200417474, + "y": 19425.064478540568 + }, + "targetPosition": { + "x": 38188.00600208737, + "y": 19242.43604983795 + }, + "floatingObject": { + "isPinned": false, + "isFrozen": false, + "isCollapsed": false, + "angleToParent": 2, + "distanceToParent": 3, + "arrangementStyle": 0 + }, + "uiObject": { + "isRunning": false + } + } + }, + "id": "a081e0a9-ee60-4a56-b5a6-aadb7bd8b052", + "savedPayload": { + "position": { + "x": 38188.00600208737, + "y": 19242.43604983795 + }, + "targetPosition": { + "x": 37950, + "y": 19059.807621135333 + }, + "floatingObject": { + "isPinned": false, + "isFrozen": false, + "isCollapsed": false, + "angleToParent": 3, + "distanceToParent": 3, + "arrangementStyle": 0 + }, + "uiObject": { + "isRunning": false + } + } + }, + { + "type": "Liquidity Program", + "name": "BNB", + "config": "{\n \"asset\": \"BNB\"\n}", + "project": "Governance", + "tokensAwarded": { + "type": "Tokens Awarded", + "name": "New Tokens Awarded", + "project": "Governance", + "id": "eab98bcc-39ee-411d-95e2-b5c6c33067cc", + "savedPayload": { + "position": { + "x": 38250, + "y": 19579.422863406 + }, + "targetPosition": { + "x": 38100, + "y": 19319.615242270665 + }, + "floatingObject": { + "isPinned": false, + "isFrozen": false, + "isCollapsed": false, + "angleToParent": 2, + "distanceToParent": 3, + "arrangementStyle": 0 + }, + "uiObject": { + "isRunning": false + } + } + }, + "id": "68d6085b-3226-4842-b100-80a8c647e7ec", + "savedPayload": { + "position": { + "x": 38100, + "y": 19319.615242270665 + }, + "targetPosition": { + "x": 37950, + "y": 19059.807621135333 + }, + "floatingObject": { + "isPinned": false, + "isFrozen": false, + "isCollapsed": false, + "angleToParent": 3, + "distanceToParent": 3, + "arrangementStyle": 0 + }, + "uiObject": { + "isRunning": false + } + } + }, + { + "type": "Liquidity Program", + "name": "BUSD", + "config": "{\n \"asset\": \"BUSD\"\n}", + "project": "Governance", + "tokensAwarded": { + "type": "Tokens Awarded", + "name": "New Tokens Awarded", + "project": "Governance", + "id": "b66c668c-8411-4401-8aa7-10d8b2c4c233", + "savedPayload": { + "position": { + "x": 38028.315715332035, + "y": 19654.674537959618 + }, + "targetPosition": { + "x": 37989.15785766602, + "y": 19357.241079547475 + }, + "floatingObject": { + "isPinned": false, + "isFrozen": false, + "isCollapsed": false, + "angleToParent": 2, + "distanceToParent": 3, + "arrangementStyle": 0 + }, + "uiObject": { + "isRunning": false + } + } + }, + "id": "8c213687-2520-41ff-8b89-f5abaf6f2f2e", + "savedPayload": { + "position": { + "x": 37989.15785766602, + "y": 19357.241079547475 + }, + "targetPosition": { + "x": 37950, + "y": 19059.807621135333 + }, + "floatingObject": { + "isPinned": false, + "isFrozen": false, + "isCollapsed": false, + "angleToParent": 3, + "distanceToParent": 3, + "arrangementStyle": 0 + }, + "uiObject": { + "isRunning": false + } + } + } + ], + "id": "ba3bc469-3c94-444d-a5d0-8ed851aa3778", + "savedPayload": { + "position": { + "x": 37950, + "y": 19059.807621135333 }, "targetPosition": { "x": 37800, diff --git a/Projects/Governance/Schemas/App-Schema/financial-programs.json b/Projects/Governance/Schemas/App-Schema/financial-programs.json index 2e79f7905..79ceb6ecb 100644 --- a/Projects/Governance/Schemas/App-Schema/financial-programs.json +++ b/Projects/Governance/Schemas/App-Schema/financial-programs.json @@ -18,16 +18,6 @@ "relatedUiObject": "Staking Program", "relatedUiObjectProject": "Governance" }, - { - "action": "Add UI Object", - "actionProject": "Visual-Scripting", - "actionFunction": "payload.executeAction", - "disableIfPropertyIsDefined": true, - "propertyToCheckFor": "stakingProgram", - "label": "Add Liquidity Program", - "relatedUiObject": "Liquidity Program", - "relatedUiObjectProject": "Governance" - }, { "action": "Add UI Object", "actionProject": "Visual-Scripting", @@ -68,12 +58,6 @@ "childType": "Staking Program", "autoAdd": false }, - { - "name": "liquidityProgram", - "type": "node", - "childType": "Liquidity Program", - "autoAdd": false - }, { "name": "delegationProgram", "type": "node", diff --git a/Projects/Governance/Schemas/App-Schema/liquidity-program.json b/Projects/Governance/Schemas/App-Schema/liquidity-program.json index 5486e6bd9..164c8cb38 100644 --- a/Projects/Governance/Schemas/App-Schema/liquidity-program.json +++ b/Projects/Governance/Schemas/App-Schema/liquidity-program.json @@ -33,8 +33,7 @@ "config": true }, "initialValues": { - "config": "{}" - }, + "config": "{\n\"asset\": \"BTCB\"\n}" }, "attachingRules": { "compatibleTypes": "->Financial Programs->" }, diff --git a/Projects/Governance/Schemas/App-Schema/liquidity-programs.json b/Projects/Governance/Schemas/App-Schema/liquidity-programs.json new file mode 100644 index 000000000..f35c417b5 --- /dev/null +++ b/Projects/Governance/Schemas/App-Schema/liquidity-programs.json @@ -0,0 +1,50 @@ +{ + "type": "Liquidity Programs", + "menuItems": [ + { + "action": "Configure", + "actionFunction": "uiObject.configEditor.activate", + "label": "Configure", + "iconPathOn": "configuration", + "iconPathOff": "configuration" + }, + { + "action": "Add UI Object", + "actionProject": "Visual-Scripting", + "actionFunction": "payload.executeAction", + "label": "Add Liquidity Program", + "relatedUiObject": "Liquidity Program", + "relatedUiObjectProject": "Governance" + }, + { + "action": "Delete UI Object", + "actionProject": "Visual-Scripting", + "askConfirmation": true, + "confirmationLabel": "Confirm to Delete", + "label": "Delete", + "iconPathOn": "delete-entity", + "iconPathOff": "delete-entity", + "actionFunction": "payload.executeAction" + } + ], + "editors": { + "config": true + }, + "initialValues": { + "config": "{}" + }, + "addLeftIcons": true, + "level": 2, + "attachingRules": { + "compatibleTypes": "->Token Power Switch->" + }, + "propertyNameAtParent": "liquidityPrograms", + "childrenNodesProperties": [ + { + "name": "liquidityProgram", + "type": "array", + "childType": "Liquidity Program", + "autoAdd": false + } + ] +} \ No newline at end of file diff --git a/Projects/Governance/Schemas/App-Schema/token-power-switch.json b/Projects/Governance/Schemas/App-Schema/token-power-switch.json index 40fb5e6c3..0d8a32bfc 100644 --- a/Projects/Governance/Schemas/App-Schema/token-power-switch.json +++ b/Projects/Governance/Schemas/App-Schema/token-power-switch.json @@ -56,6 +56,16 @@ "relatedUiObject": "Financial Programs", "relatedUiObjectProject": "Governance" }, + { + "action": "Add UI Object", + "actionProject": "Visual-Scripting", + "actionFunction": "payload.executeAction", + "disableIfPropertyIsDefined": true, + "propertyToCheckFor": "liquidityPrograms", + "label": "Add Liquidity Programs", + "relatedUiObject": "Liquidity Programs", + "relatedUiObjectProject": "Governance" + }, { "action": "Delete UI Object", "actionProject": "Visual-Scripting", @@ -109,6 +119,12 @@ "type": "node", "childType": "Financial Programs", "autoAdd": false + }, + { + "name": "liquidityPrograms", + "type": "node", + "childType": "Liquidity Programs", + "autoAdd": false } ] } \ No newline at end of file diff --git a/Projects/Governance/UI/Function-Libraries/DistributionProcess.js b/Projects/Governance/UI/Function-Libraries/DistributionProcess.js index ca1d9a1d1..189d46c3c 100644 --- a/Projects/Governance/UI/Function-Libraries/DistributionProcess.js +++ b/Projects/Governance/UI/Function-Libraries/DistributionProcess.js @@ -110,11 +110,22 @@ function newGovernanceFunctionLibraryDistributionProcess() { userProfiles ) /* - Run the Liquidity Program + Run the Liquidity Program: One per SA Token Market */ UI.projects.governance.functionLibraries.liquidityProgram.calculate( pools, - userProfiles + userProfiles, + 'BTCB' + ) + UI.projects.governance.functionLibraries.liquidityProgram.calculate( + pools, + userProfiles, + 'BNB' + ) + UI.projects.governance.functionLibraries.liquidityProgram.calculate( + pools, + userProfiles, + 'BUSD' ) /* Run the Claims Program diff --git a/Projects/Governance/UI/Function-Libraries/LiquidityProgram.js b/Projects/Governance/UI/Function-Libraries/LiquidityProgram.js index 62de5ac9c..172b1b9b1 100644 --- a/Projects/Governance/UI/Function-Libraries/LiquidityProgram.js +++ b/Projects/Governance/UI/Function-Libraries/LiquidityProgram.js @@ -7,7 +7,8 @@ function newGovernanceFunctionLibraryLiquidityProgram() { function calculate( pools, - userProfiles + userProfiles, + asset ) { let programPoolTokenReward /* @@ -20,7 +21,7 @@ function newGovernanceFunctionLibraryLiquidityProgram() { /* Scan Pools Until finding the Pool for this program*/ for (let i = 0; i < pools.length; i++) { let poolsNode = pools[i] - programPoolTokenReward = UI.projects.governance.utilities.pools.findPool(poolsNode, "Liquidity-Rewards") + programPoolTokenReward = UI.projects.governance.utilities.pools.findPool(poolsNode, "Liquidity-Rewards-" + asset) if (programPoolTokenReward !== undefined) { break } } if (programPoolTokenReward === undefined || programPoolTokenReward === 0) { return } @@ -29,7 +30,7 @@ function newGovernanceFunctionLibraryLiquidityProgram() { let userProfile = userProfiles[i] if (userProfile.tokenPowerSwitch === undefined) { continue } - let program = UI.projects.governance.utilities.validations.onlyOneProgram(userProfile, "Liquidity Program") + let program = UI.projects.governance.utilities.validations.onlyOneProgramBasedOnConfigProperty(userProfile, "Liquidity Program", 'asset', asset) if (program === undefined) { continue } if (program.payload === undefined) { continue } @@ -39,7 +40,7 @@ function newGovernanceFunctionLibraryLiquidityProgram() { let userProfile = userProfiles[i] if (userProfile.tokenPowerSwitch === undefined) { continue } - let program = UI.projects.governance.utilities.validations.onlyOneProgram(userProfile, "Liquidity Program") + let program = UI.projects.governance.utilities.validations.onlyOneProgramBasedOnConfigProperty(userProfile, "Liquidity Program", 'asset', asset) if (program === undefined) { continue } if (program.payload === undefined) { continue } @@ -49,7 +50,7 @@ function newGovernanceFunctionLibraryLiquidityProgram() { let userProfile = userProfiles[i] if (userProfile.tokenPowerSwitch === undefined) { continue } - let program = UI.projects.governance.utilities.validations.onlyOneProgram(userProfile, "Liquidity Program") + let program = UI.projects.governance.utilities.validations.onlyOneProgramBasedOnConfigProperty(userProfile, "Liquidity Program", 'asset', asset) if (program === undefined) { continue } if (program.payload === undefined) { continue } if (program.payload.liquidityProgram.isActive === false) { continue } @@ -60,7 +61,7 @@ function newGovernanceFunctionLibraryLiquidityProgram() { let userProfile = userProfiles[i] if (userProfile.tokenPowerSwitch === undefined) { continue } - let program = UI.projects.governance.utilities.validations.onlyOneProgram(userProfile, "Liquidity Program") + let program = UI.projects.governance.utilities.validations.onlyOneProgramBasedOnConfigProperty(userProfile, "Liquidity Program", 'asset', asset) if (program === undefined) { continue } if (program.payload === undefined) { continue } if (program.payload.liquidityProgram.isActive === false) { continue } @@ -123,7 +124,7 @@ function newGovernanceFunctionLibraryLiquidityProgram() { Here we will convert Liquidity Tokens into Liquidity Power. As per system rules Liquidity Powar = userProfile.payload.liquidityTokens */ - let programPower = userProfile.payload.liquidityTokens + let programPower = userProfile.payload.liquidityTokens[asset] programNode.payload.liquidityProgram.ownPower = programPower accumulatedProgramPower = accumulatedProgramPower + programPower diff --git a/Projects/Governance/UI/Spaces/User-Profile-Space/UserProfile.js b/Projects/Governance/UI/Spaces/User-Profile-Space/UserProfile.js index 8565a54ef..98f938403 100644 --- a/Projects/Governance/UI/Spaces/User-Profile-Space/UserProfile.js +++ b/Projects/Governance/UI/Spaces/User-Profile-Space/UserProfile.js @@ -15,7 +15,7 @@ function newGovernanceUserProfileSpace() { } let waitingForResponses = 0 - const BSC_SCAN_RATE_LIMIT_DELAY = 12000 + const BSC_SCAN_RATE_LIMIT_DELAY = 6000 * 4 let reputationByAddress = new Map() return thisObject @@ -423,11 +423,22 @@ function newGovernanceUserProfileSpace() { userProfile.payload.blockchainTokens === undefined ) { waitingForResponses++ - userProfile.payload.liquidityTokens = 0 // We need to set this value here so that the next call to BSCSCAN is not done more than once. - setTimeout(getBPancakeTokens, BSC_SCAN_RATE_LIMIT_DELAY / 2, userProfile, blockchainAccount) + userProfile.payload.liquidityTokens = { + BTCB: 0, + BNB: 0, + BUSD: 0 + } + + setTimeout(getBPancakeTokens, BSC_SCAN_RATE_LIMIT_DELAY / 4 * 1, userProfile, blockchainAccount, 'BTCB', UI.projects.governance.globals.saToken.SA_TOKEN_BSC_PANCAKE_LIQUIDITY_POOL_BTCB_CONTRACT_ADDRESS) + setTimeout(getBPancakeTokens, BSC_SCAN_RATE_LIMIT_DELAY / 4 * 2, userProfile, blockchainAccount, 'BNB', UI.projects.governance.globals.saToken.SA_TOKEN_BSC_PANCAKE_LIQUIDITY_POOL_BNB_CONTRACT_ADDRESS) + setTimeout(getBPancakeTokens, BSC_SCAN_RATE_LIMIT_DELAY / 4 * 3, userProfile, blockchainAccount, 'BUSD', UI.projects.governance.globals.saToken.SA_TOKEN_BSC_PANCAKE_LIQUIDITY_POOL_BUSD_CONTRACT_ADDRESS) + + /* + Now we get the SA Tokens Balance. + */ waitingForResponses++ userProfile.payload.blockchainTokens = 0 // We need to set this value here so that the next call to BSCSCAN is not done more than once. - setTimeout(getBlockchainTokens, BSC_SCAN_RATE_LIMIT_DELAY, userProfile, blockchainAccount) + setTimeout(getBlockchainTokens, BSC_SCAN_RATE_LIMIT_DELAY / 4 * 4, userProfile, blockchainAccount) } } } @@ -448,7 +459,7 @@ function newGovernanceUserProfileSpace() { ) userProfile.payload.blockchainTokens = Number(data.result) / 1000000000000000000 userProfile.payload.reputation = Math.min(reputationByAddress.get(blockchainAccount.toLowerCase()) | 0, userProfile.payload.blockchainTokens) - console.log('Reputation of ' + userProfile.name + ' is ', userProfile.payload.reputation) + console.log('[INFO] Reputation of ' + userProfile.name + ' is ', userProfile.payload.reputation) } waitingForResponses-- }).catch(function (err) { @@ -463,9 +474,9 @@ function newGovernanceUserProfileSpace() { }); } - function getBPancakeTokens(userProfile, blockchainAccount) { + function getBPancakeTokens(userProfile, blockchainAccount, asset, marketContract) { console.log('[INFO] Loading Pancake Balance for User Profile: ', userProfile.name, 'blockchainAccount: ', blockchainAccount) - const url = "https://api.bscscan.com/api?module=account&action=tokenbalance&contractaddress=" + UI.projects.governance.globals.saToken.SA_TOKEN_BSC_PANCAKE_LIQUIDITY_POOL_BTCB_CONTRACT_ADDRESS + "&address=" + blockchainAccount + "&tag=latest&apikey=YourApiKeyToken" + const url = "https://api.bscscan.com/api?module=account&action=tokenbalance&contractaddress=" + marketContract + "&address=" + blockchainAccount + "&tag=latest&apikey=YourApiKeyToken" fetch(url).then(function (response) { return response.json(); @@ -477,8 +488,8 @@ function newGovernanceUserProfileSpace() { userProfile.payload.uiObject.setInfoMessage('Pancake Balance Succesfully Loaded.', UI.projects.governance.globals.designer.SET_INFO_COUNTER_FACTOR ) - userProfile.payload.liquidityTokens = Number(data.result) / 1000000000000000000 - console.log('Liquidity of ' + userProfile.name + ' is ', userProfile.payload.liquidityTokens) + userProfile.payload.liquidityTokens[asset] = Number(data.result) / 1000000000000000000 + console.log('[INFO] Liquidity of ' + userProfile.name + ' for asset ' + asset + ' is ', userProfile.payload.liquidityTokens[asset]) } waitingForResponses-- }).catch(function (err) { diff --git a/Projects/Governance/UI/Utilities/Validations.js b/Projects/Governance/UI/Utilities/Validations.js index 05e6cd299..515e6ca79 100644 --- a/Projects/Governance/UI/Utilities/Validations.js +++ b/Projects/Governance/UI/Utilities/Validations.js @@ -1,6 +1,7 @@ -function newGovernanceUtilitiesValidations () { +function newGovernanceUtilitiesValidations() { let thisObject = { - onlyOneProgram: onlyOneProgram + onlyOneProgram: onlyOneProgram, + onlyOneProgramBasedOnConfigProperty: onlyOneProgramBasedOnConfigProperty } return thisObject @@ -15,7 +16,7 @@ function newGovernanceUtilitiesValidations () { userProfile.payload.uiObject.setErrorMessage( 'Only one ' + programNodeType + ' is allowed.', UI.projects.governance.globals.designer.SET_ERROR_COUNTER_FACTOR - ) + ) return } if (programs.length === 1) { @@ -23,4 +24,25 @@ function newGovernanceUtilitiesValidations () { } } } + + function onlyOneProgramBasedOnConfigProperty(userProfile, programNodeType, configProperetyName, configProperetyValue) { + /* + Find all the nodes representing the current program. + */ + let programs = UI.projects.visualScripting.utilities.branches.nodeBranchToArray(userProfile, programNodeType) + if (programs !== undefined) { + for (let i = 0; i < programs.length; i++) { + let program = programs[i] + let propertyValue = UI.projects.visualScripting.utilities.nodeConfig.loadConfigProperty(program.payload, configProperetyName) + if (propertyValue === configProperetyValue) { + return program + } + } + + userProfile.payload.uiObject.setErrorMessage( + 'Only one ' + programNodeType + ' is allowed. No program had a configProperty called ' + configProperetyName + ' with a value of ' + configProperetyValue, + UI.projects.governance.globals.designer.SET_ERROR_COUNTER_FACTOR + ) + } + } } \ No newline at end of file