Governance Bug Fixed Not Finding Token Rewards when multiple Pools present at workspace

This commit is contained in:
Luis Fernando Molina committed 2021-08-01 12:31:56 +02:00
1 parent df523c7f3f
commit 9b8fc29991
13 files changed
+1325 -237

No files matched your search

@@ -70663,7 +70663,7 @@
"floatingObject": {
"isPinned": false,
"isFrozen": false,
"isCollapsed": false,
"isCollapsed": true,
"angleToParent": 2,
"distanceToParent": 3,
"arrangementStyle": 0
@@ -0,0 +1,123 @@
{
"type": "Assets",
"name": "Foundations-Project Plugins API-Data-Mines Rewards",
"config": "{\"codeName\":\"Foundations-Project-Plugins\"}",
"project": "Governance",
"assetClasses": [
{
"type": "Asset Class",
"name": "Plugins Rewards",
"config": "{\n \"folderPath\": \"Foundations/Plugins\"\n}",
"project": "Governance",
"assetClasses": [
{
"type": "Asset Class",
"name": "Data-Mines",
"config": "{\"codeName\":\"Data-Mines\"}",
"project": "Governance",
"assetClasses": [],
"assets": [
{
"type": "Asset",
"name": "API-Data-Mines wit Indicators, Plotters and Sample Workspace with Trading-System",
"config": "{}",
"project": "Governance",
"assetClasses": [],
"assets": [],
"id": "c39ab3e2-6525-4789-af1c-54b0cc095ef7",
"savedPayload": {
"position": {
"x": 25080.166666666668,
"y": 38515.81154239019
},
"targetPosition": {
"x": 25080.166666666668,
"y": 38215.81154239019
},
"floatingObject": {
"isPinned": false,
"isFrozen": false,
"isCollapsed": false,
"angleToParent": 2,
"distanceToParent": 3,
"arrangementStyle": 0
},
"uiObject": {
"isRunning": false
}
}
}
],
"id": "f738a3d2-9105-436e-ba39-a08f90be6bf7",
"savedPayload": {
"position": {
"x": 25080.166666666668,
"y": 38215.81154239019
},
"targetPosition": {
"x": 25080.166666666668,
"y": 37915.81154239019
},
"floatingObject": {
"isPinned": false,
"isFrozen": false,
"isCollapsed": false,
"angleToParent": 2,
"distanceToParent": 3,
"arrangementStyle": 0
},
"uiObject": {
"isRunning": false
}
}
}
],
"assets": [],
"id": "a50d7d18-bbdf-449b-8212-fcc72fdc9ff6",
"savedPayload": {
"position": {
"x": 25080.166666666668,
"y": 37915.81154239019
},
"targetPosition": {
"x": 25080.166666666668,
"y": 37615.81154239019
},
"floatingObject": {
"isPinned": false,
"isFrozen": false,
"isCollapsed": false,
"angleToParent": 2,
"distanceToParent": 3,
"arrangementStyle": 0
},
"uiObject": {
"isRunning": false
}
}
}
],
"assets": [],
"id": "4e1ff7bb-dc41-42c7-8ca6-552a9521d4f4",
"savedPayload": {
"position": {
"x": 25080.166666666668,
"y": 37615.81154239019
},
"targetPosition": {
"x": 25080.166666666668,
"y": 37615.81154239019
},
"floatingObject": {
"isPinned": false,
"isFrozen": false,
"isCollapsed": false,
"angleToParent": 2,
"distanceToParent": 3,
"arrangementStyle": 0
},
"uiObject": {
"isRunning": false
}
}
}
@@ -0,0 +1,123 @@
{
"type": "Assets",
"name": "Foundations-Project Plugins Data-Mines Rewards",
"config": "{\"codeName\":\"Foundations-Project-Plugins\"}",
"project": "Governance",
"assetClasses": [
{
"type": "Asset Class",
"name": "Plugins Rewards",
"config": "{\n \"folderPath\": \"Foundations/Plugins\"\n}",
"project": "Governance",
"assetClasses": [
{
"type": "Asset Class",
"name": "Data-Mines",
"config": "{\"codeName\":\"Data-Mines\"}",
"project": "Governance",
"assetClasses": [],
"assets": [
{
"type": "Asset",
"name": "Data Mines wit Indicators, Plotters and Sample Workspace with Trading-System ",
"config": "{}",
"project": "Governance",
"assetClasses": [],
"assets": [],
"id": "fb57cfb4-a688-4521-8fb0-7f329484b902",
"savedPayload": {
"position": {
"x": 19313.166666666668,
"y": 38525.31154239019
},
"targetPosition": {
"x": 19313.166666666668,
"y": 38225.31154239019
},
"floatingObject": {
"isPinned": false,
"isFrozen": false,
"isCollapsed": false,
"angleToParent": 2,
"distanceToParent": 3,
"arrangementStyle": 0
},
"uiObject": {
"isRunning": false
}
}
}
],
"id": "f60b754f-83b7-4d54-9daa-99888b805e1a",
"savedPayload": {
"position": {
"x": 19313.166666666668,
"y": 38225.31154239019
},
"targetPosition": {
"x": 19313.166666666668,
"y": 37925.31154239019
},
"floatingObject": {
"isPinned": false,
"isFrozen": false,
"isCollapsed": false,
"angleToParent": 2,
"distanceToParent": 3,
"arrangementStyle": 0
},
"uiObject": {
"isRunning": false
}
}
}
],
"assets": [],
"id": "8742112d-7227-4678-a435-bf11956c0b54",
"savedPayload": {
"position": {
"x": 19313.166666666668,
"y": 37925.31154239019
},
"targetPosition": {
"x": 19313.166666666668,
"y": 37625.31154239019
},
"floatingObject": {
"isPinned": false,
"isFrozen": false,
"isCollapsed": false,
"angleToParent": 2,
"distanceToParent": 3,
"arrangementStyle": 0
},
"uiObject": {
"isRunning": false
}
}
}
],
"assets": [],
"id": "cfc85fed-e63c-4a02-9d25-f7bacec173d4",
"savedPayload": {
"position": {
"x": 19313.166666666668,
"y": 37625.31154239019
},
"targetPosition": {
"x": 19313.166666666668,
"y": 37625.31154239019
},
"floatingObject": {
"isPinned": false,
"isFrozen": false,
"isCollapsed": false,
"angleToParent": 2,
"distanceToParent": 3,
"arrangementStyle": 0
},
"uiObject": {
"isRunning": false
}
}
}
@@ -0,0 +1,123 @@
{
"type": "Assets",
"name": "Foundations-Project Plugins Trading-Systems Rewards",
"config": "{\"codeName\":\"Foundations-Project-Plugins\"}",
"project": "Governance",
"assetClasses": [
{
"type": "Asset Class",
"name": "Plugins Rewards",
"config": "{\n \"folderPath\": \"Foundations/Plugins\"\n}",
"project": "Governance",
"assetClasses": [
{
"type": "Asset Class",
"name": "Trading-Systems",
"config": "{\"codeName\":\"Trading-Systems\"}",
"project": "Governance",
"assetClasses": [],
"assets": [
{
"type": "Asset",
"name": "Elaborated Plug & Play Trading System",
"config": "{\n }",
"project": "Governance",
"assetClasses": [],
"assets": [],
"id": "67730415-7d0a-493a-a3ff-bc2683e97cad",
"savedPayload": {
"position": {
"x": 13518.166666666668,
"y": 38507.31154239019
},
"targetPosition": {
"x": 13518.166666666668,
"y": 38207.31154239019
},
"floatingObject": {
"isPinned": false,
"isFrozen": false,
"isCollapsed": false,
"angleToParent": 2,
"distanceToParent": 3,
"arrangementStyle": 0
},
"uiObject": {
"isRunning": false
}
}
}
],
"id": "3bd41614-ce3e-4866-bf2c-08161eb22cd3",
"savedPayload": {
"position": {
"x": 13518.166666666668,
"y": 38207.31154239019
},
"targetPosition": {
"x": 13518.166666666668,
"y": 37907.31154239019
},
"floatingObject": {
"isPinned": false,
"isFrozen": false,
"isCollapsed": false,
"angleToParent": 2,
"distanceToParent": 3,
"arrangementStyle": 0
},
"uiObject": {
"isRunning": false
}
}
}
],
"assets": [],
"id": "b23b34d1-a935-49d1-b507-503b9b4838bb",
"savedPayload": {
"position": {
"x": 13518.166666666668,
"y": 37907.31154239019
},
"targetPosition": {
"x": 13518.166666666668,
"y": 37607.31154239019
},
"floatingObject": {
"isPinned": false,
"isFrozen": false,
"isCollapsed": false,
"angleToParent": 2,
"distanceToParent": 3,
"arrangementStyle": 0
},
"uiObject": {
"isRunning": false
}
}
}
],
"assets": [],
"id": "519d2386-ccef-4e6c-af91-9169fc2a4a6f",
"savedPayload": {
"position": {
"x": 13518.166666666668,
"y": 37607.31154239019
},
"targetPosition": {
"x": 13518.166666666668,
"y": 37607.31154239019
},
"floatingObject": {
"isPinned": false,
"isFrozen": false,
"isCollapsed": false,
"angleToParent": 2,
"distanceToParent": 3,
"arrangementStyle": 0
},
"uiObject": {
"isRunning": false
}
}
}
@@ -118,8 +118,8 @@
"id": "c3dbcb43-d981-45e7-b92a-6f6af5180592",
"savedPayload": {
"position": {
"x": 19816.001851143188,
"y": 46548.44535202786
"x": 19807.837132668446,
"y": 46539.95354133178
},
"targetPosition": {
"x": 19595.705098312483,
@@ -148,8 +148,8 @@
"id": "e1f53501-bbce-4075-a6cd-e6a8eb61f2a0",
"savedPayload": {
"position": {
"x": 19851.49714761871,
"y": 46595.336006272955
"x": 19838.410196624965,
"y": 46575.75
},
"targetPosition": {
"x": 19595.705098312483,
@@ -178,8 +178,8 @@
"id": "1626d693-5206-484e-b0fd-30d598d3d138",
"savedPayload": {
"position": {
"x": 19877.162499089227,
"y": 46648.25045856449
"x": 19863.007055568993,
"y": 46615.88842576588
},
"targetPosition": {
"x": 19595.705098312483,
@@ -208,8 +208,8 @@
"id": "212b2b4b-a234-4b58-abf4-0cd16e8ced05",
"savedPayload": {
"position": {
"x": 19892.011600491023,
"y": 46705.15523617568
"x": 19881.022053201028,
"y": 46659.380477375256
},
"targetPosition": {
"x": 19595.705098312483,
@@ -238,8 +238,8 @@
"id": "e49df7d9-ee09-4f47-8f71-abf29d588420",
"savedPayload": {
"position": {
"x": 19895.4738091847,
"y": 46763.86352041546
"x": 19892.011600491023,
"y": 46705.15523617568
},
"targetPosition": {
"x": 19595.705098312483,
@@ -268,8 +268,8 @@
"id": "c1574672-0a07-4821-8a6e-642d39d20d11",
"savedPayload": {
"position": {
"x": 19887.416074431785,
"y": 46822.119184844516
"x": 19895.705098312483,
"y": 46752.08557568774
},
"targetPosition": {
"x": 19595.705098312483,
@@ -298,8 +298,8 @@
"id": "9dd0804a-91ad-4160-8288-139c6d78a094",
"savedPayload": {
"position": {
"x": 19868.148050460008,
"y": 46877.68349694897
"x": 19892.011600491023,
"y": 46799.01591519981
},
"targetPosition": {
"x": 19595.705098312483,
@@ -328,8 +328,8 @@
"id": "e70ea49a-419b-4838-a82a-af934368d53e",
"savedPayload": {
"position": {
"x": 19838.410196624965,
"y": 46928.421151375485
"x": 19881.022053201028,
"y": 46844.79067400023
},
"targetPosition": {
"x": 19595.705098312483,
@@ -358,8 +358,8 @@
"id": "f3e6edf8-b21a-4489-923c-b7b3efa77620",
"savedPayload": {
"position": {
"x": 19799.345321972367,
"y": 46972.38232851845
"x": 19863.007055568993,
"y": 46888.282725609606
},
"targetPosition": {
"x": 19595.705098312483,
@@ -388,8 +388,8 @@
"id": "f99ac562-4315-46f7-9466-6a2578925bea",
"savedPayload": {
"position": {
"x": 19752.454667727266,
"y": 47007.87762499397
"x": 19838.410196624965,
"y": 46928.421151375485
},
"targetPosition": {
"x": 19595.705098312483,
@@ -418,8 +418,8 @@
"id": "a5d80050-4ed3-45a3-aebc-9d3fae8bf015",
"savedPayload": {
"position": {
"x": 19699.54021543573,
"y": 47033.54297646449
"x": 19807.837132668446,
"y": 46964.21761004371
},
"targetPosition": {
"x": 19595.705098312483,
@@ -448,8 +448,8 @@
"id": "d23538f8-26ee-4ac0-9919-59678206ba6f",
"savedPayload": {
"position": {
"x": 19642.635437824552,
"y": 47048.39207786629
"x": 19772.040674000225,
"y": 46994.79067400023
},
"targetPosition": {
"x": 19595.705098312483,
@@ -478,8 +478,8 @@
"id": "b92aa988-21d0-4a01-996a-5e3aa4fe24b4",
"savedPayload": {
"position": {
"x": 19583.927153584762,
"y": 47051.85428655996
"x": 19731.902248234346,
"y": 47019.38753294425
},
"targetPosition": {
"x": 19595.705098312483,
@@ -508,8 +508,8 @@
"id": "3199d2fd-f090-4307-b43e-285bc174ff0f",
"savedPayload": {
"position": {
"x": 19525.67148915571,
"y": 47043.79655180705
"x": 19688.410196624965,
"y": 47037.40253057629
},
"targetPosition": {
"x": 19595.705098312483,
@@ -538,8 +538,128 @@
"id": "3f0c0152-1777-4773-8592-3b3d826066f7",
"savedPayload": {
"position": {
"x": 19470.107177051254,
"y": 47024.52852783527
"x": 19642.635437824552,
"y": 47048.39207786629
},
"targetPosition": {
"x": 19595.705098312483,
"y": 46752.08557568774
},
"floatingObject": {
"isPinned": false,
"isFrozen": false,
"isCollapsed": false,
"angleToParent": 2,
"distanceToParent": 3,
"arrangementStyle": 0
},
"uiObject": {
"isRunning": false
}
}
},
{
"type": "Asset",
"name": "Barcelona.json",
"config": "{\"codeName\":\"Barcelona.json\"}",
"project": "Governance",
"assetClasses": [],
"assets": [],
"id": "469377ea-5761-4b65-bb43-6e286832f53e",
"savedPayload": {
"position": {
"x": 19595.705098312483,
"y": 47052.08557568774
},
"targetPosition": {
"x": 19595.705098312483,
"y": 46752.08557568774
},
"floatingObject": {
"isPinned": false,
"isFrozen": false,
"isCollapsed": false,
"angleToParent": 2,
"distanceToParent": 3,
"arrangementStyle": 0
},
"uiObject": {
"isRunning": false
}
}
},
{
"type": "Asset",
"name": "Heikin.json",
"config": "{\"codeName\":\"Heikin.json\"}",
"project": "Governance",
"assetClasses": [],
"assets": [],
"id": "1fff7f0d-be90-4d8b-9b69-7784d15c60c2",
"savedPayload": {
"position": {
"x": 19548.774758800413,
"y": 47048.39207786629
},
"targetPosition": {
"x": 19595.705098312483,
"y": 46752.08557568774
},
"floatingObject": {
"isPinned": false,
"isFrozen": false,
"isCollapsed": false,
"angleToParent": 2,
"distanceToParent": 3,
"arrangementStyle": 0
},
"uiObject": {
"isRunning": false
}
}
},
{
"type": "Asset",
"name": "Indicator-Add-ons.json",
"config": "{\"codeName\":\"Indicator-Add-ons.json\"}",
"project": "Governance",
"assetClasses": [],
"assets": [],
"id": "57bafbea-3fed-4081-a8e9-76ec9f8cbf04",
"savedPayload": {
"position": {
"x": 19503,
"y": 47037.40253057629
},
"targetPosition": {
"x": 19595.705098312483,
"y": 46752.08557568774
},
"floatingObject": {
"isPinned": false,
"isFrozen": false,
"isCollapsed": false,
"angleToParent": 2,
"distanceToParent": 3,
"arrangementStyle": 0
},
"uiObject": {
"isRunning": false
}
}
},
{
"type": "Asset",
"name": "Quasar.json",
"config": "{\"codeName\":\"Quasar.json\"}",
"project": "Governance",
"assetClasses": [],
"assets": [],
"id": "f0b452b5-45fb-487a-a725-705325d075e3",
"savedPayload": {
"position": {
"x": 19459.50794839062,
"y": 47019.38753294425
},
"targetPosition": {
"x": 19595.705098312483,
@@ -983,6 +1103,36 @@
"isRunning": false
}
}
},
{
"type": "Asset",
"name": "LiveTester-Chart-Scanner.json",
"config": "{\"codeName\":\"LiveTester-Chart-Scanner.json\"}",
"project": "Governance",
"assetClasses": [],
"assets": [],
"id": "790140ed-8794-46c1-8f28-522b5b49529e",
"savedPayload": {
"position": {
"x": 19036.294901687517,
"y": 46824.08557568774
},
"targetPosition": {
"x": 19110.294901687517,
"y": 46752.08557568774
},
"floatingObject": {
"isPinned": false,
"isFrozen": false,
"isCollapsed": false,
"angleToParent": 2,
"distanceToParent": 3,
"arrangementStyle": 0
},
"uiObject": {
"isRunning": false
}
}
}
],
"id": "fe941ab2-b0ab-40eb-9f65-d0e874a0ae24",
@@ -817,7 +817,7 @@
"floatingObject": {
"isPinned": false,
"isFrozen": false,
"isCollapsed": false,
"isCollapsed": true,
"angleToParent": 1,
"distanceToParent": 3,
"arrangementStyle": 0
@@ -1050,8 +1050,8 @@
},
"referenceParent": {
"type": "Assets",
"name": "Foundations-Project-Plugins",
"id": "821486a9-5ad1-44a7-bf61-6fc3ef1b72c6"
"name": "Foundations-Project Plugins Data-Mines Rewards",
"id": "cfc85fed-e63c-4a02-9d25-f7bacec173d4"
}
}
},
@@ -1082,6 +1082,11 @@
},
"uiObject": {
"isRunning": false
},
"referenceParent": {
"type": "Assets",
"name": "Foundations-Project Plugins Trading-Systems Rewards",
"id": "519d2386-ccef-4e6c-af91-9169fc2a4a6f"
}
}
},
@@ -1112,6 +1117,11 @@
},
"uiObject": {
"isRunning": false
},
"referenceParent": {
"type": "Assets",
"name": "Foundations-Project Plugins API-Data-Mines Rewards",
"id": "4e1ff7bb-dc41-42c7-8ca6-552a9521d4f4"
}
}
}
@@ -1129,7 +1139,7 @@
"floatingObject": {
"isPinned": false,
"isFrozen": false,
"isCollapsed": true,
"isCollapsed": false,
"angleToParent": 1,
"distanceToParent": 3,
"arrangementStyle": 0
@@ -1436,7 +1446,7 @@
"floatingObject": {
"isPinned": false,
"isFrozen": false,
"isCollapsed": false,
"isCollapsed": true,
"angleToParent": 1,
"distanceToParent": 3,
"arrangementStyle": 0
@@ -1799,7 +1809,7 @@
},
"referenceParent": {
"type": "Positions",
"name": "Superalgos",
"name": "Foundations-Project",
"id": "50c68665-5da2-48a8-b229-7a1563ae82d2"
}
}
@@ -1931,7 +1941,7 @@
},
"referenceParent": {
"type": "Features",
"name": "Superalgos",
"name": "Foundations-Project",
"id": "1d2c1985-c762-4ece-b350-15bd893bd1f4"
}
}
File diff suppressed because it is too large. Load diff
@@ -17,10 +17,11 @@ function newGovernanceFunctionLibraryAirdropProgram() {
*/
let accumulatedProgramPower = 0
/* Scan Pools Until finding the Mentoship-Program Pool */
/* 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, "Airdrop-Rewards")
if (programPoolTokenReward !== undefined) { break }
}
if (programPoolTokenReward === undefined || programPoolTokenReward === 0) { return }
@@ -17,10 +17,11 @@ function newGovernanceFunctionLibraryGithubProgram() {
*/
let accumulatedProgramPower = 0
/* Scan Pools Until finding the Mentoship-Program Pool */
/* 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, "Github-Rewards")
if (programPoolTokenReward !== undefined) { break }
}
if (programPoolTokenReward === undefined || programPoolTokenReward === 0) { return }
@@ -17,10 +17,11 @@ function newGovernanceFunctionLibraryStakingProgram() {
*/
let accumulatedProgramPower = 0
/* Scan Pools Until finding the Mentoship-Program Pool */
/* 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, "Staking-Rewards")
if (programPoolTokenReward !== undefined) { break }
}
if (programPoolTokenReward === undefined || programPoolTokenReward === 0) { return }
@@ -20,10 +20,11 @@ function newGovernanceUtilitiesBonusProgram() {
*/
let accumulatedProgramPower = 0
/* Scan Pools Until finding the Mentoship-Program Pool */
/* 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, programCodeName)
if (programPoolTokenReward !== undefined) { break }
}
if (programPoolTokenReward === undefined || programPoolTokenReward === 0) { return }
@@ -113,7 +114,7 @@ function newGovernanceUtilitiesBonusProgram() {
be used to compute Bonuses.
*/
programNode.payload[programPropertyName].bonusPower = programNode.payload[programPropertyName].usedPower | 0
accumulatedProgramPower = accumulatedProgramPower + programNode.payload[programPropertyName].bonusPower
accumulatedProgramPower = accumulatedProgramPower + programNode.payload[programPropertyName].bonusPower
}
function calculateProgram(programNode) {
@@ -35,10 +35,11 @@ function newGovernanceUtilitiesDecendentProgram() {
*/
let accumulatedIncomingProgramPower = 0
/* Scan Pools Until finding the Mentoship-Program Pool */
/* 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, programCodeName)
if (programPoolTokenReward !== undefined) { break }
}
if (programPoolTokenReward === undefined || programPoolTokenReward === 0) { return }
/*
@@ -15,6 +15,7 @@ function newGovernanceUtilitiesPools() {
function findTokensAtPool(node, codeNameToFind) {
if (node === undefined) { return }
if (node.payload === undefined) { return }
if (tokens !== undefined) { return }
/*
This function allows us to find a Pool within a Pool hierarchy that
has a give codeName config property.