Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 0 additions & 30 deletions backend/packages/backend/src/constants/chainsDef.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,22 +47,6 @@ const chainsDef = {
symbol: "BNC",
decimals: 12,
},
moonriver: {
name: "Moonriver",
network: "moonriver",
ss58Format: 1285,
supportAssetTypes: [AssetTypes.EVM_ERC20],
symbol: "MOVR",
decimals: 18,
},
moonbeam: {
name: "Moonbeam",
network: "moonbeam",
ss58Format: 1284,
supportAssetTypes: [AssetTypes.EVM_ERC20],
symbol: "GLMR",
decimals: 18,
},
ethereum: {
name: "Ethereum",
network: "ethereum",
Expand Down Expand Up @@ -91,20 +75,6 @@ const chainsDef = {
symbol: "SDN",
decimals: 18,
},
centrifuge: {
name: "Centrifuge",
network: "centrifuge",
ss58Format: 36,
symbol: "CFG",
decimals: 18,
},
altair: {
name: "Altair",
network: "altair",
ss58Format: 136,
symbol: "AIR",
decimals: 18,
},
hydradx: {
name: "Hydradx",
network: "hydradx",
Expand Down
5 changes: 0 additions & 5 deletions backend/packages/backend/src/consts/networks.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,11 @@ const networks = Object.freeze({
karura: "karura",
kusama: "kusama",
polkadot: "polkadot",
moonriver: "moonriver",
moonbeam: "moonbeam",
acala: "acala",
astar: "astar",
astar_evm: "astar_evm",
darwinia: "darwinia",
shiden: "shiden",
altair: "altair",
hydradx: "hydradx",
hydration: "hydration",
ethereum: "ethereum",
Expand All @@ -23,8 +20,6 @@ const networks = Object.freeze({
});

const evmNetworks = [
networks.moonbeam,
networks.moonriver,
networks.ethereum,
networks.creditcoin_evm,
networks.astar_evm,
Expand Down
2 changes: 0 additions & 2 deletions backend/packages/backend/src/consts/token.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
const { networks } = require("./networks");
const tokens = Object.freeze({
RMRK: "RMRK",
KSM: "KSM",
DOT: "DOT",
KAR: "KAR",
Expand All @@ -10,7 +9,6 @@ const tokens = Object.freeze({
});

const tokenParentChain = Object.freeze({
[tokens.RMRK]: networks.statemine,
[tokens.KSM]: networks.kusama,
[tokens.DOT]: networks.polkadot,
[tokens.KAR]: networks.karura,
Expand Down
7 changes: 7 additions & 0 deletions backend/packages/backend/src/scripts/delete-chains.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,13 @@ const chainNetworks = [
"parallel",
"darwinia",
"litmus",
"interlay",
"kintsugi",
"centrifuge",
"basilisk",
"phala",
"moonbeam",
"moonriver",
];

if (!Array.isArray(chainNetworks) || chainNetworks.length === 0) {
Expand Down
3 changes: 0 additions & 3 deletions backend/packages/backend/src/scripts/init-chain-tokens.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,14 @@ const TokenType = {
};

const karuraTokens = [
{ symbol: "RMRK", decimals: 10, type: TokenType.ORML },
{ symbol: "KSM", decimals: 12, type: TokenType.ORML },
{ symbol: "ARIS", decimals: 8, type: TokenType.ORML },
{ symbol: "KINT", decimals: 12, type: TokenType.ORML },
{ symbol: "BNC", decimals: 12, type: TokenType.ORML },
{ symbol: "LKSM", decimals: 12, type: TokenType.ORML },
{ symbol: "taiKSM", decimals: 12, type: TokenType.ORML },
];

const bifrostTokens = [
{ symbol: "RMRK", decimals: 10, type: TokenType.ORML },
{ symbol: "KSM", decimals: 12, type: TokenType.ORML },
{ symbol: "KAR", decimals: 12, type: TokenType.ORML },
];
Expand Down
27 changes: 27 additions & 0 deletions backend/packages/backend/src/scripts/remove-moon-network.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
require("dotenv").config();

const { bifrostConfig } = require("./spaces/bifrost");
const { karuraConfig } = require("./spaces/karura");
const { kusamaConfig } = require("./spaces/kusama");
const { getSpaceCollection } = require("../mongo");

const spacesToUpdate = [bifrostConfig, karuraConfig, kusamaConfig];

async function main() {
const spaceCol = await getSpaceCollection();

for (const space of spacesToUpdate) {
await spaceCol.updateOne(
{ id: space.id },
{ $set: { networks: space.networks } },
{ upsert: true },
);
console.log(`Space "${space.id}" updated.`);
}
}

main()
.catch(console.error)
.finally(() => {
process.exit();
});
24 changes: 24 additions & 0 deletions backend/packages/backend/src/scripts/remove-rmrk-kint-tokens.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
require("dotenv").config();

const { getChainTokenCollection } = require("../mongo");

const tokensToRemove = [
{ chain: "karura", symbol: "RMRK" },
{ chain: "karura", symbol: "KINT" },
{ chain: "bifrost", symbol: "RMRK" },
];

async function main() {
const chainTokenCol = await getChainTokenCollection();

for (const { chain, symbol } of tokensToRemove) {
await chainTokenCol.deleteOne({ chain, symbol });
console.log(
`Deleted chain token record for chain="${chain}", symbol="${symbol}"`,
);
}
}

main()
.catch(console.error)
.finally(() => process.exit(0));
12 changes: 0 additions & 12 deletions backend/packages/backend/src/scripts/spaces/bifrost.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,18 +42,6 @@ const bifrostConfig = {
},
],
},
{
network: networks.moonriver,
assets: [
{
type: "erc20",
contract: "0xfffffffff075423be54811ecb478e911f22dde7d",
symbol: "BNC",
decimals: 12,
votingThreshold: "10000000000",
},
],
},
],
proposeThreshold: "1000000000000",
weightStrategy: [strategies.balanceOf, strategies.quadraticBalanceOf],
Expand Down
5 changes: 0 additions & 5 deletions backend/packages/backend/src/scripts/spaces/consts.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,6 @@ const statemintCommonConfig = {
ss58Format: 0,
};

const movrErc20CommonConfig = {
network: networks.moonriver,
};

const ethErc20CommonConfig = {
network: networks.ethereum,
};
Expand All @@ -36,6 +32,5 @@ module.exports = {
statemintCommonConfig,
networks,
strategies,
movrErc20CommonConfig,
ethErc20CommonConfig,
};
12 changes: 0 additions & 12 deletions backend/packages/backend/src/scripts/spaces/karura.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,18 +19,6 @@ const config = {
},
],
},
{
network: networks.moonriver,
assets: [
{
type: "erc20",
contract: "0xFfFFFFfF08220AD2E6e157f26eD8bD22A336A0A5",
symbol: "KAR",
decimals: 12,
votingThreshold: "10000000000",
},
],
},
{
network: networks.bifrost,
ss58Format: 0,
Expand Down
12 changes: 0 additions & 12 deletions backend/packages/backend/src/scripts/spaces/kusama.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,18 +54,6 @@ const config = {
},
],
},
{
network: networks.moonriver,
assets: [
{
type: "erc20",
contract: "0xFfFFfFff1FcaCBd218EDc0EbA20Fc2308C778080",
symbol: "KSM",
decimals: 12,
votingThreshold: "10000000000",
},
],
},
],
proposeThreshold: "10000000000",
weightStrategy: [strategies.balanceOf, strategies.quadraticBalanceOf],
Expand Down
3 changes: 0 additions & 3 deletions backend/packages/node-api/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,10 @@ ACA_ENDPOINTS=wss://acala-polkadot.api.onfinality.io/public-ws;wss://acala-rpc.d
RING_ENDPOINTS=wss://rpc.darwinia.network;wss://darwinia-rpc.dwellir.com
DARWINIA_ENDPOINTS=wss://rpc.darwinia.network;wss://darwinia-rpc.dwellir.com
SDN_ENDPOINTS=wss://rpc.shiden.astar.network;wss://shiden.api.onfinality.io/public-ws
AIR_ENDPOINTS=wss://fullnode.altair.centrifuge.io;wss://altair.api.onfinality.io/public-ws
HDX_ENDPOINTS=wss://rpc.hydradx.cloud;wss://hydradx-rpc.dwellir.com

# Creditcoin
CTC_ENDPOINTS=wss://rpc.mainnet.creditcoin.network/ws
MOVR_ENDPOINTS=wss://wss.api.moonriver.moonbeam.network;wss://moonriver.public.blastapi.io
GLMR_ENDPOINTS=wss://wss.api.moonbeam.network/;wss://moonbeam.public.blastapi.io

ASTR_ENDPOINTS=wss://astar.api.onfinality.io/public-ws

Expand Down
10 changes: 0 additions & 10 deletions backend/packages/node-api/src/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,8 @@ const chains = {
astarEvm: "astar_evm",
darwinia: "darwinia",
shiden: "shiden",
altair: "altair",
hydradx: "hydradx",
hydration: "hydration",
moonbeam: "moonbeam",
moonriver: "moonriver",
creditcoin: "creditcoin",
creditcoinNative: "creditcoin_native",
};
Expand All @@ -26,8 +23,6 @@ const twelveSecond = 12 * oneSecond;
const thirteenSecond = 13 * oneSecond;

const evmChains = Object.freeze({
moonriver: "moonriver",
moonbeam: "moonbeam",
ethereum: "ethereum",
creditcoin_evm: "creditcoin_evm",
astar_evm: "astar_evm",
Expand All @@ -44,21 +39,16 @@ const chainBlockTime = {
bifrost: twelveSecond,
[chains.acala]: twelveSecond,
[chains.darwinia]: sixSecond,
[chains.altair]: twelveSecond,
[chains.shiden]: twelveSecond,
[chains.hydradx]: twelveSecond,
[chains.hydration]: twelveSecond,
[evmChains.moonriver]: twelveSecond,
[evmChains.moonbeam]: twelveSecond,
[evmChains.ethereum]: thirteenSecond,
[evmChains.creditcoin_evm]: twelveSecond,
};

const symbols = {
RMRK: "RMRK",
KSM: "KSM",
ARIS: "ARIS",
KINT: "KINT",
KAR: "KAR",
BNC: "BNC",
LKSM: "LKSM",
Expand Down
3 changes: 0 additions & 3 deletions backend/packages/node-api/src/env/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,8 @@ const chainEndpointPrefixMap = {
[chains.astar]: "ASTR",
[chains.darwinia]: "RING",
[chains.shiden]: "SDN",
[chains.altair]: "AIR",
[chains.hydradx]: "HDX",
[chains.hydration]: "HDX",
[chains.moonbeam]: "GLMR",
[chains.moonriver]: "MOVR",
[chains.creditcoin]: "CTC",
[chains.creditcoinNative]: "CTC_CC3",
};
Expand Down

This file was deleted.

Loading
Loading