From d56ec6855fd3995cb0150d2a07e9fe9e1de2c5d3 Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Thu, 24 Jun 2021 11:35:18 +0200 Subject: [PATCH] Bonus Program Implemented --- Projects/Governance/Icons/tokens-bonus.png | Bin 0 -> 17306 bytes .../Governance/Plugins/Pools/Superalgos.json | 20 +- .../User-Profiles/Luis-Fernando-Molina.json | 242 +++++++++++++----- .../App-Schema/mentorship-program.json | 15 ++ .../Schemas/App-Schema/referral-program.json | 15 ++ .../Schemas/App-Schema/support-program.json | 15 ++ .../Schemas/App-Schema/tokens-bonus.json | 21 ++ .../Schemas/App-Schema/voting-program.json | 15 ++ .../Function-Libraries/MentorshipProgram.js | 10 +- .../UI/Function-Libraries/ReferralProgram.js | 10 +- .../UI/Function-Libraries/SupportProgram.js | 10 +- .../UI/Function-Libraries/VotingProgram.js | 9 + .../Governance/UI/Utilities/BonusProgram.js | 145 +++++++++++ ...andatoryProgram.js => DecendentProgram.js} | 6 +- Projects/ProjectsSchema.json | 5 + 15 files changed, 451 insertions(+), 87 deletions(-) create mode 100644 Projects/Governance/Icons/tokens-bonus.png create mode 100644 Projects/Governance/Schemas/App-Schema/tokens-bonus.json create mode 100644 Projects/Governance/UI/Utilities/BonusProgram.js rename Projects/Governance/UI/Utilities/{MandatoryProgram.js => DecendentProgram.js} (99%) diff --git a/Projects/Governance/Icons/tokens-bonus.png b/Projects/Governance/Icons/tokens-bonus.png new file mode 100644 index 0000000000000000000000000000000000000000..41d647283bb3517ae1de35fd098b0dad5adbb321 GIT binary patch literal 17306 zcmch<^+QzO^FMxf>F!2Y8YD%Kc9&2};OfSXleG4cW*7fTFCblKczrKYz0cT(hQ9 zj=D^zUN`=JbC4>a_FZ9+{#EaLq>+FnzIBKdMHk*fHX4~=g5V+%8oR`NQ(VeV5_&!~ zmZpgr&rIo6(%TUV+}tI^r|;j0gtJAZ8PYb@IvL&mNnCh-w0CfC7mLkWuu@-md+7*M zUL`b_I%T$8?SZyy+upO(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fAFxvz5oCK literal 0 HcmV?d00001 diff --git a/Projects/Governance/Plugins/Pools/Superalgos.json b/Projects/Governance/Plugins/Pools/Superalgos.json index 88b4eceb7..bcd993cb5 100644 --- a/Projects/Governance/Plugins/Pools/Superalgos.json +++ b/Projects/Governance/Plugins/Pools/Superalgos.json @@ -642,7 +642,7 @@ "floatingObject": { "isPinned": false, "isFrozen": false, - "isCollapsed": true, + "isCollapsed": false, "angleToParent": 1, "distanceToParent": 3, "arrangementStyle": 0 @@ -1274,8 +1274,8 @@ }, { "type": "Pool", - "name": "Referrals Participation Bonus", - "config": "{\n \"codeName\": \"Referrals-Participation-Bonus\"\n}", + "name": "Referrals Bonus", + "config": "{\n \"codeName\": \"Referrals-Bonus\"\n}", "project": "Governance", "poolClasses": [], "pools": [], @@ -1365,8 +1365,8 @@ }, { "type": "Pool", - "name": "Support Participation Bonus", - "config": "{\n \"codeName\": \"Support-Participation-Bonus\"\n}", + "name": "Support Bonus", + "config": "{\n \"codeName\": \"Support-Bonus\"\n}", "project": "Governance", "poolClasses": [], "pools": [], @@ -1457,7 +1457,7 @@ { "type": "Pool", "name": "Mentorship Participation Bonus", - "config": "{\n \"codeName\": \"Mentorship-Participation-Bonus\"\n}", + "config": "{\n \"codeName\": \"Mentorship-Bonus\"\n}", "project": "Governance", "poolClasses": [], "pools": [], @@ -1547,8 +1547,8 @@ "pools": [ { "type": "Pool", - "name": "Voting Participation Bonus", - "config": "{\n \"codeName\": \"Voting-Participation-Bonus\"\n}", + "name": "Voting Bonus", + "config": "{\n \"codeName\": \"Voting-Bonus\"\n}", "project": "Governance", "poolClasses": [], "pools": [], @@ -1608,8 +1608,8 @@ "pools": [ { "type": "Pool", - "name": "Liquid Democracy Participation Bonus", - "config": "{\n \"codeName\": \"Liquid-Democracy-Participation-Bonus\"\n}", + "name": "Liquid Democracy Bonus", + "config": "{\n \"codeName\": \"Liquid-Democracy-Bonus\"\n}", "project": "Governance", "poolClasses": [], "pools": [], diff --git a/Projects/Governance/Plugins/User-Profiles/Luis-Fernando-Molina.json b/Projects/Governance/Plugins/User-Profiles/Luis-Fernando-Molina.json index 32e9c885a..13941c9d6 100644 --- a/Projects/Governance/Plugins/User-Profiles/Luis-Fernando-Molina.json +++ b/Projects/Governance/Plugins/User-Profiles/Luis-Fernando-Molina.json @@ -22,8 +22,8 @@ "id": "fb0a076c-b0a8-4f16-9a47-10a3f3489a0a", "savedPayload": { "position": { - "x": 30660.151752050326, - "y": 22933.690934849117 + "x": 30695.66511087198, + "y": 22950.386032869752 }, "targetPosition": { "x": 30550.54944474041, @@ -33,7 +33,7 @@ "isPinned": false, "isFrozen": false, "isCollapsed": false, - "angleToParent": 2, + "angleToParent": 3, "distanceToParent": 3, "arrangementStyle": 0 }, @@ -53,8 +53,8 @@ "id": "56ac3eb9-2d72-4a8d-99bc-3221819ce995", "savedPayload": { "position": { - "x": 30847.198692607948, - "y": 23168.240379589526 + "x": 30785.098889480818, + "y": 23025.90611888476 }, "targetPosition": { "x": 30550.54944474041, @@ -64,7 +64,32 @@ "isPinned": false, "isFrozen": false, "isCollapsed": false, - "angleToParent": 2, + "angleToParent": 3, + "distanceToParent": 3, + "arrangementStyle": 0 + }, + "uiObject": {} + } + }, + "tokensBonus": { + "type": "Tokens Bonus", + "name": "New Tokens Bonus", + "project": "Governance", + "id": "2d205ae2-9158-4b36-a8cb-f9d5c5061342", + "savedPayload": { + "position": { + "x": 30838.82464132394, + "y": 23129.902406014924 + }, + "targetPosition": { + "x": 30550.54944474041, + "y": 23212.953059442378 + }, + "floatingObject": { + "isPinned": false, + "isFrozen": false, + "isCollapsed": false, + "angleToParent": 3, "distanceToParent": 3, "arrangementStyle": 0 }, @@ -108,8 +133,8 @@ "id": "2a038796-fccd-4a5a-b943-116ccca91b1d", "savedPayload": { "position": { - "x": 30895.15021539039, - "y": 23378.32972786362 + "x": 30904.23967921002, + "y": 23416.50441319547 }, "targetPosition": { "x": 30608.478373654547, @@ -119,7 +144,7 @@ "isPinned": false, "isFrozen": false, "isCollapsed": false, - "angleToParent": 2, + "angleToParent": 3, "distanceToParent": 3, "arrangementStyle": 0 }, @@ -139,8 +164,8 @@ "id": "c6367a1d-4bc7-4348-8309-a3e6f3fcdd50", "savedPayload": { "position": { - "x": 30828.393935203494, - "y": 23670.808101518167 + "x": 30900.956747309094, + "y": 23533.512560373787 }, "targetPosition": { "x": 30608.478373654547, @@ -150,7 +175,32 @@ "isPinned": false, "isFrozen": false, "isCollapsed": false, - "angleToParent": 2, + "angleToParent": 3, + "distanceToParent": 3, + "arrangementStyle": 0 + }, + "uiObject": {} + } + }, + "tokensBonus": { + "type": "Tokens Bonus", + "name": "New Tokens Bonus", + "project": "Governance", + "id": "3d5e14b8-8187-4f3b-8142-8daa540977a7", + "savedPayload": { + "position": { + "x": 30853.146634342324, + "y": 23640.357669040834 + }, + "targetPosition": { + "x": 30608.478373654547, + "y": 23466.75628018689 + }, + "floatingObject": { + "isPinned": false, + "isFrozen": false, + "isCollapsed": false, + "angleToParent": 3, "distanceToParent": 3, "arrangementStyle": 0 }, @@ -194,8 +244,8 @@ "id": "97483d0f-35ec-4471-a981-0d22565e0d63", "savedPayload": { "position": { - "x": 30729.330120827777, - "y": 23769.374378957273 + "x": 30684.8524863998, + "y": 23852.02767352297 }, "targetPosition": { "x": 30446.165121735266, @@ -205,7 +255,7 @@ "isPinned": false, "isFrozen": false, "isCollapsed": false, - "angleToParent": 2, + "angleToParent": 3, "distanceToParent": 3, "arrangementStyle": 0 }, @@ -225,8 +275,8 @@ "id": "8adecfda-c803-400c-acde-c34bda09e39b", "savedPayload": { "position": { - "x": 30576.330243470533, - "y": 23940.58132074145 + "x": 30617.010469685803, + "y": 23916.891283005098 }, "targetPosition": { "x": 30446.165121735266, @@ -236,7 +286,7 @@ "isPinned": false, "isFrozen": false, "isCollapsed": false, - "angleToParent": 2, + "angleToParent": 3, "distanceToParent": 3, "arrangementStyle": 0 }, @@ -256,8 +306,8 @@ "id": "09648f99-1bf8-4d53-9d20-f15cc8c71508", "savedPayload": { "position": { - "x": 30347.081403148717, - "y": 23953.455659463234 + "x": 30532.444919964873, + "y": 23957.615905376202 }, "targetPosition": { "x": 30446.165121735266, @@ -267,7 +317,32 @@ "isPinned": false, "isFrozen": false, "isCollapsed": false, - "angleToParent": 2, + "angleToParent": 3, + "distanceToParent": 3, + "arrangementStyle": 0 + }, + "uiObject": {} + } + }, + "tokensBonus": { + "type": "Tokens Bonus", + "name": "New Tokens Bonus", + "project": "Governance", + "id": "4113b77f-b7f4-41d2-8603-3784b2b65412", + "savedPayload": { + "position": { + "x": 30439.433702446524, + "y": 23970.215130853474 + }, + "targetPosition": { + "x": 30446.165121735266, + "y": 23670.290660370723 + }, + "floatingObject": { + "isPinned": false, + "isFrozen": false, + "isCollapsed": false, + "angleToParent": 3, "distanceToParent": 3, "arrangementStyle": 0 }, @@ -287,7 +362,7 @@ "floatingObject": { "isPinned": false, "isFrozen": false, - "isCollapsed": true, + "isCollapsed": false, "angleToParent": 1, "distanceToParent": 3, "arrangementStyle": 0 @@ -325,12 +400,12 @@ "id": "edf1a5c9-7802-4856-918c-3cd5a7a9caf7", "savedPayload": { "position": { - "x": 30718.661945753065, - "y": 24284.862061411382 + "x": 30541.44352053292, + "y": 24401.82684154666 }, "targetPosition": { - "x": 30463.457926046864, - "y": 24127.15693046823 + "x": 30335.75245832439, + "y": 24183.443721943684 }, "floatingObject": { "isPinned": false, @@ -352,12 +427,12 @@ "id": "ebad23ed-1a02-4edf-a9d7-fc4b2fd0dacb", "savedPayload": { "position": { - "x": 30463.457926046864, - "y": 24127.15693046823 + "x": 30335.75245832439, + "y": 24183.443721943684 }, "targetPosition": { - "x": 30208.253906340662, - "y": 23969.45179952508 + "x": 30130.06139611586, + "y": 23965.06060234071 }, "floatingObject": { "isPinned": false, @@ -387,12 +462,12 @@ "id": "e745f3cd-4cd9-421b-b9ab-f62650fb56f8", "savedPayload": { "position": { - "x": 30322.02154513654, - "y": 24247.043089667277 + "x": 30168.106583981345, + "y": 24262.63843027868 }, "targetPosition": { - "x": 30208.253906340662, - "y": 23969.45179952508 + "x": 30130.06139611586, + "y": 23965.06060234071 }, "floatingObject": { "isPinned": false, @@ -422,12 +497,12 @@ "id": "3ae7f0f9-be37-4e6c-b3b1-4343e51f80a9", "savedPayload": { "position": { - "x": 30137.12979302601, - "y": 24260.89881101294 + "x": 29985.928740982057, + "y": 24228.16852263974 }, "targetPosition": { - "x": 30208.253906340662, - "y": 23969.45179952508 + "x": 30130.06139611586, + "y": 23965.06060234071 }, "floatingObject": { "isPinned": false, @@ -457,12 +532,12 @@ "id": "d8ab7844-f98f-4ce1-a634-c0ff98af28ca", "savedPayload": { "position": { - "x": 29979.405034781983, - "y": 24163.431679889818 + "x": 29858.804673355116, + "y": 24093.20033215587 }, "targetPosition": { - "x": 30208.253906340662, - "y": 23969.45179952508 + "x": 30130.06139611586, + "y": 23965.06060234071 }, "floatingObject": { "isPinned": false, @@ -487,8 +562,8 @@ "id": "f8a482c4-dee0-475a-831b-7514fd255ba6", "savedPayload": { "position": { - "x": 30208.253906340662, - "y": 23969.45179952508 + "x": 30130.06139611586, + "y": 23965.06060234071 }, "targetPosition": { "x": 30185.834878264734, @@ -498,7 +573,7 @@ "isPinned": false, "isFrozen": false, "isCollapsed": false, - "angleToParent": 2, + "angleToParent": 3, "distanceToParent": 3, "arrangementStyle": 0 }, @@ -521,8 +596,8 @@ "id": "5011109c-3f87-471a-b786-5fd371f53853", "savedPayload": { "position": { - "x": 29937.963245969935, - "y": 23839.28667778981 + "x": 29990.148654881297, + "y": 23897.68217731436 }, "targetPosition": { "x": 30185.834878264734, @@ -532,7 +607,7 @@ "isPinned": false, "isFrozen": false, "isCollapsed": false, - "angleToParent": 2, + "angleToParent": 3, "distanceToParent": 3, "arrangementStyle": 0 }, @@ -592,12 +667,12 @@ "id": "4381f059-44c8-4843-9cac-8a7cf41fa14c", "savedPayload": { "position": { - "x": 29291.212129593012, - "y": 23941.616203036338 + "x": 29439.067762384868, + "y": 24114.971388205784 }, "targetPosition": { - "x": 29511.12769114196, - "y": 23737.564381705062 + "x": 29598.67738533947, + "y": 23860.954128437297 }, "floatingObject": { "isPinned": false, @@ -619,12 +694,12 @@ "id": "d69739f9-958e-480e-95e3-a72bb5f6ceab", "savedPayload": { "position": { - "x": 29511.12769114196, - "y": 23737.564381705062 + "x": 29598.67738533947, + "y": 23860.954128437297 }, "targetPosition": { - "x": 29731.043252690906, - "y": 23533.512560373787 + "x": 29758.28700829407, + "y": 23606.93686866881 }, "floatingObject": { "isPinned": false, @@ -1990,12 +2065,12 @@ "id": "e059f5c4-9132-4d76-9f3e-1060658fa704", "savedPayload": { "position": { - "x": 29151.893037300517, - "y": 23511.84228823741 + "x": 29193.26217880617, + "y": 23735.90009886783 }, "targetPosition": { - "x": 29444.371410955064, - "y": 23445.086008050515 + "x": 29458.49679685755, + "y": 23595.719510385912 }, "floatingObject": { "isPinned": false, @@ -2027,12 +2102,12 @@ "id": "7607658c-f3ad-42de-a316-35dd052e0477", "savedPayload": { "position": { - "x": 29240.31958962379, - "y": 23225.17044650157 + "x": 29204.479537089064, + "y": 23436.10988743131 }, "targetPosition": { - "x": 29444.371410955064, - "y": 23445.086008050515 + "x": 29458.49679685755, + "y": 23595.719510385912 }, "floatingObject": { "isPinned": false, @@ -2055,12 +2130,12 @@ "id": "1d398124-3f36-40a1-8b3b-6c77ad489b92", "savedPayload": { "position": { - "x": 29444.371410955064, - "y": 23445.086008050515 + "x": 29458.49679685755, + "y": 23595.719510385912 }, "targetPosition": { - "x": 29731.043252690906, - "y": 23533.512560373787 + "x": 29758.28700829407, + "y": 23606.93686866881 }, "floatingObject": { "isPinned": false, @@ -2080,8 +2155,8 @@ "id": "2b8d3ce7-515c-44ad-8d80-3c2be6d7736f", "savedPayload": { "position": { - "x": 29731.043252690906, - "y": 23533.512560373787 + "x": 29758.28700829407, + "y": 23606.93686866881 }, "targetPosition": { "x": 30023.521626345453, @@ -2091,7 +2166,7 @@ "isPinned": false, "isFrozen": false, "isCollapsed": false, - "angleToParent": 2, + "angleToParent": 3, "distanceToParent": 3, "arrangementStyle": 0 }, @@ -2101,6 +2176,31 @@ } } ], + "tokensBonus": { + "type": "Tokens Bonus", + "name": "New Tokens Bonus", + "project": "Governance", + "id": "e9c0e495-7985-4381-bf75-865d87289038", + "savedPayload": { + "position": { + "x": 29723.731414908932, + "y": 23455.538921903993 + }, + "targetPosition": { + "x": 30023.521626345453, + "y": 23466.75628018689 + }, + "floatingObject": { + "isPinned": false, + "isFrozen": false, + "isCollapsed": false, + "angleToParent": 3, + "distanceToParent": 3, + "arrangementStyle": 0 + }, + "uiObject": {} + } + }, "id": "d5ed432e-78bf-432e-be3b-8649932f7a65", "savedPayload": { "position": { diff --git a/Projects/Governance/Schemas/App-Schema/mentorship-program.json b/Projects/Governance/Schemas/App-Schema/mentorship-program.json index 24d587b52..1f6dd96ce 100644 --- a/Projects/Governance/Schemas/App-Schema/mentorship-program.json +++ b/Projects/Governance/Schemas/App-Schema/mentorship-program.json @@ -24,6 +24,15 @@ "label": "Add Tokens Awarded", "relatedUiObject": "Tokens Awarded" }, + { + "action": "Add UI Object", + "actionProject": "Foundations", + "disableIfPropertyIsDefined": true, + "propertyToCheckFor": "tokensBonus", + "actionFunction": "payload.executeAction", + "label": "Add Tokens Bonus", + "relatedUiObject": "Tokens Bonus" + }, { "action": "Delete UI Object", "actionProject": "Foundations", @@ -59,6 +68,12 @@ "type": "node", "childType": "Tokens Awarded", "autoAdd": true + }, + { + "name": "tokensBonus", + "type": "node", + "childType": "Tokens Bonus", + "autoAdd": true } ] } \ No newline at end of file diff --git a/Projects/Governance/Schemas/App-Schema/referral-program.json b/Projects/Governance/Schemas/App-Schema/referral-program.json index 4ee361de2..d5ae28264 100644 --- a/Projects/Governance/Schemas/App-Schema/referral-program.json +++ b/Projects/Governance/Schemas/App-Schema/referral-program.json @@ -24,6 +24,15 @@ "label": "Add Tokens Awarded", "relatedUiObject": "Tokens Awarded" }, + { + "action": "Add UI Object", + "actionProject": "Foundations", + "disableIfPropertyIsDefined": true, + "propertyToCheckFor": "tokensBonus", + "actionFunction": "payload.executeAction", + "label": "Add Tokens Bonus", + "relatedUiObject": "Tokens Bonus" + }, { "action": "Delete UI Object", "actionProject": "Foundations", @@ -59,6 +68,12 @@ "type": "node", "childType": "Tokens Awarded", "autoAdd": true + }, + { + "name": "tokensBonus", + "type": "node", + "childType": "Tokens Bonus", + "autoAdd": true } ] } \ No newline at end of file diff --git a/Projects/Governance/Schemas/App-Schema/support-program.json b/Projects/Governance/Schemas/App-Schema/support-program.json index 2441a4e96..678467cdb 100644 --- a/Projects/Governance/Schemas/App-Schema/support-program.json +++ b/Projects/Governance/Schemas/App-Schema/support-program.json @@ -24,6 +24,15 @@ "label": "Add Tokens Awarded", "relatedUiObject": "Tokens Awarded" }, + { + "action": "Add UI Object", + "actionProject": "Foundations", + "disableIfPropertyIsDefined": true, + "propertyToCheckFor": "tokensBonus", + "actionFunction": "payload.executeAction", + "label": "Add Tokens Bonus", + "relatedUiObject": "Tokens Bonus" + }, { "action": "Delete UI Object", "actionProject": "Foundations", @@ -59,6 +68,12 @@ "type": "node", "childType": "Tokens Awarded", "autoAdd": true + }, + { + "name": "tokensBonus", + "type": "node", + "childType": "Tokens Bonus", + "autoAdd": true } ] } \ No newline at end of file diff --git a/Projects/Governance/Schemas/App-Schema/tokens-bonus.json b/Projects/Governance/Schemas/App-Schema/tokens-bonus.json new file mode 100644 index 000000000..9a5d16079 --- /dev/null +++ b/Projects/Governance/Schemas/App-Schema/tokens-bonus.json @@ -0,0 +1,21 @@ +{ + "type": "Tokens Bonus", + "menuItems": [ + { + "action": "Delete UI Object", + "actionProject": "Foundations", + "askConfirmation": true, + "confirmationLabel": "Confirm to Delete", + "label": "Delete", + "iconPathOn": "delete-entity", + "iconPathOff": "delete-entity", + "actionFunction": "payload.executeAction" + } + ], + "addLeftIcons": true, + "level": 2, + "attachingRules": { + "compatibleTypes": "->Referral Program->Mentorship Program->Support Program->Voting Program->" + }, + "propertyNameAtParent": "tokensBonus" +} \ No newline at end of file diff --git a/Projects/Governance/Schemas/App-Schema/voting-program.json b/Projects/Governance/Schemas/App-Schema/voting-program.json index 83a9aec37..1c5ed21b6 100644 --- a/Projects/Governance/Schemas/App-Schema/voting-program.json +++ b/Projects/Governance/Schemas/App-Schema/voting-program.json @@ -24,6 +24,15 @@ "label": "Add Tokens Awarded", "relatedUiObject": "Tokens Awarded" }, + { + "action": "Add UI Object", + "actionProject": "Foundations", + "disableIfPropertyIsDefined": true, + "propertyToCheckFor": "tokensBonus", + "actionFunction": "payload.executeAction", + "label": "Add Tokens Bonus", + "relatedUiObject": "Tokens Bonus" + }, { "action": "Delete UI Object", "actionProject": "Foundations", @@ -59,6 +68,12 @@ "type": "node", "childType": "Tokens Awarded", "autoAdd": true + }, + { + "name": "tokensBonus", + "type": "node", + "childType": "Tokens Bonus", + "autoAdd": true } ] } \ No newline at end of file diff --git a/Projects/Governance/UI/Function-Libraries/MentorshipProgram.js b/Projects/Governance/UI/Function-Libraries/MentorshipProgram.js index e3cf2f9ed..3d3a57852 100644 --- a/Projects/Governance/UI/Function-Libraries/MentorshipProgram.js +++ b/Projects/Governance/UI/Function-Libraries/MentorshipProgram.js @@ -9,11 +9,19 @@ function newGovernanceFunctionLibraryMentorshipProgram() { pools, userProfiles ) { + + UI.projects.governance.utilities.bonusProgram.run( + pools, + userProfiles, + "mentorshipProgram", + "Mentorship-Bonus" + ) + UI.projects.governance.utilities.decendentProgram.run( pools, userProfiles, "mentorshipProgram", - "Mentorship-Program", + "Mentorship-Rewards", "Mentorship Program", "Mentorship Power", "userMentors", diff --git a/Projects/Governance/UI/Function-Libraries/ReferralProgram.js b/Projects/Governance/UI/Function-Libraries/ReferralProgram.js index d86752b24..121dc232e 100644 --- a/Projects/Governance/UI/Function-Libraries/ReferralProgram.js +++ b/Projects/Governance/UI/Function-Libraries/ReferralProgram.js @@ -9,11 +9,19 @@ function newGovernanceFunctionLibraryReferralProgram() { pools, userProfiles ) { + + UI.projects.governance.utilities.bonusProgram.run( + pools, + userProfiles, + "referralProgram", + "Referrals-Bonus" + ) + UI.projects.governance.utilities.decendentProgram.run( pools, userProfiles, "referralProgram", - "Referral-Program", + "Referrals-Rewards", "Referral Program", "Referral Power", "userReferrers", diff --git a/Projects/Governance/UI/Function-Libraries/SupportProgram.js b/Projects/Governance/UI/Function-Libraries/SupportProgram.js index 49133c611..9646cf9b2 100644 --- a/Projects/Governance/UI/Function-Libraries/SupportProgram.js +++ b/Projects/Governance/UI/Function-Libraries/SupportProgram.js @@ -9,11 +9,19 @@ function newGovernanceFunctionLibrarySupportProgram() { pools, userProfiles ) { + + UI.projects.governance.utilities.bonusProgram.run( + pools, + userProfiles, + "supportProgram", + "Support-Bonus" + ) + UI.projects.governance.utilities.decendentProgram.run( pools, userProfiles, "supportProgram", - "Support-Program", + "Support-Rewards", "Support Program", "Support Power", "userSupporters", diff --git a/Projects/Governance/UI/Function-Libraries/VotingProgram.js b/Projects/Governance/UI/Function-Libraries/VotingProgram.js index a6c802de7..0adc00ee4 100644 --- a/Projects/Governance/UI/Function-Libraries/VotingProgram.js +++ b/Projects/Governance/UI/Function-Libraries/VotingProgram.js @@ -13,6 +13,15 @@ function newGovernanceFunctionLibraryVotingProgram() { positions, userProfiles ) { + + /* Bonus Calculation is here */ + UI.projects.governance.utilities.bonusProgram.run( + pools, + userProfiles, + "votingtProgram", + "Voting-Bonus" + ) + /* Reset Votes at Pools */ for (let i = 0; i < pools.length; i++) { let poolsNode = pools[i] diff --git a/Projects/Governance/UI/Utilities/BonusProgram.js b/Projects/Governance/UI/Utilities/BonusProgram.js new file mode 100644 index 000000000..47bc18ed3 --- /dev/null +++ b/Projects/Governance/UI/Utilities/BonusProgram.js @@ -0,0 +1,145 @@ +function newFoundationsUtilitiesBonusProgram() { + let thisObject = { + run: run + } + + return thisObject + + function run( + pools, + userProfiles, + programPropertyName, + programCodeName + ) { + let programPoolTokenReward + /* + In order to be able to calculate the share of the Program Pool for each User Profile, + we need to accumulate all the Participation Power that each User Profile at their Program + node has, because with that Power is that each Program node gets a share of the pool. + */ + let accumulatedProgramPower = 0 + + /* Scan Pools Until finding the Mentoship-Program Pool */ + for (let i = 0; i < pools.length; i++) { + let poolsNode = pools[i] + programPoolTokenReward = UI.projects.governance.utilities.pools.findPool(poolsNode, programCodeName) + } + if (programPoolTokenReward === undefined || programPoolTokenReward === 0) { return } + + for (let i = 0; i < userProfiles.length; i++) { + let userProfile = userProfiles[i] + + if (userProfile.tokenPowerSwitch === undefined) { continue } + if (userProfile.tokenPowerSwitch[programPropertyName] === undefined) { continue } + if (userProfile.tokenPowerSwitch[programPropertyName].payload === undefined) { continue } + + resetProgram(userProfile.tokenPowerSwitch[programPropertyName]) + } + for (let i = 0; i < userProfiles.length; i++) { + let userProfile = userProfiles[i] + + if (userProfile.tokenPowerSwitch === undefined) { continue } + if (userProfile.tokenPowerSwitch[programPropertyName] === undefined) { continue } + if (userProfile.tokenPowerSwitch[programPropertyName].payload === undefined) { continue } + + validateProgram(userProfile.tokenPowerSwitch[programPropertyName]) + } + for (let i = 0; i < userProfiles.length; i++) { + let userProfile = userProfiles[i] + + if (userProfile.tokenPowerSwitch === undefined) { continue } + if (userProfile.tokenPowerSwitch[programPropertyName] === undefined) { continue } + if (userProfile.tokenPowerSwitch[programPropertyName].payload === undefined) { continue } + if (userProfile.tokenPowerSwitch[programPropertyName].payload[programPropertyName].isActive === false) { continue } + + distributeProgram(userProfile.tokenPowerSwitch[programPropertyName]) + } + for (let i = 0; i < userProfiles.length; i++) { + let userProfile = userProfiles[i] + + if (userProfile.tokenPowerSwitch === undefined) { continue } + if (userProfile.tokenPowerSwitch[programPropertyName] === undefined) { continue } + if (userProfile.tokenPowerSwitch[programPropertyName].payload === undefined) { continue } + if (userProfile.tokenPowerSwitch[programPropertyName].payload[programPropertyName].isActive === false) { continue } + + calculateProgram(userProfile.tokenPowerSwitch[programPropertyName]) + } + + function resetProgram(node) { + if (node === undefined) { return } + if (node.payload === undefined) { return } + node.payload[programPropertyName] = { + bonusPower: 0, + bonus: { + tokens: 0, + percentage: 0 + } + } + } + + function validateProgram(node) { + /* + This program is not going to run unless the Profile has Tokens, and for + that users needs to execute the setup procedure of signing their Github + username with their private key. + */ + if ( + node.payload.parentNode.payload.parentNode.payload.blockchainTokens === undefined + ) { + node.payload[programPropertyName].isActive = false + node.payload.parentNode.payload.parentNode.payload.uiObject.setErrorMessage("You need to setup this profile with the Profile Constructor, to access the Token Power of your account at the Blockchain.") + return + } + } + + function distributeProgram(programNode) { + if (programNode === undefined || programNode.payload === undefined) { return } + /* + Here we will convert Token Power into Participation Power. + As per system rules Participation Powar = tokensPower + */ + let programPower = programNode.payload.tokenPower + programNode.payload[programPropertyName].bonusPower = programPower + + accumulatedProgramPower = accumulatedProgramPower + programPower + } + + function calculateProgram(programNode) { + /* + Here we will calculate which share of the Program Pool this user will get in tokens. + To do that, we use the bonusPower, to see which proportion of the accumulatedProgramPower + represents. + */ + if (programNode.payload === undefined) { return } + /* + If the accumulatedProgramPower is not grater the amount of tokens at the Program Pool, then + this user will get the exact amount of tokens from the pool as incomingPower he has. + + If the accumulatedProgramPower is grater the amount of tokens at the Program Pool, then + the amount ot tokens to be received is a proportional to the share of incomingPower in accumulatedProgramPower. + */ + let totalPowerRewardRatio = accumulatedProgramPower / programPoolTokenReward + if (totalPowerRewardRatio < 1) { totalPowerRewardRatio = 1 } + + if (programNode.tokensBonus === undefined || programNode.tokensBonus.payload === undefined) { + programNode.payload.uiObject.setErrorMessage("Tokens Bonus Node is needed in order for this Program to get Tokens from the Program Pool.") + return + } + programNode.payload[programPropertyName].bonus.tokens = programNode.payload[programPropertyName].bonusPower * totalPowerRewardRatio + + drawProgram(programNode) + } + + function drawProgram(node) { + if (node.tokensBonus !== undefined && node.tokensBonus.payload !== undefined) { + + const tokensBonusText = parseFloat(node.payload[programPropertyName].bonus.tokens.toFixed(2)).toLocaleString('en') + + node.tokensBonus.payload.uiObject.valueAngleOffset = 0 + node.tokensBonus.payload.uiObject.valueAtAngle = false + + node.tokensBonus.payload.uiObject.setValue(tokensBonusText + ' SA Tokens') + } + } + } +} \ No newline at end of file diff --git a/Projects/Governance/UI/Utilities/MandatoryProgram.js b/Projects/Governance/UI/Utilities/DecendentProgram.js similarity index 99% rename from Projects/Governance/UI/Utilities/MandatoryProgram.js rename to Projects/Governance/UI/Utilities/DecendentProgram.js index c063261de..da38b64ae 100644 --- a/Projects/Governance/UI/Utilities/MandatoryProgram.js +++ b/Projects/Governance/UI/Utilities/DecendentProgram.js @@ -9,7 +9,7 @@ function newFoundationsUtilitiesDecendentProgram() { pools, userProfiles, programPropertyName, - programName, + programCodeName, programNodeType, programPowerName, usersArrayPropertyName, @@ -18,7 +18,7 @@ function newFoundationsUtilitiesDecendentProgram() { /* Here we will store the total amount of tokens that is going to be distributed among all participants of the Program. This will come from a Pool that is configured wiht a codeName config property - with the value programName + with the value programCodeName */ let programPoolTokenReward /* @@ -32,7 +32,7 @@ function newFoundationsUtilitiesDecendentProgram() { /* Scan Pools Until finding the Mentoship-Program Pool */ for (let i = 0; i < pools.length; i++) { let poolsNode = pools[i] - programPoolTokenReward = UI.projects.governance.utilities.pools.findPool(poolsNode, programName) + programPoolTokenReward = UI.projects.governance.utilities.pools.findPool(poolsNode, programCodeName) } if (programPoolTokenReward === undefined || programPoolTokenReward === 0) { return } /* diff --git a/Projects/ProjectsSchema.json b/Projects/ProjectsSchema.json index caffc8ffb..9a134882c 100644 --- a/Projects/ProjectsSchema.json +++ b/Projects/ProjectsSchema.json @@ -1034,6 +1034,11 @@ "name": "Decendent Program", "propertyName": "decendentProgram", "functionName": "newFoundationsUtilitiesDecendentProgram" + }, + { + "name": "Bonus Program", + "propertyName": "bonusProgram", + "functionName": "newFoundationsUtilitiesBonusProgram" } ], "spaces": [