Skip to content

Commit

Permalink
initial commit for dex ecosystem
Browse files Browse the repository at this point in the history
  • Loading branch information
ssplatt committed Jan 24, 2022
1 parent 80af2b6 commit bad86c6
Showing 37 changed files with 2,093 additions and 43 deletions.
11 changes: 11 additions & 0 deletions Platform/Client/httpInterface.js
Original file line number Diff line number Diff line change
@@ -251,6 +251,17 @@ exports.newHttpInterface = function newHttpInterface() {
}
}
break
case 'DEX':
SA.projects.foundations.utilities.httpRequests.getRequestBodyAsync(httpRequest, httpResponse)
.then(body => {
let config = JSON.parse(body)
//stuff
console.log(config)
})
.catch (err => {
console.error(err)
})
break
case 'Social-Bots':
switch (requestPath[2]) {
case 'Discord-Test-Message':
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
{
"type": "Decentralized Exchange",
"menuItems": [
{
"action": "Configure This",
"actionFunction": "uiObject.configEditor.activate",
"label": "Configure",
"iconPathOn": "configuration",
"iconPathOff": "configuration"
},
{
"action": "Add UI Object",
"disableIfPropertyIsDefined": true,
"propertyToCheckFor": "swapPairs",
"label": "Add Swap Pairs",
"relatedUiObject": "Swap Pairs",
"actionFunction": "payload.executeAction",
"actionProject": "Visual-Scripting",
"relatedUiObjectProject": "Decentralized-Exchanges"
},
{
"action": "Add UI Object",
"disableIfPropertyIsDefined": true,
"propertyToCheckFor": "defiWallets",
"label": "Add DeFi Wallets",
"relatedUiObject": "DeFi Wallets",
"actionFunction": "payload.executeAction",
"actionProject": "Visual-Scripting",
"relatedUiObjectProject": "Decentralized-Exchanges"
},
{
"action": "Delete UI Object",
"actionProject": "Visual-Scripting",
"askConfirmation": true,
"confirmationLabel": "Confirm to Delete",
"label": "Delete",
"iconPathOn": "delete-entity",
"iconPathOff": "delete-entity",
"actionFunction": "payload.executeAction"
}
],
"isTitleAllwaysVisible": true,
"addLeftIcons": true,
"level": 2,
"editors": {
"config": true
},
"initialValues": {
"config": "{\n\t\"codeName\": \"Type the name of the exchange\"\n}"
},
"attachingRules": {
"compatibleTypes": "->Crypto Exchanges->"
},
"propertyNameAtParent": "decentralizedExchanges",
"childrenNodesProperties": [
{
"name": "swapPairs",
"type": "node",
"childType": "Swap Pairs",
"autoAdd": true
},
{
"name": "defiWallets",
"type": "node",
"childType": "DeFi Wallets",
"autoAdd": true
}
],
"alternativeIcons": [
{
"codeName": "pancakeswap",
"iconName": "pancakeswap"
},
{
"codeName": "biswap",
"iconName": "biswap"
},
{
"codeName": "1inch",
"iconName": "1inch"
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
{
"type": "DeFi Wallet",
"menuItems": [
{
"action": "Add UI Object",
"disableIfPropertyIsDefined": true,
"propertyToCheckFor": "walletTokens",
"label": "Add Wallet Tokens",
"relatedUiObject": "Wallet Tokens",
"actionFunction": "payload.executeAction",
"actionProject": "Visual-Scripting",
"relatedUiObjectProject": "Decentralized-Exchanges"
},
{
"action": "Add UI Object",
"disableIfPropertyIsDefined": true,
"propertyToCheckFor": "walletSecrets",
"label": "Add Wallet Secrets",
"relatedUiObject": "Wallet Secrets",
"actionFunction": "payload.executeAction",
"actionProject": "Visual-Scripting",
"relatedUiObjectProject": "Decentralized-Exchanges"
},
{
"action": "Delete UI Object",
"actionProject": "Visual-Scripting",
"askConfirmation": true,
"confirmationLabel": "Confirm to Delete",
"label": "Delete",
"iconPathOn": "delete-entity",
"iconPathOff": "delete-entity",
"actionFunction": "payload.executeAction"
}
],
"addLeftIcons": true,
"level": 3,
"attachingRules": {
"compatibleTypes": "->DeFi Wallets->"
},
"propertyNameAtParent": "defiWallets",
"childrenNodesProperties": [
{
"name": "walletTokens",
"type": "node",
"childType": "Wallet Tokens",
"autoAdd": true
},
{
"name": "walletSecrets",
"type": "node",
"childType": "Wallet Secrets",
"autoAdd": true
}
],
"isPersonalData": true
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
"type": "DeFi Wallets",
"menuItems": [
{
"action": "Add UI Object",
"label": "Add DeFi Wallet",
"relatedUiObject": "DeFi Wallet",
"actionFunction": "payload.executeAction",
"actionProject": "Visual-Scripting",
"relatedUiObjectProject": "Decentralized-Exchanges"
},
{
"action": "Delete UI Object",
"actionProject": "Visual-Scripting",
"askConfirmation": true,
"confirmationLabel": "Confirm to Delete",
"label": "Delete",
"iconPathOn": "delete-entity",
"iconPathOff": "delete-entity",
"actionFunction": "payload.executeAction"
}
],
"addLeftIcons": true,
"level": 3,
"attachingRules": {
"compatibleTypes": "->Decentralized Exchange->"
},
"propertyNameAtParent": "defiWallets",
"childrenNodesProperties": [
{
"name": "defiWallets",
"type": "array",
"childType": "DeFi Wallet",
"autoAdd": true
}
],
"isPersonalData": true
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"type": "Pair Token In",
"menuItems": [
{
"action": "Delete UI Object",
"actionProject": "Visual-Scripting",
"askConfirmation": true,
"confirmationLabel": "Confirm to Delete",
"label": "Delete",
"iconPathOn": "delete-entity",
"iconPathOff": "delete-entity",
"actionFunction": "payload.executeAction"
}
],
"isTitleAllwaysVisible": true,
"addLeftIcons": true,
"level": 3,
"referencingRules": {
"compatibleTypes": "->Wallet Token->"
},
"attachingRules": {
"compatibleTypes": "->Pair->"
},
"alternativeIcons": "Use Reference Parent",
"title": [
"Use Reference Parent"
],
"propertyNameAtParent": "tokenIn"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"type": "Pair Token Out",
"menuItems": [
{
"action": "Delete UI Object",
"actionProject": "Visual-Scripting",
"askConfirmation": true,
"confirmationLabel": "Confirm to Delete",
"label": "Delete",
"iconPathOn": "delete-entity",
"iconPathOff": "delete-entity",
"actionFunction": "payload.executeAction"
}
],
"isTitleAllwaysVisible": true,
"addLeftIcons": true,
"level": 3,
"referencingRules": {
"compatibleTypes": "->Wallet Token->"
},
"attachingRules": {
"compatibleTypes": "->Pair->"
},
"alternativeIcons": "Use Reference Parent",
"title": [
"Use Reference Parent"
],
"propertyNameAtParent": "tokenOut"
}
89 changes: 89 additions & 0 deletions Projects/Decentralized-Exchanges/Schemas/App-Schema/pair.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
{
"type": "Pair",
"menuItems": [
{
"action": "Configure",
"actionFunction": "uiObject.configEditor.activate",
"label": "Configure",
"iconPathOn": "configuration",
"iconPathOff": "configuration"
},
{
"action": "Add UI Object",
"disableIfPropertyIsDefined": true,
"propertyToCheckFor": "tokenOut",
"label": "Add Token Out (Base Asset)",
"relatedUiObject": "Pair Token Out",
"actionFunction": "payload.executeAction",
"actionProject": "Visual-Scripting",
"relatedUiObjectProject": "Decentralized-Exchanges"
},
{
"action": "Add UI Object",
"disableIfPropertyIsDefined": true,
"propertyToCheckFor": "tokenIn",
"label": "Add Token In (Quoted Asset)",
"relatedUiObject": "Pair Token In",
"actionFunction": "payload.executeAction",
"actionProject": "Visual-Scripting",
"relatedUiObjectProject": "Decentralized-Exchanges"
},
{
"action": "Install Pair",
"label": "Install Pair (Market)",
"askConfirmation": true,
"confirmationLabel": "Confirm to Proceed",
"workDoneLabel": "Done",
"relatedUiObject": "Pair",
"actionFunction": "payload.executeAction",
"relatedUiObjectProject": "Decentralized-Exchanges"
},
{
"action": "Uninstall Pair",
"label": "Uninstall Pair (Market)",
"askConfirmation": true,
"confirmationLabel": "Confirm to Proceed",
"workDoneLabel": "Done",
"relatedUiObject": "Market",
"actionFunction": "payload.executeAction",
"relatedUiObjectProject": "Decentralized-Exchanges"
},
{
"action": "Delete UI Object",
"actionProject": "Visual-Scripting",
"askConfirmation": true,
"confirmationLabel": "Confirm to Delete",
"label": "Delete",
"iconPathOn": "delete-entity",
"iconPathOff": "delete-entity",
"actionFunction": "payload.executeAction"
}
],
"childrenNodesProperties": [
{
"name": "tokenOut",
"type": "node",
"childType": "Pair Token Out",
"autoAdd": true
},
{
"name": "tokenIn",
"type": "node",
"childType": "Pair Token In",
"autoAdd": true
}
],
"addLeftIcons": true,
"isTitleAllwaysVisible": true,
"level": 4,
"editors": {
"config": true
},
"initialValues": {
"config": "{ \n\"codeName\": \"Type_the_name_of_the_pair_or_market\"\n}"
},
"attachingRules": {
"compatibleTypes": "->Swap Pairs->"
},
"propertyNameAtParent": "pairs"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
{
"type": "Swap Pairs",
"menuItems": [
{
"action": "Add UI Object",
"label": "Add Pair",
"relatedUiObject": "Pair",
"actionFunction": "payload.executeAction",
"actionProject": "Visual-Scripting",
"relatedUiObjectProject": "Decentralized-Exchanges"
},
{
"action": "Add Missing Pairs",
"label": "Add Missing Pairs",
"askConfirmation": true,
"confirmationLabel": "Confirm to Proceed",
"workDoneLabel": "Request Sent",
"relatedUiObject": "Pairs",
"actionFunction": "payload.executeAction",
"relatedUiObjectProject": "Decentralized-Exchanges"
},
{
"action": "Delete UI Object",
"actionProject": "Visual-Scripting",
"askConfirmation": true,
"confirmationLabel": "Confirm to Delete",
"label": "Delete",
"iconPathOn": "delete-entity",
"iconPathOff": "delete-entity",
"actionFunction": "payload.executeAction"
}
],
"addLeftIcons": true,
"level": 3,
"attachingRules": {
"compatibleTypes": "->Decentralized Exchange->"
},
"propertyNameAtParent": "swapPairs",
"childrenNodesProperties": [
{
"name": "pairs",
"type": "array",
"childType": "Pairs"
}
]
}
Loading

0 comments on commit bad86c6

Please sign in to comment.