Merge branch 'develop' of https://github.com/Smidy13/Superalgos into develop

This commit is contained in:
Smidy13 committed 2021-08-29 00:15:48 +12:00
commit d4a3e56611
52 files changed
+3846 -2046

No files matched your search

+76 -1
View File
@@ -211,6 +211,7 @@ exports.newGithubServer = function newGithubServer() {
})
await getPrList()
await mergePrs()
await closePrsToMaster()
async function getPrList() {
@@ -445,7 +446,7 @@ exports.newGithubServer = function newGithubServer() {
*/
if (userProfile.name !== githubUsername) {
console.log('[INFO] Github Server -> mergeGithubPullRequests -> Validation #5 Failed -> Pull Request "' + pullRequest.title + '" not merged because the Github Username is not equal to the User Profile node\'s name. -> Github Username = ' + githubUsername + '-> userProfile.name = ' + userProfile.name)
await CL.projects.foundations.utilities.asyncFunctions.sleep(GITHUB_API_WAITING_TIME)
await octokit.rest.issues.createComment({
owner: owner,
@@ -592,6 +593,80 @@ exports.newGithubServer = function newGithubServer() {
}
}
}
async function closePrsToMaster() {
let githubPrListMaster = []
const per_page = 100 // Max
let page = 0
try {
page++
await CL.projects.foundations.utilities.asyncFunctions.sleep(GITHUB_API_WAITING_TIME)
let listResponse = await octokit.rest.pulls.list({
owner: owner,
repo: repo,
state: 'open',
head: undefined,
base: 'master',
sort: undefined,
direction: undefined,
per_page: per_page,
page: page
});
if (listResponse.data.length < 100) {
lastPage = true
}
console.log('[INFO] Github Server -> mergeGithubPullRequests -> doGithub -> closePrsToMaster -> Receiving Page = ' + page)
for (let i = 0; i < listResponse.data.length; i++) {
let pullRequest = listResponse.data[i]
console.log('[INFO] Github Server -> mergeGithubPullRequests -> doGithub -> closePrsToMaster -> Pull Request "' + pullRequest.title + '" found and added to the list to validate. ')
githubPrListMaster.push(pullRequest)
}
console.log('[INFO] Github Server -> mergeGithubPullRequests -> doGithub -> closePrsToMaster -> Received = ' + listResponse.data.length)
for (let i = 0; i < githubPrListMaster.length; i++) {
let pullRequest = githubPrListMaster[i]
await CL.projects.foundations.utilities.asyncFunctions.sleep(GITHUB_API_WAITING_TIME)
await octokit.rest.issues.createComment({
owner: owner,
repo: repo,
issue_number: pullRequest.number,
body: 'Hi, this is the Superalgos Governance System taking notice that you have submitted a pull request directly to the master branch.\n\nThanks for submitting a PR to the Superalgos Project. We value every contribution and everyone is welcome to send PRs. Unfortunatelly we are not merging pull requests directly into the master branch. Consider resubmitting to the develop branch intstead. For your convinienve, you can swithch branches from within the app, at the footer of the Docs tab. \n\n I will close this pull request now and look forward for your next contribution either to the develop branch or any other branch available for this purpose.'
});
await CL.projects.foundations.utilities.asyncFunctions.sleep(GITHUB_API_WAITING_TIME)
await octokit.rest.pulls.update({
owner: owner,
repo: repo,
pull_number: pullRequest.number,
state: 'closed'
});
}
} catch (err) {
console.log(err)
if (err.stack.indexOf('last page') >= 0) {
return
} else {
console.log('[ERROR] Github Server -> mergeGithubPullRequests -> doGithub -> closePrsToMaster ->Method call produced an error.')
console.log('[ERROR] Github Server -> mergeGithubPullRequests -> doGithub -> closePrsToMaster ->err.stack = ' + err.stack)
console.log('[ERROR] Github Server -> mergeGithubPullRequests -> doGithub -> closePrsToMaster ->repository = ' + repository)
console.log('[ERROR] Github Server -> mergeGithubPullRequests -> doGithub -> closePrsToMaster ->username = ' + username)
console.log('[ERROR] Github Server -> mergeGithubPullRequests -> doGithub -> closePrsToMaster ->token starts with = ' + token.substring(0, 10) + '...')
console.log('[ERROR] Github Server -> mergeGithubPullRequests -> doGithub -> closePrsToMaster ->token ends with = ' + '...' + token.substring(token.length - 10))
error = err
return
}
}
}
} catch (err) {
console.log('[ERROR] Github Server -> mergeGithubPullRequests -> doGithub -> err.stack = ' + err.stack)
}
+13 -9
View File
@@ -2,23 +2,27 @@
global.NT = {
memory: {
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.
POSTS: new Map(), // This are all the posts we are keeping track of.
EVENTS: new Map(), // This is the registry of all events received that prevents processing them more than once.
TIMELINE: [], // A time ordered list of Posts and Trades.
NETWORK_CLIENTS: [], // These are the Network Clients connected to this Network Node.
NETWORK_PEERS: [], // These are the Network Peers connected to this Network Node.
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.
POSTS: new Map(), // This are all the posts we are keeping track of.
EVENTS: new Map(), // This is the registry of all events received that prevents processing them more than once.
},
arrays: {
EVENTS: [], // A time ordered list of events.
NETWORK_CLIENTS: [], // These are the Network Clients connected to this Network Node ordered by Ranking.
NETWORK_PEERS: [], // These are the Network Peers connected to this Network Node ordered by Ranking.
}
},
modules: {
USER_PROFILE: require('./UserProfile.js'),
BOT: require('./BotProfile.js'),
EVENT: require('./Event.js'),
POST: require('./Post.js'),
BOT: require('./Bot.js'),
QUERY: require('./Query.js'),
QUERY_PROFILE_STATS: require('./Queries/ProfileStats.js'),
QUERY_PROFILE_POSTS: require('./Queries/ProfilePosts.js'),
QUERY_POST_REPLIES: require('./Queries/ProfileReplies.js'),
QUERY_TIMELINE_CHUNK: require('./Queries/TimelineChunk.js')
QUERY_EVENTS: require('./Queries/Events.js')
}
}
+245
View File
@@ -0,0 +1,245 @@
exports.newEvents = function newEvents() {
let thisObject = {
profile: undefined,
initialIndex: undefined,
amountRequested: undefined,
direction: undefined,
execute: execute,
initialize: initialize,
finalize: finalize
}
const INITIAL_EVENT_INDEX_FIRST = 'First'
const INITIAL_EVENT_INDEX_LAST = 'Last'
const MIN_AMOUNT_REQUESTED = 1
const MAX_AMOUNT_REQUESTED = 100
const DIRECTION_FUTURE = 'Future'
const DIRECTION_PAST = 'Past'
return thisObject
function finalize() {
thisObject.profile = undefined
}
function initialize(queryReceived) {
/*
Validate User Profile
*/
if (queryReceived.emitterUserProfileId !== undefined) {
thisObject.profile = NT.memory.maps.USER_PROFILES_BY_ID.get(queryReceived.emitterUserProfileId)
} else {
thisObject.profile = NT.memory.maps.USER_PROFILES_BY_HANDLE.get(queryReceived.emitterUserProfileHandle)
}
if (thisObject.profile === undefined) {
throw ('Emitter User Profile Not Found.')
}
/*
Validate Initial Index
*/
if (queryReceived.initialIndex === undefined) {
throw ('Initial Index Undefined.')
}
if (queryReceived.initialIndex === INITIAL_EVENT_INDEX_LAST) {
queryReceived.initialIndex = thisObject.profile.posts.length - 1
}
if (queryReceived.initialIndex === INITIAL_EVENT_INDEX_FIRST) {
queryReceived.initialIndex = 0
}
if (isNaN(queryReceived.initialIndex) === true) {
throw ('Initial Event Is Not a Number.')
}
thisObject.initialIndex = queryReceived.initialIndex
/*
Validate Amount Requested
*/
if (queryReceived.amountRequested === undefined) {
throw ('Amount Requested Undefined.')
}
if (isNaN(queryReceived.amountRequested) === true) {
throw ('Amount Requested Is Not a Number.')
}
if (queryReceived.amountRequested < MIN_AMOUNT_REQUESTED) {
throw ('Amount Requested Below Min.')
}
if (queryReceived.amountRequested > MAX_AMOUNT_REQUESTED) {
throw ('Amount Requested Above Max.')
}
/*
Validate Direction
*/
if (queryReceived.direction === undefined) {
throw ('Direction Undefined.')
}
if (queryReceived.direction !== DIRECTION_FUTURE && queryReceived.direction !== DIRECTION_PAST) {
throw ('Direction Not Supported.')
}
thisObject.direction = queryReceived.direction
}
function execute() {
let response = []
switch (thisObject.direction) {
case DIRECTION_FUTURE: {
for (let i = thisObject.initialIndex; i < thisObject.initialIndex + thisObject.amountRequested; i++) {
let event = NT.memory.arrays.EVENTS[i]
if (event === undefined) { break }
checkEventContext(event)
}
break
}
case DIRECTION_PAST: {
for (let i = thisObject.initialIndex; i > thisObject.initialIndex - thisObject.amountRequested; i--) {
let event = NT.memory.arrays.EVENTS[i]
if (event === undefined) { break }
checkEventContext(event)
}
break
}
}
return response
function checkEventContext(event) {
/*
For an event to be returned at the response of this query, it needs to be related
to the profile making the query. How it can be related?
1. The Emitter or Target profile must be the same as the Query Profile.
2. The Emitter or Traget profile must be at the Following map of the Query Profile.
3. The Emmiter or Target post must be belong to any profile at the Following of the Query Profile.
Any of the above happening, means that indeed it is related.
*/
let emitterUserProfile = NT.memory.maps.USER_PROFILES_BY_ID.get(eventReceived.emitterUserProfileId)
let targetUserProfile = NT.memory.maps.USER_PROFILES_BY_ID.get(eventReceived.targetUserProfileId)
let emitterPost = NT.memory.maps.POSTS.get(eventReceived.emitterPostHash)
let targetPost = NT.memory.maps.POSTS.get(eventReceived.targetPostHash)
/*
Test #1 : The Emitter or Target profile must be the same as the Query Profile.
*/
if (emitterUserProfile !== undefined) {
if (emitterUserProfile.userProfieId === thisObject.profile.userProfieId) {
addToResponse(event)
return
}
}
if (targetUserProfile !== undefined) {
if (targetUserProfile.userProfieId === thisObject.profile.userProfieId) {
addToResponse(event)
return
}
}
/*
Test #2 : The Emitter or Traget profile must be at the Following map of the Query Profile.
*/
if (emitterUserProfile !== undefined) {
if (thisObject.profile.following.get(emitterUserProfile.userProfieId) !== undefined) {
addToResponse(event)
return
}
}
if (targetUserProfile !== undefined) {
if (thisObject.profile.following.get(targetUserProfile.userProfieId) !== undefined) {
addToResponse(event)
return
}
}
/*
Test #3 : The Emmiter or Target post must be belong to any profile at the Following of the Query Profile.
*/
if (emitterPost !== undefined) {
if (thisObject.profile.following.get(emitterPost.emitterUserProfileId) !== undefined) {
addToResponse(event)
return
}
}
if (emitterPost !== undefined) {
if (thisObject.profile.following.get(emitterPost.targetUserProfileId) !== undefined) {
addToResponse(event)
return
}
}
if (targetPost !== undefined) {
if (thisObject.profile.following.get(targetPost.emitterUserProfileId) !== undefined) {
addToResponse(event)
return
}
}
if (targetPost !== undefined) {
if (thisObject.profile.following.get(targetPost.targetUserProfileId) !== undefined) {
addToResponse(event)
return
}
}
function addToResponse(event) {
let eventResponse = {
eventId: event.eventId,
eventType: event.eventType,
emitterUserProfileId: event.emitterUserProfileId,
targetUserProfileId: event.targetUserProfileId,
emitterPostHash: event.emitterPostHash,
targetPostHash: event.targetPostHash,
timestamp: event.timestamp,
botId: event.botId,
botAsset: event.botAsset,
botExchange: event.botExchange
}
if (emitterUserProfile !== undefined) {
let query = NT.modules.QUERY_PROFILE_STATS.newProfileStats()
query.initialize({ targetUserProfileId: event.emitterUserProfileId })
eventResponse.emitterUserProfile = query.execute()
}
if (targetUserProfile !== undefined) {
let query = NT.modules.QUERY_PROFILE_STATS.newProfileStats()
query.initialize({ targetUserProfileId: event.targetUserProfileId })
eventResponse.targetUserProfile = query.execute()
}
if (emitterPost !== undefined) {
eventResponse.emitterPost = addPost(emitterPost)
}
if (targetPost !== undefined) {
eventResponse.targetPost = addPost(targetPost)
}
response.push(eventResponse)
function addPost(post) {
let postResponse = {
emitterUserProfileId: post.emitterUserProfileId,
targetUserProfileId: post.targetUserProfileId,
emitterPostHash: post.emitterPostHash,
targetPostHash: post.targetPostHash,
postType: post.postType,
timestamp: post.timestamp,
repliesCount: post.replies.length,
reactionsCount: []
}
for (let i = 0; i < post.reactionTypesCount; i++) {
postResponse.reactionsCount.push(post.reactionsCount.get(i))
}
return postResponse
}
}
}
}
}
+129
View File
@@ -0,0 +1,129 @@
exports.newPostReplies = function newPostReplies() {
let thisObject = {
post: undefined,
initialIndex: undefined,
amountRequested: undefined,
direction: undefined,
execute: execute,
initialize: initialize,
finalize: finalize
}
const INITIAL_REPLY_INDEX_FIRST = 'First'
const INITIAL_REPLY_INDEX_LAST = 'Last'
const MIN_AMOUNT_REQUESTED = 1
const MAX_AMOUNT_REQUESTED = 100
const DIRECTION_FUTURE = 'Future'
const DIRECTION_PAST = 'Past'
return thisObject
function finalize() {
thisObject.post = undefined
}
function initialize(queryReceived) {
/*
Validate Post
*/
thisObject.post = NT.memory.maps.POSTS.get(queryReceived.targetPostHash)
if (thisObject.post === undefined) {
throw ('Target Post Not Found.')
}
/*
Validate Initial Index
*/
if (queryReceived.initialIndex === undefined) {
throw ('Initial Index Undefined.')
}
if (queryReceived.initialIndex === INITIAL_REPLY_INDEX_LAST) {
queryReceived.initialIndex = thisObject.poat.replies.length - 1
}
if (queryReceived.initialIndex === INITIAL_REPLY_INDEX_FIRST) {
queryReceived.initialIndex = 0
}
if (isNaN(queryReceived.initialIndex) === true) {
throw ('Initial Reply Is Not a Number.')
}
thisObject.initialIndex = queryReceived.initialIndex
/*
Validate Amount Requested
*/
if (queryReceived.amountRequested === undefined) {
throw ('Amount Requested Undefined.')
}
if (isNaN(queryReceived.amountRequested) === true) {
throw ('Amount Requested Is Not a Number.')
}
if (queryReceived.amountRequested < MIN_AMOUNT_REQUESTED) {
throw ('Amount Requested Below Min.')
}
if (queryReceived.amountRequested > MAX_AMOUNT_REQUESTED) {
throw ('Amount Requested Above Max.')
}
/*
Validate Direction
*/
if (queryReceived.direction === undefined) {
throw ('Direction Undefined.')
}
if (queryReceived.direction !== DIRECTION_FUTURE && queryReceived.direction !== DIRECTION_PAST) {
throw ('Direction Not Supported.')
}
thisObject.direction = queryReceived.direction
}
function execute() {
let response = []
switch (thisObject.direction) {
case DIRECTION_FUTURE: {
for (let i = thisObject.initialIndex; i < thisObject.initialIndex + thisObject.amountRequested; i++) {
let post = thisObject.post.replies[i]
if (post === undefined) { break }
addToResponse(post)
}
break
}
case DIRECTION_PAST: {
for (let i = thisObject.initialIndex; i > thisObject.initialIndex - thisObject.amountRequested; i--) {
let post = thisObject.post.replies[i]
if (post === undefined) { break }
addToResponse(post)
}
break
}
}
return response
function addToResponse(post) {
let postResponse = {
emitterUserProfileId: post.emitterUserProfileId,
targetUserProfileId: post.targetUserProfileId,
emitterPostHash: post.emitterPostHash,
targetPostHash: post.targetPostHash,
postType: post.postType,
timestamp: post.timestamp,
repliesCount: post.replies.length,
reactionsCount: []
}
for (let i = 0; i < post.reactionTypesCount; i++) {
postResponse.reactionsCount.push(post.reactionsCount.get(i))
}
response.push(postResponse)
}
}
}
+44 -33
View File
@@ -2,7 +2,7 @@ exports.newProfilePosts = function newProfilePosts() {
let thisObject = {
profile: undefined,
initialPostIndex: undefined,
initialIndex: undefined,
amountRequested: undefined,
direction: undefined,
execute: execute,
@@ -20,7 +20,7 @@ exports.newProfilePosts = function newProfilePosts() {
return thisObject
function finalize() {
thisObject.profile = undefined
}
function initialize(queryReceived) {
@@ -28,34 +28,34 @@ exports.newProfilePosts = function newProfilePosts() {
Validate User Profile
*/
if (queryReceived.targetUserProfileId !== undefined) {
thisObject.profile = NT.memory.USER_PROFILES_BY_ID.get(queryReceived.targetUserProfileId)
thisObject.profile = NT.memory.maps.USER_PROFILES_BY_ID.get(queryReceived.targetUserProfileId)
} else {
thisObject.profile = NT.memory.USER_PROFILES_BY_HANDLE.get(queryReceived.targetUserProfileHandle)
thisObject.profile = NT.memory.maps.USER_PROFILES_BY_HANDLE.get(queryReceived.targetUserProfileHandle)
}
if (thisObject.profile === undefined) {
throw ('Target User Profile Not Found.')
}
/*
Validate Initial Post Index
Validate Initial Index
*/
if (queryReceived.initialPostIndex === undefined) {
throw ('Initial Post Index Undefined.')
if (queryReceived.initialIndex === undefined) {
throw ('Initial Index Undefined.')
}
if (queryReceived.initialPostIndex === INITIAL_POST_INDEX_LAST) {
queryReceived.initialPostIndex = thisObject.posts.length - 1
if (queryReceived.initialIndex === INITIAL_POST_INDEX_LAST) {
queryReceived.initialIndex = thisObject.profile.posts.length - 1
}
if (queryReceived.initialPostIndex === INITIAL_POST_INDEX_FIRST) {
queryReceived.initialPostIndex = 0
if (queryReceived.initialIndex === INITIAL_POST_INDEX_FIRST) {
queryReceived.initialIndex = 0
}
if (isNaN(queryReceived.initialPostIndex) === true) {
if (isNaN(queryReceived.initialIndex) === true) {
throw ('Initial Post Is Not a Number.')
}
thisObject.initialPostIndex = queryReceived.initialPostIndex
thisObject.initialIndex = queryReceived.initialIndex
/*
Validate Amount Requested
*/
@@ -75,7 +75,7 @@ exports.newProfilePosts = function newProfilePosts() {
throw ('Amount Requested Above Max.')
}
/*
Validate Amount Requested
Validate Direction
*/
if (queryReceived.direction === undefined) {
throw ('Direction Undefined.')
@@ -90,33 +90,44 @@ exports.newProfilePosts = function newProfilePosts() {
}
function execute() {
let response = []
switch (thisObject.direction) {
case DIRECTION_FUTURE: {
for (let i = thisObject.initialPostIndex; i < thisObject.initialPostIndex + thisObject.amountRequested; i++) {
for (let i = thisObject.initialIndex; i < thisObject.initialIndex + thisObject.amountRequested; i++) {
let post = thisObject.profile.posts[i]
if (post === undefined) { break }
let postResponse = {
"emitterPostHash": post.emitterPostHash,
"targetPostHash": post.targetPostHash,
"postType": post.postType,
"userProfile": post.userProfile.userProfieId,
"timestamp": post.timestamp,
"repliesCount": post.replies.length,
"targetPostHash": post.targetPost.emitterPostHash,
"reactionsCount": []
}
for (let i = 0; i < post.reactionTypesCount; i++) {
postResponse.reactionsCount.push(post.reactionsCount.get(i))
}
response.push(postResponse)
addToResponse(post)
}
break
}
case DIRECTION_PAST: {
for (let i = thisObject.initialIndex; i > thisObject.initialIndex - thisObject.amountRequested; i--) {
let post = thisObject.profile.posts[i]
if (post === undefined) { break }
addToResponse(post)
}
break
}
}
return response
function addToResponse(post) {
let postResponse = {
emitterUserProfileId: post.emitterUserProfileId,
targetUserProfileId: post.targetUserProfileId,
emitterPostHash: post.emitterPostHash,
targetPostHash: post.targetPostHash,
postType: post.postType,
timestamp: post.timestamp,
repliesCount: post.replies.length,
reactionsCount: []
}
for (let i = 0; i < post.reactionTypesCount; i++) {
postResponse.reactionsCount.push(post.reactionsCount.get(i))
}
response.push(postResponse)
}
}
}
+4 -6
View File
@@ -18,9 +18,9 @@ exports.newProfileStats = function newProfileStats() {
Validate User Profile
*/
if (queryReceived.targetUserProfileId !== undefined) {
thisObject.profile = NT.memory.USER_PROFILES_BY_ID.get(queryReceived.targetUserProfileId)
thisObject.profile = NT.memory.maps.USER_PROFILES_BY_ID.get(queryReceived.targetUserProfileId)
} else {
thisObject.profile = NT.memory.USER_PROFILES_BY_HANDLE.get(queryReceived.targetUserProfileHandle)
thisObject.profile = NT.memory.maps.USER_PROFILES_BY_HANDLE.get(queryReceived.targetUserProfileHandle)
}
if (thisObject.profile === undefined) {
@@ -36,10 +36,8 @@ exports.newProfileStats = function newProfileStats() {
"userProfileHandle": thisObject.profile.userProfileHandle,
"blockchainAccount": thisObject.profile.blockchainAccount,
"ranking": thisObject.profile.ranking,
"multiMediaPostFollowingCount": thisObject.profile.multiMediaPostFollowingCount,
"multiMediaPostFollowersCount": thisObject.profile.multiMediaPostFollowersCount,
"tradePostsFollowingCount": thisObject.profile.tradePostsFollowingCount,
"tradePostsFollowersCount": thisObject.profile.tradePostsFollowersCount,
"followingCount": thisObject.profile.followingCount,
"followersCount": thisObject.profile.followersCount,
"emitterEventsCount": thisObject.profile.emitterEventsCount,
"targetEventsCount": thisObject.profile.targetEventsCount,
"postsCount": thisObject.profile.postsCount,
+3 -3
View File
@@ -13,7 +13,7 @@ exports.newQuery = function newQuery() {
PROFILE_STATS: 0,
PROFILE_POSTS: 1,
POST_REPLIES: 2,
TIMELINE_CHUNK: 3
EVENTS: 3
}
@@ -48,8 +48,8 @@ exports.newQuery = function newQuery() {
break
}
case QUERY_TYPES.TIMELINE_CHUNK: {
thisObject.query = NT.modules.QUERY_TIMELINE_CHUNK.newTimelineChunk()
case QUERY_TYPES.maps.EVENTS: {
thisObject.query = NT.modules.QUERY_EVENTS.newEvents()
query.initialize(queryReceived)
break
}
-28
View File
@@ -1,28 +0,0 @@
exports.newBot = function newBot() {
let thisObject = {
botId: undefined,
botAsset: undefined,
botExchange: undefined,
enabled: undefined,
initialize: initialize,
finalize: finalize
}
return thisObject
function finalize() {
}
function initialize(
botId,
botAsset,
botExchange
) {
thisObject.botId = botId
thisObject.botAsset = botAsset
thisObject.botExchange = botExchange
thisObject.enabled = true
}
}
+137
View File
@@ -0,0 +1,137 @@
exports.newUserProfile = function newUserProfile() {
let thisObject = {
botProfileId: undefined,
botProfileHandle: undefined,
botAsset: undefined,
botExchange: undefined,
enabled: undefined,
following: undefined,
followers: undefined,
followingCount: undefined,
followersCount: undefined,
emitterEventsCount: undefined,
targetEventsCount: undefined,
postsCount: undefined,
posts: undefined,
addPost: addPost,
removePost: removePost,
addFollowing: addFollowing,
removeFollowing: removeFollowing,
addFollower: addFollower,
removeFollower: removeFollower,
initialize: initialize,
finalize: finalize
}
return thisObject
function finalize() {
thisObject.following = undefined
thisObject.followers = undefined
thisObject.posts = undefined
}
function initialize() {
thisObject.following = new Map()
thisObject.followers = new Map()
thisObject.followingCount = 0
thisObject.followersCount = 0
thisObject.emitterEventsCount = 0
thisObject.targetEventsCount = 0
thisObject.postsCount = 0
thisObject.posts = []
}
function addPost(
emitterUserProfileId,
targetUserProfileId,
emitterBotProfileId,
targetBotProfileId,
emitterPostHash,
targetPostHash,
postType,
timestamp
) {
if (NT.memory.maps.POSTS.get(emitterPostHash) !== undefined) {
throw ('Post Already Exists.')
}
let post = NT.modules.POST.newPost()
post.initialize(
emitterUserProfileId,
targetUserProfileId,
emitterBotProfileId,
targetBotProfileId,
emitterPostHash,
targetPostHash,
postType,
timestamp
)
thisObject.posts.push(post)
NT.memory.maps.POSTS.set(emitterPostHash, post)
thisObject.postsCount++
}
function removePost(
emitterPostHash
) {
if (NT.memory.maps.POSTS.get(emitterPostHash) === undefined) {
throw ('Post Does Not Exist.')
}
let post = thisObject.posts.get(emitterPostHash)
post.finalize()
for (let i = thisObject.posts.length - 1; i >= 0; i--) {
if (thisObject.posts[i].emitterPostHash === emitterPostHash) {
thisObject.posts.splice(i, 1)
break
}
}
NT.memory.maps.POSTS.delete(emitterPostHash)
thisObject.postsCount--
}
function addFollowing(
botProfile
) {
if (thisObject.following.get(botProfile.id) === undefined) {
thisObject.following.set(botProfile.id, botProfile)
thisObject.followingCount++
}
}
function removeFollowing(
botProfile
) {
if (thisObject.following.get(botProfile.id) !== undefined) {
thisObject.following.delete(botProfile.id)
thisObject.followingCount--
}
}
function addFollower(
botProfile
) {
if (thisObject.followers.get(botProfile.id) === undefined) {
thisObject.followers.set(botProfile.id, botProfile)
thisObject.followersCount++
}
}
function removeFollower(
botProfile
) {
if (thisObject.followers.get(botProfile.id) !== undefined) {
thisObject.followers.delete(botProfile.id)
thisObject.followersCount--
}
}
}
+6 -3
View File
@@ -36,13 +36,13 @@ exports.newClientInterface = function newClientInterface() {
*/
let eventReceived = JSON.parse(eventMessage)
if (NT.memory.EVENTS.get(eventReceived.eventId) !== undefined) {
if (NT.memory.maps.EVENTS.get(eventReceived.eventId) !== undefined) {
throw ('Event Already Exists.')
}
let event = NT.modules.EVENT.newEvent()
event.initialize(eventReceived)
NT.memory.EVENTS.set(eventReceived.eventId, event)
NT.memory.maps.EVENTS.set(eventReceived.eventId, event)
}
function queryReceived(queryMessage) {
@@ -61,7 +61,10 @@ exports.newClientInterface = function newClientInterface() {
"timestamp": 124234234234,
"botId": "a8de78f0-c3e4-4a2a-b7e8-f659073969db",
"botAsset": "BTC",
"botExchange": "Binance"
"botExchange": "Binance",
"initialIndex": 35,
"amountRequested": 50,
"direction": "Past"
}
*/
+184 -105
View File
@@ -2,30 +2,37 @@ exports.newEvent = function newEvent() {
let thisObject = {
eventId: undefined,
eventType: undefined,
emitterUserProfile: undefined,
targetUserProfile: undefined,
asset: undefined,
emitterUserProfileId: undefined,
targetUserProfileId: undefined,
emitterBotProfileId: undefined,
targetBotProfileId: undefined,
emitterPostHash: undefined,
targetPostHash: undefined,
timestamp: undefined,
botId: undefined,
botAsset: undefined,
botExchange: undefined,
initialize: initialize,
finalize: finalize
}
const EVENT_TYPES = {
NEW_MULTI_MEDIA_POST: 10,
REPLY_TO_MULTI_MEDIA_POST: 11,
REPOST_MULTI_MEDIA: 12,
QUOTE_REPOST_MULTI_MEDIA: 13,
FOLLOW_USER_PROFILE_MULTI_MEDIA_POSTS: 14,
UNFOLLOW_USER_PROFILE_MULTI_MEDIA_POSTS: 15,
NEW_USER_POST: 10,
REPLY_TO_USER_POST: 11,
REPOST_USER_POST: 12,
QUOTE_REPOST_USER_POST: 13,
REMOVE_USER_POST: 14,
FOLLOW_USER_PROFILE: 15,
UNFOLLOW_USER_PROFILE: 16,
NEW_TRADE_POST: 20,
REPLY_TO_TRADE_POST: 21,
RE_POST_TRADE: 22,
QUOTE_REPOST_TRADE: 23,
FOLLOW_USER_PROFILE_TRADE_POSTS: 24,
UNFOLLOW_USER_PROFILE_TRADE_POSTS: 25,
NEW_BOT_POST: 20,
REPLY_TO_BOT_POST: 21,
REPOST_BOT_POST: 22,
QUOTE_REPOST_BOT_POST: 23,
REMOVE_BOT_POST: 24,
FOLLOW_BOT_PROFILE: 25,
UNFOLLOW_BOT_PROFILE: 26,
ADD_BOT: 50,
REMOVE_BOT: 51,
@@ -52,108 +59,180 @@ exports.newEvent = function newEvent() {
return thisObject
function finalize() {
thisObject.emitterUserProfile = undefined
thisObject.targetUserProfile = undefined
emitterUserProfile = undefined
targetUserProfile = undefined
}
function initialize(eventReceived) {
thisObject.emitterUserProfile = NT.memory.USER_PROFILES_BY_ID.get(eventReceived.emitterUserProfileId)
if (thisObject.emitterUserProfile === undefined) {
/*
Store the message properties into this object properties.
*/
thisObject.eventId = eventReceived.eventId
thisObject.emitterUserProfileId = eventReceived.emitterUserProfileId
thisObject.targetUserProfileId = eventReceived.targetUserProfileId
thisObject.emitterBotProfileId = eventReceived.emitterBotProfileId
thisObject.targetBotProfileId = eventReceived.targetBotProfileId
thisObject.emitterPostHash = eventReceived.emitterPostHash
thisObject.targetPostHash = eventReceived.targetPostHash
thisObject.timestamp = eventReceived.timestamp
thisObject.botId = eventReceived.botId
thisObject.botAsset = eventReceived.botAsset
thisObject.botExchange = eventReceived.botExchange
/*
Validate Emitter User Profile.
*/
let emitterUserProfile = NT.memory.maps.USER_PROFILES_BY_ID.get(thisObject.emitterUserProfileId)
if (emitterUserProfile === undefined) {
throw ('Emitter User Profile Not Found.')
}
thisObject.emitterUserProfile.emitterEventsCount++
thisObject.targetUserProfile = NT.memory.USER_PROFILES_BY_ID.get(eventReceived.targetUserProfileId)
if (thisObject.targetUserProfile === undefined) {
emitterUserProfile.emitterEventsCount++
/*
Validate Target User Profile.
*/
let targetUserProfile = NT.memory.maps.USER_PROFILES_BY_ID.get(thisObject.targetUserProfileId)
if (targetUserProfile === undefined) {
/* We thow an exception when it does not have a target user profile and is required*/
if (
eventReceived.eventType !== EVENT_TYPES.NEW_MULTI_MEDIA_POST &&
eventReceived.eventType !== EVENT_TYPES.NEW_TRADE_POST
thisObject.eventType !== EVENT_TYPES.NEW_USER_POST &&
thisObject.eventType !== EVENT_TYPES.NEW_BOT_POST
) {
throw ('Target User Profile Not Found.')
}
} else {
thisObject.targetUserProfile.targetEventsCount++
targetUserProfile.targetEventsCount++
}
thisObject.eventId = eventReceived.eventId
thisObject.eventType = eventReceived.eventType
thisObject.asset = eventReceived.asset
thisObject.timestamp = eventReceived.timestamp
/*
Is is a new post?
Validate Emitter Bot Profile.
*/
if (emitterBotProfileId !== undefined) {
let botProfile = emitterUserProfile.bots.get(emitterBotProfileId)
if (
emitterBotProfile === undefined
) {
throw ('Emitter BOt Profile Not Found.')
}
}
/*
Is is related to Posting?
*/
if (
eventReceived.eventType === EVENT_TYPES.NEW_MULTI_MEDIA_POST ||
eventReceived.eventType === EVENT_TYPES.REPLY_TO_MULTI_MEDIA_POST ||
eventReceived.eventType === EVENT_TYPES.REPOST_MULTI_MEDIA ||
eventReceived.eventType === EVENT_TYPES.QUOTE_REPOST_MULTI_MEDIA ||
eventReceived.eventType === EVENT_TYPES.NEW_TRADE_POST ||
eventReceived.eventType === EVENT_TYPES.REPLY_TO_TRADE_POST ||
eventReceived.eventType === EVENT_TYPES.RE_POST_TRADE ||
eventReceived.eventType === EVENT_TYPES.QUOTE_REPOST_TRADE
thisObject.eventType === EVENT_TYPES.NEW_USER_POST ||
thisObject.eventType === EVENT_TYPES.REPLY_TO_USER_POST ||
thisObject.eventType === EVENT_TYPES.REPOST_USER_POST ||
thisObject.eventType === EVENT_TYPES.QUOTE_REPOST_USER_POST ||
thisObject.eventType === EVENT_TYPES.NEW_BOT_POST ||
thisObject.eventType === EVENT_TYPES.REPLY_TO_BOT_POST ||
thisObject.eventType === EVENT_TYPES.REPOST_BOT_POST ||
thisObject.eventType === EVENT_TYPES.QUOTE_REPOST_BOT_POST
) {
/*
New User Post
*/
if (
eventReceived.eventType === EVENT_TYPES.NEW_MULTI_MEDIA_POST ||
eventReceived.eventType === EVENT_TYPES.REPLY_TO_MULTI_MEDIA_POST ||
eventReceived.eventType === EVENT_TYPES.REPOST_MULTI_MEDIA ||
eventReceived.eventType === EVENT_TYPES.QUOTE_REPOST_MULTI_MEDIA
thisObject.eventType === EVENT_TYPES.NEW_USER_POST ||
thisObject.eventType === EVENT_TYPES.REPLY_TO_USER_POST ||
thisObject.eventType === EVENT_TYPES.REPOST_USER_POST ||
thisObject.eventType === EVENT_TYPES.QUOTE_REPOST_USER_POST
) {
thisObject.emitterUserProfile.addPost(
eventReceived.emitterPostHash,
eventReceived.targetPostHash,
thisObject.eventType,
thisObject.emitterUserProfile,
emitterUserProfile.addPost(
thisObject.emitterUserProfileId,
thisObject.targetUserProfileId,
thisObject.emitterBotProfileId,
thisObject.targetBotProfileId,
thisObject.emitterPostHash,
thisObject.targetPostHash,
thisObject.eventType - 10,
thisObject.timestamp
)
return
}
/*
New Bot Post
*/
if (
thisObject.eventType === EVENT_TYPES.NEW_BOT_POST ||
thisObject.eventType === EVENT_TYPES.REPLY_TO_BOT_POST ||
thisObject.eventType === EVENT_TYPES.REPOST_BOT_POST ||
thisObject.eventType === EVENT_TYPES.QUOTE_REPOST_BOT_POST
) {
emitterBotProfile.addPost(
thisObject.emitterUserProfileId,
thisObject.targetUserProfileId,
thisObject.emitterBotProfileId,
thisObject.targetBotProfileId,
thisObject.emitterPostHash,
thisObject.targetPostHash,
thisObject.eventType - 20,
thisObject.timestamp
)
return
}
/*
Remove User Post
*/
if (
thisObject.eventType === EVENT_TYPES.REMOVE_USER_POST
) {
emitterUserProfile.removePost(
thisObject.emitterPostHash
)
return
}
/*
Remove Bot Post
*/
if (
thisObject.eventType === EVENT_TYPES.REMOVE_USER_POST
) {
emitterBotProfile.removePost(
thisObject.emitterPostHash
)
return
}
return
}
/*
Is is a following?
*/
if (
eventReceived.eventType === EVENT_TYPES.FOLLOW_USER_PROFILE_MULTI_MEDIA_POSTS ||
eventReceived.eventType === EVENT_TYPES.UNFOLLOW_USER_PROFILE_MULTI_MEDIA_POSTS ||
eventReceived.eventType === EVENT_TYPES.FOLLOW_USER_PROFILE_TRADE_POSTS ||
eventReceived.eventType === EVENT_TYPES.UNFOLLOW_USER_PROFILE_TRADE_POSTS
thisObject.eventType === EVENT_TYPES.FOLLOW_USER_PROFILE ||
thisObject.eventType === EVENT_TYPES.UNFOLLOW_USER_PROFILE ||
thisObject.eventType === EVENT_TYPES.FOLLOW_BOT_PROFILE ||
thisObject.eventType === EVENT_TYPES.UNFOLLOW_BOT_PROFILE
) {
switch (eventReceived.eventType) {
case EVENT_TYPES.FOLLOW_USER_PROFILE_MULTI_MEDIA_POSTS: {
thisObject.emitterUserProfile.addMultiMediaPostsFollowing(
thisObject.targetUserProfile
switch (thisObject.eventType) {
case EVENT_TYPES.FOLLOW_USER_PROFILE: {
emitterUserProfile.addFollowing(
targetUserProfile
)
thisObject.targetUserProfile.addMultiMediaPostsFollower(
thisObject.emitterUserProfile
targetUserProfile.addFollower(
emitterUserProfile
)
break
}
case EVENT_TYPES.UNFOLLOW_USER_PROFILE_MULTI_MEDIA_POSTS: {
thisObject.emitterUserProfile.removeMultiMediaPostsFollowing(
thisObject.targetUserProfile
case EVENT_TYPES.UNFOLLOW_USER_PROFILE: {
emitterUserProfile.removeFollowing(
targetUserProfile
)
thisObject.targetUserProfile.removeMultiMediaPostsFollower(
thisObject.emitterUserProfile
targetUserProfile.removeFollower(
emitterUserProfile
)
break
}
case EVENT_TYPES.FOLLOW_USER_PROFILE_TRADE_POSTS: {
thisObject.emitterUserProfile.addTradePostsFollowing(
thisObject.targetUserProfile
case EVENT_TYPES.FOLLOW_BOT_PROFILE: {
emitterUserProfile.addTradePostsFollowing(
targetUserProfile
)
thisObject.targetUserProfile.addTradePostsFollower(
thisObject.emitterUserProfile
targetUserProfile.addTradePostsFollower(
emitterUserProfile
)
break
}
case EVENT_TYPES.UNFOLLOW_USER_PROFILE_TRADE_POSTS: {
thisObject.emitterUserProfile.removeTradePostsFollowing(
thisObject.targetUserProfile
case EVENT_TYPES.UNFOLLOW_BOT_PROFILE: {
emitterUserProfile.removeTradePostsFollowing(
targetUserProfile
)
thisObject.targetUserProfile.removeTradePostsFollower(
thisObject.emitterUserProfile
targetUserProfile.removeTradePostsFollower(
emitterUserProfile
)
break
}
@@ -164,53 +243,53 @@ exports.newEvent = function newEvent() {
Is is a Reaction?
*/
if (
eventReceived.eventType === EVENT_TYPES.ADD_REACTION_LIKE ||
eventReceived.eventType === EVENT_TYPES.ADD_REACTION_LOVE ||
eventReceived.eventType === EVENT_TYPES.ADD_REACTION_HAHA ||
eventReceived.eventType === EVENT_TYPES.ADD_REACTION_WOW ||
eventReceived.eventType === EVENT_TYPES.ADD_REACTION_SAD ||
eventReceived.eventType === EVENT_TYPES.ADD_REACTION_ANGRY ||
eventReceived.eventType === EVENT_TYPES.ADD_REACTION_HUG
thisObject.eventType === EVENT_TYPES.ADD_REACTION_LIKE ||
thisObject.eventType === EVENT_TYPES.ADD_REACTION_LOVE ||
thisObject.eventType === EVENT_TYPES.ADD_REACTION_HAHA ||
thisObject.eventType === EVENT_TYPES.ADD_REACTION_WOW ||
thisObject.eventType === EVENT_TYPES.ADD_REACTION_SAD ||
thisObject.eventType === EVENT_TYPES.ADD_REACTION_ANGRY ||
thisObject.eventType === EVENT_TYPES.ADD_REACTION_HUG
) {
let targetPost = NT.memory.POSTS.get(eventReceived.targetPostHash)
let targetPost = NT.memory.maps.POSTS.get(thisObject.targetPostHash)
if (targetPost === undefined) {
throw ('Target Post Not Found')
}
targetPost.addReaction(eventReceived.eventType - 100)
targetPost.addReaction(thisObject.eventType - 100)
return
}
if (
eventReceived.eventType === EVENT_TYPES.REMOVE_REACTION_LIKE ||
eventReceived.eventType === EVENT_TYPES.REMOVE_REACTION_LOVE ||
eventReceived.eventType === EVENT_TYPES.REMOVE_REACTION_HAHA ||
eventReceived.eventType === EVENT_TYPES.REMOVE_REACTION_WOW ||
eventReceived.eventType === EVENT_TYPES.REMOVE_REACTION_SAD ||
eventReceived.eventType === EVENT_TYPES.REMOVE_REACTION_ANGRY ||
eventReceived.eventType === EVENT_TYPES.REMOVE_REACTION_HUG
thisObject.eventType === EVENT_TYPES.REMOVE_REACTION_LIKE ||
thisObject.eventType === EVENT_TYPES.REMOVE_REACTION_LOVE ||
thisObject.eventType === EVENT_TYPES.REMOVE_REACTION_HAHA ||
thisObject.eventType === EVENT_TYPES.REMOVE_REACTION_WOW ||
thisObject.eventType === EVENT_TYPES.REMOVE_REACTION_SAD ||
thisObject.eventType === EVENT_TYPES.REMOVE_REACTION_ANGRY ||
thisObject.eventType === EVENT_TYPES.REMOVE_REACTION_HUG
) {
let targetPost = NT.memory.POSTS.get(eventReceived.targetPostHash)
let targetPost = NT.memory.maps.POSTS.get(thisObject.targetPostHash)
if (targetPost === undefined) {
throw ('Target Post Not Found')
}
targetPost.removeReaction(eventReceived.eventType - 200)
targetPost.removeReaction(thisObject.eventType - 200)
return
}
/*
Is is a Bot?
*/
if (
eventReceived.eventType === EVENT_TYPES.ADD_BOT ||
eventReceived.eventType === EVENT_TYPES.REMOVE_BOT ||
eventReceived.eventType === EVENT_TYPES.ENABLE_BOT ||
eventReceived.eventType === EVENT_TYPES.DISABLE_BOT
thisObject.eventType === EVENT_TYPES.ADD_BOT ||
thisObject.eventType === EVENT_TYPES.REMOVE_BOT ||
thisObject.eventType === EVENT_TYPES.ENABLE_BOT ||
thisObject.eventType === EVENT_TYPES.DISABLE_BOT
) {
switch (eventReceived.eventType) {
switch (thisObject.eventType) {
case EVENT_TYPES.ADD_BOT: {
thisObject.emitterUserProfile.addBot(
emitterUserProfile.addBot(
thisObject.botId,
thisObject.botAsset,
thisObject.botExchange
@@ -218,19 +297,19 @@ exports.newEvent = function newEvent() {
break
}
case EVENT_TYPES.REMOVE_BOT: {
thisObject.emitterUserProfile.removeBot(
emitterUserProfile.removeBot(
thisObject.botId
)
break
}
case EVENT_TYPES.ENABLE_BOT: {
thisObject.emitterUserProfile.enableBot(
emitterUserProfile.enableBot(
thisObject.botId
)
break
}
case EVENT_TYPES.DISABLE_BOT: {
thisObject.emitterUserProfile.disableBot(
emitterUserProfile.disableBot(
thisObject.botId
)
break
+32 -28
View File
@@ -1,15 +1,17 @@
exports.newPost = function newPost() {
let thisObject = {
emitterUserProfileId: undefined,
targetUserProfileId: undefined,
emitterBotProfileId: undefined,
targetBotProfileId: undefined,
emitterPostHash: undefined,
targetPostHash: undefined,
postType: undefined,
userProfile: undefined,
timestamp: undefined,
replies: undefined,
targetPost: undefined,
reactionsCount: undefined,
reactionTypesCount: undefined,
reactionTypesCount: undefined,
addReaction: addReaction,
removeReactions: removeReaction,
initialize: initialize,
@@ -17,14 +19,10 @@ exports.newPost = function newPost() {
}
const POST_TYPES = {
NEW_MULTI_MEDIA_POST: 10,
REPLY_TO_MULTI_MEDIA_POST: 11,
REPOST_MULTI_MEDIA: 12,
QUOTE_REPOST_MULTI_MEDIA: 13,
NEW_TRADE_POST: 20,
REPLY_TO_TRADE_POST: 21,
RE_POST_TRADE: 22,
QUOTE_REPOST_TRADE: 23
NEW_POST: 0,
REPLY_TO_POST: 1,
REPOST_: 2,
QUOTE_REPOST_: 3
}
const REACTION_TYPES = {
@@ -51,44 +49,51 @@ exports.newPost = function newPost() {
return thisObject
function finalize() {
thisObject.emitterUserProfileId = undefined
thisObject.targetUserProfileId = undefined
thisObject.emitterBotProfileId = undefined
thisObject.targetBotProfileId = undefined
thisObject.emitterPostHash = undefined
thisObject.targetPostHash = undefined
thisObject.postType = undefined
thisObject.userProfile = undefined
thisObject.timestamp = undefined
thisObject.replies = undefined
thisObject.targetPost = undefined
}
function initialize(
emitterUserProfileId,
targetUserProfileId,
emitterBotProfileId,
targetBotProfileId,
emitterPostHash,
targetPostHash,
postType,
userProfile,
timestamp
) {
thisObject.emitterUserProfileId = emitterUserProfileId
thisObject.targetUserProfileId = targetUserProfileId
thisObject.emitterBotProfileId = emitterBotProfileId
thisObject.targetBotProfileId = targetBotProfileId
thisObject.emitterPostHash = emitterPostHash
thisObject.targetPostHash = targetPostHash
thisObject.postType = postType
thisObject.userProfile = userProfile
thisObject.timestamp = timestamp
thisObject.replies = []
/*
Let's find the Target Post
*/
if (
event.eventType === POST_TYPES.REPLY_TO_MULTI_MEDIA_POST ||
event.eventType === POST_TYPES.REPOST_MULTI_MEDIA ||
event.eventType === POST_TYPES.QUOTE_REPOST_MULTI_MEDIA ||
event.eventType === POST_TYPES.REPLY_TO_TRADE_POST ||
event.eventType === POST_TYPES.RE_POST_TRADE ||
event.eventType === POST_TYPES.QUOTE_REPOST_TRADE
) {
thisObject.targetPost = NT.memory.POSTS.get(thisObject.targetPostHash)
let targetPost
if (thisObject.targetPost === undefined) {
if (
thisObject.postType === POST_TYPES.REPLY_TO_POST ||
thisObject.postType === POST_TYPES.REPOST_ ||
thisObject.postType === POST_TYPES.QUOTE_REPOST_
) {
targetPost = NT.memory.maps.POSTS.get(thisObject.targetPostHash)
if (targetPost === undefined) {
throw ('Target Post Not Found.')
}
}
@@ -96,10 +101,9 @@ exports.newPost = function newPost() {
Let's add this post to the replies of the Target Post
*/
if (
event.eventType === POST_TYPES.REPLY_TO_MULTI_MEDIA_POST ||
event.eventType === POST_TYPES.REPLY_TO_TRADE_POST
thisObject.postType === POST_TYPES.REPLY_TO_POST
) {
thisObject.targetPost.replies.push(thisObject)
targetPost.replies.push(thisObject)
}
}
+42 -89
View File
@@ -4,15 +4,11 @@ exports.newUserProfile = function newUserProfile() {
userProfieId: undefined,
userProfileHandle: undefined,
blockchainAccount: undefined,
multiMediaPostsFollowing: undefined,
multiMediaPostsFollowers: undefined,
tradePostsFollowing: undefined,
tradePostsFollowers: undefined,
ranking: undefined,
multiMediaPostFollowingCount: undefined,
multiMediaPostFollowersCount: undefined,
tradePostsFollowingCount: undefined,
tradePostsFollowersCount: undefined,
following: undefined,
followers: undefined,
followingCount: undefined,
followersCount: undefined,
emitterEventsCount: undefined,
targetEventsCount: undefined,
postsCount: undefined,
@@ -21,14 +17,10 @@ exports.newUserProfile = function newUserProfile() {
posts: undefined,
addPost: addPost,
removePost: removePost,
addMultiMediaPostsFollowing: addMultiMediaPostsFollowing,
removeMultiMediaPostsFollowing: removeMultiMediaPostsFollowing,
addTradePostsFollowing: addTradePostsFollowing,
removeTradePostsFollowing: removeTradePostsFollowing,
addMultiMediaPostsFollower: addMultiMediaPostsFollower,
removeMultiMediaPostsFollower: removeMultiMediaPostsFollower,
addTradePostsFollower: addTradePostsFollower,
removeTradePostsFollower: removeTradePostsFollower,
addFollowing: addFollowing,
removeFollowing: removeFollowing,
addFollower: addFollower,
removeFollower: removeFollower,
addBot: addBot,
removeBot: removeBot,
enableBot: enableBot,
@@ -40,11 +32,8 @@ exports.newUserProfile = function newUserProfile() {
return thisObject
function finalize() {
thisObject.multiMediaPostsFollowing = undefined
thisObject.multiMediaPostsFollowers = undefined
thisObject.tradePostsFollowing = undefined
thisObject.tradePostsFollowers = undefined
thisObject.following = undefined
thisObject.followers = undefined
thisObject.posts = undefined
thisObject.bots = undefined
@@ -52,139 +41,103 @@ exports.newUserProfile = function newUserProfile() {
function initialize() {
thisObject.multiMediaPostsFollowing = new Map()
thisObject.multiMediaPostsFollowers = new Map()
thisObject.following = new Map()
thisObject.followers = new Map()
thisObject.tradePostsFollowing = new Map()
thisObject.tradePostsFollowers = new Map()
thisObject.followingCount = 0
thisObject.followersCount = 0
thisObject.multiMediaPostFollowingCount = 0
thisObject.multiMediaPostFollowersCount = 0
thisObject.tradePostsFollowingCount = 0
thisObject.tradePostsFollowersCount = 0
thisObject.emitterEventsCount = 0
thisObject.targetEventsCount = 0
thisObject.postsCount = 0
thisObject.botsCount = 0
thisObject.posts = []
thisObject.bots = undefined
thisObject.bots = []
}
function addPost(
emitterUserProfileId,
targetUserProfileId,
emitterPostHash,
targetPostHash,
postType,
userProfile,
timestamp
) {
if (NT.memory.POSTS.get(emitterPostHash) !== undefined) {
if (NT.memory.maps.POSTS.get(emitterPostHash) !== undefined) {
throw ('Post Already Exists.')
}
let post = NT.modules.POST.newPost()
post.initialize(
emitterUserProfileId,
targetUserProfileId,
undefined,
undefined,
emitterPostHash,
targetPostHash,
postType,
userProfile,
timestamp
)
thisObject.posts.push(post)
NT.memory.POSTS.set(emitterPostHash, post)
NT.memory.maps.POSTS.set(emitterPostHash, post)
thisObject.postsCount++
}
function removePost(
emitterPostHash
) {
if (NT.memory.POSTS.get(emitterPostHash) === undefined) {
if (NT.memory.maps.POSTS.get(emitterPostHash) === undefined) {
throw ('Post Does Not Exist.')
}
let post = thisObject.posts.get(emitterPostHash)
post.finalize()
for (let i = thisObject.posts.length - 1; i >= 0; i-- {
for (let i = thisObject.posts.length - 1; i >= 0; i--) {
if (thisObject.posts[i].emitterPostHash === emitterPostHash) {
thisObject.posts.splice(i, 1)
break
}
}
NT.memory.POSTS.delete(emitterPostHash)
NT.memory.maps.POSTS.delete(emitterPostHash)
thisObject.postsCount--
}
function addMultiMediaPostsFollowing(
function addFollowing(
userProfile
) {
if (thisObject.multiMediaPostsFollowing.get(userProfile.id) === undefined) {
thisObject.multiMediaPostsFollowing.set(userProfile.id, userProfile)
thisObject.multiMediaPostFollowingCount++
if (thisObject.following.get(userProfile.id) === undefined) {
thisObject.following.set(userProfile.id, userProfile)
thisObject.followingCount++
}
}
function removeMultiMediaPostsFollowing(
function removeFollowing(
userProfile
) {
if (thisObject.multiMediaPostsFollowing.get(userProfile.id) !== undefined) {
thisObject.multiMediaPostsFollowing.delete(userProfile.id)
thisObject.multiMediaPostFollowingCount--
if (thisObject.following.get(userProfile.id) !== undefined) {
thisObject.following.delete(userProfile.id)
thisObject.followingCount--
}
}
function addTradePostsFollowing(
function addFollower(
userProfile
) {
if (thisObject.tradePostsFollowingCount.get(userProfile.id) === undefined) {
thisObject.tradePostsFollowingCount.set(userProfile.id, userProfile)
thisObject.tradePostsFollowingCount++
if (thisObject.followers.get(userProfile.id) === undefined) {
thisObject.followers.set(userProfile.id, userProfile)
thisObject.followersCount++
}
}
function removeTradePostsFollowing(
function removeFollower(
userProfile
) {
if (thisObject.tradePostsFollowingCount.get(userProfile.id) !== undefined) {
thisObject.tradePostsFollowingCount.delete(userProfile.id)
thisObject.tradePostsFollowingCount--
}
}
function addMultiMediaPostsFollower(
userProfile
) {
if (thisObject.multiMediaPostsFollowers.get(userProfile.id) === undefined) {
thisObject.multiMediaPostsFollowers.set(userProfile.id, userProfile)
thisObject.multiMediaPostFollowersCount++
}
}
function removeMultiMediaPostsFollower(
userProfile
) {
if (thisObject.multiMediaPostsFollowers.get(userProfile.id) !== undefined) {
thisObject.multiMediaPostsFollowers.delete(userProfile.id)
thisObject.multiMediaPostFollowersCount--
}
}
function addTradePostsFollower(
userProfile
) {
if (thisObject.tradePostsFollowers.get(userProfile.id) === undefined) {
thisObject.tradePostsFollowers.set(userProfile.id, userProfile)
thisObject.tradePostsFollowersCount++
}
}
function removeTradePostsFollower(
userProfile
) {
if (thisObject.tradePostsFollowers.get(userProfile.id) !== undefined) {
thisObject.tradePostsFollowers.delete(userProfile.id)
thisObject.tradePostsFollowersCount--
if (thisObject.followers.get(userProfile.id) !== undefined) {
thisObject.followers.delete(userProfile.id)
thisObject.followersCount--
}
}
@@ -217,6 +217,10 @@
"text": "Before you go any further, do the Beyond the Basics tutorial in the Getting Started plugin workspace so that you learn the basics on how to deal with contributions from within the app. The tutorial will help you get your setup right so that contributions are seamless.",
"updated": 1613828879531
},
{
"style": "Text",
"text": ""
},
{
"style": "Block",
"text": "Dummy",
@@ -3,8 +3,8 @@
"pageNumber": "2",
"type": "Getting Started Tutorials Plugin Workspace",
"definition": {
"text": "This workspace is the first point of contact with Superalgos. It's purpose is to get new users familiar with all the basic aspects of Superalgos.",
"updated": 1616145473343
"text": "This workspace is the first point of contact with Superalgos. Its purpose is to get new users familiar with all the basic aspects of Superalgos.",
"updated": 1630066493238
},
"paragraphs": [
{
@@ -13,8 +13,8 @@
"paragraphs": [
{
"style": "List",
"text": "You may earn Superalgos SA Tokens and reputation by contributing to the project.",
"updated": 1629834397651
"text": "You may earn Superalgos SA Tokens and Reputation by contributing to the project.",
"updated": 1630065210887
},
{
"style": "List",
Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

After

Width:  |  Height:  |  Size: 14 KiB

File diff suppressed because it is too large. Load diff
@@ -1,7 +1,7 @@
{
"type": "Workspace",
"name": "Token-Distribution-Foundations-Project",
"config": "{\n \"docsLanguage\": \"EN\",\n \"currentBranch\": \"master\",\n \"contributionsBranch\": \"develop\"\n}",
"config": "{\n \"docsLanguage\": \"EN\",\n \"contributionsBranch\": \"develop\"\n}",
"rootNodes": [
{
"type": "Design Space",
@@ -30,7 +30,9 @@
"distanceToParent": 3,
"arrangementStyle": 0
},
"uiObject": {}
"uiObject": {
"isRunning": false
}
}
},
"spaceSettings": {
@@ -56,7 +58,9 @@
"distanceToParent": 3,
"arrangementStyle": 0
},
"uiObject": {}
"uiObject": {
"isRunning": false
}
}
},
"id": "f8485ce5-67f3-4476-b9e2-80994e49c318",
@@ -92,32 +96,6 @@
"type": "APIs",
"name": "New APIs",
"project": "Foundations",
"githubAPI": {
"type": "Github API",
"name": "New Github API",
"config": "{\n \"username\": \"Luis-Fernando-Molina\",\n \"token\": \"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\"\n}",
"project": "Foundations",
"id": "90d121ab-9f19-4437-a051-1222287085fc",
"savedPayload": {
"position": {
"x": 30630.458333333332,
"y": 10730.006707946337
},
"targetPosition": {
"x": 30330.458333333332,
"y": 10730.006707946337
},
"floatingObject": {
"isPinned": false,
"isFrozen": false,
"isCollapsed": true,
"angleToParent": 1,
"distanceToParent": 3,
"arrangementStyle": 0
},
"uiObject": {}
}
},
"id": "23021bb7-9997-4fe6-8199-71ebf70aef76",
"savedPayload": {
"position": {
@@ -168,7 +146,9 @@
"distanceToParent": 3,
"arrangementStyle": 0
},
"uiObject": {}
"uiObject": {
"isRunning": false
}
}
},
"id": "db380c52-cf90-475b-87df-c005dd51cdf6",
@@ -221,7 +201,9 @@
"distanceToParent": 3,
"arrangementStyle": 0
},
"uiObject": {}
"uiObject": {
"isRunning": false
}
}
},
"spaceSettings": {
@@ -247,7 +229,9 @@
"distanceToParent": 3,
"arrangementStyle": 0
},
"uiObject": {}
"uiObject": {
"isRunning": false
}
}
},
"id": "016e464a-2b86-4c73-b79b-35c95751c339",
@@ -300,7 +284,9 @@
"distanceToParent": 3,
"arrangementStyle": 0
},
"uiObject": {}
"uiObject": {
"isRunning": false
}
}
},
"spaces": {
@@ -325,7 +311,9 @@
"distanceToParent": 3,
"arrangementStyle": 0
},
"uiObject": {}
"uiObject": {
"isRunning": false
}
}
},
"mines": {
@@ -350,7 +338,9 @@
"distanceToParent": 3,
"arrangementStyle": 0
},
"uiObject": {}
"uiObject": {
"isRunning": false
}
}
},
"trading": {
@@ -375,7 +365,9 @@
"distanceToParent": 3,
"arrangementStyle": 0
},
"uiObject": {}
"uiObject": {
"isRunning": false
}
}
},
"learning": {
@@ -400,7 +392,9 @@
"distanceToParent": 3,
"arrangementStyle": 0
},
"uiObject": {}
"uiObject": {
"isRunning": false
}
}
},
"otherHierarchies": {
@@ -425,7 +419,9 @@
"distanceToParent": 3,
"arrangementStyle": 0
},
"uiObject": {}
"uiObject": {
"isRunning": false
}
}
},
"id": "cf9f8b3b-77c6-43c6-b01f-95cf366a91f6",
@@ -382,7 +382,7 @@
"floatingObject": {
"isPinned": true,
"isFrozen": false,
"isCollapsed": true,
"isCollapsed": false,
"angleToParent": 1,
"distanceToParent": 3,
"arrangementStyle": 0
@@ -1667,7 +1667,7 @@
"isRunning": false
},
"tutorial": {
"status": "Reset"
"status": "Done"
},
"referenceParent": {
"type": "Charting Space",
@@ -1689,12 +1689,12 @@
"id": "fb31f94d-8c05-4c1a-89b7-92d48946ad9e",
"savedPayload": {
"position": {
"x": 19972,
"y": 30934.25
"x": 17027,
"y": 30922.25
},
"targetPosition": {
"x": 19672,
"y": 30934.25
"x": 16727,
"y": 30922.25
},
"floatingObject": {
"isPinned": false,
@@ -1708,7 +1708,7 @@
"isRunning": false
},
"tutorial": {
"status": "Reset"
"status": "Done"
}
}
},
@@ -1726,12 +1726,12 @@
"id": "33321959-1eb0-494c-8df3-94b1e47efdb3",
"savedPayload": {
"position": {
"x": 20159.74486052001,
"y": 31154.339995635255
"x": 20180.438536534504,
"y": 31099.451694843894
},
"targetPosition": {
"x": 19860.04694055762,
"y": 31167.79944474041
"x": 19884.132034355964,
"y": 31146.382034355964
},
"floatingObject": {
"isPinned": false,
@@ -1745,7 +1745,7 @@
"isRunning": false
},
"tutorial": {
"status": "Reset"
"status": "Done"
},
"referenceParent": {
"type": "Workspace",
@@ -1762,12 +1762,12 @@
"id": "a13ac48c-5743-4794-85bd-bf0794d9e1a2",
"savedPayload": {
"position": {
"x": 20110.41891667401,
"y": 31333.068539176038
"x": 20151.433991612474,
"y": 31282.579184277827
},
"targetPosition": {
"x": 19860.04694055762,
"y": 31167.79944474041
"x": 19884.132034355964,
"y": 31146.382034355964
},
"floatingObject": {
"isPinned": false,
@@ -1781,7 +1781,7 @@
"isRunning": false
},
"tutorial": {
"status": "Reset"
"status": "Done"
}
}
},
@@ -1793,12 +1793,12 @@
"id": "d9b824fd-a201-40b8-8a60-d0c516d9634b",
"savedPayload": {
"position": {
"x": 19965.459387782023,
"y": 31448.66990593233
"x": 20020.329184277827,
"y": 31413.683991612474
},
"targetPosition": {
"x": 19860.04694055762,
"y": 31167.79944474041
"x": 19884.132034355964,
"y": 31146.382034355964
},
"floatingObject": {
"isPinned": false,
@@ -1812,7 +1812,7 @@
"isRunning": false
},
"tutorial": {
"status": "Reset"
"status": "Done"
},
"referenceParent": {
"type": "Crypto Exchange",
@@ -1849,12 +1849,12 @@
"id": "a0d50140-b862-4b7e-9bc6-ed055b34a0bd",
"savedPayload": {
"position": {
"x": 19780.235886887614,
"y": 31456.988302949165
"x": 19837.201694843894,
"y": 31442.688536534504
},
"targetPosition": {
"x": 19860.04694055762,
"y": 31167.79944474041
"x": 19884.132034355964,
"y": 31146.382034355964
},
"floatingObject": {
"isPinned": false,
@@ -1868,7 +1868,7 @@
"isRunning": false
},
"tutorial": {
"status": "Reset"
"status": "Done"
},
"referenceParent": {
"type": "Market",
@@ -1914,12 +1914,12 @@
"id": "eca95394-e23c-4464-a0a2-955e45fd9ca5",
"savedPayload": {
"position": {
"x": 19884.132034355964,
"y": 31146.382034355964
"x": 16939.132034355964,
"y": 31134.382034355964
},
"targetPosition": {
"x": 19672,
"y": 30934.25
"x": 16727,
"y": 30922.25
},
"floatingObject": {
"isPinned": false,
@@ -1933,7 +1933,7 @@
"isRunning": false
},
"tutorial": {
"status": "Reset"
"status": "Done"
}
}
},
@@ -1951,12 +1951,12 @@
"id": "df575afd-af40-4725-a9a0-d0e3bdd64572",
"savedPayload": {
"position": {
"x": 19695.670272136376,
"y": 31514.40021539039
"x": 19822,
"y": 31494.057621135333
},
"targetPosition": {
"x": 19607.243719813105,
"y": 31227.728373654547
"x": 19672,
"y": 31234.25
},
"floatingObject": {
"isPinned": false,
@@ -1970,7 +1970,7 @@
"isRunning": false
},
"tutorial": {
"status": "Reset"
"status": "Done"
},
"referenceParent": {
"type": "Charting Space",
@@ -1995,12 +1995,12 @@
"id": "1a414df9-32fa-4055-b0db-7a932e4b59e1",
"savedPayload": {
"position": {
"x": 19403.19189848183,
"y": 31447.643935203494
"x": 19522,
"y": 31494.057621135333
},
"targetPosition": {
"x": 19607.243719813105,
"y": 31227.728373654547
"x": 19672,
"y": 31234.25
},
"floatingObject": {
"isPinned": false,
@@ -2014,7 +2014,7 @@
"isRunning": false
},
"tutorial": {
"status": "Reset"
"status": "Done"
}
}
}
@@ -2023,12 +2023,12 @@
"id": "47f47947-70a9-48a6-88d0-bd3dae2be578",
"savedPayload": {
"position": {
"x": 19672,
"y": 31234.25
"x": 16727,
"y": 31222.25
},
"targetPosition": {
"x": 19672,
"y": 30934.25
"x": 16727,
"y": 30922.25
},
"floatingObject": {
"isPinned": false,
@@ -2042,7 +2042,7 @@
"isRunning": false
},
"tutorial": {
"status": "Reset"
"status": "Done"
}
}
},
@@ -2079,7 +2079,7 @@
"isRunning": false
},
"tutorial": {
"status": "Reset"
"status": "Done"
},
"referenceParent": {
"type": "Governance Project",
@@ -2123,7 +2123,7 @@
"isRunning": false
},
"tutorial": {
"status": "Reset"
"status": "Done"
}
}
},
@@ -2154,7 +2154,7 @@
"isRunning": false
},
"tutorial": {
"status": "Reset"
"status": "Done"
},
"referenceParent": {
"type": "Time Machine",
@@ -2194,12 +2194,12 @@
"id": "1b7b5af2-bb52-4090-965e-cd457b2e229c",
"savedPayload": {
"position": {
"x": 19459.867965644036,
"y": 31146.382034355964
"x": 16514.867965644036,
"y": 31134.382034355964
},
"targetPosition": {
"x": 19672,
"y": 30934.25
"x": 16727,
"y": 30922.25
},
"floatingObject": {
"isPinned": false,
@@ -2213,7 +2213,7 @@
"isRunning": false
},
"tutorial": {
"status": "Reset"
"status": "Done"
}
}
},
@@ -2250,7 +2250,7 @@
"isRunning": false
},
"tutorial": {
"status": "Reset"
"status": "Done"
},
"referenceParent": {
"type": "Tutorial",
@@ -2294,7 +2294,7 @@
"isRunning": false
},
"tutorial": {
"status": "Reset"
"status": "Done"
}
}
},
@@ -2325,7 +2325,7 @@
"isRunning": false
},
"tutorial": {
"status": "Reset"
"status": "Done"
}
}
}
@@ -2334,12 +2334,12 @@
"id": "9aaa02f8-73ec-4c89-b1ec-85d4114c5a93",
"savedPayload": {
"position": {
"x": 19372,
"y": 30934.25
"x": 16427,
"y": 30922.25
},
"targetPosition": {
"x": 19672,
"y": 30934.25
"x": 16727,
"y": 30922.25
},
"floatingObject": {
"isPinned": false,
@@ -2353,7 +2353,7 @@
"isRunning": false
},
"tutorial": {
"status": "Reset"
"status": "Done"
}
}
},
@@ -2390,7 +2390,7 @@
"isRunning": false
},
"tutorial": {
"status": "Reset"
"status": "Done"
}
}
},
@@ -2421,7 +2421,7 @@
"isRunning": false
},
"tutorial": {
"status": "Reset"
"status": "Done"
}
}
},
@@ -2452,7 +2452,7 @@
"isRunning": false
},
"tutorial": {
"status": "Reset"
"status": "Done"
}
}
}
@@ -2461,12 +2461,12 @@
"id": "ba99b336-1578-4a76-99f0-24e461922b4c",
"savedPayload": {
"position": {
"x": 19459.867965644036,
"y": 30722.117965644036
"x": 16514.867965644036,
"y": 30710.117965644036
},
"targetPosition": {
"x": 19672,
"y": 30934.25
"x": 16727,
"y": 30922.25
},
"floatingObject": {
"isPinned": false,
@@ -2480,7 +2480,7 @@
"isRunning": false
},
"tutorial": {
"status": "Reset"
"status": "Done"
}
}
},
@@ -2517,7 +2517,7 @@
"isRunning": false
},
"tutorial": {
"status": "Reset"
"status": "Done"
}
}
},
@@ -2548,14 +2548,14 @@
"isRunning": false
},
"tutorial": {
"status": "Reset"
"status": "Done"
}
}
},
{
"type": "Tutorial Step",
"name": "GitHub Glory",
"config": "{\n \"icon\": {\n \"name\": \"Programs\\\\github-program\",\n \"project\": \"Governance\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Governance\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - GitHub Glory\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": false,\n \"page\": {\n \"project\": \"Foundations\",\n \"category\": \"\",\n \"type\": \"\"\n }\n }\n}",
"config": "{\n \"icon\": {\n \"name\": \"Programs\\\\github-program\",\n \"project\": \"Governance\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Governance\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - GitHub Glory\"\n },\n \"controlDocs\": {\n \"panel\": \"Close\",\n \"closeTutorialEditor\": false,\n \"page\": {\n \"project\": \"Foundations\",\n \"category\": \"\",\n \"type\": \"\"\n }\n }\n}",
"project": "Education",
"id": "e580ebc9-097b-46d6-bb6d-145621548377",
"savedPayload": {
@@ -2578,9 +2578,7 @@
"uiObject": {
"isRunning": false
},
"tutorial": {
"status": "Reset"
}
"tutorial": {}
}
}
],
@@ -2588,139 +2586,12 @@
"id": "578fdee3-64ad-4836-8feb-3e41746bceda",
"savedPayload": {
"position": {
"x": 19672,
"y": 30634.25
"x": 16727,
"y": 30622.25
},
"targetPosition": {
"x": 19672,
"y": 30934.25
},
"floatingObject": {
"isPinned": false,
"isFrozen": false,
"isCollapsed": false,
"angleToParent": 1,
"distanceToParent": 3,
"arrangementStyle": 0
},
"uiObject": {
"isRunning": false
},
"tutorial": {
"status": "Reset"
}
}
},
{
"type": "Tutorial Topic",
"name": "Submit Profile",
"config": "{\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"Next\"\n}",
"project": "Education",
"tutorialSteps": [
{
"type": "Tutorial Step",
"name": "Make it Official",
"config": "{\n \"icon\": {\n \"name\": \"Programs\\\\github-program\",\n \"project\": \"Governance\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Governance\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Make it Official\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": false,\n \"page\": {\n \"project\": \"Foundations\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - GitHub.com Authentication\"\n }\n }\n}",
"project": "Education",
"id": "fe74b3ae-9490-465a-a491-db4b0834dbf7",
"savedPayload": {
"position": {
"x": 19885.132034355964,
"y": 30421.117965644036
},
"targetPosition": {
"x": 19885.132034355964,
"y": 30721.117965644036
},
"floatingObject": {
"isPinned": false,
"isFrozen": false,
"isCollapsed": false,
"angleToParent": 2,
"distanceToParent": 3,
"arrangementStyle": 0
},
"uiObject": {
"isRunning": false
},
"tutorial": {
"status": "Reset"
}
}
},
{
"type": "Tutorial Step",
"name": "Infinity and Beyond",
"config": "{\n \"icon\": {\n \"name\": \"User\\\\user-profile\",\n \"project\": \"Governance\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Governance\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - To Infinity and Beyond\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": false,\n \"page\": {\n \"project\": \"Foundations\",\n \"category\": \"\",\n \"type\": \"\"\n }\n }\n}",
"project": "Education",
"id": "e4c5a34f-67c4-4fdc-8c11-aef5bde92d72",
"savedPayload": {
"position": {
"x": 20097.264068711927,
"y": 30508.985931288073
},
"targetPosition": {
"x": 19885.132034355964,
"y": 30721.117965644036
},
"floatingObject": {
"isPinned": false,
"isFrozen": false,
"isCollapsed": false,
"angleToParent": 2,
"distanceToParent": 3,
"arrangementStyle": 0
},
"uiObject": {
"isRunning": false
},
"tutorial": {
"status": "Reset"
}
}
},
{
"type": "Tutorial Step",
"name": "Welcome aboard!",
"config": "{\n \"icon\": {\n \"name\": \"Announcement\\\\announcement\",\n \"project\": \"Foundations\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Governance\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Welcome aboard!\"\n },\n \"controlDocs\": {\n \"panel\": \"Close\",\n \"closeTutorialEditor\": false,\n \"page\": {\n \"project\": \"Foundations\",\n \"category\": \"\",\n \"type\": \"\"\n }\n }\n}",
"project": "Education",
"id": "340f9107-9b4a-424b-94f2-79d65873c572",
"savedPayload": {
"position": {
"x": 20185.132034355964,
"y": 30721.117965644036
},
"targetPosition": {
"x": 19885.132034355964,
"y": 30721.117965644036
},
"floatingObject": {
"isPinned": false,
"isFrozen": false,
"isCollapsed": false,
"angleToParent": 2,
"distanceToParent": 3,
"arrangementStyle": 0
},
"uiObject": {
"isRunning": false
},
"tutorial": {
"status": "Reset"
}
}
}
],
"tutorialTopics": [],
"id": "75373f58-ac05-4358-ad12-e50c88f08196",
"savedPayload": {
"position": {
"x": 19884.132034355964,
"y": 30722.117965644036
},
"targetPosition": {
"x": 19672,
"y": 30934.25
"x": 16727,
"y": 30922.25
},
"floatingObject": {
"isPinned": false,
@@ -2734,7 +2605,156 @@
"isRunning": false
},
"tutorial": {
"status": "Reset"
"status": "Done"
}
}
},
{
"type": "Tutorial Topic",
"name": "Submit Profile",
"config": "{\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"Next\"\n}",
"project": "Education",
"tutorialSteps": [
{
"type": "Tutorial Step",
"name": "Make it Official",
"config": "{\n \"icon\": {\n \"name\": \"Programs\\\\github-program\",\n \"project\": \"Governance\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Governance\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Make it Official\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": false,\n \"page\": {\n \"project\": \"Foundations\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - GitHub.com Authentication\"\n }\n },\n \"positionAtReferenceParent\": true\n}",
"project": "Education",
"id": "fe74b3ae-9490-465a-a491-db4b0834dbf7",
"savedPayload": {
"position": {
"x": 16939.132034355964,
"y": 30410.117965644036
},
"targetPosition": {
"x": 16939.132034355964,
"y": 30710.117965644036
},
"floatingObject": {
"isPinned": false,
"isFrozen": false,
"isCollapsed": false,
"angleToParent": 2,
"distanceToParent": 3,
"arrangementStyle": 0
},
"uiObject": {
"isRunning": false
},
"tutorial": {},
"referenceParent": {
"type": "Github API",
"name": "New Github API",
"id": "cbbb57f9-a9a0-4148-89a5-f820f40f56d3"
},
"referenceParentCombinedNodePath": [
[
"New APIs",
"APIs"
],
[
"New Github API",
"Github API"
]
]
}
},
{
"type": "Tutorial Step",
"name": "Infinity and Beyond",
"config": "{\n \"icon\": {\n \"name\": \"User\\\\user-profile\",\n \"project\": \"Governance\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Governance\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - To Infinity and Beyond\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": true,\n \"page\": {\n \"project\": \"Foundations\",\n \"category\": \"\",\n \"type\": \"\"\n }\n }\n}",
"project": "Education",
"id": "e4c5a34f-67c4-4fdc-8c11-aef5bde92d72",
"savedPayload": {
"position": {
"x": 17151.264068711927,
"y": 30497.985931288073
},
"targetPosition": {
"x": 16939.132034355964,
"y": 30710.117965644036
},
"floatingObject": {
"isPinned": false,
"isFrozen": false,
"isCollapsed": false,
"angleToParent": 2,
"distanceToParent": 3,
"arrangementStyle": 0
},
"uiObject": {
"isRunning": false
},
"tutorial": {
"status": "Done"
}
}
},
{
"type": "Tutorial Step",
"name": "Welcome aboard!",
"config": "{\n \"icon\": {\n \"name\": \"Announcement\\\\announcement\",\n \"project\": \"Foundations\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Governance\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Welcome aboard!\"\n },\n \"controlDocs\": {\n \"panel\": \"Close\",\n \"closeTutorialEditor\": false,\n \"page\": {\n \"project\": \"Foundations\",\n \"category\": \"\",\n \"type\": \"\"\n }\n },\n \"positionAtReferenceParent\": true\n}",
"project": "Education",
"id": "340f9107-9b4a-424b-94f2-79d65873c572",
"savedPayload": {
"position": {
"x": 17239.132034355964,
"y": 30710.117965644036
},
"targetPosition": {
"x": 16939.132034355964,
"y": 30710.117965644036
},
"floatingObject": {
"isPinned": false,
"isFrozen": false,
"isCollapsed": false,
"angleToParent": 2,
"distanceToParent": 3,
"arrangementStyle": 0
},
"uiObject": {
"isRunning": false
},
"tutorial": {},
"referenceParent": {
"type": "Tutorial",
"name": "Governance Program Walk Through Tutorial",
"id": "eb85fbbd-080f-41c6-91a8-c6b68195a74b"
},
"referenceParentCombinedNodePath": [
[
"Governance Program Walk Through Tutorial",
"Tutorial"
]
]
}
}
],
"tutorialTopics": [],
"id": "75373f58-ac05-4358-ad12-e50c88f08196",
"savedPayload": {
"position": {
"x": 16939.132034355964,
"y": 30710.117965644036
},
"targetPosition": {
"x": 16727,
"y": 30922.25
},
"floatingObject": {
"isPinned": false,
"isFrozen": false,
"isCollapsed": true,
"angleToParent": 1,
"distanceToParent": 3,
"arrangementStyle": 0
},
"uiObject": {
"isRunning": false
},
"tutorial": {
"status": "Done"
}
}
}
@@ -2742,12 +2762,12 @@
"id": "57e388d1-f479-4a16-af85-aee12be285a0",
"savedPayload": {
"position": {
"x": 19672,
"y": 30934.25
"x": 16727,
"y": 30922.25
},
"targetPosition": {
"x": 19672,
"y": 30934.25
"x": 16727,
"y": 30922.25
},
"floatingObject": {
"isPinned": false,
@@ -2766,30 +2786,256 @@
}
}
},
null,
{
"type": "APIs",
"name": "New APIs",
"project": "Foundations",
"id": "d9d1ab81-0cf6-4269-b4f1-ffe20566f239",
"type": "Tutorial",
"name": "Governance Program Walk Through Tutorial",
"config": "{\n \"icon\": {\n \"name\": \"Programs\\\\financial-programs\",\n \"project\": \"Governance\"\n },\n \"position\": \"Center\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Governance\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Into the Thick of It\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": false,\n \"page\": {\n \"project\": \"Foundations\",\n \"category\": \"\",\n \"type\": \"\"\n }\n }\n}",
"project": "Education",
"tutorialSteps": [
{
"type": "Tutorial Step",
"name": "Refer a Friend",
"config": "{\n \"icon\": {\n \"name\": \"Programs\\\\referral-program\",\n \"project\": \"Governance\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Governance\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Refer a Friend\"\n },\n \"controlDocs\": {\n \"panel\": \"Open\",\n \"closeTutorialEditor\": true,\n \"page\": {\n \"project\": \"Governance\",\n \"category\": \"Topic\",\n \"type\": \"Referral Program Overview\"\n }\n }\n}",
"project": "Education",
"id": "a3df7ac4-69e0-41b9-af1c-fd0087d26161",
"savedPayload": {
"position": {
"x": 21016,
"y": 30930.750000000004
},
"targetPosition": {
"x": 20716,
"y": 30930.750000000004
},
"floatingObject": {
"isPinned": false,
"isFrozen": false,
"isCollapsed": false,
"angleToParent": 1,
"distanceToParent": 3,
"arrangementStyle": 0
},
"uiObject": {
"isRunning": false
},
"tutorial": {
"status": "Done"
}
}
},
{
"type": "Tutorial Step",
"name": "A Thank You for Support",
"config": "{\n \"icon\": {\n \"name\": \"Programs\\\\support-program\",\n \"project\": \"Governance\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Governance\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - A Thank You for Support\"\n },\n \"controlDocs\": {\n \"panel\": \"Open\",\n \"closeTutorialEditor\": true,\n \"page\": {\n \"project\": \"Governance\",\n \"category\": \"Topic\",\n \"type\": \"Support Program Overview\"\n }\n }\n}",
"project": "Education",
"id": "dc20ebdc-6708-4fed-a75b-bade62d3ce0c",
"savedPayload": {
"position": {
"x": 20903.04694055762,
"y": 31165.299444740413
},
"targetPosition": {
"x": 20716,
"y": 30930.750000000004
},
"floatingObject": {
"isPinned": false,
"isFrozen": false,
"isCollapsed": false,
"angleToParent": 1,
"distanceToParent": 3,
"arrangementStyle": 0
},
"uiObject": {
"isRunning": false
},
"tutorial": {
"status": "Done"
}
}
},
{
"type": "Tutorial Step",
"name": "Find a Mentor",
"config": "{\n \"icon\": {\n \"name\": \"Programs\\\\mentorship-program\",\n \"project\": \"Governance\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Governance\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Find a Mentor\"\n },\n \"controlDocs\": {\n \"panel\": \"Open\",\n \"closeTutorialEditor\": true,\n \"page\": {\n \"project\": \"Governance\",\n \"category\": \"Topic\",\n \"type\": \"Mentorship Program Overview\"\n }\n }\n}",
"project": "Education",
"id": "258b83f3-200d-41d7-8288-81eec5da0ccf",
"savedPayload": {
"position": {
"x": 20649.243719813105,
"y": 31223.22837365455
},
"targetPosition": {
"x": 20716,
"y": 30930.750000000004
},
"floatingObject": {
"isPinned": false,
"isFrozen": false,
"isCollapsed": false,
"angleToParent": 1,
"distanceToParent": 3,
"arrangementStyle": 0
},
"uiObject": {
"isRunning": false
},
"tutorial": {
"status": "Done"
}
}
},
{
"type": "Tutorial Step",
"name": "Claim some Contributions",
"config": "{\n \"icon\": {\n \"name\": \"Programs\\\\claims-program\",\n \"project\": \"Governance\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Governance\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Claim some Contributions\"\n },\n \"controlDocs\": {\n \"panel\": \"Open\",\n \"closeTutorialEditor\": true,\n \"page\": {\n \"project\": \"Governance\",\n \"category\": \"Topic\",\n \"type\": \"Contribution Claims Program Overview\"\n }\n }\n}",
"project": "Education",
"id": "7301eace-be0a-45f8-9f8d-14afb7e9336a",
"savedPayload": {
"position": {
"x": 20445.709339629273,
"y": 31060.91512173527
},
"targetPosition": {
"x": 20716,
"y": 30930.750000000004
},
"floatingObject": {
"isPinned": false,
"isFrozen": false,
"isCollapsed": false,
"angleToParent": 1,
"distanceToParent": 3,
"arrangementStyle": 0
},
"uiObject": {
"isRunning": false
},
"tutorial": {
"status": "Done"
}
}
},
{
"type": "Tutorial Step",
"name": "Lend a Vote",
"config": "{\n \"icon\": {\n \"name\": \"Programs\\\\voting-program\",\n \"project\": \"Governance\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Governance\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Lend a Vote\"\n },\n \"controlDocs\": {\n \"panel\": \"Open\",\n \"closeTutorialEditor\": true,\n \"page\": {\n \"project\": \"Governance\",\n \"category\": \"Topic\",\n \"type\": \"Voting Program Overview\"\n }\n }\n}",
"project": "Education",
"id": "61b34c29-85ce-4b86-8a77-21f8e8888c35",
"savedPayload": {
"position": {
"x": 20445.709339629273,
"y": 30800.584878264737
},
"targetPosition": {
"x": 20716,
"y": 30930.750000000004
},
"floatingObject": {
"isPinned": false,
"isFrozen": false,
"isCollapsed": false,
"angleToParent": 1,
"distanceToParent": 3,
"arrangementStyle": 0
},
"uiObject": {
"isRunning": false
},
"tutorial": {
"status": "Done"
}
}
},
{
"type": "Tutorial Step",
"name": "Delegate some Power",
"config": "{\n \"icon\": {\n \"name\": \"Programs\\\\delegation-program\",\n \"project\": \"Governance\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Governance\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Delegate some Power\"\n },\n \"controlDocs\": {\n \"panel\": \"Open\",\n \"closeTutorialEditor\": true,\n \"page\": {\n \"project\": \"Governance\",\n \"category\": \"Topic\",\n \"type\": \"Delegation Program Overview\"\n }\n }\n}",
"project": "Education",
"id": "bb0b161f-af82-4b93-87a8-30ae6ace533c",
"savedPayload": {
"position": {
"x": 20649.243719813105,
"y": 30638.271626345457
},
"targetPosition": {
"x": 20716,
"y": 30930.750000000004
},
"floatingObject": {
"isPinned": false,
"isFrozen": false,
"isCollapsed": false,
"angleToParent": 1,
"distanceToParent": 3,
"arrangementStyle": 0
},
"uiObject": {
"isRunning": false
},
"tutorial": {
"status": "Done"
}
}
},
{
"type": "Tutorial Step",
"name": "Stake some Tokens",
"config": "{\n \"icon\": {\n \"name\": \"Programs\\\\staking-program\",\n \"project\": \"Governance\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Governance\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Stake some Tokens\"\n },\n \"controlDocs\": {\n \"panel\": \"Open\",\n \"closeTutorialEditor\": true,\n \"page\": {\n \"project\": \"Governance\",\n \"category\": \"Topic\",\n \"type\": \"Staking Program Overview\"\n }\n }\n}",
"project": "Education",
"id": "507fc893-7a06-4bba-ba23-fb7125aa2017",
"savedPayload": {
"position": {
"x": 20903.04694055762,
"y": 30696.200555259595
},
"targetPosition": {
"x": 20716,
"y": 30930.750000000004
},
"floatingObject": {
"isPinned": false,
"isFrozen": false,
"isCollapsed": false,
"angleToParent": 1,
"distanceToParent": 3,
"arrangementStyle": 0
},
"uiObject": {
"isRunning": false
},
"tutorial": {
"status": "Done"
}
}
}
],
"tutorialTopics": [],
"id": "eb85fbbd-080f-41c6-91a8-c6b68195a74b",
"savedPayload": {
"position": {
"x": 30283.083333333336,
"y": 10760.951150794494
"x": 20716,
"y": 30930.750000000004
},
"targetPosition": {
"x": 30283.083333333336,
"y": 10760.951150794494
"x": 20716,
"y": 30930.750000000004
},
"floatingObject": {
"isPinned": false,
"isFrozen": false,
"isCollapsed": false,
"isCollapsed": true,
"angleToParent": 1,
"distanceToParent": 3,
"arrangementStyle": 0
"arrangementStyle": 1
},
"uiObject": {
"isPlaying": false,
"isRunning": false
},
"tutorial": {
"status": "Done"
}
}
}
@@ -1,8 +1,8 @@
{
"type": "Governance Address",
"definition": {
"text": "Your Governance Address is a Superalgos SA Token address generated from within Superalgos, using the Profile Constructor. The tokens you hold in this address confer you Token Power, that you may use from within your User Profile to participate in governance.",
"updated": 1624722123314
"text": "Your Governance Address is a Superalgos SA Token address generated from within Superalgos, using the Profile Constructor. The tokens you hold in this address confer you Token Power which you may use from within your User Profile to participate in governance.",
"updated": 1630083503097
},
"paragraphs": [
{
@@ -12,7 +12,8 @@
},
{
"style": "Callout",
"text": "Your Governance Address is a Superalgos SA Token address generated from within Superalgos, using the Profile Constructor. The tokens you hold in this address confer you Token Power, that you may use from within your User Profile to participate in governance."
"text": "Your Governance Address is a Superalgos SA Token address generated from within Superalgos, using the Profile Constructor. The tokens you hold in this address confer you Token Power which you may use from within your User Profile to participate in governance.",
"updated": 1630083498247
}
]
}
@@ -0,0 +1,13 @@
{
"type": "Reputation Power",
"definition": {
"text": "Reputation Power is added to the Token Power you direct into the Voting Program to increase your Voting Power. Reputation power comes from the Reputation in your Governance Address.",
"updated": 1630065079427
},
"paragraphs": [
{
"style": "Text",
"text": "Right click and Edit to enter edit mode and change this text. ENTER to write new paragraphs. ESC to exit edit mode. Then you can use docs.save to save your changes and app.contribute to send it to the main repository."
}
]
}
@@ -0,0 +1,86 @@
{
"type": "Reputation",
"definition": {
"text": "The tokens you earn when contributing to the project determine your reputation. You may leverage reputation to increase your Voting Power! ",
"updated": 1630061607470
},
"paragraphs": [
{
"style": "Text",
"text": "Only the tokens you get for contributing to the project grant you reputation. Reputation is not transferable, so the tokens you acquire by any other means (buying, swapping, borrowing, trading, etc.) do not carry a reputation value."
},
{
"style": "Title",
"text": "The Utility of Reputation"
},
{
"style": "Text",
"text": "Superalgos SA Tokens in your Governance Address determine the Token Power you may use throughout the Governance System."
},
{
"style": "Text",
"text": "Your reputation grants you Reputation Power, which is added to the Token Power you direct into the Voting Program. That is, reputation augments your Voting Power."
},
{
"style": "Callout",
"text": "Reputation may only be leveraged within the Voting Program. The rationale behind this is that Superalgos wishes contributors to have a bigger voice in the direction of development, but not an advantage to participate in financial programs or any other program for that matter."
},
{
"style": "Title",
"text": "How Reputation is Determined"
},
{
"style": "Text",
"text": "The way the system determines the reputation in your User Profile is by checking how many tokens your Governance Address ever got from the Treasury Account."
},
{
"style": "Callout",
"text": "A Governance Address holds as much reputation as tokens it may have received from the Treasury Account, or as tokens it may currently have in its balance, whichever is the lesser."
},
{
"style": "Text",
"text": "Let's unpack the above statement with an example.",
"updated": 1630089275940
},
{
"style": "List",
"text": "Let's say you contributed fixing a bug and you got 1,000 SA Tokens for your contribution in the latest distribution event. You now have 1,000 SA Tokens in your Governance Address. Because all of the tokens came from the Treasury Account, your reputation is equal to 1,000."
},
{
"style": "List",
"text": "Now, let's assume you send 100 SA Tokens to a friend to get him interested in the project and sell another 400 SA Tokens in the market."
},
{
"style": "List",
"text": "Your Governance Address now has 500 SA Tokens in the balance, so your reputation is now 500. Notice that the total number of SA Tokens you ever got from the Treasury Account is still 1,000, but because you decided to part with some of them, your reputation is now indicated by the balance of your Governance Address, which is lesser.",
"updated": 1630064707717
},
{
"style": "List",
"text": "Imagine your friend comes to Superalgos and uses his existing address with the 100 SA Tokens you sent him to set up his User Profile. Because those 100 Tokens did not come from the Treasury Account, his Governance Address features 0 reputation, despite his balance is 100. In this case, the number of tokens the address got from the Treasury Account is lesser than the number of tokens in the balance."
},
{
"style": "List",
"text": "Let's close the circle. Let's say you go to the market and buy 1,000 SA Tokens and send them to your Governance Address. The balance is now 1,500 SA Tokens, but because you only ever got 1,000 from the Treasury Account, your reputation is back to 1,000.",
"updated": 1630064784130
},
{
"style": "Title",
"text": "The Rationale"
},
{
"style": "Text",
"text": "Superalgos values contributions above everything else, that is why only contributors acquire reputation."
},
{
"style": "Note",
"text": "Once you have contributed to Superalgos, you should always be able to leverage your reputation in Governance. However, if you divest your Superalgos SA Token holdings, that is, if you remove some skin from the game, then your reputation will go down too. That said, you can always get your reputation back by putting skin back in the game.",
"updated": 1630089391699
},
{
"style": "Text",
"text": "That is the game theory behind the reputation system.",
"updated": 1630064881383
}
]
}
@@ -0,0 +1,26 @@
{
"type": "Reusable Governance Snippets",
"definition": {
"text": "A collection of reusable snippets of text to be reused within the Governance Project.",
"updated": 1630091213561
},
"paragraphs": [
{
"style": "Block",
"text": "Computational Limitations",
"updated": 1630091226791
},
{
"style": "Title",
"text": "Computational Limitations"
},
{
"style": "Note",
"text": "The governance system does all calculations dynamically, in real-time, with every change in the definitions, and computes all the hierarchies loaded in the Current Workspace."
},
{
"style": "Important",
"text": "The above means that the calculations that you see from within any given Workspace is a partial calculation within the scope of the Current Workspace only. Definitions, claims, votes, and so on, existing on other workspaces or plugins are not computed."
}
]
}
@@ -0,0 +1,24 @@
{
"type": "Treasury Account",
"definition": {
"text": "The Treasury Account is the address or addresses the Superalgos Project uses to hold the tokens that are yet to be distributed.",
"updated": 1630065643067
},
"paragraphs": [
{
"style": "Text",
"text": "In the current deployment of the Superalgos SA Token in the Binance Smart Chain (BSC) the Treasury Account is:",
"updated": 1630065743586
},
{
"style": "Json",
"text": "0x8d4d2557ce99f83f658adf61eef3e61e04c2ac2c",
"updated": 1630065789468
},
{
"style": "Link",
"text": "Browse the Treasury Acount on BSCScan!->bscscan.com/token/0xfb981ed9a92377ca4d75d924b9ca06df163924fd?a=0x8d4d2557ce99f83f658adf61eef3e61e04c2ac2c",
"updated": 1630065914276
}
]
}
@@ -0,0 +1,13 @@
{
"type": "User Profile Votes",
"definition": {
"text": "You may use User Profile Votes to delegate Voting Power to other users.",
"updated": 1630055800416
},
"paragraphs": [
{
"style": "Text",
"text": "Right click and Edit to enter edit mode and change this text. ENTER to write new paragraphs. ESC to exit edit mode. Then you can use docs.save to save your changes and app.contribute to send it to the main repository."
}
]
}
@@ -1,8 +1,8 @@
{
"type": "Claims Program",
"definition": {
"text": "This node helps define the section of the User Profile hierarchy that is going to be used to define the claims users make for the contributions they have done. These claims need later to be voted by other users in order to be considered during the token distribution process.",
"updated": 1629702697773
"text": "This node helps define the section of the User Profile hierarchy used to define the claims users make for the contributions they have done. Other users may vote for this claims so that they are computed during the token distribution process.",
"updated": 1630056746833
},
"paragraphs": [
{
@@ -0,0 +1,13 @@
{
"type": "Financial Programs",
"definition": {
"text": "Use this node to spawn the Staking Program and the Delegation Program.",
"updated": 1630056638318
},
"paragraphs": [
{
"style": "Text",
"text": "Right click and select the pencil button to enter edit mode."
}
]
}
@@ -0,0 +1,18 @@
{
"type": "Governance Project",
"definition": {
"text": "The Governance Project is the section of the Superalgos Platform that enables the distributed governance of the Superalgos Project.",
"updated": 1630067351210
},
"paragraphs": [
{
"style": "Text",
"text": "Use this hierarchy to spawn project definition hierarchies such as the Pools, Positions, Features and Assets Hierarchies.",
"updated": 1630067423070
},
{
"style": "Text",
"text": "This is also where you find the option to spawn the Profile Constructor node."
}
]
}
@@ -0,0 +1,13 @@
{
"type": "Influencer Program",
"definition": {
"text": "The Influencers Program is currently unavailable. It will be implemented at a later stage. Driving Token Power into this program has no effect, so you may as well use it somewhere else.",
"updated": 1630089551098
},
"paragraphs": [
{
"style": "Text",
"text": "Right click and select the pencil button to enter edit mode."
}
]
}
@@ -0,0 +1,13 @@
{
"type": "Onboarding Programs",
"definition": {
"text": "These programs incentivize Superalgos users to take the first couple of steps to participate in governance and start giving back to the project. They make earning the first few tokens a breeze and allow every user to become invested!",
"updated": 1630056526452
},
"paragraphs": [
{
"style": "Text",
"text": "Right click and select the pencil button to enter edit mode."
}
]
}
@@ -52,7 +52,7 @@
"text": "each hierarchy may be better visualized in different workspaces in which they may interact with other definitions; etc."
},
{
"style": "Subtitle",
"style": "Title",
"text": "Superalgos Pools"
},
{
@@ -64,7 +64,7 @@
"text": "Many of the Pool nodes defined in this hierarchy link to further definitions on other hierarchies. "
},
{
"style": "Text",
"style": "Note",
"text": "The configuration of the top-level node in the hierarchy determines how many tokens will be distributed in the release."
},
{
@@ -0,0 +1,14 @@
{
"type": "Profile Constructor",
"definition": {
"text": "The Profile Constructor is a device used to build a User Profile.",
"updated": 1630067504742
},
"paragraphs": [
{
"style": "Text",
"text": "The use of the Profile Constructor is explained in the Creating Your User Profile Tutorial, and covered in the Building Your Profile page of the User Profile topic.",
"updated": 1630067647178
}
]
}
@@ -0,0 +1,14 @@
{
"type": "Tokens Mined",
"definition": {
"text": "The Tokens Mined node features the total number of tokens you will get, adding all Token Rewards and Tokens Bonus from the programs you participate in.",
"updated": 1630090191493
},
"paragraphs": [
{
"style": "Include",
"text": "Governance->Concept->Reusable Governance Snippets->Computational Limitations",
"updated": 1630091305104
}
]
}
@@ -12,12 +12,17 @@
},
{
"style": "Text",
"text": "As explained in the Building Your Profile page, your User Profile must be paired with your Governance Address. The tokens you send to this address confer you Token Power that you may use to influence how Superalgos distributes the tokens allocated to each release.",
"updated": 1624726114245
"text": "As explained in the Building Your Profile page, your User Profile is paired with your Governance Address. The tokens you hold in this address confer you Token Power that you may use to influence how Superalgos distributes the tokens allocated to each release.",
"updated": 1630091460767
},
{
"style": "Text",
"text": "After building your profile, you should see your Token Power flowing to the Token Switch node, the first offspring of the head of the hierarchy. This principle is maintained throughout the hierarchy: Token Power flows down to offsprings, through each section of the hierarchy."
"text": "After building your profile, you should see your Token Power flowing to the Token Power Switch node, the first offspring of the head of the hierarchy. This principle is maintained throughout the hierarchy: Token Power flows down to offspring nodes, through each section of the hierarchy.",
"updated": 1630094400877
},
{
"style": "Title",
"text": "Token Power Flow"
},
{
"style": "Text",
@@ -25,11 +30,13 @@
},
{
"style": "List",
"text": "By default, Token Power flows in equal proportion to each of the programs."
"text": "By default, Token Power flows in equal proportion to each direct offspring node.",
"updated": 1630093090611
},
{
"style": "List",
"text": "You may override the defaults by explicitly defining the percentage of the Token Power you wish to allocate to each program. If you define less than a total of 100%, then the remaining Token Power is distributed evenly across the programs for which there is no definition."
"text": "You may override the defaults by explicitly defining the percentage of the Token Power you wish to allocate to each offspring. If you define less than a total of 100%, then the remaining Token Power is distributed evenly across the offspring for which there is no definition.",
"updated": 1630093129825
},
{
"style": "Text",
@@ -40,6 +47,49 @@
"text": "{\n \"percentage\": 50\n}",
"updated": 1624726090541
},
{
"style": "Text",
"text": "For example, let's say you have 1,000 Token Power flowing into your Token Power Switch node. Let's say you spawn the Onboarding Programs, Community Building Programs, Votes and Claims Programs, and Financial Programs nodes.",
"updated": 1630094336717
},
{
"style": "Callout",
"text": "As soon as you deploy these four offspring of the Token Power Switch node, you will see that each of these nodes gets 25% of the Token Power by default.",
"updated": 1630094063741
},
{
"style": "Text",
"text": "But you wish to limit the Token Power flowing into the Onboarding Programs to zero, as those programs do not require Token Power. To do that, you set up the following in the Onboarding Programs node configuration:",
"updated": 1630093868178
},
{
"style": "Json",
"text": "{\n \"percentage\": 0\n}",
"updated": 1630093495369
},
{
"style": "Callout",
"text": "Once the configuration is in place, you will notice that the Onboarding Programs node shows 0% and 0 Token Power flowing into the node. You will also notice that the rest of the nodes are getting 33.33% of the Token Power each.",
"updated": 1630093693182
},
{
"style": "Text",
"text": "Now let's say you wish to use only 10% of your Token Power in the Onboarding Programs. So you set up the following config:"
},
{
"style": "Json",
"text": "{\n \"percentage\": 10\n}",
"updated": 1630093961107
},
{
"style": "Callout",
"text": "As a result, 10% of the Token Power flows into the Onboarding Programs, while the remaining nodes get 45% of the Token Power each.",
"updated": 1630094141031
},
{
"style": "Success",
"text": "The same logic applies to the flow of Token Power throughout the hierarchy!"
},
{
"style": "Block",
"text": "Configuration"
@@ -0,0 +1,13 @@
{
"type": "Votes And Claims Programs",
"definition": {
"text": "Use this node to spawn the Claims Program and the Voting Program.",
"updated": 1630056577950
},
"paragraphs": [
{
"style": "Text",
"text": "Right click and select the pencil button to enter edit mode."
}
]
}
@@ -9,8 +9,8 @@
"paragraphs": [
{
"style": "Text",
"text": "To participate in governance, community members leverage their Superalgos SA Token holdings, exerting influence proportional to their Token Power. The combined influence of all token holders participating in governance determines, among other things:",
"updated": 1624697450404
"text": "To participate in governance, community members leverage their Superalgos SA Token holdings, exerting influence proportional to their Token Power and their Reputation. The combined influence of all token holders participating in governance determines, among other things:",
"updated": 1630065456504
},
{
"style": "List",
@@ -62,14 +62,13 @@
"updated": 1629992750219
},
{
"style": "Note",
"text": "The system does all calculations dynamically, in real-time, with every change in the definitions, and computes all the hierarchies loaded in the Current Workspace.",
"updated": 1629992786999
"style": "Include",
"text": "Governance->Concept->Reusable Governance Snippets->Computational Limitations",
"updated": 1630091330176
},
{
"style": "Important",
"text": "The above means that the calculations that you see from within any given Workspace is a partial calculation within the scope of the Current Workspace only. Definitions, claims, votes, and so on, existing on other workspaces or plugins are not computed.",
"updated": 1629993191549
"style": "Block",
"text": "Transparency and Auditability"
},
{
"style": "Title",
@@ -22,7 +22,8 @@
},
{
"style": "List",
"text": "Profile Votes allow you to delegate your Voting Power to other users, so that people you trust may vote on topics you are not well versed on, using your power."
"text": "User Profile Votes allow you to delegate your Voting Power to other users, so that people you trust may vote on topics you are not well versed on, using your power.",
"updated": 1630055605861
},
{
"style": "Text",
@@ -9,8 +9,8 @@
"paragraphs": [
{
"style": "Text",
"text": "This is another feature with characteristics inspired in liquid democracy, and also plays an important societal function: new Contributors need Claims Power to place their first claims, but -- given that they are new to Superalgos -- they may hold no tokens. ",
"updated": 1624705768151
"text": "This is another feature with characteristics inspired in liquid democracy, and also plays an important societal function: new Contributors need Claims Power to place their first claims, but — given that they are new to Superalgos — they may hold no tokens.",
"updated": 1630056075583
},
{
"style": "Text",
@@ -14,7 +14,13 @@
},
{
"style": "Text",
"text": "You may participate in the Staking Program with the votes that you haven’t used for other purposes. All you need to do is establish a reference from the Staking Program node in your User Profile to the Staking Rewards Pool. You will get a number of Superalgos SA Tokens proportional to the Staking Power you direct to the pool."
"text": "You may participate in the Staking Program with the Token Power that you haven’t used for other purposes. All you need to do is spawn the program from within the Financials Program node and let some Token Power flow into it.",
"updated": 1630056267000
},
{
"style": "Success",
"text": "You will get a tokens from the Staking Rewards Pool proportional to the Staking Power you direct to the program.",
"updated": 1630056331489
}
]
}
@@ -3,26 +3,38 @@
"pageNumber": "1",
"type": "Building Your Profile",
"definition": {
"text": "Your Governance Address is a Superalgos SA Token address generated from within Superalgos, using the Profile Constructor. The tokens you hold in this address confer you Token Power, that you may use from within your User Profile to participate in governance.",
"updated": 1624722284024
"text": "Building your User Profile involves linking your Governance Address to your identity in Github.com, using the Profile Constructor. ",
"updated": 1630067747645
},
"paragraphs": [
{
"style": "Text",
"text": "This guide will get you up to speed in just a few minutes. This is what you’ll need:",
"updated": 1624721971524
"text": "This guide will get you up to speed in just a few minutes. This is what you’ll need (requirements):",
"updated": 1630066775182
},
{
"style": "List",
"text": "The latest version of Superalgos in the develop branch."
"text": "Up-to-date software: the latest version of the Superalgos Platform in the Develop branch.",
"updated": 1630067794445
},
{
"style": "List",
"text": "Trust Wallet, or any wallet that may import a Binance Smart Chain (BSC) private key."
"text": "Prior knowledge: a basic understanding of how the Superalgos Platform works. If you haven't yet, make sure you do the tutorials in the Getting Started Tutorials Plugin Workspace before diving into the Governance Project.",
"updated": 1630067826681
},
{
"style": "List",
"text": "Your GitHub.com username."
"text": "Identity: your GitHub.com username.",
"updated": 1630066924264
},
{
"style": "List",
"text": "Optional: Trust Wallet, or any wallet that may import a Binance Smart Chain (BSC) private key."
},
{
"style": "Success",
"text": "The process described below is covered, step by step, in the Creating Your User Profile Tutorial. Doing the tutorial is highly recommended. If you do, then you do not need to follow the below instructions.",
"updated": 1630067119898
},
{
"style": "Title",
@@ -34,60 +46,63 @@
},
{
"style": "Text",
"text": "You may start with this Plugin Workspace so that you may later interact with the top-level Superalgos Project definitions."
"text": "You may start with the Token Distribution Superalgos Plugin Workspace so that you may later interact with the top-level Superalgos Project definitions.",
"updated": 1630067911494
},
{
"style": "Subtitle",
"text": "2. Add User Profile and Profile Constructor"
"text": "2. Spawn and Configure the Profile Constructor",
"updated": 1630079965869
},
{
"style": "Text",
"text": "The Profile Constructor is the device you will use to link your Github.com identity with the BSC address where you hold or plan to hold your Superalgos SA Tokens. We call it your Governance Address.",
"updated": 1630080366604
},
{
"style": "Include",
"text": "Governance->Concept->Governance Address->Content"
},
{
"style": "Important",
"text": "Once you are done setting up the address, you need to back up your private key in whatever way you desire, and delete the Profile Constructor so that the private key is removed from the Workspace. No worries… I’ll remind you of all this when the time comes."
},
{
"style": "List",
"text": "Go to the Governance Project hierarchy and select Add User Profile on the menu. "
"text": "Go to the Governance Project hierarchy and select Add Profile Constructor on the menu.",
"updated": 1630079909997
},
{
"style": "List",
"text": "Needless to say, the User Profile is your profile. Name it with your GitHub.com username, your real name, or any pseudonymous name you may wish to identify with."
"text": "Access the configuration and enter your GitHub.com username.",
"updated": 1630080009714
},
{
"style": "List",
"text": "If you already have a Superalgos SA Token address, you may enter the associated mnemonic phrase to verify the ownership of the address. If you don't have an address, leave the mnemonic property empty so that the Profile Constructor creates a new address for you.",
"updated": 1630080154442
},
{
"style": "List",
"text": "Go ahead and select Add Profile Constructor too."
},
{
"style": "Text",
"text": "The Profile Constructor is the device you will use to set up the BSC address you will use to feed your profile with Token Power from your Superalgos SA Token holdings. This means that you will not be able to use your existing addresses, but will create a new one. We call it your Governance Address."
},
{
"style": "Include",
"text": "Governance->Concept->Governance Address->Content",
"updated": 1624722289979
},
{
"style": "Text",
"text": "Once you are done setting up the address, you need to back up your private key in whatever way you desire, and delete the Profile Constructor so that the private key is removed from the Workspace. No worries… I’ll remind you of all this when the time comes."
},
{
"style": "Subtitle",
"text": "3. Build Your Profile"
},
{
"style": "List",
"text": "Establish a reference from the Profile Constructor node to your User Profile node."
},
{
"style": "List",
"text": "Access the configuration of the Profile Constructor and enter your GitHub.com username."
},
{
"style": "Text",
"text": "The next step involves building the profile, but before you do so, let me explain what the process involves:"
},
{
"style": "List",
"text": "A BSC address and the corresponding private key will be generated. This is the BSC address you will use to interact with the governance system."
"text": "If you didn't enter a mnemonic, a BSC address and the corresponding private key will be generated.",
"updated": 1630080750557
},
{
"style": "List",
"text": "A cryptographic message with your GitHub.com username will be signed with the private key corresponding to the address just generated. This message will be stored in your User Profile so that we may authenticate it comes from you once you submit your profile as a plugin in the Governance Project."
"text": "A cryptographic message with your GitHub.com username will be signed with the private key corresponding to the address just generated or the mnemonic you entered. This message will be stored in your User Profile so that we may authenticate it comes from you once you submit your profile as a plugin in the Governance Project.",
"updated": 1630080772975
},
{
"style": "Text",
@@ -97,6 +112,25 @@
"style": "List",
"text": "Access the menu of the Profile Constructor and click the Build Profile option. Click again to confirm the operation."
},
{
"style": "Text",
"text": "That's it!",
"updated": 1630082601712
},
{
"style": "Note",
"text": "If you already have tokens in your Governance Address, you should see the Blockchain Power coming into your User Profile. It may take a minute or so for the system to get the data from the blockchain. If you have no tokens, then you will get zero Blockchain Power.",
"updated": 1630082879935
},
{
"style": "Png",
"text": "PNGs/Governance/Docs/building-profile/building-profile-07.png"
},
{
"style": "Title",
"text": "Check Your Configurations",
"updated": 1630082922435
},
{
"style": "Text",
"text": "Now, take a minute to check the configuration of the User Profile node. You should see a message similar to the one below:"
@@ -108,12 +142,28 @@
},
{
"style": "Text",
"text": "As explained earlier, this is how the governance system will know that this User Profile belongs to the private key that signed the message, which in turn belongs to the address that will hold the tokens that confer your profile with Token Power.",
"updated": 1624722409704
"text": "This is how the governance system will know that this User Profile belongs to the private key that signed the message, which in turn belongs to the address that will hold the tokens that confer your profile with Token Power.",
"updated": 1630080906578
},
{
"style": "Title",
"text": "Back-Up Your Keys",
"updated": 1630083527720
},
{
"style": "Text",
"text": "If you used a mnemonic to authenticate an existing address, you may safely disregard what comes next.",
"updated": 1630083542691
},
{
"style": "Warning",
"text": "This is the most important part of this guide! You must back up your private key! Later on, you will move Superalgos SA Tokens to the address you just generated, so, before you do that, you must safely store the private key that you will use to access the address. At this point, Superalgos doesn’t offer a built-in solution to securely back up your private keys. All the system does at this point is generate a BSC address / private key pair and deliver it in the configuration of the Profile Constructor node. It is up to you to decide how you are going to handle this sensitive information."
"text": "This is very important! If you chose to generate a new address, you must back up your private key! Later on, you will hold Superalgos SA Tokens in this address. Before you do that, you must safely store the private key that you will use to access the address.",
"updated": 1630083582536
},
{
"style": "Important",
"text": "At this point, Superalgos doesn’t offer a built-in solution to securely back up your private keys. All the system does at this point is create a BSC address / private key pair and deliver it in the configuration of the Profile Constructor node. It is up to you to decide how you are going to handle this sensitive information.",
"updated": 1630083613308
},
{
"style": "Text",
@@ -129,18 +179,29 @@
"text": ""
},
{
"style": "Warning",
"text": "Once you are satisfied with your backup of the private key, delete the Profile Constructor node! It is not safe to store your private key at the Workspace, as you may accidentally submit it to GitHub.com with one of your contributions. Also, remember that workspaces are saved on disk as unencrypted JSON files, with no security whatsoever.",
"updated": 1624722590003
"style": "Title",
"text": "Delete the Constructor",
"updated": 1630083196550
},
{
"style": "Subtitle",
"text": "4. Import Private Key in a Wallet"
"style": "Warning",
"text": "Once you are satisfied with your backup of the private key, or if you used a mnemonic of an existing address, you must delete the Profile Constructor node! It is not safe to store your private key at the Workspace, as you may accidentally submit it to GitHub.com with one of your contributions. Also, remember that workspaces are saved on disk as unencrypted JSON files, with no security whatsoever.",
"updated": 1630083271674
},
{
"style": "Title",
"text": "Import Private Key in a Wallet",
"updated": 1630083092448
},
{
"style": "Text",
"text": "This step is not required for interacting with governance, however, we’ll cover it as you most likely will want to do it at some point, and it is recommended anyway, even if not strictly necessary."
},
{
"style": "Note",
"text": "This step is relevant only if you created a new BSC address. If instead, you entered the mnemonic of an existing address, then you may safely skip this part.",
"updated": 1630083638851
},
{
"style": "Text",
"text": "The idea is to import the address / private key you just created into a functional hardware or software wallet, so that you may control the tokens you will eventually send to this address."
@@ -205,8 +266,8 @@
},
{
"style": "Note",
"text": "We have no images of the previous and the next few screens are Trust Wallet won't allow capturing these pages.",
"updated": 1624724274610
"text": "We have no images of the previous and the next few screens as Trust Wallet won't allow capturing these pages.",
"updated": 1630082470933
},
{
"style": "List",
@@ -224,47 +285,6 @@
"style": "Png",
"text": "PNGs/Governance/Docs/building-profile/building-profile-06.png",
"updated": 1624724788900
},
{
"style": "Subtitle",
"text": "5. Move Funds to the Address"
},
{
"style": "Text",
"text": "You’re almost ready to move some Superalgos SA Tokens to your new address. Before you do that it’s a good idea to configure the Superalgos SA Token first."
},
{
"style": "Text",
"text": "If you don’t know how to do that, follow the instructions in this Medium article:"
},
{
"style": "Link",
"text": "How to Configure the Superalgos SA Token in Trust Wallet->medium.com/superalgos/how-to-configure-the-superalgos-sa-token-in-trust-wallet-5cfc63800447"
},
{
"style": "Text",
"text": "For your convenience, this is the Superalgos SA Token BSC contract:"
},
{
"style": "Json",
"text": "0xfb981ed9a92377ca4d75d924b9ca06df163924fd"
},
{
"style": "List",
"text": "When you’re ready, send a few Superalgos SA Tokens to your new address."
},
{
"style": "List",
"text": "Once the tokens arrive, refresh the browser tab running Superalgos."
},
{
"style": "List",
"text": "Expand your User Profile node. You should see the same number of tokens you sent to your new address as Token Power on top of the dotted line connecting to the Token Switch node. This is the total Token Power that you may use to influence the governance of Superalgos."
},
{
"style": "Png",
"text": "PNGs/Governance/Docs/building-profile/building-profile-07.png",
"updated": 1624725097347
}
]
}
@@ -17,9 +17,9 @@
"updated": 1629984765258
},
{
"style": "List",
"text": "You will find guides to do that here: Building Your Profile",
"updated": 1629585521857
"style": "Note",
"text": "You will find guides for how to do this under the Building Your Profile topic in the docs.",
"updated": 1630009326066
},
{
"style": "Text",
@@ -0,0 +1,14 @@
{
"tutorial": "Governance Program Walk Through Tutorial",
"pageNumber": 1,
"type": "Into the Thick of It",
"definition": {
"text": "Write a summary for this tutorial page."
},
"paragraphs": [
{
"style": "Text",
"text": "Right click and Edit to enter edit mode and change this text. ENTER to write new paragraphs. ESC to exit edit mode. Then you can use docs.save to save your changes and app.contribute to send it to the main repository."
}
]
}
@@ -0,0 +1,30 @@
{
"tutorial": "Governance Program Walk Through Tutorial",
"pageNumber": 2,
"type": "Tutorial Step - Into the Thick of It",
"definition": {
"text": "Now that you have a working profile, it's time to dive into the real governance of Superalgos!",
"updated": 1630009993777,
"icon": {
"name": "Programs\\financial-programs",
"project": "Governance"
}
},
"paragraphs": [
{
"style": "Text",
"text": "I will walk you through all the main programs and help you get aquainted with the way they work. ",
"updated": 1630010162848
},
{
"style": "Success",
"text": "The Governance system is a living part of our collaboration so there will always be something new to check out! ",
"updated": 1630010228910
},
{
"style": "Text",
"text": "Each program aims to foster valuable types of user interaction and contribution from mentoring new users to contributing code. So let's dive in!",
"updated": 1630010267953
}
]
}
@@ -0,0 +1,20 @@
{
"tutorial": "Governance Program Walk Through Tutorial",
"pageNumber": 3,
"type": "Tutorial Step - Refer a Friend",
"definition": {
"text": "Helping people you know find Superalgos is an important way to speed the mass adoption of Superalgos!",
"icon": {
"name": "Programs\\referral-program",
"project": "Governance"
},
"updated": 1630011972702
},
"paragraphs": [
{
"style": "Callout",
"text": "Read the following Docs page to get an idea of how this program works.",
"updated": 1630011916068
}
]
}
@@ -0,0 +1,20 @@
{
"tutorial": "Governance Program Walk Through Tutorial",
"pageNumber": 4,
"type": "Tutorial Step - A Thank You for Support",
"definition": {
"text": "Superalgos support is given by other Superalgos users just like you. This program lets you tell them Thank You!",
"icon": {
"name": "Programs\\support-program",
"project": "Governance"
},
"updated": 1630012220466
},
"paragraphs": [
{
"style": "Callout",
"text": "Read the following Docs page to get an idea of how this program works.",
"updated": 1630011987218
}
]
}
@@ -0,0 +1,20 @@
{
"tutorial": "Governance Program Walk Through Tutorial",
"pageNumber": 5,
"type": "Tutorial Step - Find a Mentor",
"definition": {
"text": "Mentoring users is an important part of strengthening the community!",
"icon": {
"name": "Programs\\mentorship-program",
"project": "Governance"
},
"updated": 1630012185029
},
"paragraphs": [
{
"style": "Callout",
"text": "Read the following Docs page to get an idea of how this program works.",
"updated": 1630011996028
}
]
}
@@ -0,0 +1,20 @@
{
"tutorial": "Governance Program Walk Through Tutorial",
"pageNumber": 6,
"type": "Tutorial Step - Claim some Contributions",
"definition": {
"text": "You are in charge of claiming the work you have put in to Superalgos.",
"icon": {
"name": "Programs\\claims-program",
"project": "Governance"
},
"updated": 1630012157111
},
"paragraphs": [
{
"style": "Callout",
"text": "Read the following Docs page to get an idea of how this program works.",
"updated": 1630012004228
}
]
}
@@ -0,0 +1,20 @@
{
"tutorial": "Governance Program Walk Through Tutorial",
"pageNumber": 7,
"type": "Tutorial Step - Lend a Vote",
"definition": {
"text": "Each user helps decide how tokens will distributed.",
"icon": {
"name": "Programs\\voting-program",
"project": "Governance"
},
"updated": 1630012134952
},
"paragraphs": [
{
"style": "Callout",
"text": "Read the following Docs page to get an idea of how this program works.",
"updated": 1630012013221
}
]
}
@@ -0,0 +1,20 @@
{
"tutorial": "Governance Program Walk Through Tutorial",
"pageNumber": 8,
"type": "Tutorial Step - Delegate some Power",
"definition": {
"text": "Helping new users join in governance is the ultimate act of open collaboration!",
"icon": {
"name": "Programs\\delegation-program",
"project": "Governance"
},
"updated": 1630012095620
},
"paragraphs": [
{
"style": "Callout",
"text": "Read the following Docs page to get an idea of how this program works.",
"updated": 1630012020882
}
]
}
@@ -0,0 +1,20 @@
{
"tutorial": "Governance Program Walk Through Tutorial",
"pageNumber": 9,
"type": "Tutorial Step - Stake some Tokens",
"definition": {
"text": "If you want to put some tokens to work without doing anything you can simply stake them.",
"icon": {
"name": "Programs\\staking-program",
"project": "Governance"
},
"updated": 1630012064453
},
"paragraphs": [
{
"style": "Callout",
"text": "Read the following Docs page to get an idea of how this program works.",
"updated": 1630012030833
}
]
}
+2
View File
@@ -33,7 +33,9 @@ let nodeModulesDirs = [
path.join( process.cwd(), "Projects", "Foundations", "TS", "Bot-Modules", "Trading-Bot", "Announcements"),
path.join( process.cwd(), "Projects", "Foundations", "TS", "Bot-Modules", "Trading-Bot", "Low-Frequency-Trading", "APIs"),
path.join( process.cwd(), "Projects", "Foundations", "TS", "Task-Modules"),
/* Aug-27-21 - TensorFlow dependency integration undergoing modifications. Should be resolved within a day or two:
path.join( process.cwd(), "Projects", "TensorFlow", "TS", "Bot-Modules", "Learning-Bot", "Low-Frequency-Learning")
*/
];
console.log('');