Merge pull request #2206 from Luis-Fernando-Molina/develop

Contribution: Governance new Feature: Multiple Liquidity Programs
This commit is contained in:
Luis Fernando Molina authored and GitHub committed 2021-10-24 04:58:00 -04:00
commit 0b0360b72e
61 files changed
+3066 -2102

No files matched your search

+5 -5
View File
@@ -19,7 +19,7 @@ exports.newDesktopApp = function newDesktopApp() {
/*
This is the Web Sockets client that interacts with the Superalgos Network.
*/
DK.running.webSocketsClient = SA.projects.network.modules.webSocketsClient.newNetworkModulesWebSocketsClient()
DK.running.webSocketsClient = SA.projects.network.modules.webSocketsAppClient.newNetworkModulesWebSocketsAppClient()
await DK.running.webSocketsClient.initialize()
console.log('Desktop Client Connected to Network Node via Web Sockets ................... Connected to port ' + global.env.NETWORK_WEB_SOCKETS_INTERFACE_PORT)
@@ -43,7 +43,7 @@ exports.newDesktopApp = function newDesktopApp() {
*/
queryMessage = {
queryType: SA.projects.socialTrading.globals.queryTypes.USER_PROFILES,
emitterUserProfileId: SA.secrets.map.get('Social Trading Desktop').userProfileId,
emitterUserProfileId: SA.secrets.map.get(global.env.DESKTOP_APP_SIGNING_ACCOUNT).userProfileId,
initialIndex: 'Last',
amountRequested: 10,
direction: 'Past'
@@ -72,7 +72,7 @@ exports.newDesktopApp = function newDesktopApp() {
let eventMessage = {
eventId: SA.projects.foundations.utilities.miscellaneousFunctions.genereteUniqueId(),
eventType: SA.projects.socialTrading.globals.eventTypes.FOLLOW_USER_PROFILE,
emitterUserProfileId: SA.secrets.map.get('Social Trading Desktop').userProfileId,
emitterUserProfileId: SA.secrets.map.get(global.env.DESKTOP_APP_SIGNING_ACCOUNT).userProfileId,
targetUserProfileId: profile.userProfileId
}
@@ -97,8 +97,8 @@ exports.newDesktopApp = function newDesktopApp() {
*/
queryMessage = {
queryType: SA.projects.socialTrading.globals.queryTypes.USER_PROFILE_STATS,
emitterUserProfileId: SA.secrets.map.get('Social Trading Desktop').userProfileId,
targetUserProfileId: SA.secrets.map.get('Social Trading Desktop').userProfileId
emitterUserProfileId: SA.secrets.map.get(global.env.DESKTOP_APP_SIGNING_ACCOUNT).userProfileId,
targetUserProfileId: SA.secrets.map.get(global.env.DESKTOP_APP_SIGNING_ACCOUNT).userProfileId
}
query = {
+5 -5
View File
@@ -19,7 +19,7 @@ function newWebApp() {
try {
setupRootObject(UI, 'UI')
setupRootObject(SA, 'SA')
await UI.projects.socialTrading.modules.webSocketsClient.initialize()
await UI.projects.socialTrading.modules.webSocketsWebClient.initialize()
loadWUserProfileTimeline()
loadWhoToFollow()
setupEventHandlers()
@@ -113,7 +113,7 @@ function newWebApp() {
queryMessage: JSON.stringify(queryMessage)
}
await UI.projects.socialTrading.modules.webSocketsClient.sendMessage(
await UI.projects.socialTrading.modules.webSocketsWebClient.sendMessage(
JSON.stringify(query)
)
.then(addToContentDiv)
@@ -183,7 +183,7 @@ function newWebApp() {
queryMessage: JSON.stringify(queryMessage)
}
await UI.projects.socialTrading.modules.webSocketsClient.sendMessage(
await UI.projects.socialTrading.modules.webSocketsWebClient.sendMessage(
JSON.stringify(query)
)
.then(addWhoToFollowTable)
@@ -360,7 +360,7 @@ function newWebApp() {
eventMessage: JSON.stringify(eventMessage)
}
await UI.projects.socialTrading.modules.webSocketsClient.sendMessage(
await UI.projects.socialTrading.modules.webSocketsWebClient.sendMessage(
JSON.stringify(event)
)
.then(resolve)
@@ -396,7 +396,7 @@ function newWebApp() {
eventMessage: JSON.stringify(eventMessage)
}
await UI.projects.socialTrading.modules.webSocketsClient.sendMessage(
await UI.projects.socialTrading.modules.webSocketsWebClient.sendMessage(
JSON.stringify(event)
)
.then(resolve)
+2 -3
View File
@@ -51,17 +51,16 @@ exports.newDesktopRoot = function newDesktopRoot() {
simpleGit: require('simple-git'),
nodeFetch: require('node-fetch')
}
/*
Setting up Secrets.
*/
SA.secrets = {
array: require('./My-Secrets/Secrets.json'),
array: require('./My-Secrets/Secrets.json').secrets,
map: new Map()
}
for (let i = 0; i < SA.secrets.array.length; i++) {
let secret = SA.secrets.array[i]
SA.secrets.map.set (secret.codeName, secret)
SA.secrets.map.set (secret.signingAccountChildCodeName, secret)
}
run()
+6 -1
View File
@@ -25,7 +25,12 @@ exports.newEnvironment = function () {
PATH_TO_DESKTOP: './Desktop',
PATH_TO_DEFAULT_WORKSPACE: path.join(basePath, './Projects/Foundations/Plugins/Workspaces'),
PATH_TO_MY_WORKSPACES: path.join(basePath, './Platform/My-Workspaces'),
PATH_TO_FONTS: path.join(basePath, './Platform/WebServer/Fonts')
PATH_TO_FONTS: path.join(basePath, './Platform/WebServer/Fonts'),
DESKTOP_APP_SIGNING_ACCOUNT: 'Social-Trading-Desktop-App-1',
MOBILE_APP_SIGNING_ACCOUNT: 'Social-Trading-Mobile-App-1',
SERVER_APP_SIGNING_ACCOUNT: 'Social-Trading-Server-App-1',
PLATFORM_APP_SIGNING_ACCOUNT: 'Algo-Traders-Platform-1',
P2P_NETWORK_NODE_SIGNING_ACCOUNT: 'P2P-Network-Node-1',
}
if (process.env.DATA_PATH) {
+2 -2
View File
@@ -52,12 +52,12 @@ exports.newNetworkRoot = function newNetworkRoot() {
Setting up Secrets.
*/
SA.secrets = {
array: require('./My-Secrets/Secrets.json'),
array: require('./My-Secrets/Secrets.json').secrets,
map: new Map()
}
for (let i = 0; i < SA.secrets.array.length; i++) {
let secret = SA.secrets.array[i]
SA.secrets.map.set(secret.codeName, secret)
SA.secrets.map.set(secret.signingAccountChildCodeName, secret)
}
NT.app = require('./Network/NetwokNode.js').newNetworkNode()
Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

+318 -226
View File
@@ -33,12 +33,12 @@
"id": "2e9dff69-e407-4ccb-9a42-e4a476e28d7c",
"savedPayload": {
"position": {
"x": 16579.81965415854,
"y": 43970.43851497094
"x": 16367.687619802575,
"y": 43963.95530705624
},
"targetPosition": {
"x": 16657.465367689296,
"y": 44260.21626285766
"x": 16517.687619802575,
"y": 44223.76292819157
},
"floatingObject": {
"isPinned": false,
@@ -63,12 +63,12 @@
"id": "af1984a3-465b-48ed-9944-c101a8ed376c",
"savedPayload": {
"position": {
"x": 16696.62322535531,
"y": 43962.78280444552
"x": 16478.52976213656,
"y": 43926.329469779426
},
"targetPosition": {
"x": 16657.465367689296,
"y": 44260.21626285766
"x": 16517.687619802575,
"y": 44223.76292819157
},
"floatingObject": {
"isPinned": false,
@@ -87,12 +87,12 @@
"id": "9f94d0e0-ddf7-4e04-8a3c-9485c09e079d",
"savedPayload": {
"position": {
"x": 16657.465367689296,
"y": 44260.21626285766
"x": 16517.687619802575,
"y": 44223.76292819157
},
"targetPosition": {
"x": 16657.465367689296,
"y": 44560.21626285766
"x": 16595.333333333332,
"y": 44513.54067607829
},
"floatingObject": {
"isPinned": false,
@@ -124,12 +124,12 @@
"id": "c41497c5-7440-4ebd-aabb-fbc3d022136b",
"savedPayload": {
"position": {
"x": 17019.59740204526,
"y": 44088.276607366366
"x": 16822.97904686409,
"y": 43963.95530705624
},
"targetPosition": {
"x": 16869.59740204526,
"y": 44348.0842285017
"x": 16745.333333333332,
"y": 44253.73305494296
},
"floatingObject": {
"isPinned": false,
@@ -154,12 +154,12 @@
"id": "6625953a-6026-4686-9091-2796fd08b9a7",
"savedPayload": {
"position": {
"x": 17107.60340413263,
"y": 44165.455799799085
"x": 16927.96176203595,
"y": 44015.72705285559
},
"targetPosition": {
"x": 16869.59740204526,
"y": 44348.0842285017
"x": 16745.333333333332,
"y": 44253.73305494296
},
"floatingObject": {
"isPinned": false,
@@ -178,12 +178,12 @@
"id": "174e7d3b-fe3c-4fb1-825c-4ea488d82171",
"savedPayload": {
"position": {
"x": 16869.59740204526,
"y": 44348.0842285017
"x": 16745.333333333332,
"y": 44253.73305494296
},
"targetPosition": {
"x": 16657.465367689296,
"y": 44560.21626285766
"x": 16595.333333333332,
"y": 44513.54067607829
},
"floatingObject": {
"isPinned": false,
@@ -215,12 +215,12 @@
"id": "53ddcc36-f693-4193-8284-999a88f1c944",
"savedPayload": {
"position": {
"x": 17247.243115576017,
"y": 44482.570549326905
"x": 17144.918702355386,
"y": 44285.894962547536
},
"targetPosition": {
"x": 16957.465367689296,
"y": 44560.21626285766
"x": 16885.111081220053,
"y": 44435.894962547536
},
"floatingObject": {
"isPinned": false,
@@ -245,12 +245,12 @@
"id": "ff1e4a84-3363-4348-ad15-31a34898fa82",
"savedPayload": {
"position": {
"x": 17254.89882610144,
"y": 44599.37412052368
"x": 17182.544539632196,
"y": 44396.73710488152
},
"targetPosition": {
"x": 16957.465367689296,
"y": 44560.21626285766
"x": 16885.111081220053,
"y": 44435.894962547536
},
"floatingObject": {
"isPinned": false,
@@ -269,12 +269,12 @@
"id": "8b3714a0-3bf2-491e-8ffc-9c4286446382",
"savedPayload": {
"position": {
"x": 16957.465367689296,
"y": 44560.21626285766
"x": 16885.111081220053,
"y": 44435.894962547536
},
"targetPosition": {
"x": 16657.465367689296,
"y": 44560.21626285766
"x": 16595.333333333332,
"y": 44513.54067607829
},
"floatingObject": {
"isPinned": false,
@@ -294,8 +294,8 @@
"id": "ef1d7fc5-c776-4af7-8ae6-86a3445dca4b",
"savedPayload": {
"position": {
"x": 16657.465367689296,
"y": 44561.21626285766
"x": 16595.333333333332,
"y": 44513.54067607829
},
"targetPosition": {
"x": 16445.333333333332,
@@ -337,12 +337,12 @@
"id": "0e10c82f-94b3-4f39-b673-15eaf0551df4",
"savedPayload": {
"position": {
"x": 17264.948575603998,
"y": 44472.348297213626
"x": 17005.140954468665,
"y": 44103.73305494296
},
"targetPosition": {
"x": 17005.140954468665,
"y": 44622.348297213626
"x": 16855.140954468665,
"y": 44363.54067607829
},
"floatingObject": {
"isPinned": false,
@@ -361,12 +361,12 @@
"id": "5332a29f-2139-4dd9-aa77-f87fcbf513df",
"savedPayload": {
"position": {
"x": 17005.140954468665,
"y": 44622.348297213626
"x": 16855.140954468665,
"y": 44363.54067607829
},
"targetPosition": {
"x": 16745.333333333332,
"y": 44772.348297213626
"x": 16705.140954468665,
"y": 44623.348297213626
},
"floatingObject": {
"isPinned": false,
@@ -398,12 +398,12 @@
"id": "8829c80f-028b-4315-85a1-82ad502f0687",
"savedPayload": {
"position": {
"x": 17264.948575603998,
"y": 45072.348297213626
"x": 17305.140954468665,
"y": 44623.348297213626
},
"targetPosition": {
"x": 17005.140954468665,
"y": 44922.348297213626
"y": 44623.348297213626
},
"floatingObject": {
"isPinned": false,
@@ -423,11 +423,11 @@
"savedPayload": {
"position": {
"x": 17005.140954468665,
"y": 44922.348297213626
"y": 44623.348297213626
},
"targetPosition": {
"x": 16745.333333333332,
"y": 44772.348297213626
"x": 16705.140954468665,
"y": 44623.348297213626
},
"floatingObject": {
"isPinned": false,
@@ -445,6 +445,98 @@
],
"pools": [],
"id": "e6e1e943-9d14-40ea-9adf-b110a9309e3a",
"savedPayload": {
"position": {
"x": 16705.140954468665,
"y": 44623.348297213626
},
"targetPosition": {
"x": 16445.333333333332,
"y": 44773.348297213626
},
"floatingObject": {
"isPinned": false,
"isFrozen": false,
"isCollapsed": true,
"angleToParent": 2,
"distanceToParent": 3,
"arrangementStyle": 0
},
"uiObject": {
"isRunning": false
}
}
},
{
"type": "Pool Class",
"name": "Incentives for Voting",
"config": "{}",
"project": "Governance",
"poolClasses": [
{
"type": "Pool Class",
"name": "Voting Program",
"config": "{}",
"project": "Governance",
"poolClasses": [],
"pools": [
{
"type": "Pool",
"name": "Voting Bonus",
"config": "{\n \"codeName\": \"Voting-Bonus\"\n}",
"project": "Governance",
"poolClasses": [],
"pools": [],
"id": "9eb846a4-effb-4380-9487-1a82011b0488",
"savedPayload": {
"position": {
"x": 17345.333333333332,
"y": 44773.348297213626
},
"targetPosition": {
"x": 17045.333333333332,
"y": 44773.348297213626
},
"floatingObject": {
"isPinned": false,
"isFrozen": false,
"isCollapsed": false,
"angleToParent": 4,
"distanceToParent": 3,
"arrangementStyle": 0
},
"uiObject": {
"isRunning": false
}
}
}
],
"id": "80d4f08f-bb7f-48a2-9cef-be12befcac2e",
"savedPayload": {
"position": {
"x": 17045.333333333332,
"y": 44773.348297213626
},
"targetPosition": {
"x": 16745.333333333332,
"y": 44773.348297213626
},
"floatingObject": {
"isPinned": false,
"isFrozen": false,
"isCollapsed": false,
"angleToParent": 2,
"distanceToParent": 3,
"arrangementStyle": 0
},
"uiObject": {
"isRunning": false
}
}
}
],
"pools": [],
"id": "1f9590c2-e166-482c-8400-ba64e39f0934",
"savedPayload": {
"position": {
"x": 16745.333333333332,
@@ -469,162 +561,10 @@
},
{
"type": "Pool Class",
"name": "Other Programs",
"name": "Incentives for Providing Liquidity to SA Markets",
"config": "{}",
"project": "Governance",
"poolClasses": [
{
"type": "Pool Class",
"name": "Claims Program",
"config": "{}",
"project": "Governance",
"poolClasses": [],
"pools": [],
"id": "5bd09ac2-6c9f-4a7d-a547-c05a8a1e98e2",
"savedPayload": {
"position": {
"x": 16947.243115576017,
"y": 44907.83461803883
},
"targetPosition": {
"x": 16657.465367689296,
"y": 44985.48033156959
},
"floatingObject": {
"isPinned": false,
"isFrozen": false,
"isCollapsed": false,
"angleToParent": 2,
"distanceToParent": 3,
"arrangementStyle": 0
},
"uiObject": {
"isRunning": false
}
}
},
{
"type": "Pool Class",
"name": "Voting Program",
"config": "{}",
"project": "Governance",
"poolClasses": [],
"pools": [
{
"type": "Pool",
"name": "Voting Bonus",
"config": "{\n \"codeName\": \"Voting-Bonus\"\n}",
"project": "Governance",
"poolClasses": [],
"pools": [],
"id": "9eb846a4-effb-4380-9487-1a82011b0488",
"savedPayload": {
"position": {
"x": 17237.020863462738,
"y": 45140.771758631105
},
"targetPosition": {
"x": 16947.243115576017,
"y": 45063.12604510035
},
"floatingObject": {
"isPinned": false,
"isFrozen": false,
"isCollapsed": false,
"angleToParent": 4,
"distanceToParent": 3,
"arrangementStyle": 0
},
"uiObject": {
"isRunning": false
}
}
}
],
"id": "80d4f08f-bb7f-48a2-9cef-be12befcac2e",
"savedPayload": {
"position": {
"x": 16947.243115576017,
"y": 45063.12604510035
},
"targetPosition": {
"x": 16657.465367689296,
"y": 44985.48033156959
},
"floatingObject": {
"isPinned": false,
"isFrozen": false,
"isCollapsed": false,
"angleToParent": 2,
"distanceToParent": 3,
"arrangementStyle": 0
},
"uiObject": {
"isRunning": false
}
}
},
{
"type": "Pool Class",
"name": "Staking Program",
"config": "{}",
"project": "Governance",
"poolClasses": [],
"pools": [
{
"type": "Pool",
"name": "Staking Rewards",
"config": "{\n \"codeName\": \"Staking-Rewards\"\n}",
"project": "Governance",
"poolClasses": [],
"pools": [],
"id": "d2cf4c65-b4bd-4fa8-b0da-f73a38b8419a",
"savedPayload": {
"position": {
"x": 17081.729436401223,
"y": 45409.74440028152
},
"targetPosition": {
"x": 16869.59740204526,
"y": 45197.61236592555
},
"floatingObject": {
"isPinned": false,
"isFrozen": false,
"isCollapsed": false,
"angleToParent": 4,
"distanceToParent": 3,
"arrangementStyle": 0
},
"uiObject": {
"isRunning": false
}
}
}
],
"id": "68e3f570-4156-4be6-8881-c526a06f85d0",
"savedPayload": {
"position": {
"x": 16869.59740204526,
"y": 45197.61236592555
},
"targetPosition": {
"x": 16657.465367689296,
"y": 44985.48033156959
},
"floatingObject": {
"isPinned": false,
"isFrozen": false,
"isCollapsed": false,
"angleToParent": 2,
"distanceToParent": 3,
"arrangementStyle": 0
},
"uiObject": {
"isRunning": false
}
}
},
{
"type": "Pool Class",
"name": "Liquidity Program",
@@ -634,20 +574,80 @@
"pools": [
{
"type": "Pool",
"name": "Liquidity Rewards",
"config": "{\n \"codeName\": \"Liquidity-Rewards\"\n}",
"name": "Liquidity Rewards BTCB",
"config": "{\n \"codeName\": \"Liquidity-Rewards-BTCB\"\n}",
"project": "Governance",
"poolClasses": [],
"pools": [],
"id": "a7651e92-ab96-49fc-af9c-f936682dd7a4",
"savedPayload": {
"position": {
"x": 16812.75679475081,
"y": 45565.03582734303
"x": 17254.72632349072,
"y": 44995.70258368287
},
"targetPosition": {
"x": 16735.111081220053,
"y": 45275.25807945631
"x": 16964.948575603998,
"y": 45073.348297213626
},
"floatingObject": {
"isPinned": false,
"isFrozen": false,
"isCollapsed": false,
"angleToParent": 2,
"distanceToParent": 3,
"arrangementStyle": 0
},
"uiObject": {
"isRunning": false
}
}
},
{
"type": "Pool",
"name": "Liquidity Rewards BNB",
"config": "{\n \"codeName\": \"Liquidity-Rewards-BNB\"\n}",
"project": "Governance",
"poolClasses": [],
"pools": [],
"id": "e7c21a28-fea6-48cc-a97c-cc43470bb2fc",
"savedPayload": {
"position": {
"x": 17224.75619673933,
"y": 45223.348297213626
},
"targetPosition": {
"x": 16964.948575603998,
"y": 45073.348297213626
},
"floatingObject": {
"isPinned": false,
"isFrozen": false,
"isCollapsed": false,
"angleToParent": 2,
"distanceToParent": 3,
"arrangementStyle": 0
},
"uiObject": {
"isRunning": false
}
}
},
{
"type": "Pool",
"name": "Liquidity Rewards BUSD",
"config": "{\n \"codeName\": \"Liquidity-Rewards-BUSD\"\n}",
"project": "Governance",
"poolClasses": [],
"pools": [],
"id": "962d9bc1-4e54-463c-86ae-43aec1db0f0f",
"savedPayload": {
"position": {
"x": 17042.594289134755,
"y": 45363.12604510035
},
"targetPosition": {
"x": 16964.948575603998,
"y": 45073.348297213626
},
"floatingObject": {
"isPinned": false,
@@ -666,12 +666,104 @@
"id": "477faa7a-da4f-4949-9439-a2475ed683de",
"savedPayload": {
"position": {
"x": 16735.111081220053,
"y": 45275.25807945631
"x": 16964.948575603998,
"y": 45073.348297213626
},
"targetPosition": {
"x": 16657.465367689296,
"y": 44985.48033156959
"x": 16705.140954468665,
"y": 44923.348297213626
},
"floatingObject": {
"isPinned": false,
"isFrozen": false,
"isCollapsed": false,
"angleToParent": 2,
"distanceToParent": 3,
"arrangementStyle": 0
},
"uiObject": {
"isRunning": false
}
}
}
],
"pools": [],
"id": "00bbb418-2315-4845-aa39-8362489a360b",
"savedPayload": {
"position": {
"x": 16705.140954468665,
"y": 44923.348297213626
},
"targetPosition": {
"x": 16445.333333333332,
"y": 44773.348297213626
},
"floatingObject": {
"isPinned": false,
"isFrozen": false,
"isCollapsed": false,
"angleToParent": 2,
"distanceToParent": 3,
"arrangementStyle": 0
},
"uiObject": {
"isRunning": false
}
}
},
{
"type": "Pool Class",
"name": "Incentives for Staking & Delegating SA Tokens",
"config": "{}",
"project": "Governance",
"poolClasses": [
{
"type": "Pool Class",
"name": "Staking Program",
"config": "{}",
"project": "Governance",
"poolClasses": [],
"pools": [
{
"type": "Pool",
"name": "Staking Rewards",
"config": "{\n \"codeName\": \"Staking-Rewards\"\n}",
"project": "Governance",
"poolClasses": [],
"pools": [],
"id": "d2cf4c65-b4bd-4fa8-b0da-f73a38b8419a",
"savedPayload": {
"position": {
"x": 17114.948575603998,
"y": 45333.15591834896
},
"targetPosition": {
"x": 16855.140954468665,
"y": 45183.15591834896
},
"floatingObject": {
"isPinned": false,
"isFrozen": false,
"isCollapsed": false,
"angleToParent": 4,
"distanceToParent": 3,
"arrangementStyle": 0
},
"uiObject": {
"isRunning": false
}
}
}
],
"id": "68e3f570-4156-4be6-8881-c526a06f85d0",
"savedPayload": {
"position": {
"x": 16855.140954468665,
"y": 45183.15591834896
},
"targetPosition": {
"x": 16595.333333333332,
"y": 45033.15591834896
},
"floatingObject": {
"isPinned": false,
@@ -703,12 +795,12 @@
"id": "24e62dd3-4d7b-4eba-b401-493c155d85d0",
"savedPayload": {
"position": {
"x": 16502.17394062778,
"y": 45565.03582734303
"x": 16595.333333333332,
"y": 45633.15591834896
},
"targetPosition": {
"x": 16579.81965415854,
"y": 45275.25807945631
"x": 16595.333333333332,
"y": 45333.15591834896
},
"floatingObject": {
"isPinned": false,
@@ -727,12 +819,12 @@
"id": "f09429a2-3f6c-4210-bb73-0c8efd254c82",
"savedPayload": {
"position": {
"x": 16579.81965415854,
"y": 45275.25807945631
"x": 16595.333333333332,
"y": 45333.15591834896
},
"targetPosition": {
"x": 16657.465367689296,
"y": 44985.48033156959
"x": 16595.333333333332,
"y": 45033.15591834896
},
"floatingObject": {
"isPinned": false,
@@ -752,8 +844,8 @@
"id": "64cda2cd-270e-4046-ac3f-5cf9188113c2",
"savedPayload": {
"position": {
"x": 16657.465367689296,
"y": 44985.48033156959
"x": 16595.333333333332,
"y": 45033.15591834896
},
"targetPosition": {
"x": 16445.333333333332,
@@ -762,7 +854,7 @@
"floatingObject": {
"isPinned": false,
"isFrozen": false,
"isCollapsed": false,
"isCollapsed": true,
"angleToParent": 2,
"distanceToParent": 3,
"arrangementStyle": 0
@@ -41,12 +41,12 @@
"id": "b555c1fb-e0d3-445f-b46d-9428818b5fe5",
"savedPayload": {
"position": {
"x": 21752.372181013012,
"y": 44598.95780077478
"x": 21077.53945770656,
"y": 44522.07689281431
},
"targetPosition": {
"x": 21874.39317393575,
"y": 44873.02143806756
"x": 21375.89602631704,
"y": 44553.435431794605
},
"floatingObject": {
"isPinned": false,
@@ -71,12 +71,12 @@
"id": "71c32e58-5695-4af2-ab80-47d9baf8ecdd",
"savedPayload": {
"position": {
"x": 21866.540089443388,
"y": 44573.12424057489
"x": 21112.250892518452,
"y": 44410.287803716725
},
"targetPosition": {
"x": 21874.39317393575,
"y": 44873.02143806756
"x": 21375.89602631704,
"y": 44553.435431794605
},
"floatingObject": {
"isPinned": false,
@@ -101,12 +101,12 @@
"id": "5a13709f-761a-410b-b0e9-1542e341f19e",
"savedPayload": {
"position": {
"x": 21981.903558799342,
"y": 44592.9473101184
"x": 21187.09990900209,
"y": 44320.291643357516
},
"targetPosition": {
"x": 21874.39317393575,
"y": 44873.02143806756
"x": 21375.89602631704,
"y": 44553.435431794605
},
"floatingObject": {
"isPinned": false,
@@ -126,17 +126,17 @@
"id": "68dd2990-457e-48df-b752-6e1fd02081a3",
"savedPayload": {
"position": {
"x": 21874.39317393575,
"y": 44873.02143806756
"x": 21375.89602631704,
"y": 44553.435431794605
},
"targetPosition": {
"x": 21882.246258428113,
"y": 45172.91863556023
"x": 21639.54116011563,
"y": 44696.583059872486
},
"floatingObject": {
"isPinned": false,
"isFrozen": false,
"isCollapsed": true,
"isCollapsed": false,
"angleToParent": 2,
"distanceToParent": 3,
"arrangementStyle": 0
@@ -247,12 +247,12 @@
"id": "21bdec2e-d471-4b64-a3e0-6e2b31c5adcc",
"savedPayload": {
"position": {
"x": 21989.756643291705,
"y": 44892.844507611066
"x": 21450.745042800678,
"y": 44463.439271435396
},
"targetPosition": {
"x": 21882.246258428113,
"y": 45172.91863556023
"x": 21639.54116011563,
"y": 44696.583059872486
},
"floatingObject": {
"isPinned": false,
@@ -368,12 +368,12 @@
"id": "ffe4621a-a216-412f-a9be-354f30f6d102",
"savedPayload": {
"position": {
"x": 22088.752631136238,
"y": 44955.30632425654
"x": 21554.336556704453,
"y": 44408.93713941203
},
"targetPosition": {
"x": 21882.246258428113,
"y": 45172.91863556023
"x": 21639.54116011563,
"y": 44696.583059872486
},
"floatingObject": {
"isPinned": false,
@@ -489,12 +489,12 @@
"id": "96e5c443-f932-47e4-9e5d-48e986dcc637",
"savedPayload": {
"position": {
"x": 22156.309895720893,
"y": 45050.89764263749
"x": 21670.899699095928,
"y": 44398.226491262
},
"targetPosition": {
"x": 21882.246258428113,
"y": 45172.91863556023
"x": 21639.54116011563,
"y": 44696.583059872486
},
"floatingObject": {
"isPinned": false,
@@ -610,12 +610,12 @@
"id": "a0f8d421-8864-44ac-8922-5d13176abb54",
"savedPayload": {
"position": {
"x": 22182.14345592078,
"y": 45165.06555106787
"x": 21782.688788193514,
"y": 44432.93792607389
},
"targetPosition": {
"x": 21882.246258428113,
"y": 45172.91863556023
"x": 21639.54116011563,
"y": 44696.583059872486
},
"floatingObject": {
"isPinned": false,
@@ -731,12 +731,12 @@
"id": "39e7f6fd-1faa-47e9-862d-45a8482a558a",
"savedPayload": {
"position": {
"x": 22162.320386377272,
"y": 45280.42902042382
"x": 21872.68494855272,
"y": 44507.78694255753
},
"targetPosition": {
"x": 21882.246258428113,
"y": 45172.91863556023
"x": 21639.54116011563,
"y": 44696.583059872486
},
"floatingObject": {
"isPinned": false,
@@ -852,12 +852,12 @@
"id": "0a5a7864-efff-4715-a435-f4bf35d1517e",
"savedPayload": {
"position": {
"x": 22099.858569731798,
"y": 45379.42500826836
"x": 21927.18708057609,
"y": 44611.37845646131
},
"targetPosition": {
"x": 21882.246258428113,
"y": 45172.91863556023
"x": 21639.54116011563,
"y": 44696.583059872486
},
"floatingObject": {
"isPinned": false,
@@ -886,7 +886,7 @@
"floatingObject": {
"isPinned": false,
"isFrozen": false,
"isCollapsed": true,
"isCollapsed": false,
"angleToParent": 2,
"distanceToParent": 3,
"arrangementStyle": 0
@@ -1004,12 +1004,12 @@
"id": "0e8d603c-081f-4510-917c-34cf9a6ceb4b",
"savedPayload": {
"position": {
"x": 22153.2280717391,
"y": 45193.92142522379
"x": 21688.016714441055,
"y": 44413.61809228199
},
"targetPosition": {
"x": 21901.626901355474,
"y": 45357.3131357283
"x": 21748.193539176038,
"y": 44707.52071180896
},
"floatingObject": {
"isPinned": false,
@@ -1125,12 +1125,12 @@
"id": "fe061f32-f818-4823-8935-e8abf25d1b59",
"savedPayload": {
"position": {
"x": 22195.071181575615,
"y": 45419.686642973626
"x": 21913.462633611667,
"y": 44457.14873569257
},
"targetPosition": {
"x": 21901.626901355474,
"y": 45357.3131357283
"x": 21748.193539176038,
"y": 44707.52071180896
},
"floatingObject": {
"isPinned": false,
@@ -1246,12 +1246,12 @@
"id": "24ee5cf0-650a-4bd7-8d8c-904264e54b02",
"savedPayload": {
"position": {
"x": 22065.01861185998,
"y": 45608.914306111925
"x": 22042.096158703007,
"y": 44647.34388707398
},
"targetPosition": {
"x": 21901.626901355474,
"y": 45357.3131357283
"x": 21748.193539176038,
"y": 44707.52071180896
},
"floatingObject": {
"isPinned": false,
@@ -1398,12 +1398,12 @@
"id": "eb50e1af-b356-419a-a848-43e3fa43bfa8",
"savedPayload": {
"position": {
"x": 22009.66098495065,
"y": 45740.826523769414
"x": 22144.66536712425,
"y": 44747.06779347655
},
"targetPosition": {
"x": 21808.92180304299,
"y": 45517.88307612619
"x": 21863.79490593233,
"y": 44852.48024070095
},
"floatingObject": {
"isPinned": false,
@@ -1465,12 +1465,12 @@
"id": "bd33151c-c5f5-4210-9ea4-a40e41ad917d",
"savedPayload": {
"position": {
"x": 21446.791436650125,
"y": 45482.942349082005
"x": 22444.247960837183,
"y": 44942.454454347535
},
"targetPosition": {
"x": 21331.986406940596,
"y": 45205.778489328615
"x": 22180.602827038594,
"y": 45085.602082425416
},
"floatingObject": {
"isPinned": false,
@@ -1495,12 +1495,12 @@
"id": "45888d4c-0ebc-4713-9f82-9c4db3359a1e",
"savedPayload": {
"position": {
"x": 21331.986406940596,
"y": 45505.778489328615
"x": 22478.959395649075,
"y": 45054.24354344512
},
"targetPosition": {
"x": 21331.986406940596,
"y": 45205.778489328615
"x": 22180.602827038594,
"y": 45085.602082425416
},
"floatingObject": {
"isPinned": false,
@@ -1525,12 +1525,12 @@
"id": "39062bcb-7491-41a6-993d-5d2d3c84fc5e",
"savedPayload": {
"position": {
"x": 21217.18137723107,
"y": 45482.942349082005
"x": 22468.248747499052,
"y": 45170.80668583659
},
"targetPosition": {
"x": 21331.986406940596,
"y": 45205.778489328615
"x": 22180.602827038594,
"y": 45085.602082425416
},
"floatingObject": {
"isPinned": false,
@@ -1550,17 +1550,17 @@
"id": "2242950f-bf22-4843-a8ea-e8d61339c362",
"savedPayload": {
"position": {
"x": 21815.876735803373,
"y": 45836.00129540594
"x": 22180.602827038594,
"y": 45085.602082425416
},
"targetPosition": {
"x": 21639.54116011563,
"y": 45593.296197093456
"x": 21882.246258428113,
"y": 45116.96062140571
},
"floatingObject": {
"isPinned": false,
"isFrozen": false,
"isCollapsed": true,
"isCollapsed": false,
"angleToParent": 2,
"distanceToParent": 3,
"arrangementStyle": 0
@@ -1671,12 +1671,12 @@
"id": "aff3a589-27aa-4a84-92a7-c25919a33c70",
"savedPayload": {
"position": {
"x": 21517.52016719289,
"y": 45867.35983438624
"x": 22058.581834115856,
"y": 45359.6657197182
},
"targetPosition": {
"x": 21639.54116011563,
"y": 45593.296197093456
"x": 21882.246258428113,
"y": 45116.96062140571
},
"floatingObject": {
"isPinned": false,
@@ -1729,7 +1729,7 @@
"floatingObject": {
"isPinned": false,
"isFrozen": false,
"isCollapsed": true,
"isCollapsed": false,
"angleToParent": 1,
"distanceToParent": 3,
"arrangementStyle": 0
@@ -2911,7 +2911,7 @@
"floatingObject": {
"isPinned": false,
"isFrozen": false,
"isCollapsed": true,
"isCollapsed": false,
"angleToParent": 1,
"distanceToParent": 3,
"arrangementStyle": 0
@@ -4102,12 +4102,12 @@
"id": "dc148eee-1c57-48be-918e-5c91d3b2a1ee",
"savedPayload": {
"position": {
"x": 21314.99425281151,
"y": 46057.29874664579
"x": 20461.63031479918,
"y": 45484.235522592324
},
"targetPosition": {
"x": 21098.932678850673,
"y": 45849.17042983723
"x": 20576.435344508704,
"y": 45207.071662838935
},
"floatingObject": {
"isPinned": false,
@@ -4132,12 +4132,12 @@
"id": "5177790d-4a5f-4873-b25f-b727729c53a5",
"savedPayload": {
"position": {
"x": 21218.900286146596,
"y": 46124.139106598224
"x": 20364.30331015274,
"y": 45419.2036971949
},
"targetPosition": {
"x": 21098.932678850673,
"y": 45849.17042983723
"x": 20576.435344508704,
"y": 45207.071662838935
},
"floatingObject": {
"isPinned": false,
@@ -4162,12 +4162,12 @@
"id": "f6494f82-4e9a-4962-a111-f75763f66bff",
"savedPayload": {
"position": {
"x": 21104.542338779946,
"y": 46149.117978111055
"x": 20299.271484755318,
"y": 45321.87669254846
},
"targetPosition": {
"x": 21098.932678850673,
"y": 45849.17042983723
"x": 20576.435344508704,
"y": 45207.071662838935
},
"floatingObject": {
"isPinned": false,
@@ -4187,12 +4187,12 @@
"id": "d845296c-a4c9-43a1-9fcd-f63678d09649",
"savedPayload": {
"position": {
"x": 21098.932678850673,
"y": 45849.17042983723
"x": 20576.435344508704,
"y": 45207.071662838935
},
"targetPosition": {
"x": 20978.96507155475,
"y": 45574.20175307623
"x": 20788.567378864667,
"y": 44994.93962848297
},
"floatingObject": {
"isPinned": false,
@@ -4223,12 +4223,12 @@
"id": "71389baa-502a-4df3-bed5-66618ccb5495",
"savedPayload": {
"position": {
"x": 20874.972424174106,
"y": 46153.41142594332
"x": 20211.40351911128,
"y": 45109.744658192496
},
"targetPosition": {
"x": 20869.362764244834,
"y": 45853.46387766949
"x": 20488.567378864667,
"y": 44994.93962848297
},
"floatingObject": {
"isPinned": false,
@@ -4253,12 +4253,12 @@
"id": "b756d2de-2a22-421a-840c-629646e8851b",
"savedPayload": {
"position": {
"x": 20759.760456934917,
"y": 46132.72600226275
"x": 20188.567378864667,
"y": 44994.93962848297
},
"targetPosition": {
"x": 20869.362764244834,
"y": 45853.46387766949
"x": 20488.567378864667,
"y": 44994.93962848297
},
"floatingObject": {
"isPinned": false,
@@ -4283,12 +4283,12 @@
"id": "90877e7d-cce4-475b-864b-9ec29fd6c5e3",
"savedPayload": {
"position": {
"x": 20661.234447436273,
"y": 46069.52545163033
"x": 20211.40351911128,
"y": 44880.134598773446
},
"targetPosition": {
"x": 20869.362764244834,
"y": 45853.46387766949
"x": 20488.567378864667,
"y": 44994.93962848297
},
"floatingObject": {
"isPinned": false,
@@ -4308,12 +4308,12 @@
"id": "edf5afb0-79ff-4a19-98af-8001f118b735",
"savedPayload": {
"position": {
"x": 20869.362764244834,
"y": 45853.46387766949
"x": 20488.567378864667,
"y": 44994.93962848297
},
"targetPosition": {
"x": 20978.96507155475,
"y": 45574.20175307623
"x": 20788.567378864667,
"y": 44994.93962848297
},
"floatingObject": {
"isPinned": false,
@@ -4344,12 +4344,12 @@
"id": "1484266d-df06-4a29-bba6-53e296f8ba3f",
"savedPayload": {
"position": {
"x": 20495.868077985197,
"y": 45910.23093433299
"x": 20299.271484755318,
"y": 44668.00256441748
},
"targetPosition": {
"x": 20703.996394793758,
"y": 45694.16936037215
"x": 20576.435344508704,
"y": 44782.80759412701
},
"floatingObject": {
"isPinned": false,
@@ -4374,12 +4374,12 @@
"id": "21d0d5bf-a5ff-473b-9913-ccf80a136aa6",
"savedPayload": {
"position": {
"x": 20429.027718032765,
"y": 45814.13696766807
"x": 20364.30331015274,
"y": 44570.67555977104
},
"targetPosition": {
"x": 20703.996394793758,
"y": 45694.16936037215
"x": 20576.435344508704,
"y": 44782.80759412701
},
"floatingObject": {
"isPinned": false,
@@ -4404,12 +4404,12 @@
"id": "05c32139-e3ba-460c-8837-24d002892f2b",
"savedPayload": {
"position": {
"x": 20404.048846519934,
"y": 45699.77902030142
"x": 20461.63031479918,
"y": 44505.64373437362
},
"targetPosition": {
"x": 20703.996394793758,
"y": 45694.16936037215
"x": 20576.435344508704,
"y": 44782.80759412701
},
"floatingObject": {
"isPinned": false,
@@ -4429,12 +4429,12 @@
"id": "b779f4a3-91c0-419c-b41b-d264c0e6b055",
"savedPayload": {
"position": {
"x": 20703.996394793758,
"y": 45694.16936037215
"x": 20576.435344508704,
"y": 44782.80759412701
},
"targetPosition": {
"x": 20978.96507155475,
"y": 45574.20175307623
"x": 20788.567378864667,
"y": 44994.93962848297
},
"floatingObject": {
"isPinned": false,
@@ -4496,12 +4496,12 @@
"id": "8f1453bd-7df3-433b-9c09-9645f3010bad",
"savedPayload": {
"position": {
"x": 20523.648020938374,
"y": 45975.72061436919
"x": 20550.561376777296,
"y": 44292.69595750969
},
"targetPosition": {
"x": 20648.736255766773,
"y": 45703.04327114552
"x": 20788.567378864667,
"y": 44475.324386212305
},
"floatingObject": {
"isPinned": false,
@@ -4526,12 +4526,12 @@
"id": "3c25bc31-19a1-4a11-90d6-ab1507499c46",
"savedPayload": {
"position": {
"x": 20428.820694217826,
"y": 45907.0950924768
"x": 20638.567378864667,
"y": 44215.51676507697
},
"targetPosition": {
"x": 20648.736255766773,
"y": 45703.04327114552
"x": 20788.567378864667,
"y": 44475.324386212305
},
"floatingObject": {
"isPinned": false,
@@ -4556,12 +4556,12 @@
"id": "ae537189-a6ff-470a-9f15-2425160f4d47",
"savedPayload": {
"position": {
"x": 20367.473518203573,
"y": 45807.40453052109
"x": 20749.409521198653,
"y": 44177.89092780016
},
"targetPosition": {
"x": 20648.736255766773,
"y": 45703.04327114552
"x": 20788.567378864667,
"y": 44475.324386212305
},
"floatingObject": {
"isPinned": false,
@@ -4581,12 +4581,12 @@
"id": "845ddcca-fadb-4a8e-9f2a-03cb9cbfb99a",
"savedPayload": {
"position": {
"x": 20648.736255766773,
"y": 45703.04327114552
"x": 20788.567378864667,
"y": 44475.324386212305
},
"targetPosition": {
"x": 20868.65181731572,
"y": 45498.991449814246
"x": 20938.567378864667,
"y": 44735.13200734764
},
"floatingObject": {
"isPinned": false,
@@ -4688,7 +4688,7 @@
"floatingObject": {
"isPinned": false,
"isFrozen": false,
"isCollapsed": false,
"isCollapsed": true,
"angleToParent": 1,
"distanceToParent": 3,
"arrangementStyle": 0
File diff suppressed because it is too large. Load diff
@@ -33,5 +33,5 @@
"compatibleTypes": "->Signing Account->"
},
"childrenNodesProperties": [],
"propertyNameAtParent": "assignedTo"
"propertyNameAtParent": "signingAccountChild"
}
@@ -18,16 +18,6 @@
"relatedUiObject": "Staking Program",
"relatedUiObjectProject": "Governance"
},
{
"action": "Add UI Object",
"actionProject": "Visual-Scripting",
"actionFunction": "payload.executeAction",
"disableIfPropertyIsDefined": true,
"propertyToCheckFor": "stakingProgram",
"label": "Add Liquidity Program",
"relatedUiObject": "Liquidity Program",
"relatedUiObjectProject": "Governance"
},
{
"action": "Add UI Object",
"actionProject": "Visual-Scripting",
@@ -68,12 +58,6 @@
"childType": "Staking Program",
"autoAdd": false
},
{
"name": "liquidityProgram",
"type": "node",
"childType": "Liquidity Program",
"autoAdd": false
},
{
"name": "delegationProgram",
"type": "node",
@@ -33,10 +33,9 @@
"config": true
},
"initialValues": {
"config": "{}"
},
"config": "{\n\"asset\": \"BTCB\"\n}" },
"attachingRules": {
"compatibleTypes": "->Financial Programs->"
"compatibleTypes": "->Liquidity Programs->"
},
"addLeftIcons": true,
"level": 1,
@@ -0,0 +1,50 @@
{
"type": "Liquidity Programs",
"menuItems": [
{
"action": "Configure",
"actionFunction": "uiObject.configEditor.activate",
"label": "Configure",
"iconPathOn": "configuration",
"iconPathOff": "configuration"
},
{
"action": "Add UI Object",
"actionProject": "Visual-Scripting",
"actionFunction": "payload.executeAction",
"label": "Add Liquidity Program",
"relatedUiObject": "Liquidity Program",
"relatedUiObjectProject": "Governance"
},
{
"action": "Delete UI Object",
"actionProject": "Visual-Scripting",
"askConfirmation": true,
"confirmationLabel": "Confirm to Delete",
"label": "Delete",
"iconPathOn": "delete-entity",
"iconPathOff": "delete-entity",
"actionFunction": "payload.executeAction"
}
],
"editors": {
"config": true
},
"initialValues": {
"config": "{}"
},
"addLeftIcons": true,
"level": 2,
"attachingRules": {
"compatibleTypes": "->Token Power Switch->"
},
"propertyNameAtParent": "liquidityPrograms",
"childrenNodesProperties": [
{
"name": "liquidityProgram",
"type": "array",
"childType": "Liquidity Program",
"autoAdd": false
}
]
}
@@ -25,7 +25,7 @@
"config": true
},
"initialValues": {
"config": "{ \n\"host\": \"localhost\", \n\"webPort\": \"34248\", \n\"webSocketsPort\": \"18041\"\n}"
"config": "{ \n\"codeName\": \"localhost\", \n\"host\": \"localhost\", \n\"webSocketsPort\": \"18042\"\n}"
},
"addLeftIcons": true,
"level": 1,
@@ -33,5 +33,5 @@
"compatibleTypes": "->Signing Account->"
},
"childrenNodesProperties": [],
"propertyNameAtParent": "assignedTo"
"propertyNameAtParent": "signingAccountChild"
}
@@ -20,9 +20,53 @@
"relatedUiObjectProject": "Governance"
},
{
"action": "Add Signing Account",
"action": "Add Social Trading Desktop App",
"actionProject": "Governance",
"label": "Add Signing Account",
"label": "Add Social Trading Desktop App",
"askConfirmation": true,
"confirmationLabel": "Confirm to Proceed",
"workDoneLabel": "Done",
"relatedUiObject": "Profile Constructor",
"actionFunction": "payload.executeAction",
"relatedUiObjectProject": "Governance"
},
{
"action": "Add Social Trading Server App",
"actionProject": "Governance",
"label": "Add Social Trading Server App",
"askConfirmation": true,
"confirmationLabel": "Confirm to Proceed",
"workDoneLabel": "Done",
"relatedUiObject": "Profile Constructor",
"actionFunction": "payload.executeAction",
"relatedUiObjectProject": "Governance"
},
{
"action": "Add Social Trading Mobile App",
"actionProject": "Governance",
"label": "Add Social Trading Mobile App",
"askConfirmation": true,
"confirmationLabel": "Confirm to Proceed",
"workDoneLabel": "Done",
"relatedUiObject": "Profile Constructor",
"actionFunction": "payload.executeAction",
"relatedUiObjectProject": "Governance"
},
{
"action": "Add Algo Traders Platform",
"actionProject": "Governance",
"label": "Add Algo Traders Platform",
"askConfirmation": true,
"confirmationLabel": "Confirm to Proceed",
"workDoneLabel": "Done",
"relatedUiObject": "Profile Constructor",
"actionFunction": "payload.executeAction",
"relatedUiObjectProject": "Governance"
},
{
"action": "Add P2P Network Node",
"actionProject": "Governance",
"label": "Add P2P Network Node",
"askConfirmation": true,
"confirmationLabel": "Confirm to Proceed",
"workDoneLabel": "Done",
@@ -9,56 +9,6 @@
"iconPathOn": "configuration",
"iconPathOff": "configuration"
},
{
"action": "Add UI Object",
"actionProject": "Visual-Scripting",
"disableIfPropertyIsDefined": true,
"propertyToCheckFor": "assignedTo",
"label": "Add P2P Network Node",
"relatedUiObject": "P2P Network Node",
"actionFunction": "payload.executeAction",
"relatedUiObjectProject": "Network"
},
{
"action": "Add UI Object",
"actionProject": "Visual-Scripting",
"disableIfPropertyIsDefined": true,
"propertyToCheckFor": "assignedTo",
"label": "Add Algo Traders Platform",
"relatedUiObject": "Algo Traders Platform",
"actionFunction": "payload.executeAction",
"relatedUiObjectProject": "Governance"
},
{
"action": "Add UI Object",
"actionProject": "Visual-Scripting",
"disableIfPropertyIsDefined": true,
"propertyToCheckFor": "assignedTo",
"label": "Add Social Trading Mobile App",
"relatedUiObject": "Social Trading Mobile App",
"actionFunction": "payload.executeAction",
"relatedUiObjectProject": "Governance"
},
{
"action": "Add UI Object",
"actionProject": "Visual-Scripting",
"disableIfPropertyIsDefined": true,
"propertyToCheckFor": "assignedTo",
"label": "Add Social Trading Desktop App",
"relatedUiObject": "Social Trading Desktop App",
"actionFunction": "payload.executeAction",
"relatedUiObjectProject": "Governance"
},
{
"action": "Add UI Object",
"actionProject": "Visual-Scripting",
"disableIfPropertyIsDefined": true,
"propertyToCheckFor": "assignedTo",
"label": "Add Social Trading Server App",
"relatedUiObject": "Social Trading Server App",
"actionFunction": "payload.executeAction",
"relatedUiObjectProject": "Governance"
},
{
"action": "Delete UI Object",
"actionProject": "Visual-Scripting",
@@ -84,31 +34,31 @@
"propertyNameAtParent": "signingAccounts",
"childrenNodesProperties": [
{
"name": "assignedTo",
"name": "signingAccountChild",
"type": "node",
"childType": "P2P Network Node",
"autoAdd": false
},
{
"name": "assignedTo",
"name": "signingAccountChild",
"type": "node",
"childType": "Algo Traders Platform",
"autoAdd": false
},
{
"name": "assignedTo",
"name": "signingAccountChild",
"type": "node",
"childType": "Social Trading Mobile App",
"autoAdd": false
},
{
"name": "assignedTo",
"name": "signingAccountChild",
"type": "node",
"childType": "Social Trading Desktop App",
"autoAdd": false
},
{
"name": "assignedTo",
"name": "signingAccountChild",
"type": "node",
"childType": "Social Trading Server App",
"autoAdd": false
@@ -33,5 +33,5 @@
"compatibleTypes": "->Signing Account->"
},
"childrenNodesProperties": [],
"propertyNameAtParent": "assignedTo"
"propertyNameAtParent": "signingAccountChild"
}
@@ -33,5 +33,5 @@
"compatibleTypes": "->Signing Account->"
},
"childrenNodesProperties": [],
"propertyNameAtParent": "assignedTo"
"propertyNameAtParent": "signingAccountChild"
}
@@ -33,5 +33,5 @@
"compatibleTypes": "->Signing Account->"
},
"childrenNodesProperties": [],
"propertyNameAtParent": "assignedTo"
"propertyNameAtParent": "signingAccountChild"
}
@@ -56,6 +56,16 @@
"relatedUiObject": "Financial Programs",
"relatedUiObjectProject": "Governance"
},
{
"action": "Add UI Object",
"actionProject": "Visual-Scripting",
"actionFunction": "payload.executeAction",
"disableIfPropertyIsDefined": true,
"propertyToCheckFor": "liquidityPrograms",
"label": "Add Liquidity Programs",
"relatedUiObject": "Liquidity Programs",
"relatedUiObjectProject": "Governance"
},
{
"action": "Delete UI Object",
"actionProject": "Visual-Scripting",
@@ -109,6 +119,12 @@
"type": "node",
"childType": "Financial Programs",
"autoAdd": false
},
{
"name": "liquidityPrograms",
"type": "node",
"childType": "Liquidity Programs",
"autoAdd": false
}
]
}
@@ -15,7 +15,7 @@
"addLeftIcons": true,
"level": 2,
"attachingRules": {
"compatibleTypes": "->Referral Program->Mentorship Program->Support Program->Claims Program->Staking Program->Github Program->Airdrop Program->Influencer Program->"
"compatibleTypes": "->Referral Program->Mentorship Program->Support Program->Claims Program->Staking Program->Github Program->Airdrop Program->Influencer Program->Liquidity Program->"
},
"propertyNameAtParent": "tokensAwarded"
}
@@ -38,9 +38,29 @@ function newGovernanceActionSwitch() {
UI.projects.governance.functionLibraries.profileConstructor.buildProfile(action.node, action.rootNodes)
break
}
case 'Add Signing Account':
case 'Add Social Trading Desktop App':
{
UI.projects.governance.functionLibraries.profileConstructor.addSigningAccount(action.node, action.rootNodes)
UI.projects.governance.functionLibraries.profileConstructor.addSigningAccount(action.node, action.rootNodes, 'Social Trading Desktop App')
break
}
case 'Add Social Trading Server App':
{
UI.projects.governance.functionLibraries.profileConstructor.addSigningAccount(action.node, action.rootNodes, 'Social Trading Server App')
break
}
case 'Add Social Trading Mobile App':
{
UI.projects.governance.functionLibraries.profileConstructor.addSigningAccount(action.node, action.rootNodes, 'Social Trading Mobile App')
break
}
case 'Add Algo Traders Platform':
{
UI.projects.governance.functionLibraries.profileConstructor.addSigningAccount(action.node, action.rootNodes, 'Algo Traders Platform')
break
}
case 'Add P2P Network Node':
{
UI.projects.governance.functionLibraries.profileConstructor.addSigningAccount(action.node, action.rootNodes, 'P2P Network Node')
break
}
case 'Add Missing Plugin User Profiles':
@@ -68,7 +88,7 @@ function newGovernanceActionSwitch() {
UI.projects.governance.functionLibraries.pluginsFunctions.addMissingPluginPositions(action.node, action.rootNodes)
}
break
default: {
console.log("[WARN] Action sent to Governance Action Switch does not belong here. Verify at the App Schema file of the node that triggered this action that the actionProject is pointing to the right project. -> Action = " + action.name + " -> Action Node Name = " + action.node.name)
}
@@ -107,7 +107,7 @@ function newGovernanceFunctionLibraryAirdropProgram() {
) {
node.payload.airdropProgram.isActive = false
userProfile.payload.uiObject.setErrorMessage(
"Waiting for blockchain balance. It takes 6 seconds to load the balance of each profile, bacause you are using a free API provided by BSC Scan.",
"Waiting for blockchain balance. It takes 1 minute to load the balance of each profile, bacause you are using a free API provided by BSC Scan.",
UI.projects.governance.globals.designer.SET_ERROR_COUNTER_FACTOR
)
return
@@ -110,11 +110,22 @@ function newGovernanceFunctionLibraryDistributionProcess() {
userProfiles
)
/*
Run the Liquidity Program
Run the Liquidity Program: One per SA Token Market
*/
UI.projects.governance.functionLibraries.liquidityProgram.calculate(
pools,
userProfiles
userProfiles,
'BTCB'
)
UI.projects.governance.functionLibraries.liquidityProgram.calculate(
pools,
userProfiles,
'BNB'
)
UI.projects.governance.functionLibraries.liquidityProgram.calculate(
pools,
userProfiles,
'BUSD'
)
/*
Run the Claims Program
@@ -107,7 +107,7 @@ function newGovernanceFunctionLibraryGithubProgram() {
) {
node.payload.githubProgram.isActive = false
userProfile.payload.uiObject.setErrorMessage(
"Waiting for blockchain balance. It takes 6 seconds to load the balance of each profile, bacause you are using a free API provided by BSC Scan.",
"Waiting for blockchain balance. It takes 1 minute to load the balance of each profile, bacause you are using a free API provided by BSC Scan.",
UI.projects.governance.globals.designer.SET_ERROR_COUNTER_FACTOR
)
return
@@ -7,7 +7,8 @@ function newGovernanceFunctionLibraryLiquidityProgram() {
function calculate(
pools,
userProfiles
userProfiles,
asset
) {
let programPoolTokenReward
/*
@@ -20,7 +21,7 @@ function newGovernanceFunctionLibraryLiquidityProgram() {
/* Scan Pools Until finding the Pool for this program*/
for (let i = 0; i < pools.length; i++) {
let poolsNode = pools[i]
programPoolTokenReward = UI.projects.governance.utilities.pools.findPool(poolsNode, "Liquidity-Rewards")
programPoolTokenReward = UI.projects.governance.utilities.pools.findPool(poolsNode, "Liquidity-Rewards-" + asset)
if (programPoolTokenReward !== undefined) { break }
}
if (programPoolTokenReward === undefined || programPoolTokenReward === 0) { return }
@@ -29,7 +30,7 @@ function newGovernanceFunctionLibraryLiquidityProgram() {
let userProfile = userProfiles[i]
if (userProfile.tokenPowerSwitch === undefined) { continue }
let program = UI.projects.governance.utilities.validations.onlyOneProgram(userProfile, "Liquidity Program")
let program = UI.projects.governance.utilities.validations.onlyOneProgramBasedOnConfigProperty(userProfile, "Liquidity Program", 'asset', asset)
if (program === undefined) { continue }
if (program.payload === undefined) { continue }
@@ -39,7 +40,7 @@ function newGovernanceFunctionLibraryLiquidityProgram() {
let userProfile = userProfiles[i]
if (userProfile.tokenPowerSwitch === undefined) { continue }
let program = UI.projects.governance.utilities.validations.onlyOneProgram(userProfile, "Liquidity Program")
let program = UI.projects.governance.utilities.validations.onlyOneProgramBasedOnConfigProperty(userProfile, "Liquidity Program", 'asset', asset)
if (program === undefined) { continue }
if (program.payload === undefined) { continue }
@@ -49,7 +50,7 @@ function newGovernanceFunctionLibraryLiquidityProgram() {
let userProfile = userProfiles[i]
if (userProfile.tokenPowerSwitch === undefined) { continue }
let program = UI.projects.governance.utilities.validations.onlyOneProgram(userProfile, "Liquidity Program")
let program = UI.projects.governance.utilities.validations.onlyOneProgramBasedOnConfigProperty(userProfile, "Liquidity Program", 'asset', asset)
if (program === undefined) { continue }
if (program.payload === undefined) { continue }
if (program.payload.liquidityProgram.isActive === false) { continue }
@@ -60,7 +61,7 @@ function newGovernanceFunctionLibraryLiquidityProgram() {
let userProfile = userProfiles[i]
if (userProfile.tokenPowerSwitch === undefined) { continue }
let program = UI.projects.governance.utilities.validations.onlyOneProgram(userProfile, "Liquidity Program")
let program = UI.projects.governance.utilities.validations.onlyOneProgramBasedOnConfigProperty(userProfile, "Liquidity Program", 'asset', asset)
if (program === undefined) { continue }
if (program.payload === undefined) { continue }
if (program.payload.liquidityProgram.isActive === false) { continue }
@@ -107,7 +108,7 @@ function newGovernanceFunctionLibraryLiquidityProgram() {
) {
node.payload.liquidityProgram.isActive = false
userProfile.payload.uiObject.setErrorMessage(
"Waiting for liquidity balance. It takes 6 seconds to load the liquidity provided by each profile, bacause you are using a free API provided by BSC Scan.",
"Waiting for liquidity balance. It takes 1 minute to load the liquidity provided by each profile, bacause you are using a free API provided by BSC Scan.",
UI.projects.governance.globals.designer.SET_ERROR_COUNTER_FACTOR
)
return
@@ -123,7 +124,7 @@ function newGovernanceFunctionLibraryLiquidityProgram() {
Here we will convert Liquidity Tokens into Liquidity Power.
As per system rules Liquidity Powar = userProfile.payload.liquidityTokens
*/
let programPower = userProfile.payload.liquidityTokens
let programPower = userProfile.payload.liquidityTokens[asset]
programNode.payload.liquidityProgram.ownPower = programPower
accumulatedProgramPower = accumulatedProgramPower + programPower
@@ -159,7 +159,8 @@ function newGovernanceFunctionLibraryProfileConstructor() {
function addSigningAccount(
node,
rootNodes
rootNodes,
targetNodeType
) {
let githubUsername = UI.projects.visualScripting.utilities.nodeConfig.loadConfigProperty(node.payload, 'githubUsername')
let mnemonic = UI.projects.visualScripting.utilities.nodeConfig.loadConfigProperty(node.payload, 'mnemonic')
@@ -299,20 +300,48 @@ function newGovernanceFunctionLibraryProfileConstructor() {
'Signing Account',
UI.projects.foundations.spaces.designSpace.workspace.workspaceNode.rootNodes
)
let signingAccountChild = UI.projects.visualScripting.functionLibraries.uiObjectsFromNodes.addUIObject(
signingAccount,
targetNodeType,
UI.projects.foundations.spaces.designSpace.workspace.workspaceNode.rootNodes
)
/*
Let's get a cool name for this node.
*/
let targetNodeTypeCount = 0
for (let i = 0; i < signingAccounts.signingAccounts.length; i++) {
let singningAccount = signingAccounts.signingAccounts[i]
if (singningAccount.signingAccountChild.type === targetNodeType) {
targetNodeTypeCount++
}
}
signingAccountChild.name = targetNodeType +" # " + targetNodeTypeCount
let codeName = targetNodeType.replaceAll(' ', '-') + "-" + targetNodeTypeCount
/*
We store at the User Profile the Signed githubUsername
*/
UI.projects.visualScripting.utilities.nodeConfig.saveConfigProperty(signingAccountChild.payload, 'codeName', codeName)
UI.projects.visualScripting.utilities.nodeConfig.saveConfigProperty(signingAccount.payload, 'signature', signature)
node.config = "{}"
UI.projects.visualScripting.utilities.nodeConfig.saveConfigProperty(node.payload, 'nodeName', signingAccount.name)
UI.projects.visualScripting.utilities.nodeConfig.saveConfigProperty(node.payload, 'codeName', signingAccount.name)
UI.projects.visualScripting.utilities.nodeConfig.saveConfigProperty(node.payload, 'nodeType', signingAccount.type)
UI.projects.visualScripting.utilities.nodeConfig.saveConfigProperty(node.payload, 'nodeId', signingAccount.id)
UI.projects.visualScripting.utilities.nodeConfig.saveConfigProperty(node.payload, 'address', address)
UI.projects.visualScripting.utilities.nodeConfig.saveConfigProperty(node.payload, 'privateKey', privateKey)
UI.projects.visualScripting.utilities.nodeConfig.saveConfigProperty(node.payload, 'githubUsername', githubUsername)
UI.projects.visualScripting.utilities.nodeConfig.saveConfigProperty(node.payload, 'userProfileId', node.payload.referenceParent.id)
let secrets = UI.projects.visualScripting.utilities.nodeConfig.loadConfigProperty(node.payload, 'secrets', signingAccount.name)
if (secrets === undefined) {
secrets = []
}
let secret = {
signingAccountChildName: signingAccountChild.name,
signingAccountChildType: targetNodeType,
signingAccountChildCodeName: codeName,
signingAccountNodeId: signingAccount.id,
privateKey: privateKey,
userProfileHandle: githubUsername,
userProfileId: node.payload.referenceParent.id
}
secrets.push(secret)
UI.projects.visualScripting.utilities.nodeConfig.saveConfigProperty(node.payload, 'secrets', secrets)
/*
Show nice message.
*/
@@ -107,7 +107,7 @@ function newGovernanceFunctionLibraryStakingProgram() {
) {
node.payload.stakingProgram.isActive = false
userProfile.payload.uiObject.setErrorMessage(
"Waiting for blockchain balance. It takes 6 seconds to load the balance of each profile, bacause you are using a free API provided by BSC Scan.",
"Waiting for blockchain balance. It takes 1 minute to load the balance of each profile, bacause you are using a free API provided by BSC Scan.",
UI.projects.governance.globals.designer.SET_ERROR_COUNTER_FACTOR
)
return
@@ -113,6 +113,18 @@ function newGovernanceFunctionLibraryTokenMining() {
calculateProgram(userProfile, program, "airdropProgram")
}
for (let i = 0; i < userProfiles.length; i++) {
let userProfile = userProfiles[i]
for (let j = 0; j < UI.projects.governance.globals.saToken.SA_TOKEN_BSC_PANCAKE_LIQUIDITY_ASSETS.length; j++) {
let asset = UI.projects.governance.globals.saToken.SA_TOKEN_BSC_PANCAKE_LIQUIDITY_ASSETS[j]
if (userProfile.tokenPowerSwitch === undefined) { continue }
let program = UI.projects.governance.utilities.validations.onlyOneProgramBasedOnConfigProperty(userProfile, "Liquidity Program", 'asset', asset)
if (program === undefined) { continue }
if (program.payload === undefined) { continue }
calculateProgram(userProfile, program, "liquidityProgram")
}
}
for (let i = 0; i < userProfiles.length; i++) {
let userProfile = userProfiles[i]
@@ -149,7 +161,7 @@ function newGovernanceFunctionLibraryTokenMining() {
if (userProfile.payload === undefined) { return }
if (userProfile.tokensMined === undefined) { return }
if (userProfile.tokensMined.payload === undefined) { return }
if (programNode.payload === undefined) { return }
if (programNode.payload[programPropertyName] === undefined) { return }
@@ -4,6 +4,7 @@ function newGovernanceFunctionLibraryTokenPower() {
calculateDelegatedPower: calculateDelegatedPower
}
const OPAQUE_NODES_TYPES = ['Tokens Mined', 'Signing Accounts', 'Onboarding Programs', 'Liquidity Programs']
return thisObject
function calculateTokenPower(
@@ -99,7 +100,7 @@ function newGovernanceFunctionLibraryTokenPower() {
userProfile.payload.uiObject.setErrorMessage(
"You need to have a Token Power Switch child node.",
UI.projects.governance.globals.designer.SET_ERROR_COUNTER_FACTOR
)
)
return
}
distributeTokenPower(
@@ -125,7 +126,7 @@ function newGovernanceFunctionLibraryTokenPower() {
userProfile.payload.uiObject.setErrorMessage(
"You need to have a Token Power Switch child node.",
UI.projects.governance.globals.designer.SET_ERROR_COUNTER_FACTOR
)
)
return
}
distributeTokenPower(
@@ -186,8 +187,7 @@ function newGovernanceFunctionLibraryTokenPower() {
let childNode = node[property.name]
if (childNode === undefined) { continue }
if (childNode.type === "Delegation Program" && excludeDelegationProgram === true) { continue }
if (childNode.type === "Tokens Mined") { continue }
if (childNode.type === "Signing Accounts") { continue }
if (OPAQUE_NODES_TYPES.includes(childNode.type)) { continue }
let percentage = getPercentage(childNode)
@@ -205,8 +205,7 @@ function newGovernanceFunctionLibraryTokenPower() {
let childNode = propertyArray[m]
if (childNode === undefined) { continue }
if (childNode.type === "Delegation Program" && excludeDelegationProgram === true) { continue }
if (childNode.type === "Tokens Mined") { continue }
if (childNode.type === "Signing Accounts") { continue }
if (OPAQUE_NODES_TYPES.includes(childNode.type)) { continue }
let percentage = getPercentage(childNode)
if (percentage !== undefined && isNaN(percentage) !== true) {
@@ -224,7 +223,7 @@ function newGovernanceFunctionLibraryTokenPower() {
node.payload.uiObject.setErrorMessage(
'Token Power Switching Error. Total Percentage of children nodes is grater that 100.',
UI.projects.governance.globals.designer.SET_ERROR_COUNTER_FACTOR
)
)
return
}
let defaultPercentage = 0
@@ -242,8 +241,7 @@ function newGovernanceFunctionLibraryTokenPower() {
let childNode = node[property.name]
if (childNode === undefined) { continue }
if (childNode.type === "Delegation Program" && excludeDelegationProgram === true) { continue }
if (childNode.type === "Tokens Mined") { continue }
if (childNode.type === "Signing Accounts") { continue }
if (OPAQUE_NODES_TYPES.includes(childNode.type)) { continue }
let percentage = getPercentage(childNode)
if (percentage === undefined || isNaN(percentage) === true) {
@@ -264,8 +262,7 @@ function newGovernanceFunctionLibraryTokenPower() {
let childNode = propertyArray[m]
if (childNode === undefined) { continue }
if (childNode.type === "Delegation Program" && excludeDelegationProgram === true) { continue }
if (childNode.type === "Tokens Mined") { continue }
if (childNode.type === "Signing Accounts") { continue }
if (OPAQUE_NODES_TYPES.includes(childNode.type)) { continue }
let percentage = getPercentage(childNode)
if (percentage === undefined || isNaN(percentage) === true) {
@@ -316,7 +313,7 @@ function newGovernanceFunctionLibraryTokenPower() {
node.payload.uiObject.percentageAngleOffset = 180
node.payload.uiObject.percentageAtAngle = true
node.payload.uiObject.setPercentage(percentage.toFixed(2),
UI.projects.governance.globals.designer.SET_PERCENTAGE_COUNTER
UI.projects.governance.globals.designer.SET_PERCENTAGE_COUNTER
)
}
}
+4 -1
View File
@@ -4,7 +4,10 @@ function newGovernanceGlobalsSaToken() {
SA_TOKEN_BSC_CONTRACT_ABI: '[{"constant":true,"inputs":[],"name":"name","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_spender","type":"address"},{"name":"_value","type":"uint256"}],"name":"approve","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"totalSupply","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_from","type":"address"},{"name":"_to","type":"address"},{"name":"_value","type":"uint256"}],"name":"transferFrom","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"decimals","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"unpause","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"account","type":"address"},{"name":"amount","type":"uint256"}],"name":"mint","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_value","type":"uint256"}],"name":"burn","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"paused","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_spender","type":"address"},{"name":"_subtractedValue","type":"uint256"}],"name":"decreaseApproval","outputs":[{"name":"success","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"_owner","type":"address"}],"name":"balanceOf","outputs":[{"name":"balance","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"listAddress","type":"address"},{"name":"isBlackListed","type":"bool"}],"name":"blackListAddress","outputs":[{"name":"success","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"pause","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"symbol","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_to","type":"address"},{"name":"_value","type":"uint256"}],"name":"transfer","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_spender","type":"address"},{"name":"_addedValue","type":"uint256"}],"name":"increaseApproval","outputs":[{"name":"success","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"_owner","type":"address"},{"name":"_spender","type":"address"}],"name":"allowance","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"inputs":[{"name":"_name","type":"string"},{"name":"_symbol","type":"string"},{"name":"_decimals","type":"uint256"},{"name":"_supply","type":"uint256"},{"name":"tokenOwner","type":"address"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"name":"from","type":"address"},{"indexed":true,"name":"to","type":"address"},{"indexed":false,"name":"value","type":"uint256"}],"name":"Mint","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"burner","type":"address"},{"indexed":false,"name":"value","type":"uint256"}],"name":"Burn","type":"event"},{"anonymous":false,"inputs":[],"name":"Pause","type":"event"},{"anonymous":false,"inputs":[],"name":"Unpause","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"previousOwner","type":"address"},{"indexed":true,"name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"blackListed","type":"address"},{"indexed":false,"name":"value","type":"bool"}],"name":"Blacklist","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"owner","type":"address"},{"indexed":true,"name":"spender","type":"address"},{"indexed":false,"name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"from","type":"address"},{"indexed":true,"name":"to","type":"address"},{"indexed":false,"name":"value",Line truncated
SA_TOKEN_BSC_TREASURY_ACCOUNT_ADDRESS: '0x8d4d2557ce99f83f658adf61eef3e61e04c2ac2c',
SA_TOKEN_BSC_DECIMAL_FACTOR: 1000000000000000000,
SA_TOKEN_BSC_PANCAKE_LIQUIDITY_POOL_CONTRACT_ADDRESS: '0x7164b91db59c50156b63d0e31da08cd47b031711'
SA_TOKEN_BSC_PANCAKE_LIQUIDITY_POOL_BTCB_CONTRACT_ADDRESS: '0x7164b91db59c50156b63d0e31da08cd47b031711',
SA_TOKEN_BSC_PANCAKE_LIQUIDITY_POOL_BNB_CONTRACT_ADDRESS: '0xd4a05523839d0d175289054022ee4e01e3dae854',
SA_TOKEN_BSC_PANCAKE_LIQUIDITY_POOL_BUSD_CONTRACT_ADDRESS: '0xf9e8ce74058d872f7688665885826c3d5e1d0a27',
SA_TOKEN_BSC_PANCAKE_LIQUIDITY_ASSETS: ['BTCB', 'BNB', 'BUSD']
}
return thisObject
}
@@ -45,7 +45,14 @@ function newGovernanceReportsLiquidity() {
"textAlign": "left"
},
{
"name": "LiquidityPower",
"name": "market",
"label": "Market",
"type": "string",
"order": "ascending",
"textAlign": "center"
},
{
"name": "liquidityPower",
"label": "Liquidity Power",
"type": "number",
"order": "descending",
@@ -53,7 +60,7 @@ function newGovernanceReportsLiquidity() {
"format": "2 decimals"
},
{
"name": "Percentage",
"name": "percentage",
"label": "Percentage",
"type": "number",
"order": "descending",
@@ -77,24 +84,28 @@ function newGovernanceReportsLiquidity() {
/*
Transform the result array into table records.
*/
for (let j = 0; j < userProfiles.length; j++) {
let userProfile = userProfiles[j]
for (let j = 0; j < UI.projects.governance.globals.saToken.SA_TOKEN_BSC_PANCAKE_LIQUIDITY_ASSETS.length; j++) {
let asset = UI.projects.governance.globals.saToken.SA_TOKEN_BSC_PANCAKE_LIQUIDITY_ASSETS[j]
if (userProfile.tokenPowerSwitch === undefined) { continue }
let program = UI.projects.governance.utilities.validations.onlyOneProgramBasedOnConfigProperty(userProfile, programName, 'asset', asset)
if (program === undefined) { continue }
if (program.payload === undefined) { continue }
if (program.payload[programPropertyName] === undefined) { continue }
if (userProfile.tokenPowerSwitch === undefined) { continue }
let program = UI.projects.governance.utilities.validations.onlyOneProgram(userProfile, programName)
if (program === undefined) { continue }
if (program.payload === undefined) { continue }
if (program.payload[programPropertyName] === undefined) { continue }
let tableRecord = {
"name": userProfile.name,
"market": 'SA / ' + asset,
"liquidityPower": program.payload[programPropertyName].ownPower,
"percentage": program.payload[programPropertyName].awarded.percentage / 100,
"tokensAwarded": program.payload[programPropertyName].awarded.tokens | 0
}
let tableRecord = {
"name": userProfile.name,
"LiquidityPower": program.payload[programPropertyName].ownPower,
"percentage": program.payload[programPropertyName].awarded.percentage,
"tokensAwarded": program.payload[programPropertyName].awarded.tokens | 0
}
if (UI.projects.governance.utilities.filters.applyFilters(filters, filtersObject, tableRecord) === true) {
tableRecords.push(tableRecord)
if (UI.projects.governance.utilities.filters.applyFilters(filters, filtersObject, tableRecord) === true) {
tableRecords.push(tableRecord)
}
}
}
/*
@@ -15,7 +15,7 @@ function newGovernanceUserProfileSpace() {
}
let waitingForResponses = 0
const BSC_SCAN_RATE_LIMIT_DELAY = 12000
const BSC_SCAN_RATE_LIMIT_DELAY = 6000 * 5
let reputationByAddress = new Map()
return thisObject
@@ -373,7 +373,14 @@ function newGovernanceUserProfileSpace() {
let userProfile = userProfiles[i]
if (userProfile.payload === undefined) { continue }
if (userProfile.payload.bloackchainBalancesLoading === true) {
return
}
if (userProfile.payload.blockchainTokens === undefined) {
userProfile.payload.bloackchainBalancesLoading = true
UI.projects.foundations.spaces.cockpitSpace.setStatus('Loading blockchain balances for User Profile # ' + (i + 1) + ' / ' + userProfiles.length, 1500, UI.projects.foundations.spaces.cockpitSpace.statusTypes.ALL_GOOD)
getBlockchainAccount(userProfile)
return
}
@@ -394,6 +401,7 @@ function newGovernanceUserProfileSpace() {
httpRequest(JSON.stringify(request.params), request.url, onResponse)
function onResponse(err, data) {
/* Lets check the result of the call through the http interface */
if (err.result !== GLOBAL.DEFAULT_OK_RESPONSE.result) {
userProfile.payload.uiObject.setErrorMessage(
@@ -422,12 +430,25 @@ function newGovernanceUserProfileSpace() {
blockchainAccount !== "" &&
userProfile.payload.blockchainTokens === undefined
) {
userProfile.payload.liquidityTokens = {
BTCB: 0,
BNB: 0,
BUSD: 0
}
waitingForResponses++
userProfile.payload.liquidityTokens = 0 // We need to set this value here so that the next call to BSCSCAN is not done more than once.
setTimeout(getBPancakeTokens, BSC_SCAN_RATE_LIMIT_DELAY / 2, userProfile, blockchainAccount)
waitingForResponses++
userProfile.payload.blockchainTokens = 0 // We need to set this value here so that the next call to BSCSCAN is not done more than once.
setTimeout(getBlockchainTokens, BSC_SCAN_RATE_LIMIT_DELAY, userProfile, blockchainAccount)
waitingForResponses++
setTimeout(getBPancakeTokens, BSC_SCAN_RATE_LIMIT_DELAY / 4 * 1, userProfile, blockchainAccount, 'BTCB', UI.projects.governance.globals.saToken.SA_TOKEN_BSC_PANCAKE_LIQUIDITY_POOL_BTCB_CONTRACT_ADDRESS)
setTimeout(getBPancakeTokens, BSC_SCAN_RATE_LIMIT_DELAY / 4 * 2, userProfile, blockchainAccount, 'BNB', UI.projects.governance.globals.saToken.SA_TOKEN_BSC_PANCAKE_LIQUIDITY_POOL_BNB_CONTRACT_ADDRESS)
setTimeout(getBPancakeTokens, BSC_SCAN_RATE_LIMIT_DELAY / 4 * 3, userProfile, blockchainAccount, 'BUSD', UI.projects.governance.globals.saToken.SA_TOKEN_BSC_PANCAKE_LIQUIDITY_POOL_BUSD_CONTRACT_ADDRESS)
/*
Now we get the SA Tokens Balance.
*/
waitingForResponses++
setTimeout(getBlockchainTokens, BSC_SCAN_RATE_LIMIT_DELAY / 4 * 4, userProfile, blockchainAccount)
}
}
}
@@ -439,16 +460,17 @@ function newGovernanceUserProfileSpace() {
fetch(url).then(function (response) {
return response.json();
}).then(function (data) {
//console.log(data)
userProfile.payload.bloackchainBalancesLoading = false
if (data.result === "Max rate limit reached, please use API Key for higher rate limit") {
userProfile.payload.blockchainTokens = undefined // This enables this profile to query the blockchain again.
userProfile.payload.blockchainTokens = undefined
} else {
userProfile.payload.uiObject.setInfoMessage('Blockchan Balance Succesfully Loaded.',
UI.projects.governance.globals.designer.SET_INFO_COUNTER_FACTOR
)
userProfile.payload.blockchainTokens = Number(data.result) / 1000000000000000000
console.log('[INFO] SA Balance of ' + userProfile.name + ' is ', userProfile.payload.blockchainTokens)
userProfile.payload.reputation = Math.min(reputationByAddress.get(blockchainAccount.toLowerCase()) | 0, userProfile.payload.blockchainTokens)
console.log('Reputation of ' + userProfile.name + ' is ', userProfile.payload.reputation)
console.log('[INFO] Reputation of ' + userProfile.name + ' is ', userProfile.payload.reputation)
}
waitingForResponses--
}).catch(function (err) {
@@ -463,22 +485,23 @@ function newGovernanceUserProfileSpace() {
});
}
function getBPancakeTokens(userProfile, blockchainAccount) {
console.log('[INFO] Loading Pancake Balance for User Profile: ', userProfile.name, 'blockchainAccount: ', blockchainAccount)
const url = "https://api.bscscan.com/api?module=account&action=tokenbalance&contractaddress=" + UI.projects.governance.globals.saToken.SA_TOKEN_BSC_PANCAKE_LIQUIDITY_POOL_CONTRACT_ADDRESS + "&address=" + blockchainAccount + "&tag=latest&apikey=YourApiKeyToken"
function getBPancakeTokens(userProfile, blockchainAccount, asset, marketContract) {
console.log('[INFO] Loading Pancake Balance for User Profile: ', userProfile.name, 'blockchainAccount: ', blockchainAccount, 'asset: ', asset)
const url = "https://api.bscscan.com/api?module=account&action=tokenbalance&contractaddress=" + marketContract + "&address=" + blockchainAccount + "&tag=latest&apikey=YourApiKeyToken"
fetch(url).then(function (response) {
return response.json();
}).then(function (data) {
//console.log(data)
if (data.result === "Max rate limit reached, please use API Key for higher rate limit") {
userProfile.payload.liquidityTokens = undefined // This enables this profile to query the blockchain again.
console.log('[WARN] Rate Limit Reached fetching liquidity tokens for asset ' + asset + ' of user profile ' + userProfile.name)
userProfile.payload.blockchainTokens = undefined
} else {
userProfile.payload.uiObject.setInfoMessage('Pancake Balance Succesfully Loaded.',
userProfile.payload.uiObject.setInfoMessage('Pancake Balance Succesfully Loaded for asset ' + asset,
UI.projects.governance.globals.designer.SET_INFO_COUNTER_FACTOR
)
userProfile.payload.liquidityTokens = Number(data.result) / 1000000000000000000
console.log('Liquidity of ' + userProfile.name + ' is ', userProfile.payload.liquidityTokens)
userProfile.payload.liquidityTokens[asset] = Number(data.result) / 1000000000000000000
console.log('[INFO] Liquidity of ' + userProfile.name + ' for asset ' + asset + ' is ', userProfile.payload.liquidityTokens[asset])
}
waitingForResponses--
}).catch(function (err) {
@@ -102,7 +102,7 @@ function newGovernanceUtilitiesBonusProgram() {
) {
node.payload[programPropertyName].isActive = false
userProfile.payload.uiObject.setErrorMessage(
"Waiting for blockchain balance. It takes 6 seconds to load the balance of each profile, bacause you are using a free API provided by BSC Scan.",
"Waiting for blockchain balance. It takes 1 minute to load the balance of each profile, bacause you are using a free API provided by BSC Scan.",
UI.projects.governance.globals.designer.SET_ERROR_COUNTER_FACTOR
)
return
@@ -169,7 +169,7 @@ function newGovernanceUtilitiesDecendentProgram() {
) {
node.payload[programPropertyName].isActive = false
userProfile.payload.uiObject.setErrorMessage(
"Waiting for blockchain balance. It takes 6 seconds to load the balance of each profile, bacause you are using a free API provided by BSC Scan.",
"Waiting for blockchain balance. It takes 1 minute to load the balance of each profile, bacause you are using a free API provided by BSC Scan.",
UI.projects.governance.globals.designer.SET_ERROR_COUNTER_FACTOR
)
return
@@ -1,6 +1,7 @@
function newGovernanceUtilitiesValidations () {
function newGovernanceUtilitiesValidations() {
let thisObject = {
onlyOneProgram: onlyOneProgram
onlyOneProgram: onlyOneProgram,
onlyOneProgramBasedOnConfigProperty: onlyOneProgramBasedOnConfigProperty
}
return thisObject
@@ -15,7 +16,7 @@ function newGovernanceUtilitiesValidations () {
userProfile.payload.uiObject.setErrorMessage(
'Only one ' + programNodeType + ' is allowed.',
UI.projects.governance.globals.designer.SET_ERROR_COUNTER_FACTOR
)
)
return
}
if (programs.length === 1) {
@@ -23,4 +24,20 @@ function newGovernanceUtilitiesValidations () {
}
}
}
function onlyOneProgramBasedOnConfigProperty(userProfile, programNodeType, configProperetyName, configProperetyValue) {
/*
Find all the nodes representing the current program.
*/
let programs = UI.projects.visualScripting.utilities.branches.nodeBranchToArray(userProfile, programNodeType)
if (programs !== undefined) {
for (let i = 0; i < programs.length; i++) {
let program = programs[i]
let propertyValue = UI.projects.visualScripting.utilities.nodeConfig.loadConfigProperty(program.payload, configProperetyName)
if (propertyValue === configProperetyValue) {
return program
}
}
}
}
}
@@ -1,12 +1,9 @@
exports.newSocialTradingGlobalsMemory = function () {
exports.newNetworkGlobalsMemory = function () {
/*
Here is the Data we are going to keep in memory.
*/
let thisObject = {
maps: {
USER_PROFILES_BY_ID: new Map(), // Here we will store the user profiles by User Profile Id.
USER_PROFILES_BY_HANDLE: new Map(), // Here we will store the user profiles by User Profile Handle.
USER_PROFILES_BY_BLOCHAIN_ACCOUNT: new Map(), // Here we will store the user profiles by Blockchain Account.
EVENTS: new Map() // This is the registry of all events received that prevents processing them more than once.
},
arrays: {
@@ -252,11 +252,11 @@ exports.newNetworkModulesWebSocketsInterface = function newNetworkModulesWebSock
*/
let signedMessage = {
callerProfileHandle: messageHeader.callerProfileHandle,
calledProfileHandle: SA.secrets.map.get('P2P Network Node').githubUsername,
calledProfileHandle: SA.secrets.map.get(global.env.P2P_NETWORK_NODE_SIGNING_ACCOUNT).userProfileHandle,
callerTimestamp: messageHeader.callerTimestamp,
calledTimestamp: calledTimestamp
}
let signature = web3.eth.accounts.sign(JSON.stringify(signedMessage), SA.secrets.map.get('P2P Network Node').privateKey)
let signature = web3.eth.accounts.sign(JSON.stringify(signedMessage), SA.secrets.map.get(global.env.P2P_NETWORK_NODE_SIGNING_ACCOUNT).privateKey)
let response = {
result: 'Ok',
@@ -304,7 +304,7 @@ exports.newNetworkModulesWebSocketsInterface = function newNetworkModulesWebSock
/*
The signature gives us the blockchain account, and the account the user profile.
*/
let witnessUserProfile = NT.projects.socialTrading.globals.memory.maps.USER_PROFILES_BY_BLOCHAIN_ACCOUNT.get(caller.blockchainAccount)
let witnessUserProfile = SA.projects.network.globals.memory.maps.USER_PROFILES_BY_BLOCHAIN_ACCOUNT.get(caller.blockchainAccount)
if (witnessUserProfile === undefined) {
let response = {
@@ -345,7 +345,7 @@ exports.newNetworkModulesWebSocketsInterface = function newNetworkModulesWebSock
We will check that the signature includes this Network Node handle, to avoid
man in the middle attackts.
*/
if (signedMessage.calledProfileHandle !== SA.secrets.map.get('P2P Network Node').githubUsername) {
if (signedMessage.calledProfileHandle !== SA.secrets.map.get(global.env.P2P_NETWORK_NODE_SIGNING_ACCOUNT).userProfileHandle) {
let response = {
result: 'Error',
message: 'calledProfileHandle Does Not Match This Network Node Handle.'
@@ -415,6 +415,7 @@ exports.newNetworkModulesWebSocketsInterface = function newNetworkModulesWebSock
}
function removeCaller(caller) {
if (caller === undefined) { return }
thisObject.callersMap.delete(caller.socket.id)
@@ -0,0 +1,269 @@
exports.newNetworkModulesWebSocketsNetworkClient = function newNetworkModulesWebSocketsNetworkClient() {
let thisObject = {
sendMessage: sendMessage,
initialize: initialize,
finalize: finalize
}
let socketClient
let web3
let called = {}
let selectedNetworkNode // This is a Network Node we pick to try to connect to.
let onMessageFunctionsMap = new Map()
return thisObject
function finalize() {
socketClient.close()
socketClient = undefined
networkInterface = undefined
peerInterface = undefined
web3 = undefined
called = undefined
onMessageFunctionsMap = undefined
}
async function initialize() {
/*
Here we will pick a Network Node from all users profiles available that do have a Network Node running. // TODO
In the meantime, we will assume that we have chosen the following Network Node to connect to.
*/
web3 = new SA.nodeModules.web3()
selectedNetworkNode = {
userProfileHandle: "Luis-Fernando-Molina",
blockchainAccount: "0xeBDCB7a73c4796ca9F025d005630eCe773dd9e54",
ranking: 0,
host: "localhost",
port: global.env.NETWORK_WEB_SOCKETS_INTERFACE_PORT
}
socketClient = new SA.nodeModules.ws('ws://' + selectedNetworkNode.host + ':' + selectedNetworkNode.port)
await setUpWebsocketClient()
}
async function setUpWebsocketClient() {
return new Promise(connectToNewtwork)
function connectToNewtwork(resolve, reject) {
try {
socketClient.onopen = () => { onConnection() }
socketClient.onerror = err => { onError(err) }
function onConnection() {
handshakeProcedure()
function handshakeProcedure() {
let callerTimestamp
stepOneRequest()
function stepOneRequest() {
/*
Send Handshake Message Step One:
At Step One we will just say hello, identify ourselves
as a Network Client, and send the Network Node our
User Profile Handle.
This Handle will be signed by the Network Node to prove
it's ouwn identity, and later we will sign it's own handle
to prove ours.
*/
socketClient.onmessage = socketMessage => { stepOneResponse(socketMessage) }
callerTimestamp = (new Date()).valueOf()
let message = {
messageType: 'Handshake',
callerRole: 'Network Node',
callerProfileHandle: SA.secrets.map.get(global.env.P2P_NETWORK_NODE_SIGNING_ACCOUNT).userProfileHandle,
callerTimestamp: callerTimestamp,
step: 'One'
}
socketClient.send(JSON.stringify(message))
}
function stepOneResponse(socketMessage) {
let response = JSON.parse(socketMessage.data)
if (response.result !== 'Ok') {
console.log('[ERROR] Web Sockets Client -> stepOneResponse -> response.message = ' + response.message)
reject()
return
}
let signature = JSON.parse(response.signature)
called.blockchainAccount = web3.eth.accounts.recover(signature)
/*
We will check that the signature received produces a valid Blockchain Account.
*/
if (called.blockchainAccount === undefined) {
console.log('[ERROR] Web Sockets Client -> stepOneResponse -> Signature does not produce a valid Blockchain Account.')
reject()
return
}
/*
We will check that the blockchain account taken from the signature matches
the one we have on record for the user profile of the Network Node we are calling.
*/
if (called.blockchainAccount !== selectedNetworkNode.blockchainAccount) {
console.log('[ERROR] Web Sockets Client -> stepOneResponse -> The Network Node called does not have the expected Profile Handle.')
reject()
return
}
let signedMessage = JSON.parse(signature.message)
/*
We will verify that the signature belongs to the signature.message.
To do this we will hash the signature.message and see if we get
the same hash of the signature.
*/
let hash = web3.eth.accounts.hashMessage(signature.message)
if (hash !== signature.messageHash) {
console.log('[ERROR] Web Sockets Client -> stepOneResponse -> signature.message Hashed Does Not Match signature.messageHash.')
reject()
return
}
/*
We will check that the Network Node that responded has the same User Profile Handle
that we have on record, otherwise something is wrong and we should not proceed.
*/
if (signedMessage.calledProfileHandle !== selectedNetworkNode.userProfileHandle) {
console.log('[ERROR] Web Sockets Client -> stepOneResponse -> The Network Node called does not have the expected Profile Handle.')
reject()
return
}
/*
We will check that the profile handle we sent to the Network Node, is returned at the
signed message, to avoid man in the middle attackts.
*/
if (signedMessage.callerProfileHandle !== SA.secrets.map.get(global.env.P2P_NETWORK_NODE_SIGNING_ACCOUNT).userProfileHandle) {
console.log('[ERROR] Web Sockets Client -> stepOneResponse -> The Network Node callerProfileHandle does not match my own userProfileHandle.')
reject()
return
}
/*
We will also check that the callerTimestamp we sent to the Network Node, is returned at the
signed message, also to avoid man in the middle attackts.
*/
if (signedMessage.callerTimestamp !== callerTimestamp) {
console.log('[ERROR] Web Sockets Client -> stepOneResponse -> The Network Node callerTimestamp does not match my own callerTimestamp.')
reject()
return
}
/*
All validations passed, it seems we can continue with Step Two.
*/
stepTwoRequest(signedMessage)
}
function stepTwoRequest(signedMessage) {
/*
Send Handshake Message Step Two:
Here we will sign a message with the Network Node profile
handle and timestamp to prove our own identity.
*/
socketClient.onmessage = socketMessage => { stepTwoResponse(socketMessage) }
let signature = web3.eth.accounts.sign(JSON.stringify(signedMessage), SA.secrets.map.get(global.env.P2P_NETWORK_NODE_SIGNING_ACCOUNT).privateKey)
let message = {
messageType: 'Handshake',
signature: JSON.stringify(signature),
step: 'Two'
}
socketClient.send(JSON.stringify(message))
}
function stepTwoResponse(socketMessage) {
let response = JSON.parse(socketMessage.data)
if (response.result !== 'Ok') {
console.log('[ERROR] Web Sockets Client -> stepOneResponse -> response.message = ' + response.message)
reject()
return
}
/*
This was the end of the Handshake producere. We are connected to the
Network Node and from now on, all response messages will be received
at this following function.
*/
socketClient.onmessage = socketMessage => { onMenssage(socketMessage) }
resolve()
}
}
}
function onError(err) {
console.log('[ERROR] Web Sockets Client -> onError -> err.message = ' + err.message)
console.log('[ERROR] Web Sockets Client -> onError -> err.stack = ' + err.stack)
}
} catch (err) {
console.log('[ERROR] Web Sockets Client -> setUpWebsocketClient -> err.stack = ' + err.stack)
}
}
}
function sendMessage(message) {
return new Promise(sendSocketMessage)
function sendSocketMessage(resolve, reject) {
if (socketClient.readyState !== 1) { // 1 means connected and ready.
console.log('[ERROR] Web Sockets Client -> sendMessage -> Cannot send message while connection is closed.')
reject('Websockets Connection Not Ready.')
return
}
let socketMessage = {
messageId: SA.projects.foundations.utilities.miscellaneousFunctions.genereteUniqueId(),
messageType: 'Request',
payload: message
}
onMessageFunctionsMap.set(socketMessage.messageId, onMenssageFunction)
socketClient.send(
JSON.stringify(socketMessage)
)
function onMenssageFunction(response) {
try {
if (response.result === 'Ok') {
resolve(response.data)
} else {
console.log('[ERROR] Web Sockets Client -> onMenssageFunction -> response.message = ' + response.message)
reject(response.message)
}
} catch (err) {
callbackFunction = undefined
console.log('[ERROR] Web Sockets Client -> err.stack = ' + err.stack)
}
}
}
}
function onMenssage(socketMessage) {
let response = JSON.parse(socketMessage.data)
/*
We get the functioin that is going to resolve or reject the promise given.
*/
onMenssageFunction = onMessageFunctionsMap.get(response.messageId)
onMessageFunctionsMap.delete(response.messageId)
onMenssageFunction(response)
}
}
+16
View File
@@ -0,0 +1,16 @@
exports.newNetworkGlobalsMemory = function () {
/*
Here is the Data we are going to keep in memory.
*/
let thisObject = {
maps: {
USER_PROFILES_BY_ID: new Map(), // Here we will store the user profiles by User Profile Id.
USER_PROFILES_BY_HANDLE: new Map(), // Here we will store the user profiles by User Profile Handle.
USER_PROFILES_BY_BLOCHAIN_ACCOUNT: new Map() // Here we will store the user profiles by Blockchain Account.
},
arrays: {
}
}
return thisObject
}
@@ -1,15 +1,10 @@
exports.newBootstrap = function newBootstrap() {
exports.newNetworkModulesUserProfiles = function newNetworkModulesUserProfiles() {
/*
This module helps the Network Node to bootstrap, by
loading all the services and data that needs to start
operating.
In particular, a network node operates with all User Profiles loaded in
memory maps. These profiles become part of the system in the form of User Profiles
Plugins at the Governance System, when user submit them. This means
that all these profiles are already at the local disk of the Network Node.
From there they will be loaded into memory as part of this bootstrapping process.
This module is usefull for all Apps that needs to operate with all User Profiles loaded in
memory maps.
User Profiles are plugins of the Governance System. Besides the info they carry, we also
need to read the blockchain for each one in order to calculate their ranking.
*/
let thisObject = {
/* Framework Functions */
@@ -48,7 +43,7 @@ exports.newBootstrap = function newBootstrap() {
let userProfileId = userProfilePlugin.id
let userHandle = config.signature.message
let userProfile = NT.projects.socialTrading.modules.socialGraphUserProfile.newSocialTradingModulesSocialGraphUserProfile()
let userProfile = SA.projects.socialTrading.modules.socialGraphUserProfile.newSocialTradingModulesSocialGraphUserProfile()
userProfile.initialize(
userProfileId,
userHandle,
@@ -56,9 +51,9 @@ exports.newBootstrap = function newBootstrap() {
ranking
)
NT.projects.socialTrading.globals.memory.maps.USER_PROFILES_BY_ID.set(userProfileId, userProfile)
NT.projects.socialTrading.globals.memory.maps.USER_PROFILES_BY_HANDLE.set(userHandle, userProfile)
NT.projects.socialTrading.globals.memory.maps.USER_PROFILES_BY_BLOCHAIN_ACCOUNT.set(blockchainAccount, userProfile)
SA.projects.network.globals.memory.maps.USER_PROFILES_BY_ID.set(userProfileId, userProfile)
SA.projects.network.globals.memory.maps.USER_PROFILES_BY_HANDLE.set(userHandle, userProfile)
SA.projects.network.globals.memory.maps.USER_PROFILES_BY_BLOCHAIN_ACCOUNT.set(blockchainAccount, userProfile)
/*
Each User Profile might have Signing Accounts, meaning
accounts that can be siging on behalf of the User Profile.
@@ -70,7 +65,7 @@ exports.newBootstrap = function newBootstrap() {
let signatureObject = config.signature
let web3 = new SA.nodeModules.web3()
let blockchainAccount = web3.eth.accounts.recover(signatureObject)
NT.projects.socialTrading.globals.memory.maps.USER_PROFILES_BY_BLOCHAIN_ACCOUNT.set(blockchainAccount, userProfile)
SA.projects.network.globals.memory.maps.USER_PROFILES_BY_BLOCHAIN_ACCOUNT.set(blockchainAccount, userProfile)
}
}
}
@@ -1,4 +1,4 @@
exports.newNetworkModulesWebSocketsClient = function newNetworkModulesWebSocketsClient() {
exports.newNetworkModulesWebSocketsAppClient = function newNetworkModulesWebSocketsAppClient() {
let thisObject = {
sendMessage: sendMessage,
@@ -30,7 +30,6 @@ exports.newNetworkModulesWebSocketsClient = function newNetworkModulesWebSockets
/*
Here we will pick a Network Node from all users profiles available that do have a Network Node running. // TODO
In the meantime, we will assume that we have chosen the following Network Node to connect to.
*/
web3 = new SA.nodeModules.web3()
@@ -87,7 +86,7 @@ exports.newNetworkModulesWebSocketsClient = function newNetworkModulesWebSockets
let message = {
messageType: 'Handshake',
callerRole: 'Network Client',
callerProfileHandle: SA.secrets.map.get('Social Trading Desktop').githubUsername,
callerProfileHandle: SA.secrets.map.get(global.env.DESKTOP_APP_SIGNING_ACCOUNT).userProfileHandle,
callerTimestamp: callerTimestamp,
step: 'One'
}
@@ -148,7 +147,7 @@ exports.newNetworkModulesWebSocketsClient = function newNetworkModulesWebSockets
We will check that the profile handle we sent to the Network Node, is returned at the
signed message, to avoid man in the middle attackts.
*/
if (signedMessage.callerProfileHandle !== SA.secrets.map.get('Social Trading Desktop').githubUsername) {
if (signedMessage.callerProfileHandle !== SA.secrets.map.get(global.env.DESKTOP_APP_SIGNING_ACCOUNT).userProfileHandle) {
console.log('[ERROR] Web Sockets Client -> stepOneResponse -> The Network Node callerProfileHandle does not match my own userProfileHandle.')
reject()
return
@@ -178,7 +177,7 @@ exports.newNetworkModulesWebSocketsClient = function newNetworkModulesWebSockets
*/
socketClient.onmessage = socketMessage => { stepTwoResponse(socketMessage) }
let signature = web3.eth.accounts.sign(JSON.stringify(signedMessage), SA.secrets.map.get('Social Trading Desktop').privateKey)
let signature = web3.eth.accounts.sign(JSON.stringify(signedMessage), SA.secrets.map.get(global.env.DESKTOP_APP_SIGNING_ACCOUNT).userProfileHandle)
let message = {
messageType: 'Handshake',
@@ -0,0 +1,12 @@
exports.newAppClientNetworkNetworkNodePicker = function newAppClientNetworkNetworkNodePicker () {
let thisObject = {
pickOneNetworkNode: pickOneNetworkNode
}
return thisObject
function pickOneNetworkNode() {
}
}
+67 -44
View File
@@ -311,7 +311,8 @@
"name": "Load Save Frame",
"propertyName": "loadSaveFrame",
"functionName": "newVisualScriptingUtilitiesLoadSaveFrame"
}, {
},
{
"name": "Meshes",
"propertyName": "meshes",
"functionName": "newVisualScriptingUtilitiesMeshes"
@@ -1350,42 +1351,68 @@
"name": "Network",
"propertyName": "network",
"NT": {
"globals": [],
"globals": [
{
"name": "Memory",
"propertyName": "memory",
"functionName": "newNetworkGlobalsMemory",
"fileName": "Memory.js"
}
],
"modules": [
{
"name": "Web Sockets Interface",
"propertyName": "webSocketsInterface",
"functionName": "newNetworkModulesWebSocketsInterface",
"fileName": "WebSocketsInterface.js"
},
{
"name": "Web Sockets Network Client",
"propertyName": "webSocketsNetworkClient",
"functionName": "newNetworkModulesWebSocketsNetworkClient",
"fileName": "WebSocketsNetworkClient.js"
}
],
"utilities": []
},
"SA": {
"globals": [],
"modules": [
"globals": [
{
"name": "Web Sockets Client",
"propertyName": "webSocketsClient",
"functionName": "newNetworkModulesWebSocketsClient",
"fileName": "WebSocketsClient.js"
"name": "Memory",
"propertyName": "memory",
"functionName": "newNetworkGlobalsMemory",
"fileName": "Memory.js"
}
],
"utilities": []
"modules": [
{
"name": "Web Sockets App Client",
"propertyName": "webSocketsAppClient",
"functionName": "newNetworkModulesWebSocketsAppClient",
"fileName": "WebSocketsAppClient.js"
},
{
"name": "User Profiles",
"propertyName": "userProfiles",
"functionName": "newNetworkModulesUserProfiles",
"fileName": "UserProfiles.js"
}
],
"utilities": [
{
"name": "App Client Network Node Picker",
"propertyName": "appClientNetworkNodePicker",
"functionName": "newAppClientNetworkNetworkNodePicker",
"fileName": "AppClientNetworkNodePicker.js"
}
]
}
},
{
"name": "Social-Trading",
"propertyName": "socialTrading",
"NT": {
"globals": [
{
"name": "Memory",
"propertyName": "memory",
"functionName": "newSocialTradingGlobalsMemory",
"fileName": "Memory.js"
}
],
"globals": [],
"modules": [
{
"name": "User Profiles",
@@ -1441,36 +1468,12 @@
"functionName": "newSocialTradingModulesQueriesEvents",
"fileName": "Queries/Events.js"
},
{
"name": "User Profile",
"propertyName": "socialGraphUserProfile",
"functionName": "newSocialTradingModulesSocialGraphUserProfile",
"fileName": "Social-Graph/UserProfile.js"
},
{
"name": "Bot Profile",
"propertyName": "socialGraphBotProfile",
"functionName": "newSocialTradingModulesSocialGraphBotProfile",
"fileName": "Social-Graph/BotProfile.js"
},
{
"name": "Post",
"propertyName": "socialGraphPost",
"functionName": "newSocialTradingModulesSocialGraphPost",
"fileName": "Social-Graph/Post.js"
},
{
"name": "Social Graph",
"propertyName": "socialGraph",
"functionName": "newSocialTradingModulesSocialGraph",
"fileName": "SocialGraph.js"
},
{
"name": "Bootstrap",
"propertyName": "bootstrap",
"functionName": "newSocialTradingModulesBootstrap",
"fileName": "Bootstrap.js"
},
{
"name": "Query",
"propertyName": "query",
@@ -1512,6 +1515,26 @@
]
},
"SA": {
"modules": [
{
"name": "User Profile",
"propertyName": "socialGraphUserProfile",
"functionName": "newSocialTradingModulesSocialGraphUserProfile",
"fileName": "Social-Graph/UserProfile.js"
},
{
"name": "Bot Profile",
"propertyName": "socialGraphBotProfile",
"functionName": "newSocialTradingModulesSocialGraphBotProfile",
"fileName": "Social-Graph/BotProfile.js"
},
{
"name": "Post",
"propertyName": "socialGraphPost",
"functionName": "newSocialTradingModulesSocialGraphPost",
"fileName": "Social-Graph/Post.js"
}
],
"globals": [
{
"name": "Query Constants",
@@ -1567,9 +1590,9 @@
"modules": [
{
"name": "Web Sockets Client",
"propertyName": "webSocketsClient",
"functionName": "newSocialTradingModulesWebSocketsClient",
"fileName": "WebSocketsClient.js"
"propertyName": "webSocketsWebClient",
"functionName": "newSocialTradingModulesWebSocketsWebClient",
"fileName": "WebSocketsWebClient.js"
}
]
}
@@ -14,6 +14,7 @@ exports.newSocialTradingModulesSocialGraph = function newSocialTradingModulesSoc
no need to ask it to a network node.
*/
let thisObject = {
userProfiles: undefined,
initialize: initialize,
finalize: finalize
}
@@ -24,7 +25,8 @@ exports.newSocialTradingModulesSocialGraph = function newSocialTradingModulesSoc
}
function initialize() {
async function initialize() {
thisObject.userProfiles = SA.projects.network.modules.userProfiles.newNetworkModulesUserProfiles()
await thisObject.userProfiles.initialize()
}
}
@@ -47,7 +47,7 @@ exports.newSocialTradingModulesWebAppInterface = function newSocialTradingModule
}
return JSON.stringify(response)
}
queryMessage.emitterUserProfileId = SA.secrets.map.get('Social Trading Desktop').userProfileId
queryMessage.emitterUserProfileId = SA.secrets.map.get(global.env.DESKTOP_APP_SIGNING_ACCOUNT).userProfileId
messageHeader.queryMessage = JSON.stringify(queryMessage)
let response
@@ -126,7 +126,7 @@ exports.newSocialTradingModulesWebAppInterface = function newSocialTradingModule
eventMessage.postText = undefined
}
eventMessage.emitterUserProfileId = SA.secrets.map.get('Social Trading Desktop').userProfileId
eventMessage.emitterUserProfileId = SA.secrets.map.get(global.env.DESKTOP_APP_SIGNING_ACCOUNT).userProfileId
messageHeader.eventMessage = JSON.stringify(eventMessage)
let response = {
@@ -120,7 +120,7 @@ exports.newSocialTradingModulesClientInterface = function newSocialTradingModule
We will not accept events that have already been processed.
*/
if (NT.projects.socialTrading.globals.memory.maps.EVENTS.get(eventReceived.eventId) !== undefined) {
if (NT.projects.network.globals.memory.maps.EVENTS.get(eventReceived.eventId) !== undefined) {
let response = {
result: 'Error',
message: 'Client Interface Event Already Exists.'
@@ -133,8 +133,8 @@ exports.newSocialTradingModulesClientInterface = function newSocialTradingModule
try {
let event = NT.projects.socialTrading.modules.event.newSocialTradingModulesEvent()
event.initialize(eventReceived)
NT.projects.socialTrading.globals.memory.maps.EVENTS.set(eventReceived.eventId, event)
NT.projects.socialTrading.globals.memory.arrays.EVENTS.push(event)
NT.projects.network.globals.memory.maps.EVENTS.set(eventReceived.eventId, event)
NT.projects.network.globals.memory.arrays.EVENTS.push(event)
let response = {
result: 'Ok',
+2 -2
View File
@@ -64,7 +64,7 @@ exports.newSocialTradingModulesEvent = function newSocialTradingModulesEvent() {
if (thisObject.emitterUserProfileId === undefined) {
throw ('Emitter User Profile Id Not Provided.')
}
emitterUserProfile = NT.projects.socialTrading.globals.memory.maps.USER_PROFILES_BY_ID.get(thisObject.emitterUserProfileId)
emitterUserProfile = SA.projects.network.globals.memory.maps.USER_PROFILES_BY_ID.get(thisObject.emitterUserProfileId)
if (emitterUserProfile === undefined) {
throw ('Emitter User Profile Not Found.')
}
@@ -72,7 +72,7 @@ exports.newSocialTradingModulesEvent = function newSocialTradingModulesEvent() {
Validate Target User Profile.
*/
if (thisObject.targetUserProfileId !== undefined) {
targetUserProfile = NT.projects.socialTrading.globals.memory.maps.USER_PROFILES_BY_ID.get(thisObject.targetUserProfileId)
targetUserProfile = SA.projects.network.globals.memory.maps.USER_PROFILES_BY_ID.get(thisObject.targetUserProfileId)
if (targetUserProfile === undefined) {
throw ('Target User Profile Not Found.')
}
@@ -19,9 +19,9 @@ exports.newSocialTradingModulesQueriesBotProfileStats = function newSocialTradin
*/
let userProfile
if (queryReceived.targetUserProfileId !== undefined) {
userProfile = NT.projects.socialTrading.globals.memory.maps.USER_PROFILES_BY_ID.get(queryReceived.targetUserProfileId)
userProfile = SA.projects.network.globals.memory.maps.USER_PROFILES_BY_ID.get(queryReceived.targetUserProfileId)
} else {
userProfile = NT.projects.socialTrading.globals.memory.maps.USER_PROFILES_BY_HANDLE.get(queryReceived.targetUserProfileHandle)
userProfile = SA.projects.network.globals.memory.maps.USER_PROFILES_BY_HANDLE.get(queryReceived.targetUserProfileHandle)
}
if (userProfile === undefined) {
@@ -22,7 +22,7 @@ exports.newSocialTradingModulesQueriesEvents = function newSocialTradingModulesQ
function initialize(queryReceived) {
NT.projects.socialTrading.utilities.queriesValidations.profilesValidations(queryReceived, thisObject)
NT.projects.socialTrading.utilities.queriesValidations.arrayValidations(queryReceived, thisObject, NT.projects.socialTrading.globals.memory.arrays.EVENTS)
NT.projects.socialTrading.utilities.queriesValidations.arrayValidations(queryReceived, thisObject, NT.projects.network.globals.memory.arrays.EVENTS)
}
@@ -31,7 +31,7 @@ exports.newSocialTradingModulesQueriesEvents = function newSocialTradingModulesQ
switch (thisObject.direction) {
case SA.projects.socialTrading.globals.queryConstants.DIRECTION_FUTURE: {
for (let i = thisObject.initialIndex; i < thisObject.initialIndex + thisObject.amountRequested; i++) {
let event = NT.projects.socialTrading.globals.memory.arrays.EVENTS[i]
let event = NT.projects.network.globals.memory.arrays.EVENTS[i]
if (event === undefined) { break }
checkEventContext(event)
}
@@ -39,7 +39,7 @@ exports.newSocialTradingModulesQueriesEvents = function newSocialTradingModulesQ
}
case SA.projects.socialTrading.globals.queryConstants.DIRECTION_PAST: {
for (let i = thisObject.initialIndex; i > thisObject.initialIndex - thisObject.amountRequested; i--) {
let event = NT.projects.socialTrading.globals.memory.arrays.EVENTS[i]
let event = NT.projects.network.globals.memory.arrays.EVENTS[i]
if (event === undefined) { break }
checkEventContext(event)
}
@@ -59,11 +59,11 @@ exports.newSocialTradingModulesQueriesEvents = function newSocialTradingModulesQ
Any of the above happening, means that indeed it is related.
*/
let emitterUserProfile = NT.projects.socialTrading.globals.memory.maps.USER_PROFILES_BY_ID.get(event.emitterUserProfileId)
let emitterUserProfile = SA.projects.network.globals.memory.maps.USER_PROFILES_BY_ID.get(event.emitterUserProfileId)
let emitterBotProfile = emitterUserProfile.bots.get(event.emitterBotProfileId)
let emitterPost = emitterUserProfile.posts.get(event.emitterPostHash)
let targetUserProfile = NT.projects.socialTrading.globals.memory.maps.USER_PROFILES_BY_ID.get(event.targetUserProfileId)
let targetUserProfile = SA.projects.network.globals.memory.maps.USER_PROFILES_BY_ID.get(event.targetUserProfileId)
let targetBotProfile
let targetPost
@@ -24,13 +24,13 @@ exports.newSocialTradingModulesQueriesUnfollowedUserProfiles = function newSocia
function initialize(queryReceived) {
thisObject.emitterUserProfile = NT.projects.socialTrading.globals.memory.maps.USER_PROFILES_BY_ID.get(queryReceived.emitterUserProfileId)
thisObject.emitterUserProfile = SA.projects.network.globals.memory.maps.USER_PROFILES_BY_ID.get(queryReceived.emitterUserProfileId)
if (thisObject.emitterUserProfile === undefined) {
throw ('Emitter User Profile Not Found.')
}
thisObject.profiles = Array.from(
NT.projects.socialTrading.globals.memory.maps.USER_PROFILES_BY_ID,
SA.projects.network.globals.memory.maps.USER_PROFILES_BY_ID,
x => x[1]
)
thisObject.profiles.sort((a, b) => (a["ranking"] > b["ranking"]) ? 1 : -1)
@@ -18,9 +18,9 @@ exports.newSocialTradingModulesQueriesUserProfileStats = function newSocialTradi
Validate User Profile
*/
if (queryReceived.targetUserProfileId !== undefined) {
thisObject.profile = NT.projects.socialTrading.globals.memory.maps.USER_PROFILES_BY_ID.get(queryReceived.targetUserProfileId)
thisObject.profile = SA.projects.network.globals.memory.maps.USER_PROFILES_BY_ID.get(queryReceived.targetUserProfileId)
} else {
thisObject.profile = NT.projects.socialTrading.globals.memory.maps.USER_PROFILES_BY_HANDLE.get(queryReceived.targetUserProfileHandle)
thisObject.profile = SA.projects.network.globals.memory.maps.USER_PROFILES_BY_HANDLE.get(queryReceived.targetUserProfileHandle)
}
if (thisObject.profile === undefined) {
@@ -23,7 +23,7 @@ exports.newSocialTradingModulesQueriesUserProfiles = function newSocialTradingMo
function initialize(queryReceived) {
thisObject.profiles = Array.from(
NT.projects.socialTrading.globals.memory.maps.USER_PROFILES_BY_ID,
SA.projects.network.globals.memory.maps.USER_PROFILES_BY_ID,
x => x[1]
)
thisObject.profiles.sort((a, b) => (a["ranking"] > b["ranking"]) ? 1 : -1)
@@ -1,20 +0,0 @@
exports.newSocialTradingModulesSocialGraph = function newSocialTradingModulesSocialGraph() {
/*
This object represent the entire Social Graph.
*/
let thisObject = {
initialize: initialize,
finalize: finalize
}
return thisObject
function finalize() {
}
function initialize() {
}
}
@@ -9,9 +9,10 @@ exports.newNetworkModulesSocialGraph = function newNetworkModulesSocialGraph() {
their posts.
*/
let thisObject = {
userProfiles: undefined,
/* Framework Functions */
initialize: initialize,
finalize: finalize
finalize: finalize
}
return thisObject
@@ -21,7 +22,7 @@ exports.newNetworkModulesSocialGraph = function newNetworkModulesSocialGraph() {
}
async function initialize() {
let bootstrapProcess = NT.projects.socialTrading.modules.bootstrap.newBootstrap()
await bootstrapProcess.initialize()
thisObject.userProfiles = SA.projects.network.modules.userProfiles.newNetworkModulesUserProfiles()
await thisObject.userProfiles.initialize()
}
}
@@ -54,9 +54,9 @@ exports.newSocialTradingModulesStorage = function newSocialTradingModulesStorage
try {
let event = NT.projects.socialTrading.modules.event.newSocialTradingModulesEvent()
event.initialize(storedEvent)
NT.projects.socialTrading.globals.memory.maps.EVENTS.set(storedEvent.eventId, event)
NT.projects.socialTrading.globals.memory.arrays.EVENTS.push(event)
indexLastSavedEvent = NT.projects.socialTrading.globals.memory.arrays.EVENTS.length - 1
NT.projects.network.globals.memory.maps.EVENTS.set(storedEvent.eventId, event)
NT.projects.network.globals.memory.arrays.EVENTS.push(event)
indexLastSavedEvent = NT.projects.network.globals.memory.arrays.EVENTS.length - 1
} catch (err) {
if (err.stack !== undefined) {
console.log('[ERROR] Client Interface -> err.stack = ' + err.stack)
@@ -94,8 +94,8 @@ exports.newSocialTradingModulesStorage = function newSocialTradingModulesStorage
let eventsToSave = []
let minuteToSave
for (let i = indexLastSavedEvent + 1; i < NT.projects.socialTrading.globals.memory.arrays.EVENTS.length; i++) {
let event = NT.projects.socialTrading.globals.memory.arrays.EVENTS[i]
for (let i = indexLastSavedEvent + 1; i < NT.projects.network.globals.memory.arrays.EVENTS.length; i++) {
let event = NT.projects.network.globals.memory.arrays.EVENTS[i]
let currentMinute = Math.trunc((new Date()).valueOf() / SA.projects.foundations.globals.timeConstants.ONE_MIN_IN_MILISECONDS)
let eventMinute = Math.trunc(event.timestamp / SA.projects.foundations.globals.timeConstants.ONE_MIN_IN_MILISECONDS)
@@ -15,14 +15,14 @@ exports.newSocialTradingUtilitiesQueriesValidations = function newSocialTradingU
Validate User Profile
*/
if (queryReceived.emitterUserProfileId !== undefined) {
thisObject.profile = NT.projects.socialTrading.globals.memory.maps.USER_PROFILES_BY_ID.get(queryReceived.emitterUserProfileId)
thisObject.profile = SA.projects.network.globals.memory.maps.USER_PROFILES_BY_ID.get(queryReceived.emitterUserProfileId)
if (thisObject.profile === undefined) {
throw ('Emitter User Profile Not Found.')
}
}
if (queryReceived.targetUserProfileId !== undefined) {
thisObject.profile = NT.projects.socialTrading.globals.memory.maps.USER_PROFILES_BY_ID.get(queryReceived.targetUserProfileId)
thisObject.profile = SA.projects.network.globals.memory.maps.USER_PROFILES_BY_ID.get(queryReceived.targetUserProfileId)
if (thisObject.profile === undefined) {
throw ('Target User Profile Not Found.')
}
@@ -80,7 +80,7 @@ exports.newSocialTradingModulesSocialGraphBotProfile = function newSocialTrading
if (thisObject.posts.get(emitterPostHash) !== undefined) {
throw ('Post Already Exists.')
} else {
let post = NT.projects.socialTrading.modules.socialGraphPost.newSocialTradingModulesSocialGraphPost()
let post = SA.projects.socialTrading.modules.socialGraphPost.newSocialTradingModulesSocialGraphPost()
post.initialize(
emitterUserProfileId,
targetUserProfileId,
@@ -99,7 +99,7 @@ exports.newSocialTradingModulesSocialGraphPost = function newSocialTradingModule
/*
Validate Target User Profile.
*/
let targetUserProfile = NT.projects.socialTrading.globals.memory.maps.USER_PROFILES_BY_ID.get(thisObject.targetUserProfileId)
let targetUserProfile = SA.projects.network.globals.memory.maps.USER_PROFILES_BY_ID.get(thisObject.targetUserProfileId)
if (targetUserProfile === undefined) {
throw ('Target User Profile Not Found.')
}
@@ -84,7 +84,7 @@ exports.newSocialTradingModulesSocialGraphUserProfile = function newSocialTradin
if (thisObject.posts.get(emitterPostHash) !== undefined) {
throw ('Post Already Exists.')
} else {
let post = NT.projects.socialTrading.modules.socialGraphPost.newSocialTradingModulesSocialGraphPost()
let post = SA.projects.socialTrading.modules.socialGraphPost.newSocialTradingModulesSocialGraphPost()
post.initialize(
emitterUserProfileId,
targetUserProfileId,
@@ -1,4 +1,4 @@
function newSocialTradingModulesWebSocketsClient() {
function newSocialTradingModulesWebSocketsWebClient() {
let thisObject = {
sendMessage: sendMessage,