Merge branch 'develop' of https://github.com/Smidy13/Superalgos into develop
This commit is contained in:
commit
a5d1ed4dec
71 files changed
+82364
-814
No files matched your search
@@ -32,7 +32,8 @@
|
|||||||
} catch (e) { console.error('CJ protection', e) }
|
} catch (e) { console.error('CJ protection', e) }
|
||||||
|
|
||||||
try {
|
try {
|
||||||
loadSuperalgos();
|
drawSplashText()
|
||||||
|
loadSuperalgos()
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.log("[ERROR] UI can not be started. Please check that WebServer is running.", err);
|
console.log("[ERROR] UI can not be started. Please check that WebServer is running.", err);
|
||||||
}
|
}
|
||||||
@@ -48,21 +49,72 @@
|
|||||||
console.log('Error Resizing. ' + err.stack)
|
console.log('Error Resizing. ' + err.stack)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function drawSplashText() {
|
||||||
|
const splashTextArray = [
|
||||||
|
{
|
||||||
|
"splashTextLine1Html": 'Superalgos is <span class="credits-red">open source</span>, <span class="credits-red">forever free</span> for <span class="credits-red">everyone</span>, and is <spanclass="credits-red">constantly improving</span> thanks to the involvement of contributors:'
|
||||||
|
,
|
||||||
|
"splashTextLine2Html": 'Luis Fernando Molina, Julian Molina, Andreja Cobeljic, Ira Miller, matbenitez, bearcanrun, nikolabjelo, 9808us, pmmax, suttridge, Basalt09, Mhnramin, 0xperez, infin1t3, benitezme, whtv, cozed-gh, Eduardo678-dotcom, Smidy13, teehanming, 64bittuning, joenij, apronotti, Noeljarillo, ssplatt, rico4dev, DougJCook, mane, Cordo-van-Saviour, CarnivalBen, Sil3ntLight, pisukesoramame, Edodi, harrellbm, CaptainJeff, Jeff Braun, Francisco J. Santillán, Norman, Viktoria B., Guillermo V., Daniel J., Javier A., Gustavo J., Romina GS, Pedro P., Thais M., Andrey M., Loui M., Natalia, M., Bashar A., Carlos V., Diego M., Sebastian E., Bogdan P., Marko V., Igor S., Niksa K., Rodrigo M., Nicanor M., Mateo H., Lan T., Leon A., Uroš R., Filip M., Vladimir J. and Pavle B.'
|
||||||
|
,
|
||||||
|
"splashTextLine3Html": 'Please, <span class="credits-red">give a star to the Superalgos repo at GitHub.com...</span> It helps other devs find the project!'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"splashTextLine1Html": 'Superalgos is a Community of <span class="credits-red">Algo-Traders</span>, sharing knoleadge, experience and tools between each other.'
|
||||||
|
,
|
||||||
|
"splashTextLine2Html": 'The Superalgos Community is capable of collective bargaining with Crypto Exchanges to get better trading fees for all members.'
|
||||||
|
,
|
||||||
|
"splashTextLine3Html": 'Become part of the <span class="credits-red">Superalgos Community</span> by making a small contribution to the open source project!'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"splashTextLine1Html": 'Superalgos is built on <span class="credits-red">Core Values</span> that we are never going to change.'
|
||||||
|
,
|
||||||
|
"splashTextLine2Html": 'Superalgos software <span class="credits-red">does not include Ads</span> of any kind, and it will never do it. Superalgos software <span class="credits-red">does not collect user information</span> of any kind, and it will never do it. Superalgos software <span class="credits-red">is Free of Charge</span> for all community members, and it will allways be. We value <span class="credits-red">Education</span> that is why we build into the software educational tools and content.'
|
||||||
|
,
|
||||||
|
"splashTextLine3Html": 'We build this together and it belongs to us. Become part of the <span class="credits-red">Superalgos Community</span> by making a small contribution to the open source project!'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"splashTextLine1Html": 'Superalgos is <span class="credits-red">Permissionless</span>. Don\'t like the UI? Don\'t like the icons used? Don\'t like the Charting System? Don\'t like the Visual Designer? Don\'t like the Visual Debugger? Don\'t like the Docs? Don\'t like the Trading Bot? Don\'t like the Indicators? Don\'t like the Plotters? Don\'t like any other part of the system?'
|
||||||
|
,
|
||||||
|
"splashTextLine2Html": 'No problem, code or integrate libraries with your own version of any component and we promise we will merge your work and provide it as an alternative to users. We believe in <span class="credits-red">Permissionless Innovation</span> and that users, not team members, are the final judges and the ones who decide what they prefer to use. You are free to create an alternative for any part of the system that you believe that should work or should have been done in a different way. We will help you integrate your vision into the next release and enable a way for users to choose between different implementations of the same functionality. You will also be granted the title of maintainer of the functionality you provide and have decision power on how it evolves in the future.'
|
||||||
|
,
|
||||||
|
"splashTextLine3Html": 'We are strong belieavers in <span class="credits-red">Permissionless Innovation</span>. You don\'t need to ask for permission to become one of us. Make a small contribution to the open source project and you will become a member of the <span class="credits-red">Superalgos Community</span>'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"splashTextLine1Html": 'Would you like to join the <span class="credits-red">Superalgos\'s Developer Team</span>?.'
|
||||||
|
,
|
||||||
|
"splashTextLine2Html": 'Just look around, find something that is missing and start coding it. If you need help ask at the chat groups. If the feature you want to add is big or difficult to integrate, look for a mentor to help you out.'
|
||||||
|
,
|
||||||
|
"splashTextLine3Html": 'If Bitcoin\'s motto is <span class="credits-red">Don\'t trust. Verify.</span>, ours is: <span class="credits-red">Just code it.</span>'
|
||||||
|
}
|
||||||
|
]
|
||||||
|
|
||||||
|
let arrayIndex = Math.trunc(Math.random() * splashTextArray.length)
|
||||||
|
let splashTextElement
|
||||||
|
splashTextElement = document.getElementById('splash-text-line-1')
|
||||||
|
splashTextElement.innerHTML = splashTextArray[arrayIndex].splashTextLine1Html
|
||||||
|
splashTextElement = document.getElementById('splash-text-line-2')
|
||||||
|
splashTextElement.innerHTML = splashTextArray[arrayIndex].splashTextLine2Html
|
||||||
|
splashTextElement = document.getElementById('splash-text-line-3')
|
||||||
|
splashTextElement.innerHTML = splashTextArray[arrayIndex].splashTextLine3Html
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body id="body" onload="loadCanvas()"
|
<body id="body" onload="loadCanvas()"
|
||||||
style="overflow:hidden; background: url(Images/superalgos-platform.jpg); background-size: cover;"
|
style="overflow:hidden; background: url(Images/superalgos-platform.jpg); background-size: cover;"
|
||||||
onresize="onResize()">
|
onresize="onResize()">
|
||||||
<div id="contributors" class="credits">
|
<div id="splash-text" class="credits">
|
||||||
<p style="font-size: 120%;">Superalgos is <span class="credits-red">open source</span>, <span class="credits-red">forever free</span> for <span class="credits-red">everyone</span>, and is <span class="credits-red">constantly improving</span> thanks to the involvement of contributors:</p>
|
<p id="splash-text-line-1" style="font-size: 120%;"></p>
|
||||||
<p style="font-size: 100%;">Luis Fernando Molina, Julian Molina, Andreja Cobeljic, Ira Miller, matbenitez, bearcanrun, nikolabjelo, 9808us, pmmax, suttridge, Basalt09, Mhnramin, 0xperez, infin1t3, benitezme, whtv, cozed-gh, Eduardo678-dotcom, Smidy13, teehanming, 64bittuning, joenij, apronotti, Noeljarillo, ssplatt, rico4dev, DougJCook, mane, Cordo-van-Saviour, CarnivalBen, Sil3ntLight, pisukesoramame, Edodi, harrellbm, CaptainJeff, Jeff Braun, Francisco J. Santillán, Norman, Viktoria B., Guillermo V., Daniel J., Javier A., Gustavo J., Romina GS, Pedro P., Thais M., Andrey M., Loui M., Natalia M., Bashar A., Carlos V., Diego M., Sebastian E., Bogdan P., Marko V., Igor S., Niksa K., Rodrigo M., Nicanor M., Mateo H., Lan T., Leon A., Uroš R., Filip M., Vladimir J. and Pavle B.</p>
|
<p id="splash-text-line-2" style="font-size: 120%;"></p>
|
||||||
<p style="font-size: 120%;">Please, <span class="credits-red">give a star to the Superalgos repo at GitHub.com...</span> It helps other devs find the project!</p>
|
<p id="splash-text-line-3" style="font-size: 120%;"></p>
|
||||||
<p id="credits-page-status-paragraph" class="credits-yellow">The UI is loading...</p>
|
<p id="splash-text-status-paragraph" class="credits-yellow">The UI is loading...</p>
|
||||||
</div>
|
</div>
|
||||||
<div id="masterApp"></div>
|
<div id="masterApp"></div>
|
||||||
<div id="canvasApp"></div>
|
<div id="canvasApp"></div>
|
||||||
<div id="docs-space-div" class="docs-page" style="position:fixed; top:100000px; left:100000px"><div id="docs-content-div"></div></div>
|
<div id="docs-space-div" class="docs-page" style="position:fixed; top:100000px; left:100000px">
|
||||||
|
<div id="docs-content-div"></div>
|
||||||
|
</div>
|
||||||
<div id="chatApp" style="position:fixed; top:100000px; left:100000px">
|
<div id="chatApp" style="position:fixed; top:100000px; left:100000px">
|
||||||
<iframe id="chatIFrame" style="border:none; " height="2000" width="900"></iframe>
|
<iframe id="chatIFrame" style="border:none; " height="2000" width="900"></iframe>
|
||||||
</div>
|
</div>
|
||||||
@@ -196,4 +248,4 @@
|
|||||||
|
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
@@ -223,10 +223,7 @@ exports.newWeb3Server = function newWeb3Server() {
|
|||||||
|
|
||||||
async function recoverAddress(signature) {
|
async function recoverAddress(signature) {
|
||||||
try {
|
try {
|
||||||
|
|
||||||
console.log("STRING:", signature)
|
|
||||||
let signatureObject = JSON.parse(signature)
|
let signatureObject = JSON.parse(signature)
|
||||||
console.log("OBJECT:", signatureObject)
|
|
||||||
let web3 = new Web3()
|
let web3 = new Web3()
|
||||||
let address = web3.eth.accounts.recover(signatureObject)
|
let address = web3.eth.accounts.recover(signatureObject)
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,69 @@
|
|||||||
|
const { execSync } = require("child_process");
|
||||||
|
const os = require("os");
|
||||||
|
|
||||||
|
// Minimum versions required
|
||||||
|
const npmNeededVersion = '5'
|
||||||
|
const nodeNeededVersion = '12'
|
||||||
|
const gitNeededVersion = '2'
|
||||||
|
|
||||||
|
function systemCheck () {
|
||||||
|
try {
|
||||||
|
|
||||||
|
// Gather Installed Versions of Node, NPM and Git
|
||||||
|
const npmVersionRaw = execSync( "npm -v",{ encoding: 'utf8', timeout: 30000 })
|
||||||
|
const nodeVersionRaw = execSync( "node -v",{ encoding: 'utf8',timeout: 30000 })
|
||||||
|
const gitVersionRaw = execSync( "git --version",{ encoding: 'utf8',timeout: 30000 })
|
||||||
|
const npmVersion = npmVersionRaw.trim().split('.')
|
||||||
|
const nodeVersion = nodeVersionRaw.trim().substring(1).split('.')
|
||||||
|
const gitVersion = gitVersionRaw.trim().split(' ')[2].split('.')
|
||||||
|
|
||||||
|
// Make sure update version of npm is installed
|
||||||
|
if ( npmVersion[0] < npmNeededVersion ) {
|
||||||
|
console.log('');
|
||||||
|
console.log("ERROR: the version of npm you have installed is out of date. Please update your installation of npm and try again.");
|
||||||
|
console.log('');
|
||||||
|
process.exit();
|
||||||
|
}
|
||||||
|
|
||||||
|
// Make sure update version of node is installed
|
||||||
|
if ( nodeVersion[0] < nodeNeededVersion ) {
|
||||||
|
console.log('');
|
||||||
|
console.log("ERROR: the version of node you have installed is out of date. Please update your installation of node and try again.");
|
||||||
|
console.log('');
|
||||||
|
process.exit();
|
||||||
|
}
|
||||||
|
|
||||||
|
// Make sure updated version of git is installed
|
||||||
|
if ( gitVersion[0] < gitNeededVersion ) {
|
||||||
|
console.log('');
|
||||||
|
console.log("ERROR: the version of git you have installed is out of date. Please update your installation of git and try again.");
|
||||||
|
console.log('');
|
||||||
|
process.exit();
|
||||||
|
}
|
||||||
|
|
||||||
|
// Check windows system
|
||||||
|
if (os.platform() == "win32") {
|
||||||
|
|
||||||
|
// Verify C:\Windows\System32 is on the windows PATH
|
||||||
|
const path = execSync( "echo %PATH%",{ encoding: 'utf8',timeout: 30000 })
|
||||||
|
let check = path.includes('System32')
|
||||||
|
if ( check === false ) {
|
||||||
|
console.log('');
|
||||||
|
console.log("ERROR: it appears C:\\Windows\\System32 is missing from your PATH. Please add to your path and try again.");
|
||||||
|
console.log('');
|
||||||
|
process.exit();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
} catch (error) {
|
||||||
|
console.log('');
|
||||||
|
console.log("There was an error with your system: ");
|
||||||
|
console.log('');
|
||||||
|
console.log( error );
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
module.exports = systemCheck
|
||||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Binary file not shown.
|
After Width: | Height: | Size: 17 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 17 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 11 KiB |
File renamed without changes.
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
@@ -1 +1 @@
|
|||||||
{"type":"Data Mine","name":"Sparta","config":"{\n\"codeName\": \"Sparta\"\n}","project":"Foundations","sensorBots":[],"indicatorBots":[{"type":"Indicator Bot","name":"Simple Moving Average (SMA)","config":"{\n\"codeName\": \"SMA\"\n}","project":"Foundations","processes":[{"type":"Process Definition","name":"Multi-Time-Frame-Market","config":"{\n \"codeName\": \"Multi-Time-Frame-Market\",\n \"description\": \"Calculates SMAs for Time Frames of 01-hs and above.\",\n \"deadWaitTime\": 0,\n \"normalWaitTime\": 0,\n \"retryWaitTime\": 10000,\n \"sleepWaitTime\": 3600000,\n \"comaWaitTime\": 86400000,\n \"framework\": {\n \"name\": \"Multi-Time-Frame-Market\"\n }\n }","project":"Foundations","processOutput":{"type":"Process Output","name":"New Process Output","project":"Foundations","outputDatasets":[{"type":"Output Dataset","name":"Multi-Time-Frame-Market Popular SMAs","project":"Foundations","id":"5302effb-1f09-4a30-9f71-6956b8b9ca88","savedPayload":{"position":{"x":10609.044651705652,"y":17428.90566641547},"targetPosition":{"x":10995.890269605332,"y":17540.32974347027},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":3,"distanceToParent":3,"arrangementStyle":0},"uiObject":{},"referenceParent":{"type":"Dataset Definition","name":"Multi-Time-Frame-Market","id":"3b21f9d7-2cbc-4c23-80c8-cc5e5b06a22c"}}},{"type":"Output Dataset","name":"Multi-Time-Frame-Market Base11 SMAs","project":"Foundations","id":"8221593c-6298-4b4c-bfc2-cffbc9e5cd0f","savedPayload":{"position":{"x":10652.515125452519,"y":17324.96443352291},"targetPosition":{"x":10995.890269605332,"y":17540.32974347027},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":3,"distanceToParent":3,"arrangementStyle":0},"uiObject":{},"referenceParent":{"type":"Dataset Definition","name":"Multi-Time-Frame-Market","id":"af9b9cef-2a74-486f-b79e-047d68669a1f"}}},{"type":"Output Dataset","name":"Multi-Time-Frame-Market Base7 SMAs","project":"Foundations","id":"aabd0857-b4fc-404a-8967-967475ed3993","savedPayload":{"position":{"x":10721.675023375876,"y":17240.07387795538},"targetPosition":{"x":10995.890269605332,"y":17540.32974347027},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":3,"distanceToParent":3,"arrangementStyle":0},"uiObject":{},"referenceParent":{"type":"Dataset Definition","name":"Multi-Time-Frame-Market","id":"78a6ef37-4df8-4ac8-83a0-c9a732467c59"}}},{"type":"Output Dataset","name":"Multi-Time-Frame-Market Base6 SMAs","project":"Foundations","id":"dd00a77a-761e-404b-9e44-627335668112","savedPayload":{"position":{"x":10809.956405495142,"y":17178.031642194932},"targetPosition":{"x":10995.890269605332,"y":17540.32974347027},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":3,"distanceToParent":3,"arrangementStyle":0},"uiObject":{},"referenceParent":{"type":"Dataset Definition","name":"Multi-Time-Frame-Market","id":"c0862b3d-d35a-4d3e-8d80-258b8a01c37c"}}},{"type":"Output Dataset","name":"Multi-Time-Frame-Market Base5 SMAs","project":"Foundations","id":"b6426833-d2c7-4300-b610-801e12a7edfd","savedPayload":{"position":{"x":10936.584878620257,"y":17141.406608785455},"targetPosition":{"x":10995.890269605332,"y":17540.32974347027},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":3,"distanceToParent":3,"arrangementStyle":0},"uiObject":{},"referenceParent":{"type":"Dataset Definition","name":"Multi-Time-Frame-Market","id":"a5d28568-fb58-469a-9820-b9f0e8eab705"}}}],"outputDatasetFolders":[],"id":"85a56739-9351-444b-95e9-a57470dca38a","savedPayload":{"position":{"x":10995.890269605332,"y":17540.32974347027},"targetPosition":{"x":11302.555356491408,"y":17880.959414907546},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"processDependencies":{"type":"Process Dependencies","name":"New Process Dependencies","project":"Foundations","statusDependencies":[{"type":"Status Dependency","name":"Simple Moving Average (SMA) Multi-Time-Frame-Market","config":"{\"mainUtility\": \"Self Reference\"}","project":"Foundations","id":"d49d1e94-1960-4121-8e40-be8af52947ee","savedPayload":{"position":{"x":11067.618896327327,"y":17267.479023725446},"targetPosition":{"x":11205.707967556615,"y":17422.24521572421},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":3,"distanceToParent":2,"arrangementStyle":0},"uiObject":{},"referenceParent":{"type":"Status Report","name":"New Status Report","id":"81346f2f-13f2-46f4-85f5-a04b4d80f455"}}},{"type":"Status Dependency","name":"Candles Volumes Multi-Time-Frame-Market","config":"{\"mainUtility\": \"Market Ending Point\"}","project":"Foundations","id":"f7cf0949-06fc-4c98-a399-61fac1671c6e","savedPayload":{"position":{"x":11151.101786685287,"y":17208.702149919078},"targetPosition":{"Line truncated
|
{"type":"Data Mine","name":"Sparta","config":"{\n\"codeName\": \"Sparta\"\n}","project":"Superalgos","sensorBots":[],"apiDataFetcherBots":[],"indicatorBots":[{"type":"Indicator Bot","name":"Simple Moving Average (SMA)","config":"{\n\"codeName\": \"SMA\"\n}","project":"Superalgos","processes":[{"type":"Process Definition","name":"Multi-Time-Frame-Market","config":"{\n \"codeName\": \"Multi-Time-Frame-Market\",\n \"description\": \"Calculates SMAs for Time Frames of 01-hs and above.\",\n \"deadWaitTime\": 0,\n \"normalWaitTime\": 0,\n \"retryWaitTime\": 10000,\n \"sleepWaitTime\": 3600000,\n \"comaWaitTime\": 86400000,\n \"framework\": {\n \"name\": \"Multi-Time-Frame-Market\"\n }\n }","project":"Superalgos","processOutput":{"type":"Process Output","name":"New Process Output","project":"Superalgos","outputDatasets":[{"type":"Output Dataset","name":"Multi-Time-Frame-Market Popular SMAs","project":"Superalgos","id":"6b361e67-c005-4c68-8e60-9561afea7995","savedPayload":{"position":{"x":14543.634455080679,"y":17851.215894240788},"targetPosition":{"x":14930.48007298036,"y":17962.639971295586},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":3,"distanceToParent":3,"arrangementStyle":0},"uiObject":{},"referenceParent":{"type":"Dataset Definition","name":"Multi-Time-Frame-Market","id":"24e17411-dccd-44b9-864d-ee83550186a8"}}},{"type":"Output Dataset","name":"Multi-Time-Frame-Market Base11 SMAs","project":"Superalgos","id":"5d513ab5-6e74-4b56-9ff9-889c8fea55b6","savedPayload":{"position":{"x":14587.104928827546,"y":17747.274661348227},"targetPosition":{"x":14930.48007298036,"y":17962.639971295586},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":3,"distanceToParent":3,"arrangementStyle":0},"uiObject":{},"referenceParent":{"type":"Dataset Definition","name":"Multi-Time-Frame-Market","id":"b2698fb2-3dee-406f-9bd6-461771adb181"}}},{"type":"Output Dataset","name":"Multi-Time-Frame-Market Base7 SMAs","project":"Superalgos","id":"36eca54d-9b12-494b-89d1-63da6b41d84f","savedPayload":{"position":{"x":14656.264826750903,"y":17662.384105780697},"targetPosition":{"x":14930.48007298036,"y":17962.639971295586},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":3,"distanceToParent":3,"arrangementStyle":0},"uiObject":{},"referenceParent":{"type":"Dataset Definition","name":"Multi-Time-Frame-Market","id":"d435f8db-8340-4e1a-b133-3f0042fc1e07"}}},{"type":"Output Dataset","name":"Multi-Time-Frame-Market Base6 SMAs","project":"Superalgos","id":"3cf7431e-358e-4fe7-b3e9-4b0825f8382b","savedPayload":{"position":{"x":14744.54620887017,"y":17600.34187002025},"targetPosition":{"x":14930.48007298036,"y":17962.639971295586},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":3,"distanceToParent":3,"arrangementStyle":0},"uiObject":{},"referenceParent":{"type":"Dataset Definition","name":"Multi-Time-Frame-Market","id":"59b1356d-d6fa-48c1-8fce-7f401cc9e35c"}}},{"type":"Output Dataset","name":"Multi-Time-Frame-Market Base5 SMAs","project":"Superalgos","id":"09d7bdff-7ce9-44f2-98eb-6e2846be35d8","savedPayload":{"position":{"x":14871.174681995284,"y":17563.716836610773},"targetPosition":{"x":14930.48007298036,"y":17962.639971295586},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":3,"distanceToParent":3,"arrangementStyle":0},"uiObject":{},"referenceParent":{"type":"Dataset Definition","name":"Multi-Time-Frame-Market","id":"bda8eb74-bd2b-42d8-b008-03caa80d16d6"}}}],"outputDatasetFolders":[],"id":"0102062f-55a7-40b2-bb5a-5fdec10094d3","savedPayload":{"position":{"x":14930.48007298036,"y":17962.639971295586},"targetPosition":{"x":15237.145159866435,"y":18303.269642732863},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"processDependencies":{"type":"Process Dependencies","name":"New Process Dependencies","project":"Superalgos","statusDependencies":[{"type":"Status Dependency","name":"","config":"{\"mainUtility\": \"Self Reference\"}","project":"Superalgos","id":"b10b3a53-b2a3-419d-895a-6970ca5f6d64","savedPayload":{"position":{"x":15002.208699702354,"y":17689.789251550763},"targetPosition":{"x":15140.297770931642,"y":17844.55544354953},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":3,"distanceToParent":2,"arrangementStyle":0},"uiObject":{},"referenceParent":{"type":"Status Report","name":"New Status Report","id":"d8c4906e-d779-4637-af38-c3e44751ec62"}}},{"type":"Status Dependency","name":"","config":"{\"mainUtility\": \"Market Ending Point\"}","project":"Superalgos","id":"7a5e25af-1d32-40ee-9d15-904395addd9c","savedPayload":{"position":{"x":15085.691590060314,"y":17631.012377744395},"targetPosition":{"x":15140.297770931642,"y":17844.55544354953},"floatingObject":{"isPinned":falLine truncated
|
||||||
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
@@ -1 +0,0 @@
|
|||||||
{"type":"Workspace","name":"Custom Charts Tutorials","rootNodes":[{"type":"Network","name":"My Network","project":"Foundations","networkNodes":[{"type":"Network Node","name":"My Computer","config":"{ \n\"host\": \"localhost\", \n\"webPort\": \"34248\", \n\"webSocketsPort\": \"18041\"\n}","project":"Foundations","dataTasks":{"type":"Data Tasks","name":"New Data Tasks","project":"Foundations","projectDataTasks":[{"type":"Project Data Tasks","name":"Foundations","project":"Foundations","exchangeDataTasks":[{"type":"Exchange Data Tasks","name":"Binance","project":"Foundations","marketDataTasks":[{"type":"Market Data Tasks","name":"Binance BTC/USDT","project":"Foundations","dataMineTasks":[{"type":"Data Mine Tasks","name":"Sparta","project":"Foundations","taskManagers":[{"type":"Task Manager","name":"Sparta","project":"Foundations","tasks":[{"type":"Task","name":"Simple Moving Average (SMA)","project":"Foundations","bot":{"type":"Indicator Bot Instance","name":"Simple Moving Average (SMA)","config":"{ \n\"parameter1\": \"Value for parameter1 defined at the Product Definition\"\n}","project":"Foundations","processes":[{"type":"Indicator Process Instance","name":"Simple Moving Average (SMA) Multi-Time-Frame-Market","project":"Foundations","id":"07281d67-3aad-46e6-b78d-8b85bf2fdb26","savedPayload":{"position":{"x":25070.356993272086,"y":28790.11115747996},"targetPosition":{"x":25090.356993272086,"y":28756.11115747996},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":3,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Process Definition","name":"Multi-Time-Frame-Market","id":"456269f6-9849-4d5f-9c8c-7cd7d1eef297"}}},{"type":"Indicator Process Instance","name":"Simple Moving Average (SMA) Multi-Time-Frame-Daily","project":"Foundations","id":"bfc9c489-a981-4800-8f61-092f19ff0e93","savedPayload":{"position":{"x":25172.356993272086,"y":28806.11115747996},"targetPosition":{"x":25090.356993272086,"y":28756.11115747996},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":3,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Process Definition","name":"Multi-Time-Frame-Daily","id":"333ae5d7-7ec1-4f08-b206-91e3b4f2c99f"}}}],"id":"b1ab4a4a-256f-4cc3-a1df-b921c8fe4605","savedPayload":{"position":{"x":25090.356993272086,"y":28756.11115747996},"targetPosition":{"x":25177.356993272086,"y":28674.11115747996},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"19a527e8-8570-4766-8190-e2fbc7ece275","savedPayload":{"position":{"x":25177.356993272086,"y":28674.11115747996},"targetPosition":{"x":25124.356993272086,"y":28583.11115747996},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Task","name":"Exponential Moving Average (EMA)","project":"Foundations","bot":{"type":"Indicator Bot Instance","name":"Exponential Moving Average (EMA)","config":"{ \n\"parameter1\": \"Value for parameter1 defined at the Product Definition\"\n}","project":"Foundations","processes":[{"type":"Indicator Process Instance","name":"Exponential Moving Average (EMA) Multi-Time-Frame-Market","project":"Foundations","id":"098228d9-c139-46bc-8938-46c84811e33d","savedPayload":{"position":{"x":25191.356993272086,"y":28759.11115747996},"targetPosition":{"x":25211.356993272086,"y":28715.11115747996},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":3,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Process Definition","name":"Multi-Time-Frame-Market","id":"278c34a7-199d-400e-8a06-087149e3d391"}}},{"type":"Indicator Process Instance","name":"Exponential Moving Average (EMA) Multi-Time-Frame-Daily","project":"Foundations","id":"16d1a19b-fd61-4d41-9cad-56cc68774b62","savedPayload":{"position":{"x":25134.356993272086,"y":28660.11115747996},"targetPosition":{"x":25211.356993272086,"y":28715.11115747996},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":3,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Process Definition","name":"Multi-Time-Frame-Daily","id":"943ea24f-ee24-4eae-9b4b-e8a73122b1c2"}}}],"id":"dab1daf1-4a5d-4abb-b4a6-3ebfe99aa543","savedPayload":{"position":{"x":25211.356993272086,"y":28715.11115747996},"targetPosition":{"x":25176.356993272086,"y":28674.11115747996},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"603927bd-8140-45d6-ba57-47b3d7d5a77f","savedPayload":{"position":{"x":25176.356993272086,"y":28674.11115747996},"targetPosition":{"x":25124Line truncated
|
|
||||||
+2
-2
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"tutorial": "How to aggregate data from different Exchanges in the same Chart ",
|
"tutorial": "Aggregate data from different Exchanges in a Chart ",
|
||||||
"pageNumber": "1",
|
"pageNumber": "1",
|
||||||
"type": "How to combine Exchanges in a Chart Tutorial",
|
"type": "Combine Exchanges in a Chart Tutorial",
|
||||||
"definition": {
|
"definition": {
|
||||||
"text": "This Tutorial covers the process of pulling together the most diverse set of data: data from different exchanges! By the end of this tutorial you will be able to build charts almost impossible to find anywhere else.",
|
"text": "This Tutorial covers the process of pulling together the most diverse set of data: data from different exchanges! By the end of this tutorial you will be able to build charts almost impossible to find anywhere else.",
|
||||||
"updated": 1617376996248
|
"updated": 1617376996248
|
||||||
@@ -197,7 +197,8 @@ exports.newFoundationsBotModulesSnapshots = function (processIndex) {
|
|||||||
if (nodeWithCode.code === undefined) { return }
|
if (nodeWithCode.code === undefined) { return }
|
||||||
|
|
||||||
try {
|
try {
|
||||||
let instructionsArray = nodeWithCode.code.split(' ')
|
const code = nodeWithCode.code
|
||||||
|
let instructionsArray = code.split(' ')
|
||||||
for (let i = 0; i < instructionsArray.length; i++) {
|
for (let i = 0; i < instructionsArray.length; i++) {
|
||||||
let instruction = instructionsArray[i]
|
let instruction = instructionsArray[i]
|
||||||
instruction = instruction.replace('(', '')
|
instruction = instruction.replace('(', '')
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ function newFoundationsUtilitiesStatusBar() {
|
|||||||
return thisObject
|
return thisObject
|
||||||
|
|
||||||
function changeStatus(newStatus) {
|
function changeStatus(newStatus) {
|
||||||
let statusParagraph = document.getElementById('credits-page-status-paragraph')
|
let statusParagraph = document.getElementById('splash-text-status-paragraph')
|
||||||
statusParagraph.lastChild.data = newStatus
|
statusParagraph.lastChild.data = newStatus
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|||||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -1 +1,212 @@
|
|||||||
{"type":"Features","name":"Superalgos","project":"Governance","featureClasses":[{"type":"Feature Class","name":"Superalgos","config":"{\n \"description\": \"\", \"relativeWeight\": 0 \n}","project":"Governance","featureClasses":[{"type":"Feature Class","name":"Visual Designer","config":"{\n \"description\": \"\", \"relativeWeight\": 0 \n}","project":"Governance","featureClasses":[],"features":[],"id":"18584f3f-6e48-4a68-89f1-0268185156e9","savedPayload":{"position":{"x":35870.70509831249,"y":38274.83557568774},"targetPosition":{"x":35628,"y":38098.5},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Feature Class","name":"Visual Debugger","config":"{\n \"description\": \"\", \"relativeWeight\": 0 \n}","project":"Governance","featureClasses":[],"features":[],"id":"0e329071-a542-405f-ae8c-2933098759c1","savedPayload":{"position":{"x":35720.70509831249,"y":38383.81695488855},"targetPosition":{"x":35628,"y":38098.5},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Feature Class","name":"Charting System","config":"{\n \"description\": \"\", \"relativeWeight\": 0 \n}","project":"Governance","featureClasses":[],"features":[],"id":"7edc83c0-74fc-4427-816d-4db5d840577f","savedPayload":{"position":{"x":35535.29490168751,"y":38383.81695488855},"targetPosition":{"x":35628,"y":38098.5},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Feature Class","name":"Data Mining","config":"{\n \"description\": \"\", \"relativeWeight\": 0 \n}","project":"Governance","featureClasses":[],"features":[],"id":"025c0e15-ad8d-49ae-b501-577bb82c207d","savedPayload":{"position":{"x":35385.29490168751,"y":38274.83557568774},"targetPosition":{"x":35628,"y":38098.5},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"features":[],"id":"136b6e7a-f042-441b-84be-395b56b65b70","savedPayload":{"position":{"x":35628,"y":38098.5},"targetPosition":{"x":35628,"y":37798.5},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"features":[],"id":"1d2c1985-c762-4ece-b350-15bd893bd1f4","savedPayload":{"position":{"x":35628,"y":37798.5},"targetPosition":{"x":35628,"y":37798.5},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}}
|
{
|
||||||
|
"type": "Features",
|
||||||
|
"name": "Superalgos",
|
||||||
|
"project": "Governance",
|
||||||
|
"featureClasses": [
|
||||||
|
{
|
||||||
|
"type": "Feature Class",
|
||||||
|
"name": "Superalgos",
|
||||||
|
"config": "{\n \"description\": \"\", \"relativeWeight\": 0 \n}",
|
||||||
|
"project": "Governance",
|
||||||
|
"featureClasses": [
|
||||||
|
{
|
||||||
|
"type": "Feature Class",
|
||||||
|
"name": "Visual Designer",
|
||||||
|
"config": "{\n \"description\": \"\", \"relativeWeight\": 0 \n}",
|
||||||
|
"project": "Governance",
|
||||||
|
"featureClasses": [],
|
||||||
|
"features": [],
|
||||||
|
"id": "18584f3f-6e48-4a68-89f1-0268185156e9",
|
||||||
|
"savedPayload": {
|
||||||
|
"position": {
|
||||||
|
"x": 35870.70509831249,
|
||||||
|
"y": 38274.83557568774
|
||||||
|
},
|
||||||
|
"targetPosition": {
|
||||||
|
"x": 35628,
|
||||||
|
"y": 38098.5
|
||||||
|
},
|
||||||
|
"floatingObject": {
|
||||||
|
"isPinned": false,
|
||||||
|
"isFrozen": false,
|
||||||
|
"isCollapsed": false,
|
||||||
|
"angleToParent": 2,
|
||||||
|
"distanceToParent": 3,
|
||||||
|
"arrangementStyle": 0
|
||||||
|
},
|
||||||
|
"uiObject": {
|
||||||
|
"isRunning": false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "Feature Class",
|
||||||
|
"name": "Visual Debugger",
|
||||||
|
"config": "{\n \"description\": \"\", \"relativeWeight\": 0 \n}",
|
||||||
|
"project": "Governance",
|
||||||
|
"featureClasses": [],
|
||||||
|
"features": [],
|
||||||
|
"id": "0e329071-a542-405f-ae8c-2933098759c1",
|
||||||
|
"savedPayload": {
|
||||||
|
"position": {
|
||||||
|
"x": 35720.70509831249,
|
||||||
|
"y": 38383.81695488855
|
||||||
|
},
|
||||||
|
"targetPosition": {
|
||||||
|
"x": 35628,
|
||||||
|
"y": 38098.5
|
||||||
|
},
|
||||||
|
"floatingObject": {
|
||||||
|
"isPinned": false,
|
||||||
|
"isFrozen": false,
|
||||||
|
"isCollapsed": false,
|
||||||
|
"angleToParent": 2,
|
||||||
|
"distanceToParent": 3,
|
||||||
|
"arrangementStyle": 0
|
||||||
|
},
|
||||||
|
"uiObject": {
|
||||||
|
"isRunning": false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "Feature Class",
|
||||||
|
"name": "Charting System",
|
||||||
|
"config": "{\n \"description\": \"\", \"relativeWeight\": 0 \n}",
|
||||||
|
"project": "Governance",
|
||||||
|
"featureClasses": [],
|
||||||
|
"features": [],
|
||||||
|
"id": "7edc83c0-74fc-4427-816d-4db5d840577f",
|
||||||
|
"savedPayload": {
|
||||||
|
"position": {
|
||||||
|
"x": 35535.29490168751,
|
||||||
|
"y": 38383.81695488855
|
||||||
|
},
|
||||||
|
"targetPosition": {
|
||||||
|
"x": 35628,
|
||||||
|
"y": 38098.5
|
||||||
|
},
|
||||||
|
"floatingObject": {
|
||||||
|
"isPinned": false,
|
||||||
|
"isFrozen": false,
|
||||||
|
"isCollapsed": false,
|
||||||
|
"angleToParent": 2,
|
||||||
|
"distanceToParent": 3,
|
||||||
|
"arrangementStyle": 0
|
||||||
|
},
|
||||||
|
"uiObject": {
|
||||||
|
"isRunning": false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "Feature Class",
|
||||||
|
"name": "Data Mining",
|
||||||
|
"config": "{\n \"description\": \"\", \"relativeWeight\": 0 \n}",
|
||||||
|
"project": "Governance",
|
||||||
|
"featureClasses": [],
|
||||||
|
"features": [
|
||||||
|
{
|
||||||
|
"type": "Feature",
|
||||||
|
"name": "Feature X",
|
||||||
|
"config": "{}",
|
||||||
|
"project": "Governance",
|
||||||
|
"featureClasses": [],
|
||||||
|
"features": [],
|
||||||
|
"id": "1b9dd977-f388-4434-a3f9-2e7a10726848",
|
||||||
|
"savedPayload": {
|
||||||
|
"position": {
|
||||||
|
"x": 35142.58980337503,
|
||||||
|
"y": 38451.171151375485
|
||||||
|
},
|
||||||
|
"targetPosition": {
|
||||||
|
"x": 35385.29490168751,
|
||||||
|
"y": 38274.83557568774
|
||||||
|
},
|
||||||
|
"floatingObject": {
|
||||||
|
"isPinned": false,
|
||||||
|
"isFrozen": false,
|
||||||
|
"isCollapsed": false,
|
||||||
|
"angleToParent": 2,
|
||||||
|
"distanceToParent": 3,
|
||||||
|
"arrangementStyle": 0
|
||||||
|
},
|
||||||
|
"uiObject": {
|
||||||
|
"isRunning": false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"id": "025c0e15-ad8d-49ae-b501-577bb82c207d",
|
||||||
|
"savedPayload": {
|
||||||
|
"position": {
|
||||||
|
"x": 35385.29490168751,
|
||||||
|
"y": 38274.83557568774
|
||||||
|
},
|
||||||
|
"targetPosition": {
|
||||||
|
"x": 35628,
|
||||||
|
"y": 38098.5
|
||||||
|
},
|
||||||
|
"floatingObject": {
|
||||||
|
"isPinned": false,
|
||||||
|
"isFrozen": false,
|
||||||
|
"isCollapsed": false,
|
||||||
|
"angleToParent": 2,
|
||||||
|
"distanceToParent": 3,
|
||||||
|
"arrangementStyle": 0
|
||||||
|
},
|
||||||
|
"uiObject": {
|
||||||
|
"isRunning": false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"features": [],
|
||||||
|
"id": "136b6e7a-f042-441b-84be-395b56b65b70",
|
||||||
|
"savedPayload": {
|
||||||
|
"position": {
|
||||||
|
"x": 35628,
|
||||||
|
"y": 38098.5
|
||||||
|
},
|
||||||
|
"targetPosition": {
|
||||||
|
"x": 35628,
|
||||||
|
"y": 37798.5
|
||||||
|
},
|
||||||
|
"floatingObject": {
|
||||||
|
"isPinned": false,
|
||||||
|
"isFrozen": false,
|
||||||
|
"isCollapsed": false,
|
||||||
|
"angleToParent": 2,
|
||||||
|
"distanceToParent": 3,
|
||||||
|
"arrangementStyle": 0
|
||||||
|
},
|
||||||
|
"uiObject": {
|
||||||
|
"isRunning": false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"features": [],
|
||||||
|
"id": "1d2c1985-c762-4ece-b350-15bd893bd1f4",
|
||||||
|
"savedPayload": {
|
||||||
|
"position": {
|
||||||
|
"x": 35628,
|
||||||
|
"y": 37798.5
|
||||||
|
},
|
||||||
|
"targetPosition": {
|
||||||
|
"x": 35628,
|
||||||
|
"y": 37798.5
|
||||||
|
},
|
||||||
|
"floatingObject": {
|
||||||
|
"isPinned": false,
|
||||||
|
"isFrozen": false,
|
||||||
|
"isCollapsed": false,
|
||||||
|
"angleToParent": 1,
|
||||||
|
"distanceToParent": 3,
|
||||||
|
"arrangementStyle": 0
|
||||||
|
},
|
||||||
|
"uiObject": {
|
||||||
|
"isRunning": false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -6,7 +6,7 @@
|
|||||||
"poolClasses": [
|
"poolClasses": [
|
||||||
{
|
{
|
||||||
"type": "Pool Class",
|
"type": "Pool Class",
|
||||||
"name": "Software",
|
"name": "Software Projects",
|
||||||
"config": "{\n \"description\": \"\"\n}",
|
"config": "{\n \"description\": \"\"\n}",
|
||||||
"project": "Governance",
|
"project": "Governance",
|
||||||
"poolClasses": [],
|
"poolClasses": [],
|
||||||
@@ -180,7 +180,7 @@
|
|||||||
"floatingObject": {
|
"floatingObject": {
|
||||||
"isPinned": false,
|
"isPinned": false,
|
||||||
"isFrozen": false,
|
"isFrozen": false,
|
||||||
"isCollapsed": false,
|
"isCollapsed": true,
|
||||||
"angleToParent": 1,
|
"angleToParent": 1,
|
||||||
"distanceToParent": 3,
|
"distanceToParent": 3,
|
||||||
"arrangementStyle": 0
|
"arrangementStyle": 0
|
||||||
@@ -213,12 +213,12 @@
|
|||||||
"id": "6a456247-13b7-41f2-80b3-957c1af55009",
|
"id": "6a456247-13b7-41f2-80b3-957c1af55009",
|
||||||
"savedPayload": {
|
"savedPayload": {
|
||||||
"position": {
|
"position": {
|
||||||
"x": 25599.401355365237,
|
"x": 25700.116150324728,
|
||||||
"y": 30867.356170711148
|
"y": 30728.73414780495
|
||||||
},
|
},
|
||||||
"targetPosition": {
|
"targetPosition": {
|
||||||
"x": 25305.957075145096,
|
"x": 25400.116150324728,
|
||||||
"y": 30804.98266346582
|
"y": 30728.73414780495
|
||||||
},
|
},
|
||||||
"floatingObject": {
|
"floatingObject": {
|
||||||
"isPinned": false,
|
"isPinned": false,
|
||||||
@@ -243,12 +243,12 @@
|
|||||||
"id": "5bbe5a09-fe32-4802-8e14-d06615a24510",
|
"id": "5bbe5a09-fe32-4802-8e14-d06615a24510",
|
||||||
"savedPayload": {
|
"savedPayload": {
|
||||||
"position": {
|
"position": {
|
||||||
"x": 25398.66217345758,
|
"x": 25550.116150324728,
|
||||||
"y": 31090.299618354366
|
"y": 30988.541768940282
|
||||||
},
|
},
|
||||||
"targetPosition": {
|
"targetPosition": {
|
||||||
"x": 25305.957075145096,
|
"x": 25400.116150324728,
|
||||||
"y": 30804.98266346582
|
"y": 30728.73414780495
|
||||||
},
|
},
|
||||||
"floatingObject": {
|
"floatingObject": {
|
||||||
"isPinned": false,
|
"isPinned": false,
|
||||||
@@ -267,12 +267,12 @@
|
|||||||
"id": "95431b88-cbff-459c-a707-fd3518e79c73",
|
"id": "95431b88-cbff-459c-a707-fd3518e79c73",
|
||||||
"savedPayload": {
|
"savedPayload": {
|
||||||
"position": {
|
"position": {
|
||||||
"x": 25305.957075145096,
|
"x": 25400.116150324728,
|
||||||
"y": 30804.98266346582
|
"y": 30728.73414780495
|
||||||
},
|
},
|
||||||
"targetPosition": {
|
"targetPosition": {
|
||||||
"x": 25083.013627501878,
|
"x": 25140.308529189395,
|
||||||
"y": 30604.243481558162
|
"y": 30578.73414780495
|
||||||
},
|
},
|
||||||
"floatingObject": {
|
"floatingObject": {
|
||||||
"isPinned": false,
|
"isPinned": false,
|
||||||
@@ -304,12 +304,12 @@
|
|||||||
"id": "6b4bee15-622d-4df6-9662-4d7b8d44f198",
|
"id": "6b4bee15-622d-4df6-9662-4d7b8d44f198",
|
||||||
"savedPayload": {
|
"savedPayload": {
|
||||||
"position": {
|
"position": {
|
||||||
"x": 24958.266613011223,
|
"x": 25140.308529189395,
|
||||||
"y": 31191.132041998444
|
"y": 31178.73414780495
|
||||||
},
|
},
|
||||||
"targetPosition": {
|
"targetPosition": {
|
||||||
"x": 25020.64012025655,
|
"x": 25140.308529189395,
|
||||||
"y": 30897.687761778303
|
"y": 30878.73414780495
|
||||||
},
|
},
|
||||||
"floatingObject": {
|
"floatingObject": {
|
||||||
"isPinned": false,
|
"isPinned": false,
|
||||||
@@ -333,12 +333,12 @@
|
|||||||
"id": "ab43c779-d6d6-451d-a444-cfb8b68df07e",
|
"id": "ab43c779-d6d6-451d-a444-cfb8b68df07e",
|
||||||
"savedPayload": {
|
"savedPayload": {
|
||||||
"position": {
|
"position": {
|
||||||
"x": 25020.64012025655,
|
"x": 25140.308529189395,
|
||||||
"y": 30897.687761778303
|
"y": 30878.73414780495
|
||||||
},
|
},
|
||||||
"targetPosition": {
|
"targetPosition": {
|
||||||
"x": 25083.013627501878,
|
"x": 25140.308529189395,
|
||||||
"y": 30604.243481558162
|
"y": 30578.73414780495
|
||||||
},
|
},
|
||||||
"floatingObject": {
|
"floatingObject": {
|
||||||
"isPinned": false,
|
"isPinned": false,
|
||||||
@@ -358,8 +358,8 @@
|
|||||||
"id": "85dbdcb9-5b59-432e-86a0-fab37e20a55d",
|
"id": "85dbdcb9-5b59-432e-86a0-fab37e20a55d",
|
||||||
"savedPayload": {
|
"savedPayload": {
|
||||||
"position": {
|
"position": {
|
||||||
"x": 25083.013627501878,
|
"x": 25140.308529189395,
|
||||||
"y": 30604.243481558162
|
"y": 30578.73414780495
|
||||||
},
|
},
|
||||||
"targetPosition": {
|
"targetPosition": {
|
||||||
"x": 24990.308529189395,
|
"x": 24990.308529189395,
|
||||||
@@ -368,7 +368,7 @@
|
|||||||
"floatingObject": {
|
"floatingObject": {
|
||||||
"isPinned": false,
|
"isPinned": false,
|
||||||
"isFrozen": false,
|
"isFrozen": false,
|
||||||
"isCollapsed": false,
|
"isCollapsed": true,
|
||||||
"angleToParent": 1,
|
"angleToParent": 1,
|
||||||
"distanceToParent": 3,
|
"distanceToParent": 3,
|
||||||
"arrangementStyle": 0
|
"arrangementStyle": 0
|
||||||
@@ -393,20 +393,20 @@
|
|||||||
"pools": [
|
"pools": [
|
||||||
{
|
{
|
||||||
"type": "Pool",
|
"type": "Pool",
|
||||||
"name": "Usage",
|
"name": "Mentorship Program",
|
||||||
"config": "{}",
|
"config": "{\n \"codeName\": \"Mentorship-Program\"\n}",
|
||||||
"project": "Governance",
|
"project": "Governance",
|
||||||
"poolClasses": [],
|
"poolClasses": [],
|
||||||
"pools": [],
|
"pools": [],
|
||||||
"id": "60712b3c-ee76-40ba-8de2-e03aa61f6dde",
|
"id": "60712b3c-ee76-40ba-8de2-e03aa61f6dde",
|
||||||
"savedPayload": {
|
"savedPayload": {
|
||||||
"position": {
|
"position": {
|
||||||
"x": 24808.183476228434,
|
"x": 25130.086277076116,
|
||||||
"y": 31071.64273248506
|
"y": 31080.643930047634
|
||||||
},
|
},
|
||||||
"targetPosition": {
|
"targetPosition": {
|
||||||
"x": 24700.673091364843,
|
"x": 24917.954242720152,
|
||||||
"y": 30791.5686045359
|
"y": 30868.51189569167
|
||||||
},
|
},
|
||||||
"floatingObject": {
|
"floatingObject": {
|
||||||
"isPinned": false,
|
"isPinned": false,
|
||||||
@@ -423,7 +423,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "Pool",
|
"type": "Pool",
|
||||||
"name": "User Referrals",
|
"name": "Referral Program",
|
||||||
"config": "{\n \"codeName\": \"Referral-Program\"\n}",
|
"config": "{\n \"codeName\": \"Referral-Program\"\n}",
|
||||||
"project": "Governance",
|
"project": "Governance",
|
||||||
"poolClasses": [],
|
"poolClasses": [],
|
||||||
@@ -431,12 +431,12 @@
|
|||||||
"id": "639a6504-a0d0-4d7e-ad99-80ba5115ac72",
|
"id": "639a6504-a0d0-4d7e-ad99-80ba5115ac72",
|
||||||
"savedPayload": {
|
"savedPayload": {
|
||||||
"position": {
|
"position": {
|
||||||
"x": 24511.87697404989,
|
"x": 24840.308529189395,
|
||||||
"y": 31024.71239297299
|
"y": 31158.28964357839
|
||||||
},
|
},
|
||||||
"targetPosition": {
|
"targetPosition": {
|
||||||
"x": 24700.673091364843,
|
"x": 24917.954242720152,
|
||||||
"y": 30791.5686045359
|
"y": 30868.51189569167
|
||||||
},
|
},
|
||||||
"floatingObject": {
|
"floatingObject": {
|
||||||
"isPinned": false,
|
"isPinned": false,
|
||||||
@@ -455,12 +455,12 @@
|
|||||||
"id": "9b6c24b9-e21d-458b-b509-1828d40b4239",
|
"id": "9b6c24b9-e21d-458b-b509-1828d40b4239",
|
||||||
"savedPayload": {
|
"savedPayload": {
|
||||||
"position": {
|
"position": {
|
||||||
"x": 24700.673091364843,
|
"x": 24917.954242720152,
|
||||||
"y": 30791.5686045359
|
"y": 30868.51189569167
|
||||||
},
|
},
|
||||||
"targetPosition": {
|
"targetPosition": {
|
||||||
"x": 24747.603430876912,
|
"x": 24840.308529189395,
|
||||||
"y": 30495.26210235736
|
"y": 30578.73414780495
|
||||||
},
|
},
|
||||||
"floatingObject": {
|
"floatingObject": {
|
||||||
"isPinned": false,
|
"isPinned": false,
|
||||||
@@ -492,12 +492,12 @@
|
|||||||
"id": "6b11cf29-2957-417d-a268-3569178eca9e",
|
"id": "6b11cf29-2957-417d-a268-3569178eca9e",
|
||||||
"savedPayload": {
|
"savedPayload": {
|
||||||
"position": {
|
"position": {
|
||||||
"x": 24262.193234251947,
|
"x": 24540.308529189395,
|
||||||
"y": 30847.933253732845
|
"y": 31098.349390075615
|
||||||
},
|
},
|
||||||
"targetPosition": {
|
"targetPosition": {
|
||||||
"x": 24504.89833256443,
|
"x": 24690.308529189395,
|
||||||
"y": 30671.597678045102
|
"y": 30838.541768940282
|
||||||
},
|
},
|
||||||
"floatingObject": {
|
"floatingObject": {
|
||||||
"isPinned": false,
|
"isPinned": false,
|
||||||
@@ -516,12 +516,12 @@
|
|||||||
"id": "e2113b73-9a38-4c59-8fbe-95a7539379c5",
|
"id": "e2113b73-9a38-4c59-8fbe-95a7539379c5",
|
||||||
"savedPayload": {
|
"savedPayload": {
|
||||||
"position": {
|
"position": {
|
||||||
"x": 24504.89833256443,
|
"x": 24690.308529189395,
|
||||||
"y": 30671.597678045102
|
"y": 30838.541768940282
|
||||||
},
|
},
|
||||||
"targetPosition": {
|
"targetPosition": {
|
||||||
"x": 24747.603430876912,
|
"x": 24840.308529189395,
|
||||||
"y": 30495.26210235736
|
"y": 30578.73414780495
|
||||||
},
|
},
|
||||||
"floatingObject": {
|
"floatingObject": {
|
||||||
"isPinned": false,
|
"isPinned": false,
|
||||||
@@ -553,12 +553,12 @@
|
|||||||
"id": "ea79efd3-c3d9-4c80-a1d0-1cab106e0242",
|
"id": "ea79efd3-c3d9-4c80-a1d0-1cab106e0242",
|
||||||
"savedPayload": {
|
"savedPayload": {
|
||||||
"position": {
|
"position": {
|
||||||
"x": 24154.99042651983,
|
"x": 24260.753033415953,
|
||||||
"y": 30401.40142333322
|
"y": 30734.025574866464
|
||||||
},
|
},
|
||||||
"targetPosition": {
|
"targetPosition": {
|
||||||
"x": 24451.29692869837,
|
"x": 24550.530781302674,
|
||||||
"y": 30448.33176284529
|
"y": 30656.379861335707
|
||||||
},
|
},
|
||||||
"floatingObject": {
|
"floatingObject": {
|
||||||
"isPinned": false,
|
"isPinned": false,
|
||||||
@@ -577,12 +577,12 @@
|
|||||||
"id": "c7cd91a3-96b0-4115-aaaa-fddae1c1b246",
|
"id": "c7cd91a3-96b0-4115-aaaa-fddae1c1b246",
|
||||||
"savedPayload": {
|
"savedPayload": {
|
||||||
"position": {
|
"position": {
|
||||||
"x": 24451.29692869837,
|
"x": 24550.530781302674,
|
||||||
"y": 30448.33176284529
|
"y": 30656.379861335707
|
||||||
},
|
},
|
||||||
"targetPosition": {
|
"targetPosition": {
|
||||||
"x": 24747.603430876912,
|
"x": 24840.308529189395,
|
||||||
"y": 30495.26210235736
|
"y": 30578.73414780495
|
||||||
},
|
},
|
||||||
"floatingObject": {
|
"floatingObject": {
|
||||||
"isPinned": false,
|
"isPinned": false,
|
||||||
@@ -602,8 +602,8 @@
|
|||||||
"id": "ae18dd6f-80f7-4fa0-a386-7ffd75e45063",
|
"id": "ae18dd6f-80f7-4fa0-a386-7ffd75e45063",
|
||||||
"savedPayload": {
|
"savedPayload": {
|
||||||
"position": {
|
"position": {
|
||||||
"x": 24747.603430876912,
|
"x": 24840.308529189395,
|
||||||
"y": 30495.26210235736
|
"y": 30578.73414780495
|
||||||
},
|
},
|
||||||
"targetPosition": {
|
"targetPosition": {
|
||||||
"x": 24990.308529189395,
|
"x": 24990.308529189395,
|
||||||
@@ -1047,8 +1047,8 @@
|
|||||||
"id": "86787666-908c-4b27-8265-cd460732030f",
|
"id": "86787666-908c-4b27-8265-cd460732030f",
|
||||||
"savedPayload": {
|
"savedPayload": {
|
||||||
"position": {
|
"position": {
|
||||||
"x": 24747.603430876912,
|
"x": 24690.308529189395,
|
||||||
"y": 30142.590950981874
|
"y": 30318.926526669617
|
||||||
},
|
},
|
||||||
"targetPosition": {
|
"targetPosition": {
|
||||||
"x": 24990.308529189395,
|
"x": 24990.308529189395,
|
||||||
@@ -1057,7 +1057,7 @@
|
|||||||
"floatingObject": {
|
"floatingObject": {
|
||||||
"isPinned": false,
|
"isPinned": false,
|
||||||
"isFrozen": false,
|
"isFrozen": false,
|
||||||
"isCollapsed": false,
|
"isCollapsed": true,
|
||||||
"angleToParent": 1,
|
"angleToParent": 1,
|
||||||
"distanceToParent": 3,
|
"distanceToParent": 3,
|
||||||
"arrangementStyle": 0
|
"arrangementStyle": 0
|
||||||
@@ -1084,12 +1084,12 @@
|
|||||||
"id": "5d878af1-e32c-4458-8fb7-98df55f1e54a",
|
"id": "5d878af1-e32c-4458-8fb7-98df55f1e54a",
|
||||||
"savedPayload": {
|
"savedPayload": {
|
||||||
"position": {
|
"position": {
|
||||||
"x": 25175.71872581436,
|
"x": 24690.308529189395,
|
||||||
"y": 29748.292616892526
|
"y": 29799.31128439895
|
||||||
},
|
},
|
||||||
"targetPosition": {
|
"targetPosition": {
|
||||||
"x": 25083.013627501878,
|
"x": 24840.308529189395,
|
||||||
"y": 30033.60957178107
|
"y": 30059.118905534284
|
||||||
},
|
},
|
||||||
"floatingObject": {
|
"floatingObject": {
|
||||||
"isPinned": false,
|
"isPinned": false,
|
||||||
@@ -1113,8 +1113,74 @@
|
|||||||
"id": "a2acb2b1-c88f-47f2-b31b-b0cde52801ac",
|
"id": "a2acb2b1-c88f-47f2-b31b-b0cde52801ac",
|
||||||
"savedPayload": {
|
"savedPayload": {
|
||||||
"position": {
|
"position": {
|
||||||
"x": 25083.013627501878,
|
"x": 24840.308529189395,
|
||||||
"y": 30033.60957178107
|
"y": 30059.118905534284
|
||||||
|
},
|
||||||
|
"targetPosition": {
|
||||||
|
"x": 24990.308529189395,
|
||||||
|
"y": 30318.926526669617
|
||||||
|
},
|
||||||
|
"floatingObject": {
|
||||||
|
"isPinned": false,
|
||||||
|
"isFrozen": false,
|
||||||
|
"isCollapsed": true,
|
||||||
|
"angleToParent": 1,
|
||||||
|
"distanceToParent": 3,
|
||||||
|
"arrangementStyle": 0
|
||||||
|
},
|
||||||
|
"uiObject": {
|
||||||
|
"isRunning": false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "Pool Class",
|
||||||
|
"name": "Features",
|
||||||
|
"config": "{}",
|
||||||
|
"project": "Governance",
|
||||||
|
"poolClasses": [],
|
||||||
|
"pools": [
|
||||||
|
{
|
||||||
|
"type": "Pool",
|
||||||
|
"name": "Features",
|
||||||
|
"config": "{}",
|
||||||
|
"project": "Governance",
|
||||||
|
"poolClasses": [],
|
||||||
|
"pools": [],
|
||||||
|
"id": "2d34ec1b-e281-4163-a44b-6ac33a54e002",
|
||||||
|
"savedPayload": {
|
||||||
|
"position": {
|
||||||
|
"x": 25290.308529189395,
|
||||||
|
"y": 29799.31128439895
|
||||||
|
},
|
||||||
|
"targetPosition": {
|
||||||
|
"x": 25140.308529189395,
|
||||||
|
"y": 30059.118905534284
|
||||||
|
},
|
||||||
|
"floatingObject": {
|
||||||
|
"isPinned": false,
|
||||||
|
"isFrozen": false,
|
||||||
|
"isCollapsed": false,
|
||||||
|
"angleToParent": 1,
|
||||||
|
"distanceToParent": 3,
|
||||||
|
"arrangementStyle": 0
|
||||||
|
},
|
||||||
|
"uiObject": {
|
||||||
|
"isRunning": false
|
||||||
|
},
|
||||||
|
"referenceParent": {
|
||||||
|
"type": "Features",
|
||||||
|
"name": "Superalgos",
|
||||||
|
"id": "1d2c1985-c762-4ece-b350-15bd893bd1f4"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"id": "8c3175a1-17aa-4e27-bcbe-063468ecc87e",
|
||||||
|
"savedPayload": {
|
||||||
|
"position": {
|
||||||
|
"x": 25140.308529189395,
|
||||||
|
"y": 30059.118905534284
|
||||||
},
|
},
|
||||||
"targetPosition": {
|
"targetPosition": {
|
||||||
"x": 24990.308529189395,
|
"x": 24990.308529189395,
|
||||||
@@ -1148,7 +1214,7 @@
|
|||||||
"floatingObject": {
|
"floatingObject": {
|
||||||
"isPinned": false,
|
"isPinned": false,
|
||||||
"isFrozen": false,
|
"isFrozen": false,
|
||||||
"isCollapsed": true,
|
"isCollapsed": false,
|
||||||
"angleToParent": 1,
|
"angleToParent": 1,
|
||||||
"distanceToParent": 3,
|
"distanceToParent": 3,
|
||||||
"arrangementStyle": 0
|
"arrangementStyle": 0
|
||||||
|
|||||||
@@ -15,7 +15,7 @@
|
|||||||
"project": "Governance",
|
"project": "Governance",
|
||||||
"userReferrer": {
|
"userReferrer": {
|
||||||
"type": "User Referrer",
|
"type": "User Referrer",
|
||||||
"name": "",
|
"name": "Jeremy",
|
||||||
"config": "{}",
|
"config": "{}",
|
||||||
"project": "Governance",
|
"project": "Governance",
|
||||||
"id": "0d0b04ff-034b-4b02-8351-67d621d514c0",
|
"id": "0d0b04ff-034b-4b02-8351-67d621d514c0",
|
||||||
@@ -82,7 +82,7 @@
|
|||||||
"floatingObject": {
|
"floatingObject": {
|
||||||
"isPinned": false,
|
"isPinned": false,
|
||||||
"isFrozen": false,
|
"isFrozen": false,
|
||||||
"isCollapsed": false,
|
"isCollapsed": true,
|
||||||
"angleToParent": 2,
|
"angleToParent": 2,
|
||||||
"distanceToParent": 3,
|
"distanceToParent": 3,
|
||||||
"arrangementStyle": 0
|
"arrangementStyle": 0
|
||||||
@@ -97,12 +97,69 @@
|
|||||||
"name": "New Mentorship Program",
|
"name": "New Mentorship Program",
|
||||||
"config": "{}",
|
"config": "{}",
|
||||||
"project": "Governance",
|
"project": "Governance",
|
||||||
"userMentors": [],
|
"userMentors": [
|
||||||
|
{
|
||||||
|
"type": "User Mentor",
|
||||||
|
"name": "Jeremy",
|
||||||
|
"config": "{}",
|
||||||
|
"project": "Governance",
|
||||||
|
"id": "0e176a01-3ed2-4b02-b070-601236ea2393",
|
||||||
|
"savedPayload": {
|
||||||
|
"position": {
|
||||||
|
"x": 25662.630264392985,
|
||||||
|
"y": 23874.32824727054
|
||||||
|
},
|
||||||
|
"targetPosition": {
|
||||||
|
"x": 25243.737077503094,
|
||||||
|
"y": 23709.924786305663
|
||||||
|
},
|
||||||
|
"floatingObject": {
|
||||||
|
"isPinned": false,
|
||||||
|
"isFrozen": false,
|
||||||
|
"isCollapsed": false,
|
||||||
|
"angleToParent": 2,
|
||||||
|
"distanceToParent": 3,
|
||||||
|
"arrangementStyle": 0
|
||||||
|
},
|
||||||
|
"uiObject": {},
|
||||||
|
"referenceParent": {
|
||||||
|
"type": "User Profile",
|
||||||
|
"name": "Jeremy",
|
||||||
|
"id": "759e9012-c995-47ed-92f1-7d204bf2b58e"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"tokensAwarded": {
|
||||||
|
"type": "Tokens Awarded",
|
||||||
|
"name": "New Tokens Awarded",
|
||||||
|
"project": "Governance",
|
||||||
|
"id": "27f046ba-de7c-45a3-9086-d6f4e0ac0fd7",
|
||||||
|
"savedPayload": {
|
||||||
|
"position": {
|
||||||
|
"x": 25310.806097282373,
|
||||||
|
"y": 24154.89865810697
|
||||||
|
},
|
||||||
|
"targetPosition": {
|
||||||
|
"x": 25243.737077503094,
|
||||||
|
"y": 23709.924786305663
|
||||||
|
},
|
||||||
|
"floatingObject": {
|
||||||
|
"isPinned": false,
|
||||||
|
"isFrozen": false,
|
||||||
|
"isCollapsed": false,
|
||||||
|
"angleToParent": 2,
|
||||||
|
"distanceToParent": 3,
|
||||||
|
"arrangementStyle": 0
|
||||||
|
},
|
||||||
|
"uiObject": {}
|
||||||
|
}
|
||||||
|
},
|
||||||
"id": "362a1ecb-dce9-4ebb-9b00-a20d3631f2f3",
|
"id": "362a1ecb-dce9-4ebb-9b00-a20d3631f2f3",
|
||||||
"savedPayload": {
|
"savedPayload": {
|
||||||
"position": {
|
"position": {
|
||||||
"x": 25150.213607224283,
|
"x": 25243.737077503094,
|
||||||
"y": 23592.650063935456
|
"y": 23709.924786305663
|
||||||
},
|
},
|
||||||
"targetPosition": {
|
"targetPosition": {
|
||||||
"x": 24963.166666666664,
|
"x": 24963.166666666664,
|
||||||
@@ -113,7 +170,7 @@
|
|||||||
"isFrozen": false,
|
"isFrozen": false,
|
||||||
"isCollapsed": false,
|
"isCollapsed": false,
|
||||||
"angleToParent": 2,
|
"angleToParent": 2,
|
||||||
"distanceToParent": 3,
|
"distanceToParent": 4,
|
||||||
"arrangementStyle": 0
|
"arrangementStyle": 0
|
||||||
},
|
},
|
||||||
"uiObject": {
|
"uiObject": {
|
||||||
@@ -184,9 +241,9 @@
|
|||||||
"name": "New Claims Program",
|
"name": "New Claims Program",
|
||||||
"config": "{}",
|
"config": "{}",
|
||||||
"project": "Governance",
|
"project": "Governance",
|
||||||
"assetContributionsFolder": [],
|
"assetClaimsFolders": [],
|
||||||
"featureContributionsFolder": [],
|
"featureClaimsFolders": [],
|
||||||
"positionContributionsFolder": [],
|
"positionClaimsFolders": [],
|
||||||
"id": "bec9399a-9f85-4cb5-bff4-9938a3bc7ac4",
|
"id": "bec9399a-9f85-4cb5-bff4-9938a3bc7ac4",
|
||||||
"savedPayload": {
|
"savedPayload": {
|
||||||
"position": {
|
"position": {
|
||||||
@@ -274,7 +331,7 @@
|
|||||||
"floatingObject": {
|
"floatingObject": {
|
||||||
"isPinned": false,
|
"isPinned": false,
|
||||||
"isFrozen": false,
|
"isFrozen": false,
|
||||||
"isCollapsed": true,
|
"isCollapsed": false,
|
||||||
"angleToParent": 2,
|
"angleToParent": 2,
|
||||||
"distanceToParent": 3,
|
"distanceToParent": 3,
|
||||||
"arrangementStyle": 0
|
"arrangementStyle": 0
|
||||||
|
|||||||
File diff suppressed because it is too large.
Load diff
+19
-7
@@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"type": "Asset Contributions Folder",
|
"type": "Asset Claims Folder",
|
||||||
"menuItems": [
|
"menuItems": [
|
||||||
{
|
{
|
||||||
"action": "Configure",
|
"action": "Configure",
|
||||||
@@ -8,12 +8,21 @@
|
|||||||
"iconPathOn": "configuration",
|
"iconPathOn": "configuration",
|
||||||
"iconPathOff": "configuration"
|
"iconPathOff": "configuration"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"action": "Install Missing Claims",
|
||||||
|
"actionProject": "Governance",
|
||||||
|
"actionFunction": "payload.executeAction",
|
||||||
|
"label": "Install Missing Claims",
|
||||||
|
"relatedUiObject": "Asset Contribution Claim",
|
||||||
|
"askConfirmation": true,
|
||||||
|
"confirmationLabel": "Confirm to Install"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"action": "Add UI Object",
|
"action": "Add UI Object",
|
||||||
"actionProject": "Foundations",
|
"actionProject": "Foundations",
|
||||||
"actionFunction": "payload.executeAction",
|
"actionFunction": "payload.executeAction",
|
||||||
"label": "Add Asset Contributions Folder",
|
"label": "Add Asset Claims Folder",
|
||||||
"relatedUiObject": "Asset Contributions Folder"
|
"relatedUiObject": "Asset Claims Folder"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"action": "Add UI Object",
|
"action": "Add UI Object",
|
||||||
@@ -42,14 +51,17 @@
|
|||||||
"addLeftIcons": true,
|
"addLeftIcons": true,
|
||||||
"level": 2,
|
"level": 2,
|
||||||
"attachingRules": {
|
"attachingRules": {
|
||||||
"compatibleTypes": "->Claims Program->Asset Contributions Folder->"
|
"compatibleTypes": "->Claims Program->Asset Claims Folder->"
|
||||||
},
|
},
|
||||||
"propertyNameAtParent": "assetContributionsFolder",
|
"referencingRules": {
|
||||||
|
"compatibleTypes": "->Asset Class->"
|
||||||
|
},
|
||||||
|
"propertyNameAtParent": "assetClaimsFolders",
|
||||||
"childrenNodesProperties": [
|
"childrenNodesProperties": [
|
||||||
{
|
{
|
||||||
"name": "assetContributionsFolder",
|
"name": "assetClaimsFolders",
|
||||||
"type": "array",
|
"type": "array",
|
||||||
"childType": "Asset Contributions Folder",
|
"childType": "Asset Claims Folder",
|
||||||
"autoAdd": false
|
"autoAdd": false
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -9,9 +9,9 @@
|
|||||||
"iconPathOff": "configuration"
|
"iconPathOff": "configuration"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"action": "Install Assets",
|
"action": "Install Missing Assets",
|
||||||
"actionProject": "Governance",
|
"actionProject": "Governance",
|
||||||
"label": "Install Assets",
|
"label": "Install Missing Assets",
|
||||||
"askConfirmation": true,
|
"askConfirmation": true,
|
||||||
"confirmationLabel": "Confirm to Proceed",
|
"confirmationLabel": "Confirm to Proceed",
|
||||||
"workDoneLabel": "Done",
|
"workDoneLabel": "Done",
|
||||||
|
|||||||
@@ -33,7 +33,7 @@
|
|||||||
"addLeftIcons": true,
|
"addLeftIcons": true,
|
||||||
"level": 2,
|
"level": 2,
|
||||||
"attachingRules": {
|
"attachingRules": {
|
||||||
"compatibleTypes": "->Asset Contributions Folder->"
|
"compatibleTypes": "->Asset Claims Folder->"
|
||||||
},
|
},
|
||||||
"referencingRules": {
|
"referencingRules": {
|
||||||
"compatibleTypes": "->Asset->"
|
"compatibleTypes": "->Asset->"
|
||||||
|
|||||||
@@ -9,9 +9,9 @@
|
|||||||
"iconPathOff": "configuration"
|
"iconPathOff": "configuration"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"action": "Install Assets",
|
"action": "Install Missing Assets",
|
||||||
"actionProject": "Governance",
|
"actionProject": "Governance",
|
||||||
"label": "Install Assets",
|
"label": "Install Missing Assets",
|
||||||
"askConfirmation": true,
|
"askConfirmation": true,
|
||||||
"confirmationLabel": "Confirm to Proceed",
|
"confirmationLabel": "Confirm to Proceed",
|
||||||
"workDoneLabel": "Done",
|
"workDoneLabel": "Done",
|
||||||
|
|||||||
@@ -9,10 +9,10 @@
|
|||||||
"iconPathOff": "configuration"
|
"iconPathOff": "configuration"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"action": "Install Votes",
|
"action": "Install Missing Votes",
|
||||||
"actionProject": "Governance",
|
"actionProject": "Governance",
|
||||||
"actionFunction": "payload.executeAction",
|
"actionFunction": "payload.executeAction",
|
||||||
"label": "Install Votes",
|
"label": "Install Missing Votes",
|
||||||
"relatedUiObject": "Weight Votes Switch",
|
"relatedUiObject": "Weight Votes Switch",
|
||||||
"askConfirmation": true,
|
"askConfirmation": true,
|
||||||
"confirmationLabel": "Confirm to Install"
|
"confirmationLabel": "Confirm to Install"
|
||||||
|
|||||||
@@ -11,23 +11,23 @@
|
|||||||
{
|
{
|
||||||
"action": "Add UI Object",
|
"action": "Add UI Object",
|
||||||
"actionProject": "Foundations",
|
"actionProject": "Foundations",
|
||||||
"label": "Add Asset Contributions Folder",
|
"label": "Add Asset Claims Folder",
|
||||||
"relatedUiObject": "Asset Contributions Folder",
|
"relatedUiObject": "Asset Claims Folder",
|
||||||
"actionFunction": "payload.executeAction"
|
"actionFunction": "payload.executeAction"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"action": "Add UI Object",
|
"action": "Add UI Object",
|
||||||
"actionProject": "Foundations",
|
"actionProject": "Foundations",
|
||||||
"actionFunction": "payload.executeAction",
|
"actionFunction": "payload.executeAction",
|
||||||
"label": "Add Feature Contributions Folder",
|
"label": "Add Feature Claims Folder",
|
||||||
"relatedUiObject": "Feature Contributions Folder"
|
"relatedUiObject": "Feature Claims Folder"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"action": "Add UI Object",
|
"action": "Add UI Object",
|
||||||
"actionProject": "Foundations",
|
"actionProject": "Foundations",
|
||||||
"actionFunction": "payload.executeAction",
|
"actionFunction": "payload.executeAction",
|
||||||
"label": "Add Position Contributions Folder",
|
"label": "Add Position Claims Folder",
|
||||||
"relatedUiObject": "Position Contributions Folder"
|
"relatedUiObject": "Position Claims Folder"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"action": "Add UI Object",
|
"action": "Add UI Object",
|
||||||
@@ -63,21 +63,21 @@
|
|||||||
"propertyNameAtParent": "claimsProgram",
|
"propertyNameAtParent": "claimsProgram",
|
||||||
"childrenNodesProperties": [
|
"childrenNodesProperties": [
|
||||||
{
|
{
|
||||||
"name": "assetContributionsFolder",
|
"name": "assetClaimsFolders",
|
||||||
"type": "array",
|
"type": "array",
|
||||||
"childType": "Asset Contributions Folder",
|
"childType": "Asset Claims Folder",
|
||||||
"autoAdd": false
|
"autoAdd": false
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "featureContributionsFolder",
|
"name": "featureClaimsFolders",
|
||||||
"type": "array",
|
"type": "array",
|
||||||
"childType": "Feature Contributions Folder",
|
"childType": "Feature Claims Folder",
|
||||||
"autoAdd": false
|
"autoAdd": false
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "positionContributionsFolder",
|
"name": "positionClaimsFolders",
|
||||||
"type": "array",
|
"type": "array",
|
||||||
"childType": "Position Contributions Folder",
|
"childType": "Position Claims Folder",
|
||||||
"autoAdd": false
|
"autoAdd": false
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
+19
-7
@@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"type": "Feature Contributions Folder",
|
"type": "Feature Claims Folder",
|
||||||
"menuItems": [
|
"menuItems": [
|
||||||
{
|
{
|
||||||
"action": "Configure",
|
"action": "Configure",
|
||||||
@@ -8,12 +8,21 @@
|
|||||||
"iconPathOn": "configuration",
|
"iconPathOn": "configuration",
|
||||||
"iconPathOff": "configuration"
|
"iconPathOff": "configuration"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"action": "Install Missing Claims",
|
||||||
|
"actionProject": "Governance",
|
||||||
|
"actionFunction": "payload.executeAction",
|
||||||
|
"label": "Install Missing Claims",
|
||||||
|
"relatedUiObject": "Feature Contribution Claim",
|
||||||
|
"askConfirmation": true,
|
||||||
|
"confirmationLabel": "Confirm to Install"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"action": "Add UI Object",
|
"action": "Add UI Object",
|
||||||
"actionProject": "Foundations",
|
"actionProject": "Foundations",
|
||||||
"actionFunction": "payload.executeAction",
|
"actionFunction": "payload.executeAction",
|
||||||
"label": "Add Feature Contributions Folder",
|
"label": "Add Feature Claims Folder",
|
||||||
"relatedUiObject": "Feature Contributions Folder"
|
"relatedUiObject": "Feature Claims Folder"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"action": "Add UI Object",
|
"action": "Add UI Object",
|
||||||
@@ -42,14 +51,17 @@
|
|||||||
"addLeftIcons": true,
|
"addLeftIcons": true,
|
||||||
"level": 2,
|
"level": 2,
|
||||||
"attachingRules": {
|
"attachingRules": {
|
||||||
"compatibleTypes": "->Claims Program->Feature Contributions Folder->"
|
"compatibleTypes": "->Claims Program->Feature Claims Folder->"
|
||||||
},
|
},
|
||||||
"propertyNameAtParent": "featureContributionsFolder",
|
"referencingRules": {
|
||||||
|
"compatibleTypes": "->Feature Class->"
|
||||||
|
},
|
||||||
|
"propertyNameAtParent": "featureClaimsFolders",
|
||||||
"childrenNodesProperties": [
|
"childrenNodesProperties": [
|
||||||
{
|
{
|
||||||
"name": "featureContributionsFolder",
|
"name": "featureClaimsFolders",
|
||||||
"type": "array",
|
"type": "array",
|
||||||
"childType": "Feature Contributions Folder",
|
"childType": "Feature Claims Folder",
|
||||||
"autoAdd": false
|
"autoAdd": false
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -32,7 +32,7 @@
|
|||||||
"addLeftIcons": true,
|
"addLeftIcons": true,
|
||||||
"level": 2,
|
"level": 2,
|
||||||
"attachingRules": {
|
"attachingRules": {
|
||||||
"compatibleTypes": "->Feature Contributions Folder->"
|
"compatibleTypes": "->Feature Claims Folder->"
|
||||||
},
|
},
|
||||||
"referencingRules": {
|
"referencingRules": {
|
||||||
"compatibleTypes": "->Feature->"
|
"compatibleTypes": "->Feature->"
|
||||||
|
|||||||
+19
-7
@@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"type": "Position Contributions Folder",
|
"type": "Position Claims Folder",
|
||||||
"menuItems": [
|
"menuItems": [
|
||||||
{
|
{
|
||||||
"action": "Configure",
|
"action": "Configure",
|
||||||
@@ -8,12 +8,21 @@
|
|||||||
"iconPathOn": "configuration",
|
"iconPathOn": "configuration",
|
||||||
"iconPathOff": "configuration"
|
"iconPathOff": "configuration"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"action": "Install Missing Claims",
|
||||||
|
"actionProject": "Governance",
|
||||||
|
"actionFunction": "payload.executeAction",
|
||||||
|
"label": "Install Missing Claims",
|
||||||
|
"relatedUiObject": "Position Contribution Claim",
|
||||||
|
"askConfirmation": true,
|
||||||
|
"confirmationLabel": "Confirm to Install"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"action": "Add UI Object",
|
"action": "Add UI Object",
|
||||||
"actionProject": "Foundations",
|
"actionProject": "Foundations",
|
||||||
"actionFunction": "payload.executeAction",
|
"actionFunction": "payload.executeAction",
|
||||||
"label": "Add Position Contributions Folder",
|
"label": "Add Position Claims Folder",
|
||||||
"relatedUiObject": "Position Contributions Folder"
|
"relatedUiObject": "Position Claims Folder"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"action": "Add UI Object",
|
"action": "Add UI Object",
|
||||||
@@ -42,14 +51,17 @@
|
|||||||
"addLeftIcons": true,
|
"addLeftIcons": true,
|
||||||
"level": 2,
|
"level": 2,
|
||||||
"attachingRules": {
|
"attachingRules": {
|
||||||
"compatibleTypes": "->Claims Program->Position Contributions Folder->"
|
"compatibleTypes": "->Claims Program->Position Claims Folder->"
|
||||||
},
|
},
|
||||||
"propertyNameAtParent": "positionContributionsFolder",
|
"referencingRules": {
|
||||||
|
"compatibleTypes": "->Position Class->"
|
||||||
|
},
|
||||||
|
"propertyNameAtParent": "positionClaimsFolders",
|
||||||
"childrenNodesProperties": [
|
"childrenNodesProperties": [
|
||||||
{
|
{
|
||||||
"name": "positionContributionsFolder",
|
"name": "positionClaimsFolders",
|
||||||
"type": "array",
|
"type": "array",
|
||||||
"childType": "Position Contributions Folder",
|
"childType": "Position Claims Folder",
|
||||||
"autoAdd": false
|
"autoAdd": false
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -32,7 +32,7 @@
|
|||||||
"addLeftIcons": true,
|
"addLeftIcons": true,
|
||||||
"level": 2,
|
"level": 2,
|
||||||
"attachingRules": {
|
"attachingRules": {
|
||||||
"compatibleTypes": "->Position Contributions Folder->"
|
"compatibleTypes": "->Position Claims Folder->"
|
||||||
},
|
},
|
||||||
"referencingRules": {
|
"referencingRules": {
|
||||||
"compatibleTypes": "->Position->"
|
"compatibleTypes": "->Position->"
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"action": "Build Profile",
|
"action": "Build Profile",
|
||||||
"actionProject": "Governance",
|
"actionProject": "Governance",
|
||||||
"label": "Build Profile",
|
"label": "Build Profile",
|
||||||
"askConfirmation": true,
|
"askConfirmation": true,
|
||||||
"confirmationLabel": "Confirm to Proceed",
|
"confirmationLabel": "Confirm to Proceed",
|
||||||
@@ -40,5 +40,6 @@
|
|||||||
"level": 2,
|
"level": 2,
|
||||||
"referencingRules": {
|
"referencingRules": {
|
||||||
"compatibleTypes": "->User Profile->"
|
"compatibleTypes": "->User Profile->"
|
||||||
}
|
},
|
||||||
|
"isPersonalData": true
|
||||||
}
|
}
|
||||||
@@ -9,10 +9,10 @@
|
|||||||
"iconPathOff": "configuration"
|
"iconPathOff": "configuration"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"action": "Install Votes",
|
"action": "Install Missing Votes",
|
||||||
"actionProject": "Governance",
|
"actionProject": "Governance",
|
||||||
"actionFunction": "payload.executeAction",
|
"actionFunction": "payload.executeAction",
|
||||||
"label": "Install Votes",
|
"label": "Install Missing Votes",
|
||||||
"relatedUiObject": "Weight Votes Switch",
|
"relatedUiObject": "Weight Votes Switch",
|
||||||
"askConfirmation": true,
|
"askConfirmation": true,
|
||||||
"confirmationLabel": "Confirm to Install"
|
"confirmationLabel": "Confirm to Install"
|
||||||
|
|||||||
@@ -9,10 +9,10 @@
|
|||||||
"iconPathOff": "configuration"
|
"iconPathOff": "configuration"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"action": "Install Votes",
|
"action": "Install Missing Votes",
|
||||||
"actionProject": "Governance",
|
"actionProject": "Governance",
|
||||||
"actionFunction": "payload.executeAction",
|
"actionFunction": "payload.executeAction",
|
||||||
"label": "Install Votes",
|
"label": "Install Missing Votes",
|
||||||
"relatedUiObject": "Weight Votes Switch",
|
"relatedUiObject": "Weight Votes Switch",
|
||||||
"askConfirmation": true,
|
"askConfirmation": true,
|
||||||
"confirmationLabel": "Confirm to Install"
|
"confirmationLabel": "Confirm to Install"
|
||||||
|
|||||||
@@ -9,10 +9,10 @@
|
|||||||
"iconPathOff": "configuration"
|
"iconPathOff": "configuration"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"action": "Install Votes",
|
"action": "Install Missing Votes",
|
||||||
"actionProject": "Governance",
|
"actionProject": "Governance",
|
||||||
"actionFunction": "payload.executeAction",
|
"actionFunction": "payload.executeAction",
|
||||||
"label": "Install Votes",
|
"label": "Install Missing Votes",
|
||||||
"relatedUiObject": "Weight Votes Switch",
|
"relatedUiObject": "Weight Votes Switch",
|
||||||
"askConfirmation": true,
|
"askConfirmation": true,
|
||||||
"confirmationLabel": "Confirm to Install"
|
"confirmationLabel": "Confirm to Install"
|
||||||
|
|||||||
+1
-1
@@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"type": "Asset Contributions Folder",
|
"type": "Asset Claims Folder",
|
||||||
"definition": {
|
"definition": {
|
||||||
"text": "This folder type of node, help users organize their Asset contributions claims.",
|
"text": "This folder type of node, help users organize their Asset contributions claims.",
|
||||||
"updated": 1622989520560
|
"updated": 1622989520560
|
||||||
+1
-1
@@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"type": "Feature Contributions Folder",
|
"type": "Feature Claims Folder",
|
||||||
"definition": {
|
"definition": {
|
||||||
"text": "This folder type of node, help users organize their Feature contributions claims.",
|
"text": "This folder type of node, help users organize their Feature contributions claims.",
|
||||||
"updated": 1622989537182
|
"updated": 1622989537182
|
||||||
+1
-1
@@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"type": "Position Contributions Folder",
|
"type": "Position Claims Folder",
|
||||||
"definition": {
|
"definition": {
|
||||||
"text": "This folder type of node, help users organize their Position contributions claims.",
|
"text": "This folder type of node, help users organize their Position contributions claims.",
|
||||||
"updated": 1622989549721
|
"updated": 1622989549721
|
||||||
@@ -18,14 +18,19 @@ function newGovernanceActionSwitch() {
|
|||||||
|
|
||||||
async function executeAction(action) {
|
async function executeAction(action) {
|
||||||
switch (action.name) {
|
switch (action.name) {
|
||||||
case 'Install Assets':
|
case 'Install Missing Assets':
|
||||||
{
|
{
|
||||||
UI.projects.governance.functionLibraries.assets.installAssets(action.node, action.rootNodes)
|
UI.projects.governance.functionLibraries.assets.installMissingAssets(action.node, action.rootNodes)
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
case 'Install Votes':
|
case 'Install Missing Votes':
|
||||||
{
|
{
|
||||||
UI.projects.governance.functionLibraries.votes.installVotes(action.node, action.rootNodes)
|
UI.projects.governance.functionLibraries.votes.installMissingVotes(action.node, action.rootNodes)
|
||||||
|
break
|
||||||
|
}
|
||||||
|
case 'Install Missing Claims':
|
||||||
|
{
|
||||||
|
UI.projects.governance.functionLibraries.claims.installMissingClaims(action.node, action.rootNodes)
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
case 'Build Profile':
|
case 'Build Profile':
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
function newGovernanceFunctionLibraryAssets() {
|
function newGovernanceFunctionLibraryAssets() {
|
||||||
let thisObject = {
|
let thisObject = {
|
||||||
installAssets: installAssets
|
installMissingAssets: installMissingAssets
|
||||||
}
|
}
|
||||||
|
|
||||||
return thisObject
|
return thisObject
|
||||||
|
|
||||||
function installAssets(
|
function installMissingAssets(
|
||||||
node,
|
node,
|
||||||
rootNodes
|
rootNodes
|
||||||
) {
|
) {
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
function newGovernanceFunctionLibraryClaims() {
|
function newGovernanceFunctionLibraryClaims() {
|
||||||
let thisObject = {
|
let thisObject = {
|
||||||
calculate: calculate
|
calculate: calculate,
|
||||||
|
installMissingClaims: installMissingClaims
|
||||||
}
|
}
|
||||||
|
|
||||||
return thisObject
|
return thisObject
|
||||||
@@ -48,211 +49,309 @@ function newGovernanceFunctionLibraryClaims() {
|
|||||||
let userProfilesNode = userProfiles[i]
|
let userProfilesNode = userProfiles[i]
|
||||||
calculateForNode(userProfilesNode.claimsProgram, userProfilesNode)
|
calculateForNode(userProfilesNode.claimsProgram, userProfilesNode)
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
function resetClaims(node) {
|
function resetClaims(node) {
|
||||||
if (node === undefined) { return }
|
if (node === undefined) { return }
|
||||||
if (node.payload === undefined) { return }
|
if (node.payload === undefined) { return }
|
||||||
|
|
||||||
if (
|
if (
|
||||||
node.type !== 'Asset Class' &&
|
node.type !== 'Asset Class' &&
|
||||||
node.type !== 'Feature Class' &&
|
node.type !== 'Feature Class' &&
|
||||||
node.type !== 'Position Class'
|
node.type !== 'Position Class'
|
||||||
) {
|
) {
|
||||||
if (node.payload.votes !== undefined) {
|
if (node.payload.votes !== undefined) {
|
||||||
node.payload.claims = {
|
node.payload.claims = {
|
||||||
count: 0,
|
|
||||||
votes: 0
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
let schemaDocument = getSchemaDocument(node)
|
|
||||||
if (schemaDocument === undefined) { return }
|
|
||||||
|
|
||||||
if (schemaDocument.childrenNodesProperties !== undefined) {
|
|
||||||
for (let i = 0; i < schemaDocument.childrenNodesProperties.length; i++) {
|
|
||||||
let property = schemaDocument.childrenNodesProperties[i]
|
|
||||||
switch (property.type) {
|
|
||||||
case 'node': {
|
|
||||||
let childNode = node[property.name]
|
|
||||||
resetClaims(childNode)
|
|
||||||
}
|
|
||||||
break
|
|
||||||
case 'array': {
|
|
||||||
let propertyArray = node[property.name]
|
|
||||||
if (propertyArray !== undefined) {
|
|
||||||
for (let m = 0; m < propertyArray.length; m++) {
|
|
||||||
let childNode = propertyArray[m]
|
|
||||||
resetClaims(childNode)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
break
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function countForNode(node) {
|
|
||||||
if (node === undefined) { return }
|
|
||||||
if (node.payload === undefined) { return }
|
|
||||||
|
|
||||||
if (
|
|
||||||
node.type !== 'Asset Contributions Folder' &&
|
|
||||||
node.type !== 'Feature Contributions Folder' &&
|
|
||||||
node.type !== 'Position Contributions Folder' &&
|
|
||||||
node.type !== 'Claims Program'
|
|
||||||
) {
|
|
||||||
if (node.payload.claims === undefined) {
|
|
||||||
node.payload.claims = {
|
|
||||||
count: 0,
|
|
||||||
awarded: {
|
|
||||||
tokens: 0,
|
|
||||||
percentage: 0
|
|
||||||
},
|
|
||||||
share: {
|
|
||||||
count: 0,
|
count: 0,
|
||||||
percentage: 0
|
votes: 0
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (
|
let schemaDocument = getSchemaDocument(node)
|
||||||
node.payload.votes !== undefined &&
|
if (schemaDocument === undefined) { return }
|
||||||
node.payload.votes > 0 &&
|
|
||||||
node.payload.referenceParent !== undefined &&
|
if (schemaDocument.childrenNodesProperties !== undefined) {
|
||||||
node.payload.referenceParent.payload !== undefined &&
|
for (let i = 0; i < schemaDocument.childrenNodesProperties.length; i++) {
|
||||||
node.payload.referenceParent.payload.votes !== undefined &&
|
let property = schemaDocument.childrenNodesProperties[i]
|
||||||
node.payload.referenceParent.payload.votes > 0 &&
|
switch (property.type) {
|
||||||
node.payload.referenceParent.payload.weight !== undefined &&
|
case 'node': {
|
||||||
node.payload.referenceParent.payload.weight > 0 &&
|
let childNode = node[property.name]
|
||||||
node.payload.referenceParent.payload.claims.count !== undefined &&
|
resetClaims(childNode)
|
||||||
node.payload.referenceParent.payload.claims.votes !== undefined
|
}
|
||||||
) {
|
break
|
||||||
node.payload.referenceParent.payload.claims.count++
|
case 'array': {
|
||||||
node.payload.referenceParent.payload.claims.votes = node.payload.referenceParent.payload.claims.votes + node.payload.votes
|
let propertyArray = node[property.name]
|
||||||
|
if (propertyArray !== undefined) {
|
||||||
|
for (let m = 0; m < propertyArray.length; m++) {
|
||||||
|
let childNode = propertyArray[m]
|
||||||
|
resetClaims(childNode)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
let schemaDocument = getSchemaDocument(node)
|
function countForNode(node) {
|
||||||
if (schemaDocument === undefined) { return }
|
if (node === undefined) { return }
|
||||||
|
if (node.payload === undefined) { return }
|
||||||
|
|
||||||
if (schemaDocument.childrenNodesProperties !== undefined) {
|
if (
|
||||||
for (let i = 0; i < schemaDocument.childrenNodesProperties.length; i++) {
|
node.type !== 'Asset Claims Folder' &&
|
||||||
let property = schemaDocument.childrenNodesProperties[i]
|
node.type !== 'Feature Claims Folder' &&
|
||||||
switch (property.type) {
|
node.type !== 'Position Claims Folder' &&
|
||||||
case 'node': {
|
node.type !== 'Claims Program'
|
||||||
let childNode = node[property.name]
|
) {
|
||||||
countForNode(childNode)
|
if (node.payload.claims === undefined) {
|
||||||
|
node.payload.claims = {
|
||||||
|
count: 0,
|
||||||
|
awarded: {
|
||||||
|
tokens: 0,
|
||||||
|
percentage: 0
|
||||||
|
},
|
||||||
|
share: {
|
||||||
|
count: 0,
|
||||||
|
percentage: 0
|
||||||
|
}
|
||||||
}
|
}
|
||||||
break
|
}
|
||||||
case 'array': {
|
|
||||||
let propertyArray = node[property.name]
|
if (
|
||||||
if (propertyArray !== undefined) {
|
node.payload.votes !== undefined &&
|
||||||
for (let m = 0; m < propertyArray.length; m++) {
|
node.payload.votes > 0 &&
|
||||||
let childNode = propertyArray[m]
|
node.payload.referenceParent !== undefined &&
|
||||||
countForNode(childNode)
|
node.payload.referenceParent.payload !== undefined &&
|
||||||
|
node.payload.referenceParent.payload.votes !== undefined &&
|
||||||
|
node.payload.referenceParent.payload.votes > 0 &&
|
||||||
|
node.payload.referenceParent.payload.weight !== undefined &&
|
||||||
|
node.payload.referenceParent.payload.weight > 0 &&
|
||||||
|
node.payload.referenceParent.payload.claims.count !== undefined &&
|
||||||
|
node.payload.referenceParent.payload.claims.votes !== undefined
|
||||||
|
) {
|
||||||
|
node.payload.referenceParent.payload.claims.count++
|
||||||
|
node.payload.referenceParent.payload.claims.votes = node.payload.referenceParent.payload.claims.votes + node.payload.votes
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
let schemaDocument = getSchemaDocument(node)
|
||||||
|
if (schemaDocument === undefined) { return }
|
||||||
|
|
||||||
|
if (schemaDocument.childrenNodesProperties !== undefined) {
|
||||||
|
for (let i = 0; i < schemaDocument.childrenNodesProperties.length; i++) {
|
||||||
|
let property = schemaDocument.childrenNodesProperties[i]
|
||||||
|
switch (property.type) {
|
||||||
|
case 'node': {
|
||||||
|
let childNode = node[property.name]
|
||||||
|
countForNode(childNode)
|
||||||
|
}
|
||||||
|
break
|
||||||
|
case 'array': {
|
||||||
|
let propertyArray = node[property.name]
|
||||||
|
if (propertyArray !== undefined) {
|
||||||
|
for (let m = 0; m < propertyArray.length; m++) {
|
||||||
|
let childNode = propertyArray[m]
|
||||||
|
countForNode(childNode)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
break
|
||||||
}
|
}
|
||||||
break
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function calculateForNode(node, userProfilesNode) {
|
||||||
|
if (node === undefined) { return }
|
||||||
|
if (node.payload === undefined) { return }
|
||||||
|
|
||||||
|
if (
|
||||||
|
node.type !== 'Asset Claims Folder' &&
|
||||||
|
node.type !== 'Feature Claims Folder' &&
|
||||||
|
node.type !== 'Position Claims Folder' &&
|
||||||
|
node.type !== 'Claims Program'
|
||||||
|
) {
|
||||||
|
if (
|
||||||
|
node.payload.claims !== undefined &&
|
||||||
|
node.payload.votes !== undefined &&
|
||||||
|
node.payload.votes > 0 &&
|
||||||
|
node.payload.referenceParent !== undefined &&
|
||||||
|
node.payload.referenceParent.payload !== undefined &&
|
||||||
|
node.payload.referenceParent.payload.votes !== undefined &&
|
||||||
|
node.payload.referenceParent.payload.votes > 0 &&
|
||||||
|
node.payload.referenceParent.payload.weight !== undefined &&
|
||||||
|
node.payload.referenceParent.payload.weight > 0 &&
|
||||||
|
node.payload.referenceParent.payload.claims.count !== undefined &&
|
||||||
|
node.payload.referenceParent.payload.claims.votes !== undefined
|
||||||
|
) {
|
||||||
|
/*
|
||||||
|
We will use the concept of Vote Reward Claims Ratio for the situation in which the
|
||||||
|
total votes in claims exeeds the amount of votes of the reward. When this happens
|
||||||
|
the Votes Rewards Claims Ratio will be used to redude the amount of tokens awarded
|
||||||
|
proportionally to how much was exeeded.
|
||||||
|
*/
|
||||||
|
let votesRatio = node.payload.referenceParent.payload.votes / node.payload.referenceParent.payload.claims.votes
|
||||||
|
if (votesRatio > 1) { votesRatio = 1 }
|
||||||
|
/*
|
||||||
|
Share Count means the amount to claims pointing to the same potential tokens reward.
|
||||||
|
*/
|
||||||
|
node.payload.claims.share.count = node.payload.referenceParent.payload.claims.count
|
||||||
|
node.payload.claims.share.percentage = node.payload.votes * 100 / node.payload.referenceParent.payload.claims.votes
|
||||||
|
node.payload.claims.awarded.tokens =
|
||||||
|
Math.min(
|
||||||
|
node.payload.votes / node.payload.referenceParent.payload.votes * node.payload.referenceParent.payload.tokens * votesRatio,
|
||||||
|
node.payload.votes
|
||||||
|
)
|
||||||
|
node.payload.claims.awarded.percentage = node.payload.claims.awarded.tokens / node.payload.referenceParent.payload.tokens * 100
|
||||||
|
|
||||||
|
userProfilesNode.payload.claims.awarded.tokens = userProfilesNode.payload.claims.awarded.tokens + node.payload.claims.awarded.tokens
|
||||||
|
userProfilesNode.payload.claims.count++
|
||||||
|
|
||||||
|
drawClaims(node, userProfilesNode)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
let schemaDocument = getSchemaDocument(node)
|
||||||
|
if (schemaDocument === undefined) { return }
|
||||||
|
|
||||||
|
if (schemaDocument.childrenNodesProperties !== undefined) {
|
||||||
|
for (let i = 0; i < schemaDocument.childrenNodesProperties.length; i++) {
|
||||||
|
let property = schemaDocument.childrenNodesProperties[i]
|
||||||
|
switch (property.type) {
|
||||||
|
case 'node': {
|
||||||
|
let childNode = node[property.name]
|
||||||
|
calculateForNode(childNode, userProfilesNode)
|
||||||
|
}
|
||||||
|
break
|
||||||
|
case 'array': {
|
||||||
|
let propertyArray = node[property.name]
|
||||||
|
if (propertyArray !== undefined) {
|
||||||
|
for (let m = 0; m < propertyArray.length; m++) {
|
||||||
|
let childNode = propertyArray[m]
|
||||||
|
calculateForNode(childNode, userProfilesNode)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function drawClaims(node, userProfilesNode) {
|
||||||
|
let satatus =
|
||||||
|
new Intl.NumberFormat().format(node.payload.claims.awarded.tokens) +
|
||||||
|
' ' + 'SA Tokens Awarded' + ' - ' +
|
||||||
|
'From Reward: ' + node.payload.claims.awarded.percentage.toFixed(2) + '%' + ' - ' +
|
||||||
|
'Shared Between: ' + node.payload.claims.share.count + ' claims' + ' - ' +
|
||||||
|
'Share of Claims: ' + node.payload.claims.share.percentage.toFixed(2) + '%'
|
||||||
|
|
||||||
|
node.payload.uiObject.setStatus(satatus)
|
||||||
|
|
||||||
|
satatus = new Intl.NumberFormat().format(userProfilesNode.payload.claims.awarded.tokens) +
|
||||||
|
' ' + 'SA Tokens Awarded' +
|
||||||
|
' from ' + userProfilesNode.payload.claims.count + ' Claims'
|
||||||
|
|
||||||
|
userProfilesNode.payload.uiObject.setValue(satatus)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function calculateForNode(node, userProfilesNode) {
|
function installMissingClaims(node, rootNodes) {
|
||||||
if (node === undefined) { return }
|
|
||||||
if (node.payload === undefined) { return }
|
if (node.payload === undefined) { return }
|
||||||
|
if (node.payload.referenceParent === undefined) {
|
||||||
if (
|
node.payload.uiObject.setErrorMessage('To Install Missing Claims you need a Reference Parent')
|
||||||
node.type !== 'Asset Contributions Folder' &&
|
return
|
||||||
node.type !== 'Feature Contributions Folder' &&
|
|
||||||
node.type !== 'Position Contributions Folder' &&
|
|
||||||
node.type !== 'Claims Program'
|
|
||||||
) {
|
|
||||||
if (
|
|
||||||
node.payload.claims !== undefined &&
|
|
||||||
node.payload.votes !== undefined &&
|
|
||||||
node.payload.votes > 0 &&
|
|
||||||
node.payload.referenceParent !== undefined &&
|
|
||||||
node.payload.referenceParent.payload !== undefined &&
|
|
||||||
node.payload.referenceParent.payload.votes !== undefined &&
|
|
||||||
node.payload.referenceParent.payload.votes > 0 &&
|
|
||||||
node.payload.referenceParent.payload.weight !== undefined &&
|
|
||||||
node.payload.referenceParent.payload.weight > 0 &&
|
|
||||||
node.payload.referenceParent.payload.claims.count !== undefined &&
|
|
||||||
node.payload.referenceParent.payload.claims.votes !== undefined
|
|
||||||
) {
|
|
||||||
/*
|
|
||||||
We will use the concept of Vote Reward Claims Ratio for the situation in which the
|
|
||||||
total votes in claims exeeds the amount of votes of the reward. When this happens
|
|
||||||
the Votes Rewards Claims Ratio will be used to redude the amount of tokens awarded
|
|
||||||
proportionally to how much was exeeded.
|
|
||||||
*/
|
|
||||||
let votesRatio = node.payload.referenceParent.payload.votes / node.payload.referenceParent.payload.claims.votes
|
|
||||||
if (votesRatio > 1) { votesRatio = 1 }
|
|
||||||
/*
|
|
||||||
Share Count means the amount to claims pointing to the same potential tokens reward.
|
|
||||||
*/
|
|
||||||
node.payload.claims.share.count = node.payload.referenceParent.payload.claims.count
|
|
||||||
node.payload.claims.share.percentage = node.payload.votes * 100 / node.payload.referenceParent.payload.claims.votes
|
|
||||||
node.payload.claims.awarded.tokens =
|
|
||||||
Math.min(
|
|
||||||
node.payload.votes / node.payload.referenceParent.payload.votes * node.payload.referenceParent.payload.tokens * votesRatio,
|
|
||||||
node.payload.votes
|
|
||||||
)
|
|
||||||
node.payload.claims.awarded.percentage = node.payload.claims.awarded.tokens / node.payload.referenceParent.payload.tokens * 100
|
|
||||||
|
|
||||||
userProfilesNode.payload.claims.awarded.tokens = userProfilesNode.payload.claims.awarded.tokens + node.payload.claims.awarded.tokens
|
|
||||||
userProfilesNode.payload.claims.count++
|
|
||||||
|
|
||||||
drawClaims(node, userProfilesNode)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
scanNodeBranch(node, node.payload.referenceParent)
|
||||||
|
|
||||||
let schemaDocument = getSchemaDocument(node)
|
function scanNodeBranch(originNode, destinationNode) {
|
||||||
if (schemaDocument === undefined) { return }
|
if (
|
||||||
|
destinationNode.type === 'Asset' ||
|
||||||
|
destinationNode.type === 'Feature' ||
|
||||||
|
destinationNode.type === 'Position'
|
||||||
|
) {
|
||||||
|
originNode.name = destinationNode.name + ' ' + destinationNode.type + ' ' + ' Claim'
|
||||||
|
} else {
|
||||||
|
originNode.name = destinationNode.name + ' ' + destinationNode.type
|
||||||
|
}
|
||||||
|
|
||||||
if (schemaDocument.childrenNodesProperties !== undefined) {
|
let schemaDocument = getSchemaDocument(destinationNode)
|
||||||
for (let i = 0; i < schemaDocument.childrenNodesProperties.length; i++) {
|
if (schemaDocument === undefined) { return }
|
||||||
let property = schemaDocument.childrenNodesProperties[i]
|
|
||||||
switch (property.type) {
|
if (schemaDocument.childrenNodesProperties !== undefined) {
|
||||||
case 'node': {
|
for (let i = 0; i < schemaDocument.childrenNodesProperties.length; i++) {
|
||||||
let childNode = node[property.name]
|
let property = schemaDocument.childrenNodesProperties[i]
|
||||||
calculateForNode(childNode, userProfilesNode)
|
|
||||||
}
|
switch (property.type) {
|
||||||
break
|
case 'node': {
|
||||||
case 'array': {
|
|
||||||
let propertyArray = node[property.name]
|
let destinationNodeChild = destinationNode[property.name]
|
||||||
if (propertyArray !== undefined) {
|
|
||||||
for (let m = 0; m < propertyArray.length; m++) {
|
let originNodeChildType = getOriginNodeChildType(destinationNodeChild)
|
||||||
let childNode = propertyArray[m]
|
let originNodeChild = UI.projects.foundations.utilities.children.findChildReferencingThisNode(originNode, destinationNodeChild)
|
||||||
calculateForNode(childNode, userProfilesNode)
|
|
||||||
|
if (originNodeChild === undefined) {
|
||||||
|
originNodeChild = UI.projects.foundations.functionLibraries.uiObjectsFromNodes.addUIObject(originNode, originNodeChildType)
|
||||||
}
|
}
|
||||||
|
originNodeChild.payload.referenceParent = destinationNodeChild
|
||||||
|
scanNodeBranch(originNodeChild, destinationNodeChild)
|
||||||
|
}
|
||||||
|
break
|
||||||
|
case 'array': {
|
||||||
|
let propertyArray = destinationNode[property.name]
|
||||||
|
if (propertyArray !== undefined) {
|
||||||
|
for (let m = 0; m < propertyArray.length; m++) {
|
||||||
|
|
||||||
|
let destinationNodeChild = propertyArray[m]
|
||||||
|
|
||||||
|
let originNodeChildType = getOriginNodeChildType(destinationNodeChild)
|
||||||
|
let originNodeChild = UI.projects.foundations.utilities.children.findChildReferencingThisNode(originNode, destinationNodeChild)
|
||||||
|
|
||||||
|
if (originNodeChild === undefined) {
|
||||||
|
originNodeChild = UI.projects.foundations.functionLibraries.uiObjectsFromNodes.addUIObject(originNode, originNodeChildType)
|
||||||
|
}
|
||||||
|
originNodeChild.payload.referenceParent = destinationNodeChild
|
||||||
|
scanNodeBranch(originNodeChild, destinationNodeChild)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break
|
||||||
}
|
}
|
||||||
break
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
function drawClaims(node, userProfilesNode) {
|
function getOriginNodeChildType(destinationNode) {
|
||||||
let satatus =
|
let originNodeType
|
||||||
new Intl.NumberFormat().format(node.payload.claims.awarded.tokens) +
|
|
||||||
' ' + 'SA Tokens Awarded' + ' - ' +
|
|
||||||
'From Reward: ' + node.payload.claims.awarded.percentage.toFixed(2) + '%' + ' - ' +
|
|
||||||
'Shared Between: ' + node.payload.claims.share.count + ' claims' + ' - ' +
|
|
||||||
'Share of Claims: ' + node.payload.claims.share.percentage.toFixed(2) + '%'
|
|
||||||
|
|
||||||
node.payload.uiObject.setStatus(satatus)
|
switch (destinationNode.type) {
|
||||||
|
case 'Asset Class': {
|
||||||
satatus = new Intl.NumberFormat().format(userProfilesNode.payload.claims.awarded.tokens) +
|
originNodeType = 'Asset Claims Folder'
|
||||||
' ' + 'SA Tokens Awarded' +
|
break
|
||||||
' from ' + userProfilesNode.payload.claims.count + ' Claims'
|
}
|
||||||
|
case 'Feature Class': {
|
||||||
userProfilesNode.payload.uiObject.setValue(satatus)
|
originNodeType = 'Feature Claims Folder'
|
||||||
|
break
|
||||||
|
}
|
||||||
|
case 'Position Class': {
|
||||||
|
originNodeType = 'Position Claims Folder'
|
||||||
|
break
|
||||||
|
}
|
||||||
|
case 'Asset': {
|
||||||
|
originNodeType = 'Asset Contribution Claim'
|
||||||
|
break
|
||||||
|
}
|
||||||
|
case 'Feature': {
|
||||||
|
originNodeType = 'Feature Contribution Claim'
|
||||||
|
break
|
||||||
|
}
|
||||||
|
case 'Position': {
|
||||||
|
originNodeType = 'Position Contribution Claim'
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return originNodeType
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -36,7 +36,12 @@ function newGovernanceFunctionLibraryDistributionProcess() {
|
|||||||
pools
|
pools
|
||||||
)
|
)
|
||||||
|
|
||||||
UI.projects.governance.functionLibraries.userrReferrals.calculate(
|
UI.projects.governance.functionLibraries.referralProgram.calculate(
|
||||||
|
pools,
|
||||||
|
userProfiles
|
||||||
|
)
|
||||||
|
|
||||||
|
UI.projects.governance.functionLibraries.mentorshipProgram.calculate(
|
||||||
pools,
|
pools,
|
||||||
userProfiles
|
userProfiles
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -0,0 +1,291 @@
|
|||||||
|
function newGovernanceFunctionLibraryMentorshipProgram() {
|
||||||
|
let thisObject = {
|
||||||
|
calculate: calculate
|
||||||
|
}
|
||||||
|
|
||||||
|
return thisObject
|
||||||
|
|
||||||
|
function calculate(
|
||||||
|
pools,
|
||||||
|
userProfiles
|
||||||
|
) {
|
||||||
|
/*
|
||||||
|
Here we will store the total amount of tokens that is going to be distributed among all participants
|
||||||
|
of the Mentorship Program. This will come from a Pool that is configured wiht a codeName config property
|
||||||
|
with the value "Mentorship-Program"
|
||||||
|
*/
|
||||||
|
let mentorshipProgramPoolTokenReward
|
||||||
|
/*
|
||||||
|
In order to be able to calculate the share of the Mentorships Program Pool for each User Profile,
|
||||||
|
we need to accumulate all the Icomming Mentorship Power that each User Profile at their Mentorship Program
|
||||||
|
node has, because with that Incoming Power is that each Mentorship Program node gets a share of
|
||||||
|
the pool.
|
||||||
|
*/
|
||||||
|
let accumulatedIncomingMentorshipPower = 0
|
||||||
|
|
||||||
|
/* Scan Pools Until finding the Mentoship-Program Pool */
|
||||||
|
for (let i = 0; i < pools.length; i++) {
|
||||||
|
let poolsNode = pools[i]
|
||||||
|
mentorshipProgramPoolTokenReward = UI.projects.governance.utilities.pools.findPool(poolsNode, "Mentorship-Program")
|
||||||
|
}
|
||||||
|
if (mentorshipProgramPoolTokenReward === undefined || mentorshipProgramPoolTokenReward === 0) { return }
|
||||||
|
/*
|
||||||
|
We will first reset all the mentorship outgoingPower, and then distribute it.
|
||||||
|
*/
|
||||||
|
for (let i = 0; i < userProfiles.length; i++) {
|
||||||
|
let userProfile = userProfiles[i]
|
||||||
|
|
||||||
|
if (userProfile.tokenSwitch === undefined) { continue }
|
||||||
|
if (userProfile.tokenSwitch.mentorshipProgram === undefined) { continue }
|
||||||
|
if (userProfile.tokenSwitch.mentorshipProgram.payload === undefined) { continue }
|
||||||
|
|
||||||
|
reserMentorshipProgram(userProfile.tokenSwitch.mentorshipProgram)
|
||||||
|
}
|
||||||
|
for (let i = 0; i < userProfiles.length; i++) {
|
||||||
|
let userProfile = userProfiles[i]
|
||||||
|
|
||||||
|
if (userProfile.tokenSwitch === undefined) { continue }
|
||||||
|
if (userProfile.tokenSwitch.mentorshipProgram === undefined) { continue }
|
||||||
|
if (userProfile.tokenSwitch.mentorshipProgram.payload === undefined) { continue }
|
||||||
|
|
||||||
|
distributeMentorshipProgram(userProfile.tokenSwitch.mentorshipProgram)
|
||||||
|
}
|
||||||
|
for (let i = 0; i < userProfiles.length; i++) {
|
||||||
|
let userProfile = userProfiles[i]
|
||||||
|
|
||||||
|
if (userProfile.tokenSwitch === undefined) { continue }
|
||||||
|
if (userProfile.tokenSwitch.mentorshipProgram === undefined) { continue }
|
||||||
|
if (userProfile.tokenSwitch.mentorshipProgram.payload === undefined) { continue }
|
||||||
|
|
||||||
|
calculateMentorshipProgram(userProfile.tokenSwitch.mentorshipProgram)
|
||||||
|
}
|
||||||
|
|
||||||
|
function reserMentorshipProgram(node) {
|
||||||
|
if (node === undefined) { return }
|
||||||
|
if (node.payload === undefined) { return }
|
||||||
|
node.payload.mentorshipProgram = {
|
||||||
|
count: 0,
|
||||||
|
outgoingPower: 0,
|
||||||
|
ownPower: 0,
|
||||||
|
incomingPower: 0,
|
||||||
|
awarded: {
|
||||||
|
tokens: 0,
|
||||||
|
percentage: 0
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (
|
||||||
|
node.type === 'User Profile' &&
|
||||||
|
node.tokenSwitch !== undefined
|
||||||
|
) {
|
||||||
|
reserMentorshipProgram(node.tokenSwitch)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if (
|
||||||
|
node.type === 'Token Switch' &&
|
||||||
|
node.mentorshipProgram !== undefined
|
||||||
|
) {
|
||||||
|
reserMentorshipProgram(node.mentorshipProgram)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if (
|
||||||
|
node.type === 'Mentorship Program' &&
|
||||||
|
node.userMentors !== undefined
|
||||||
|
) {
|
||||||
|
for (let i = 0; i < node.userMentors.length; i++) {
|
||||||
|
reserMentorshipProgram(node.userMentors[i])
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if (
|
||||||
|
node.type === 'User Mentor' &&
|
||||||
|
node.payload.referenceParent !== undefined
|
||||||
|
) {
|
||||||
|
reserMentorshipProgram(node.payload.referenceParent)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function distributeMentorshipProgram(mentorshipProgram) {
|
||||||
|
if (mentorshipProgram === undefined || mentorshipProgram.payload === undefined) { return }
|
||||||
|
/*
|
||||||
|
Here we will convert Token Power into Mentorship Power.
|
||||||
|
As per system rules mentoshipPower = tokensPower
|
||||||
|
*/
|
||||||
|
let mentoshipPower = mentorshipProgram.payload.tokenPower
|
||||||
|
/*
|
||||||
|
We will also reseet the count of mentorships here.
|
||||||
|
*/
|
||||||
|
let count = 0
|
||||||
|
/*
|
||||||
|
The Own Power is the power generated by the same User Profile tokens, not inherited from others.
|
||||||
|
*/
|
||||||
|
mentorshipProgram.payload.mentorshipProgram.ownPower = mentoshipPower
|
||||||
|
|
||||||
|
distributeMentorshipPower(mentorshipProgram, mentoshipPower, count)
|
||||||
|
}
|
||||||
|
|
||||||
|
function distributeMentorshipPower(
|
||||||
|
node,
|
||||||
|
mentoshipPower,
|
||||||
|
count
|
||||||
|
) {
|
||||||
|
if (node === undefined) { return }
|
||||||
|
if (node.payload === undefined) { return }
|
||||||
|
if (node.payload.mentorshipProgram === undefined) { return }
|
||||||
|
|
||||||
|
switch (node.type) {
|
||||||
|
case 'Mentorship Program': {
|
||||||
|
/*
|
||||||
|
This is the point where we increase to our local count of mentorships whatever it comes
|
||||||
|
at the count parameters. If we are processing the User Profile of this Mentorship Program
|
||||||
|
then we will add zero, otherwise, 1.
|
||||||
|
*/
|
||||||
|
node.payload.mentorshipProgram.count = node.payload.mentorshipProgram.count + count
|
||||||
|
/*
|
||||||
|
The outgoingPower of this node will be accumulating all the mentoshipPower flowing
|
||||||
|
through it, no matter from where it comes.
|
||||||
|
*/
|
||||||
|
node.payload.mentorshipProgram.outgoingPower = node.payload.mentorshipProgram.outgoingPower + mentoshipPower
|
||||||
|
/*
|
||||||
|
We need to adjust the balance that holds the accumulationt of all incomingPower of all Mentorship Program
|
||||||
|
nodes. To do this we will substratct the current incomingPower, bacause it is going to be recalculated
|
||||||
|
inmediatelly after this, and then we will add it again after the recalcualtion.
|
||||||
|
*/
|
||||||
|
accumulatedIncomingMentorshipPower = accumulatedIncomingMentorshipPower - node.payload.mentorshipProgram.incomingPower
|
||||||
|
/*
|
||||||
|
At any point in time, the incomingPower will be equal to the total of the outgoingPower minus
|
||||||
|
the ownPower. This is like this because the outgoingPower is the accumulation of all the
|
||||||
|
power flow that is leaving this node, which includes the ownPower. That means that if we
|
||||||
|
substract the ownPower, we will have the accumulation of all the incomingPower, which
|
||||||
|
means all the power coming from other User Profiles referencing this one.
|
||||||
|
*/
|
||||||
|
node.payload.mentorshipProgram.incomingPower = node.payload.mentorshipProgram.outgoingPower - node.payload.mentorshipProgram.ownPower
|
||||||
|
/*
|
||||||
|
Now that we have the incomingPower calculated again, we can add it again to the balance of all the incomingPower
|
||||||
|
of all Mentorship Program nodes.
|
||||||
|
*/
|
||||||
|
accumulatedIncomingMentorshipPower = accumulatedIncomingMentorshipPower + node.payload.mentorshipProgram.incomingPower
|
||||||
|
|
||||||
|
if (node.userMentors !== undefined) {
|
||||||
|
for (let i = 0; i < node.userMentors.length; i++) {
|
||||||
|
distributeMentorshipPower(node.userMentors[i], mentoshipPower / node.userMentors.length, 0)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break
|
||||||
|
}
|
||||||
|
case 'User Mentor': {
|
||||||
|
node.payload.mentorshipProgram.outgoingPower = node.payload.parentNode.payload.mentorshipProgram.outgoingPower / node.payload.parentNode.userMentors.length
|
||||||
|
|
||||||
|
drawUserMentor(node)
|
||||||
|
if (node.payload.referenceParent !== undefined) {
|
||||||
|
distributeMentorshipPower(node.payload.referenceParent, mentoshipPower / 10, 0)
|
||||||
|
}
|
||||||
|
break
|
||||||
|
}
|
||||||
|
case 'User Profile': {
|
||||||
|
if (node.tokenSwitch !== undefined) {
|
||||||
|
distributeMentorshipPower(node.tokenSwitch, mentoshipPower, 0)
|
||||||
|
}
|
||||||
|
break
|
||||||
|
}
|
||||||
|
case 'Token Switch': {
|
||||||
|
if (node.mentorshipProgram !== undefined) {
|
||||||
|
distributeMentorshipPower(node.mentorshipProgram, mentoshipPower, 1)
|
||||||
|
}
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function calculateMentorshipProgram(mentorshipProgram) {
|
||||||
|
/*
|
||||||
|
Here we will calculate which share of the Mentorship Program Pool this user will get in tokens.
|
||||||
|
To do that, we use the incomingPower, to see which proportion of the accumulatedIncomingMentorshipPower
|
||||||
|
represents.
|
||||||
|
*/
|
||||||
|
if (mentorshipProgram.payload === undefined) { return }
|
||||||
|
/*
|
||||||
|
If the accumulatedIncomingMentorshipPower is not grater the amount of tokens at the Mentorship Program Pool, then
|
||||||
|
this user will get the exact amount of tokens from the pool as incomingPower he has.
|
||||||
|
|
||||||
|
If the accumulatedIncomingMentorshipPower is grater the amount of tokens at the Mentorship Program Pool, then
|
||||||
|
the amount ot tokens to be received is a proportional to the share of incomingPower in accumulatedIncomingMentorshipPower.
|
||||||
|
*/
|
||||||
|
let totalPowerRewardRatio = accumulatedIncomingMentorshipPower / mentorshipProgramPoolTokenReward
|
||||||
|
if (totalPowerRewardRatio < 1) { totalPowerRewardRatio = 1 }
|
||||||
|
|
||||||
|
if (mentorshipProgram.tokensAwarded === undefined || mentorshipProgram.tokensAwarded.payload === undefined) {
|
||||||
|
mentorshipProgram.payload.uiObject.setErrorMessage("Tokens Awarded Node is needed in order for this Program to get Tokens from the Mentorship Program Pool.")
|
||||||
|
return
|
||||||
|
}
|
||||||
|
mentorshipProgram.payload.mentorshipProgram.awarded.tokens = mentorshipProgram.payload.mentorshipProgram.incomingPower * totalPowerRewardRatio
|
||||||
|
/*
|
||||||
|
As per the system rules, the Mentorship Program will not give tokens to users that do not ha their own Referrer set up,
|
||||||
|
unless it has a big amount of tokens (this last condition is for the edge case where a user it at the top of the
|
||||||
|
mentorship pyramid.)
|
||||||
|
*/
|
||||||
|
if (
|
||||||
|
mentorshipProgram.payload.mentorshipProgram.awarded.tokens > 0 &&
|
||||||
|
mentorshipProgram.payload.mentorshipProgram.ownPower < 1000000 &&
|
||||||
|
(mentorshipProgram.userMentors === undefined || hasUsersDefined(mentorshipProgram.userMentors) === false)
|
||||||
|
) {
|
||||||
|
|
||||||
|
mentorshipProgram.payload.uiObject.setErrorMessage("In order to be awarded " + mentorshipProgram.payload.mentorshipProgram.awarded.tokens + " SA Tokens from your mentorships, you need first to define yourself who your metors are.")
|
||||||
|
mentorshipProgram.payload.mentorshipProgram.awarded.tokens = 0
|
||||||
|
}
|
||||||
|
|
||||||
|
drawMentorshipProgram(mentorshipProgram)
|
||||||
|
}
|
||||||
|
|
||||||
|
function hasUsersDefined(usersArray) {
|
||||||
|
if (usersArray === undefined) { return false }
|
||||||
|
for (let i = 0; i < usersArray.length; i++) {
|
||||||
|
let user = usersArray[i]
|
||||||
|
if (user.payload.referenceParent !== undefined) { return true }
|
||||||
|
}
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
function drawUserMentor(node) {
|
||||||
|
if (node.payload !== undefined) {
|
||||||
|
|
||||||
|
const outgoingPowerText = new Intl.NumberFormat().format(node.payload.mentorshipProgram.outgoingPower)
|
||||||
|
|
||||||
|
node.payload.uiObject.valueAngleOffset = 180
|
||||||
|
node.payload.uiObject.valueAtAngle = true
|
||||||
|
|
||||||
|
node.payload.uiObject.setValue(outgoingPowerText + ' ' + 'Mentorship Power')
|
||||||
|
|
||||||
|
node.payload.uiObject.statusAngleOffset = 0
|
||||||
|
node.payload.uiObject.statusAtAngle = false
|
||||||
|
|
||||||
|
node.payload.uiObject.setStatus(outgoingPowerText + ' ' + ' Outgoing Power')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function drawMentorshipProgram(node) {
|
||||||
|
if (node.payload !== undefined) {
|
||||||
|
|
||||||
|
const ownPowerText = new Intl.NumberFormat().format(node.payload.mentorshipProgram.ownPower)
|
||||||
|
const incomingPowerText = new Intl.NumberFormat().format(node.payload.mentorshipProgram.incomingPower)
|
||||||
|
|
||||||
|
node.payload.uiObject.statusAngleOffset = 0
|
||||||
|
node.payload.uiObject.statusAtAngle = false
|
||||||
|
|
||||||
|
node.payload.uiObject.setStatus(ownPowerText + ' Own Power - ' + incomingPowerText + ' Incoming Power')
|
||||||
|
}
|
||||||
|
if (node.tokensAwarded !== undefined && node.tokensAwarded.payload !== undefined) {
|
||||||
|
|
||||||
|
const tokensAwardedText = new Intl.NumberFormat().format(node.payload.mentorshipProgram.awarded.tokens)
|
||||||
|
|
||||||
|
node.tokensAwarded.payload.uiObject.statusAngleOffset = 0
|
||||||
|
node.tokensAwarded.payload.uiObject.statusAtAngle = false
|
||||||
|
node.tokensAwarded.payload.uiObject.valueAngleOffset = 0
|
||||||
|
node.tokensAwarded.payload.uiObject.valueAtAngle = false
|
||||||
|
|
||||||
|
node.tokensAwarded.payload.uiObject.setValue(tokensAwardedText + ' SA Tokens')
|
||||||
|
node.tokensAwarded.payload.uiObject.setStatus('From ' + node.payload.mentorshipProgram.count + ' Mentees.')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
+39
-85
@@ -1,4 +1,4 @@
|
|||||||
function newGovernanceFunctionLibraryUserReferrals() {
|
function newGovernanceFunctionLibraryReferralProgram() {
|
||||||
let thisObject = {
|
let thisObject = {
|
||||||
calculate: calculate
|
calculate: calculate
|
||||||
}
|
}
|
||||||
@@ -23,10 +23,10 @@ function newGovernanceFunctionLibraryUserReferrals() {
|
|||||||
*/
|
*/
|
||||||
let accumulatedIncomingReferralPower = 0
|
let accumulatedIncomingReferralPower = 0
|
||||||
|
|
||||||
/* Scan Pools Until finding the User-Referrlas Pool */
|
/* Scan Pools Until finding the Referrla-Program Pool */
|
||||||
for (let i = 0; i < pools.length; i++) {
|
for (let i = 0; i < pools.length; i++) {
|
||||||
let poolsNode = pools[i]
|
let poolsNode = pools[i]
|
||||||
findPool(poolsNode)
|
referralProgramPoolTokenReward = UI.projects.governance.utilities.pools.findPool(poolsNode, "Referral-Program")
|
||||||
}
|
}
|
||||||
if (referralProgramPoolTokenReward === undefined || referralProgramPoolTokenReward === 0) { return }
|
if (referralProgramPoolTokenReward === undefined || referralProgramPoolTokenReward === 0) { return }
|
||||||
/*
|
/*
|
||||||
@@ -39,7 +39,7 @@ function newGovernanceFunctionLibraryUserReferrals() {
|
|||||||
if (userProfile.tokenSwitch.referralProgram === undefined) { continue }
|
if (userProfile.tokenSwitch.referralProgram === undefined) { continue }
|
||||||
if (userProfile.tokenSwitch.referralProgram.payload === undefined) { continue }
|
if (userProfile.tokenSwitch.referralProgram.payload === undefined) { continue }
|
||||||
|
|
||||||
resetUserReferrals(userProfile.tokenSwitch.referralProgram)
|
reserReferralProgram(userProfile.tokenSwitch.referralProgram)
|
||||||
}
|
}
|
||||||
for (let i = 0; i < userProfiles.length; i++) {
|
for (let i = 0; i < userProfiles.length; i++) {
|
||||||
let userProfile = userProfiles[i]
|
let userProfile = userProfiles[i]
|
||||||
@@ -48,7 +48,7 @@ function newGovernanceFunctionLibraryUserReferrals() {
|
|||||||
if (userProfile.tokenSwitch.referralProgram === undefined) { continue }
|
if (userProfile.tokenSwitch.referralProgram === undefined) { continue }
|
||||||
if (userProfile.tokenSwitch.referralProgram.payload === undefined) { continue }
|
if (userProfile.tokenSwitch.referralProgram.payload === undefined) { continue }
|
||||||
|
|
||||||
distributeForReferralProgram(userProfile.tokenSwitch.referralProgram)
|
distributeReferralProgram(userProfile.tokenSwitch.referralProgram)
|
||||||
}
|
}
|
||||||
for (let i = 0; i < userProfiles.length; i++) {
|
for (let i = 0; i < userProfiles.length; i++) {
|
||||||
let userProfile = userProfiles[i]
|
let userProfile = userProfiles[i]
|
||||||
@@ -57,58 +57,13 @@ function newGovernanceFunctionLibraryUserReferrals() {
|
|||||||
if (userProfile.tokenSwitch.referralProgram === undefined) { continue }
|
if (userProfile.tokenSwitch.referralProgram === undefined) { continue }
|
||||||
if (userProfile.tokenSwitch.referralProgram.payload === undefined) { continue }
|
if (userProfile.tokenSwitch.referralProgram.payload === undefined) { continue }
|
||||||
|
|
||||||
calculateForReferralProgram(userProfile.tokenSwitch.referralProgram)
|
calculateReferralProgram(userProfile.tokenSwitch.referralProgram)
|
||||||
}
|
}
|
||||||
|
|
||||||
function findPool(node) {
|
function reserReferralProgram(node) {
|
||||||
if (node === undefined) { return }
|
if (node === undefined) { return }
|
||||||
if (node.payload === undefined) { return }
|
if (node.payload === undefined) { return }
|
||||||
|
node.payload.referralProgram = {
|
||||||
/*
|
|
||||||
When we reach certain node types, we will halt the distribution, because these are targets for
|
|
||||||
voting outgoingPower.
|
|
||||||
*/
|
|
||||||
if (
|
|
||||||
node.type === 'Pool'
|
|
||||||
) {
|
|
||||||
let codeName = UI.projects.foundations.utilities.nodeConfig.loadConfigProperty(node.payload, 'codeName')
|
|
||||||
if (codeName === "Referral-Program") {
|
|
||||||
referralProgramPoolTokenReward = node.payload.tokens
|
|
||||||
return
|
|
||||||
}
|
|
||||||
}
|
|
||||||
let schemaDocument = getSchemaDocument(node)
|
|
||||||
if (schemaDocument === undefined) { return }
|
|
||||||
|
|
||||||
if (schemaDocument.childrenNodesProperties !== undefined) {
|
|
||||||
for (let i = 0; i < schemaDocument.childrenNodesProperties.length; i++) {
|
|
||||||
let property = schemaDocument.childrenNodesProperties[i]
|
|
||||||
|
|
||||||
switch (property.type) {
|
|
||||||
case 'node': {
|
|
||||||
let childNode = node[property.name]
|
|
||||||
findPool(childNode)
|
|
||||||
}
|
|
||||||
break
|
|
||||||
case 'array': {
|
|
||||||
let propertyArray = node[property.name]
|
|
||||||
if (propertyArray !== undefined) {
|
|
||||||
for (let m = 0; m < propertyArray.length; m++) {
|
|
||||||
let childNode = propertyArray[m]
|
|
||||||
findPool(childNode)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
break
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function resetUserReferrals(node) {
|
|
||||||
if (node === undefined) { return }
|
|
||||||
if (node.payload === undefined) { return }
|
|
||||||
node.payload.referrals = {
|
|
||||||
count: 0,
|
count: 0,
|
||||||
outgoingPower: 0,
|
outgoingPower: 0,
|
||||||
ownPower: 0,
|
ownPower: 0,
|
||||||
@@ -118,41 +73,37 @@ function newGovernanceFunctionLibraryUserReferrals() {
|
|||||||
percentage: 0
|
percentage: 0
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/*
|
|
||||||
If the node is a User Profile, we will check if it has a User Referrer child defined.
|
|
||||||
*/
|
|
||||||
if (
|
if (
|
||||||
node.type === 'User Profile' &&
|
node.type === 'User Profile' &&
|
||||||
node.tokenSwitch !== undefined &&
|
node.tokenSwitch !== undefined
|
||||||
node.tokenSwitch.referralProgram !== undefined
|
|
||||||
) {
|
) {
|
||||||
resetUserReferrals(node.tokenSwitch.referralProgram)
|
reserReferralProgram(node.tokenSwitch)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if (
|
||||||
|
node.type === 'Token Switch' &&
|
||||||
|
node.referralProgram !== undefined
|
||||||
|
) {
|
||||||
|
reserReferralProgram(node.referralProgram)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
/*
|
|
||||||
If the node is a Referral Program, we will check if it has a User Referrer child defined.
|
|
||||||
*/
|
|
||||||
if (
|
if (
|
||||||
node.type === 'Referral Program' &&
|
node.type === 'Referral Program' &&
|
||||||
node.userReferrer !== undefined
|
node.userReferrer !== undefined
|
||||||
) {
|
) {
|
||||||
resetUserReferrals(node.userReferrer)
|
reserReferralProgram(node.userReferrer)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
/*
|
|
||||||
If there is a reference parent defined, this means that the referral outgoingPower is
|
|
||||||
transfered to it.
|
|
||||||
*/
|
|
||||||
if (
|
if (
|
||||||
node.type === 'User Referrer' &&
|
node.type === 'User Referrer' &&
|
||||||
node.payload.referenceParent !== undefined
|
node.payload.referenceParent !== undefined
|
||||||
) {
|
) {
|
||||||
resetUserReferrals(node.payload.referenceParent)
|
reserReferralProgram(node.payload.referenceParent)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function distributeForReferralProgram(referralProgram) {
|
function distributeReferralProgram(referralProgram) {
|
||||||
if (referralProgram === undefined || referralProgram.payload === undefined) { return }
|
if (referralProgram === undefined || referralProgram.payload === undefined) { return }
|
||||||
/*
|
/*
|
||||||
Here we will convert Token Power into Referral Power.
|
Here we will convert Token Power into Referral Power.
|
||||||
@@ -166,7 +117,7 @@ function newGovernanceFunctionLibraryUserReferrals() {
|
|||||||
/*
|
/*
|
||||||
The Own Power is the power generated by the same User Profile tokens, not inherited from others.
|
The Own Power is the power generated by the same User Profile tokens, not inherited from others.
|
||||||
*/
|
*/
|
||||||
referralProgram.payload.referrals.ownPower = referringPower
|
referralProgram.payload.referralProgram.ownPower = referringPower
|
||||||
|
|
||||||
distributeReferralPower(referralProgram, referringPower, count)
|
distributeReferralPower(referralProgram, referringPower, count)
|
||||||
}
|
}
|
||||||
@@ -187,18 +138,18 @@ function newGovernanceFunctionLibraryUserReferrals() {
|
|||||||
at the count parameters. If we are processing the User Profile of this Referral Program
|
at the count parameters. If we are processing the User Profile of this Referral Program
|
||||||
then we will add zero, otherwise, 1.
|
then we will add zero, otherwise, 1.
|
||||||
*/
|
*/
|
||||||
node.payload.referrals.count = node.payload.referrals.count + count
|
node.payload.referralProgram.count = node.payload.referralProgram.count + count
|
||||||
/*
|
/*
|
||||||
The outgoingPower of this node will be accumulating all the referringPower flowing
|
The outgoingPower of this node will be accumulating all the referringPower flowing
|
||||||
through it, no matter from where it comes.
|
through it, no matter from where it comes.
|
||||||
*/
|
*/
|
||||||
node.payload.referrals.outgoingPower = node.payload.referrals.outgoingPower + referringPower
|
node.payload.referralProgram.outgoingPower = node.payload.referralProgram.outgoingPower + referringPower
|
||||||
/*
|
/*
|
||||||
We need to adjust the balance that holds the accumulationt of all incomingPower of all Referral Program
|
We need to adjust the balance that holds the accumulationt of all incomingPower of all Referral Program
|
||||||
nodes. To do this we will substratct the current incomingPower, bacause it is going to be recalculated
|
nodes. To do this we will substratct the current incomingPower, bacause it is going to be recalculated
|
||||||
inmediatelly after this, and then we will add it again after the recalcualtion.
|
inmediatelly after this, and then we will add it again after the recalcualtion.
|
||||||
*/
|
*/
|
||||||
accumulatedIncomingReferralPower = accumulatedIncomingReferralPower - node.payload.referrals.incomingPower
|
accumulatedIncomingReferralPower = accumulatedIncomingReferralPower - node.payload.referralProgram.incomingPower
|
||||||
/*
|
/*
|
||||||
At any point in time, the incomingPower will be equal to the total of the outgoingPower minus
|
At any point in time, the incomingPower will be equal to the total of the outgoingPower minus
|
||||||
the ownPower. This is like this because the outgoingPower is the accumulation of all the
|
the ownPower. This is like this because the outgoingPower is the accumulation of all the
|
||||||
@@ -206,12 +157,12 @@ function newGovernanceFunctionLibraryUserReferrals() {
|
|||||||
substract the ownPower, we will have the accumulation of all the incomingPower, which
|
substract the ownPower, we will have the accumulation of all the incomingPower, which
|
||||||
means all the power coming from other User Profiles referencing this one.
|
means all the power coming from other User Profiles referencing this one.
|
||||||
*/
|
*/
|
||||||
node.payload.referrals.incomingPower = node.payload.referrals.outgoingPower - node.payload.referrals.ownPower
|
node.payload.referralProgram.incomingPower = node.payload.referralProgram.outgoingPower - node.payload.referralProgram.ownPower
|
||||||
/*
|
/*
|
||||||
Now that we have the incomingPower calculated again, we can add it again to the balance of all the incomingPower
|
Now that we have the incomingPower calculated again, we can add it again to the balance of all the incomingPower
|
||||||
of all Referral Program nodes.
|
of all Referral Program nodes.
|
||||||
*/
|
*/
|
||||||
accumulatedIncomingReferralPower = accumulatedIncomingReferralPower + node.payload.referrals.incomingPower
|
accumulatedIncomingReferralPower = accumulatedIncomingReferralPower + node.payload.referralProgram.incomingPower
|
||||||
|
|
||||||
if (node.userReferrer !== undefined) {
|
if (node.userReferrer !== undefined) {
|
||||||
distributeReferralPower(node.userReferrer, referringPower, 0)
|
distributeReferralPower(node.userReferrer, referringPower, 0)
|
||||||
@@ -240,10 +191,10 @@ function newGovernanceFunctionLibraryUserReferrals() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function calculateForReferralProgram(referralProgram) {
|
function calculateReferralProgram(referralProgram) {
|
||||||
/*
|
/*
|
||||||
Here we will calculate which share of the Referral Program Pool this user will get in tokens.
|
Here we will calculate which share of the Referral Program Pool this user will get in tokens.
|
||||||
To do that, we use the incomingPower, to se which proportion of the accumulatedIncomingReferralPower
|
To do that, we use the incomingPower, to see which proportion of the accumulatedIncomingReferralPower
|
||||||
represents.
|
represents.
|
||||||
*/
|
*/
|
||||||
if (referralProgram.payload === undefined) { return }
|
if (referralProgram.payload === undefined) { return }
|
||||||
@@ -261,19 +212,19 @@ function newGovernanceFunctionLibraryUserReferrals() {
|
|||||||
referralProgram.payload.uiObject.setErrorMessage("Tokens Awarded Node is needed in order for this Program to get Tokens from the Referral Program Pool.")
|
referralProgram.payload.uiObject.setErrorMessage("Tokens Awarded Node is needed in order for this Program to get Tokens from the Referral Program Pool.")
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
referralProgram.payload.referrals.awarded.tokens = referralProgram.payload.referrals.incomingPower * totalPowerRewardRatio
|
referralProgram.payload.referralProgram.awarded.tokens = referralProgram.payload.referralProgram.incomingPower * totalPowerRewardRatio
|
||||||
/*
|
/*
|
||||||
As per the system rules, the Referral Program will not give tokens to users that do not ha their own Referrer set up,
|
As per the system rules, the Referral Program will not give tokens to users that do not ha their own Referrer set up,
|
||||||
unless it has a big amount of tokens (this last condition is for the edge case where a user it at the top of the
|
unless it has a big amount of tokens (this last condition is for the edge case where a user it at the top of the
|
||||||
referral pyramid.)
|
referral pyramid.)
|
||||||
*/
|
*/
|
||||||
if (
|
if (
|
||||||
referralProgram.payload.referrals.ownPower < 1000000 &&
|
referralProgram.payload.referralProgram.ownPower < 1000000 &&
|
||||||
(referralProgram.userReferrer === undefined || referralProgram.userReferrer.payload.referenceParent === undefined)
|
(referralProgram.userReferrer === undefined || referralProgram.userReferrer.payload.referenceParent === undefined)
|
||||||
) {
|
) {
|
||||||
|
|
||||||
referralProgram.payload.uiObject.setErrorMessage("In order to be awarded " + referralProgram.payload.referrals.awarded.tokens + " SA Tokens from your referrals, you need first to define yourself who your referrer is.")
|
referralProgram.payload.uiObject.setErrorMessage("In order to be awarded " + referralProgram.payload.referralProgram.awarded.tokens + " SA Tokens from your referrals, you need first to define yourself who your referrer is.")
|
||||||
referralProgram.payload.referrals.awarded.tokens = 0
|
referralProgram.payload.referralProgram.awarded.tokens = 0
|
||||||
}
|
}
|
||||||
|
|
||||||
drawReferralProgram(referralProgram)
|
drawReferralProgram(referralProgram)
|
||||||
@@ -281,9 +232,9 @@ function newGovernanceFunctionLibraryUserReferrals() {
|
|||||||
|
|
||||||
function drawUserReferrer(node) {
|
function drawUserReferrer(node) {
|
||||||
if (node.payload !== undefined) {
|
if (node.payload !== undefined) {
|
||||||
const ownPowerText = new Intl.NumberFormat().format(node.payload.parentNode.payload.referrals.ownPower)
|
const ownPowerText = new Intl.NumberFormat().format(node.payload.parentNode.payload.referralProgram.ownPower)
|
||||||
const incomingPowerText = new Intl.NumberFormat().format(node.payload.parentNode.payload.referrals.incomingPower)
|
const incomingPowerText = new Intl.NumberFormat().format(node.payload.parentNode.payload.referralProgram.incomingPower)
|
||||||
const outgoingPowerText = new Intl.NumberFormat().format(node.payload.parentNode.payload.referrals.outgoingPower)
|
const outgoingPowerText = new Intl.NumberFormat().format(node.payload.parentNode.payload.referralProgram.outgoingPower)
|
||||||
|
|
||||||
node.payload.uiObject.valueAngleOffset = 180
|
node.payload.uiObject.valueAngleOffset = 180
|
||||||
node.payload.uiObject.valueAtAngle = true
|
node.payload.uiObject.valueAtAngle = true
|
||||||
@@ -307,12 +258,15 @@ function newGovernanceFunctionLibraryUserReferrals() {
|
|||||||
}
|
}
|
||||||
if (node.tokensAwarded !== undefined && node.tokensAwarded.payload !== undefined) {
|
if (node.tokensAwarded !== undefined && node.tokensAwarded.payload !== undefined) {
|
||||||
|
|
||||||
const tokensAwardedText = new Intl.NumberFormat().format(node.payload.referrals.awarded.tokens)
|
const tokensAwardedText = new Intl.NumberFormat().format(node.payload.referralProgram.awarded.tokens)
|
||||||
|
|
||||||
node.tokensAwarded.payload.uiObject.statusAngleOffset = 0
|
node.tokensAwarded.payload.uiObject.statusAngleOffset = 0
|
||||||
node.tokensAwarded.payload.uiObject.statusAtAngle = false
|
node.tokensAwarded.payload.uiObject.statusAtAngle = false
|
||||||
|
node.tokensAwarded.payload.uiObject.valueAngleOffset = 0
|
||||||
|
node.tokensAwarded.payload.uiObject.valueAtAngle = false
|
||||||
|
|
||||||
node.tokensAwarded.payload.uiObject.setValue(tokensAwardedText + ' SA Tokens')
|
node.tokensAwarded.payload.uiObject.setValue(tokensAwardedText + ' SA Tokens')
|
||||||
|
node.tokensAwarded.payload.uiObject.setStatus('From '+ node.payload.referralProgram.count + ' Referrals.')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -17,7 +17,7 @@ function newGovernanceFunctionLibraryTokenPower() {
|
|||||||
}
|
}
|
||||||
for (let i = 0; i < userProfiles.length; i++) {
|
for (let i = 0; i < userProfiles.length; i++) {
|
||||||
let userProfile = userProfiles[i]
|
let userProfile = userProfiles[i]
|
||||||
distributeForProfile(userProfile)
|
distributeProfile(userProfile)
|
||||||
}
|
}
|
||||||
|
|
||||||
function resetTokenPower(node) {
|
function resetTokenPower(node) {
|
||||||
@@ -67,7 +67,7 @@ function newGovernanceFunctionLibraryTokenPower() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function distributeForProfile(userProfile) {
|
function distributeProfile(userProfile) {
|
||||||
if (userProfile.payload === undefined) { return }
|
if (userProfile.payload === undefined) { return }
|
||||||
let tokenPower
|
let tokenPower
|
||||||
if (userProfile.payload.blockchainTokens === undefined) {
|
if (userProfile.payload.blockchainTokens === undefined) {
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
function newGovernanceFunctionLibraryVotes() {
|
function newGovernanceFunctionLibraryVotes() {
|
||||||
let thisObject = {
|
let thisObject = {
|
||||||
calculate: calculate,
|
calculate: calculate,
|
||||||
installVotes: installVotes
|
installMissingVotes: installMissingVotes
|
||||||
}
|
}
|
||||||
|
|
||||||
return thisObject
|
return thisObject
|
||||||
@@ -57,7 +57,7 @@ function newGovernanceFunctionLibraryVotes() {
|
|||||||
|
|
||||||
userProfile.tokenSwitch.votingProgram.payload.votes = userProfile.tokenSwitch.votingProgram.payload.tokenPower
|
userProfile.tokenSwitch.votingProgram.payload.votes = userProfile.tokenSwitch.votingProgram.payload.tokenPower
|
||||||
|
|
||||||
distributeForVotingProgram(userProfile.tokenSwitch.votingProgram)
|
distributeVotingProgram(userProfile.tokenSwitch.votingProgram)
|
||||||
}
|
}
|
||||||
|
|
||||||
function resetVotes(node) {
|
function resetVotes(node) {
|
||||||
@@ -126,7 +126,7 @@ function newGovernanceFunctionLibraryVotes() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function distributeForVotingProgram(votingProgram) {
|
function distributeVotingProgram(votingProgram) {
|
||||||
if (votingProgram.payload === undefined) { return }
|
if (votingProgram.payload === undefined) { return }
|
||||||
let votes = votingProgram.payload.votes
|
let votes = votingProgram.payload.votes
|
||||||
distributeVotes(votingProgram, votes)
|
distributeVotes(votingProgram, votes)
|
||||||
@@ -313,7 +313,7 @@ function newGovernanceFunctionLibraryVotes() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function installVotes(node, rootNodes) {
|
function installMissingVotes(node, rootNodes) {
|
||||||
if (node.payload === undefined) { return }
|
if (node.payload === undefined) { return }
|
||||||
if (node.payload.referenceParent === undefined) {
|
if (node.payload.referenceParent === undefined) {
|
||||||
node.payload.uiObject.setErrorMessage('To install votes you need a Reference Parent')
|
node.payload.uiObject.setErrorMessage('To install votes you need a Reference Parent')
|
||||||
@@ -346,17 +346,12 @@ function newGovernanceFunctionLibraryVotes() {
|
|||||||
let destinationNodeChild = destinationNode[property.name]
|
let destinationNodeChild = destinationNode[property.name]
|
||||||
|
|
||||||
let originNodeChildType = getOriginNodeChildType(destinationNodeChild)
|
let originNodeChildType = getOriginNodeChildType(destinationNodeChild)
|
||||||
let originNodeChild = UI.projects.foundations.functionLibraries.uiObjectsFromNodes.addUIObject(originNode, originNodeChildType)
|
let originNodeChild = UI.projects.foundations.utilities.children.findChildReferencingThisNode(originNode, destinationNodeChild)
|
||||||
|
|
||||||
if (
|
if (originNodeChild === undefined) {
|
||||||
destinationNodeChild.type === 'Pool' ||
|
originNodeChild = UI.projects.foundations.functionLibraries.uiObjectsFromNodes.addUIObject(originNode, originNodeChildType)
|
||||||
destinationNodeChild.type === 'Asset' ||
|
|
||||||
destinationNodeChild.type === 'Feature' ||
|
|
||||||
destinationNodeChild.type === 'Position'
|
|
||||||
) {
|
|
||||||
originNodeChild.payload.referenceParent = destinationNodeChild
|
|
||||||
}
|
}
|
||||||
|
originNodeChild.payload.referenceParent = destinationNodeChild
|
||||||
scanNodeBranch(originNodeChild, destinationNodeChild)
|
scanNodeBranch(originNodeChild, destinationNodeChild)
|
||||||
}
|
}
|
||||||
break
|
break
|
||||||
@@ -368,17 +363,12 @@ function newGovernanceFunctionLibraryVotes() {
|
|||||||
let destinationNodeChild = propertyArray[m]
|
let destinationNodeChild = propertyArray[m]
|
||||||
|
|
||||||
let originNodeChildType = getOriginNodeChildType(destinationNodeChild)
|
let originNodeChildType = getOriginNodeChildType(destinationNodeChild)
|
||||||
let originNodeChild = UI.projects.foundations.functionLibraries.uiObjectsFromNodes.addUIObject(originNode, originNodeChildType)
|
let originNodeChild = UI.projects.foundations.utilities.children.findChildReferencingThisNode(originNode, destinationNodeChild)
|
||||||
|
|
||||||
if (
|
if (originNodeChild === undefined) {
|
||||||
destinationNodeChild.type === 'Pool' ||
|
originNodeChild = UI.projects.foundations.functionLibraries.uiObjectsFromNodes.addUIObject(originNode, originNodeChildType)
|
||||||
destinationNodeChild.type === 'Asset' ||
|
|
||||||
destinationNodeChild.type === 'Feature' ||
|
|
||||||
destinationNodeChild.type === 'Position'
|
|
||||||
) {
|
|
||||||
originNodeChild.payload.referenceParent = destinationNodeChild
|
|
||||||
}
|
}
|
||||||
|
originNodeChild.payload.referenceParent = destinationNodeChild
|
||||||
scanNodeBranch(originNodeChild, destinationNodeChild)
|
scanNodeBranch(originNodeChild, destinationNodeChild)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,58 @@
|
|||||||
|
function newFoundationsUtilitiesPools() {
|
||||||
|
let thisObject = {
|
||||||
|
findPool: findPool
|
||||||
|
}
|
||||||
|
|
||||||
|
return thisObject
|
||||||
|
|
||||||
|
function findPool(node, codeNameToFind) {
|
||||||
|
|
||||||
|
let tokens = undefined
|
||||||
|
findTokensAtPool(node, codeNameToFind)
|
||||||
|
|
||||||
|
return tokens
|
||||||
|
|
||||||
|
function findTokensAtPool(node, codeNameToFind) {
|
||||||
|
if (node === undefined) { return }
|
||||||
|
if (node.payload === undefined) { return }
|
||||||
|
/*
|
||||||
|
This function allows us to find a Pool within a Pool hierarchy that
|
||||||
|
has a give codeName config property.
|
||||||
|
*/
|
||||||
|
if (
|
||||||
|
node.type === 'Pool'
|
||||||
|
) {
|
||||||
|
let codeName = UI.projects.foundations.utilities.nodeConfig.loadConfigProperty(node.payload, 'codeName')
|
||||||
|
if (codeName === codeNameToFind) {
|
||||||
|
tokens = node.payload.tokens
|
||||||
|
}
|
||||||
|
}
|
||||||
|
let schemaDocument = getSchemaDocument(node)
|
||||||
|
if (schemaDocument === undefined) { return }
|
||||||
|
|
||||||
|
if (schemaDocument.childrenNodesProperties !== undefined) {
|
||||||
|
for (let i = 0; i < schemaDocument.childrenNodesProperties.length; i++) {
|
||||||
|
let property = schemaDocument.childrenNodesProperties[i]
|
||||||
|
|
||||||
|
switch (property.type) {
|
||||||
|
case 'node': {
|
||||||
|
let childNode = node[property.name]
|
||||||
|
findTokensAtPool(childNode, codeNameToFind)
|
||||||
|
}
|
||||||
|
break
|
||||||
|
case 'array': {
|
||||||
|
let propertyArray = node[property.name]
|
||||||
|
if (propertyArray !== undefined) {
|
||||||
|
for (let m = 0; m < propertyArray.length; m++) {
|
||||||
|
let childNode = propertyArray[m]
|
||||||
|
findTokensAtPool(childNode, codeNameToFind)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -999,9 +999,14 @@
|
|||||||
"functionName": "newGovernanceFunctionLibraryPluginsFunctions"
|
"functionName": "newGovernanceFunctionLibraryPluginsFunctions"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "User Referrals",
|
"name": "Referral Program",
|
||||||
"propertyName": "userrReferrals",
|
"propertyName": "referralProgram",
|
||||||
"functionName": "newGovernanceFunctionLibraryUserReferrals"
|
"functionName": "newGovernanceFunctionLibraryReferralProgram"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Mentorship Program",
|
||||||
|
"propertyName": "mentorshipProgram",
|
||||||
|
"functionName": "newGovernanceFunctionLibraryMentorshipProgram"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "Profile Constructor",
|
"name": "Profile Constructor",
|
||||||
@@ -1009,7 +1014,13 @@
|
|||||||
"functionName": "newGovernanceFunctionLibraryProfileConstructor"
|
"functionName": "newGovernanceFunctionLibraryProfileConstructor"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"utilities": [],
|
"utilities": [
|
||||||
|
{
|
||||||
|
"name": "Pools",
|
||||||
|
"propertyName": "pools",
|
||||||
|
"functionName": "newFoundationsUtilitiesPools"
|
||||||
|
}
|
||||||
|
],
|
||||||
"spaces": [
|
"spaces": [
|
||||||
{
|
{
|
||||||
"name": "User Profile Space",
|
"name": "User Profile Space",
|
||||||
|
|||||||
Vendored
-17
@@ -1,17 +0,0 @@
|
|||||||
{
|
|
||||||
// Use IntelliSense to learn about possible attributes.
|
|
||||||
// Hover to view descriptions of existing attributes.
|
|
||||||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
|
|
||||||
"version": "0.2.0",
|
|
||||||
"configurations": [
|
|
||||||
{
|
|
||||||
"type": "node",
|
|
||||||
"request": "launch",
|
|
||||||
"name": "Launch Program",
|
|
||||||
"skipFiles": [
|
|
||||||
"<node_internals>/**"
|
|
||||||
],
|
|
||||||
"program": "${workspaceFolder}\\Task.js"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
@@ -131,6 +131,7 @@ function splitTextIntoPhrases(text, wordsPerLine) {
|
|||||||
return phrases
|
return phrases
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.log(err.stack)
|
console.log(err.stack)
|
||||||
|
return []
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Generated
+3
@@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
"lockfileVersion": 1
|
||||||
|
}
|
||||||
@@ -96,7 +96,7 @@ if ( fs.existsSync(path) ) {
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
console.log('')
|
console.log('')
|
||||||
console.log('ERROR: node_modules does not exist. Try running node setup to solve this issue. Then try again.')
|
console.log('ERROR: node_modules does not exist. Try running node setup to solve this issue. Then try again. You can finded detailed instructions for this in the ReadMe.')
|
||||||
console.log('')
|
console.log('')
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,10 @@
|
|||||||
const path = require("path");
|
const path = require("path");
|
||||||
const process = require("process");
|
const process = require("process");
|
||||||
const { exec } = require("child_process");
|
const { exec } = require("child_process");
|
||||||
|
const systemCheck = require('./Launch-Scripts/system-check')
|
||||||
|
|
||||||
|
// Check system is set up correctly
|
||||||
|
systemCheck();
|
||||||
|
|
||||||
// Handle adding shortcuts
|
// Handle adding shortcuts
|
||||||
if (process.argv.includes("noShortcuts")) {
|
if (process.argv.includes("noShortcuts")) {
|
||||||
|
|||||||
Reference in new issue
Block a user