Skip to content

Commit

Permalink
remove equilibrium alphanet config
Browse files Browse the repository at this point in the history
  • Loading branch information
mmaurello committed Jan 16, 2024
1 parent 8635450 commit bd7a99b
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 152 deletions.
20 changes: 10 additions & 10 deletions packages/config/src/ConfigBuilder/ConfigBuilder.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
import { Ecosystem } from '@moonbeam-network/xcm-types';
import { ConfigService } from '../ConfigService';
import { dev } from '../assets';
import { equilibriumAlphanet, moonbaseAlpha } from '../chains';
import { equilibriumAlphanetConfig } from '../configs/equilibriumAlphanet';
import { moonbaseAlpha, pendulumAlphanet } from '../chains';
import { moonbaseAlphaConfig } from '../configs/moonbaseAlpha';
import { pendulumAlphanetConfig } from '../configs/pendulumAlphanet';
import { ConfigBuilder } from './ConfigBuilder';

describe('configBuilder', () => {
Expand All @@ -13,7 +13,7 @@ describe('configBuilder', () => {
.assets(Ecosystem.AlphanetRelay)
.asset(dev)
.source(moonbaseAlpha)
.destination(equilibriumAlphanet)
.destination(pendulumAlphanet)
.build();

expect(config).toStrictEqual({
Expand All @@ -22,12 +22,12 @@ describe('configBuilder', () => {
chain: moonbaseAlpha,
config: moonbaseAlphaConfig.getAssetDestinationConfig(
dev,
equilibriumAlphanet,
pendulumAlphanet,
),
},
destination: {
chain: equilibriumAlphanet,
config: equilibriumAlphanetConfig.getAssetDestinationConfig(
chain: pendulumAlphanet,
config: pendulumAlphanetConfig.getAssetDestinationConfig(
dev,
moonbaseAlpha,
),
Expand All @@ -41,7 +41,7 @@ describe('configBuilder', () => {
.assets(Ecosystem.AlphanetRelay)
.asset(dev)
.source(moonbaseAlpha)
.destination(equilibriumAlphanet)
.destination(pendulumAlphanet)
.build();

expect(config).toStrictEqual({
Expand All @@ -50,12 +50,12 @@ describe('configBuilder', () => {
chain: moonbaseAlpha,
config: moonbaseAlphaConfig.getAssetDestinationConfig(
dev,
equilibriumAlphanet,
pendulumAlphanet,
),
},
destination: {
chain: equilibriumAlphanet,
config: equilibriumAlphanetConfig.getAssetDestinationConfig(
chain: pendulumAlphanet,
config: pendulumAlphanetConfig.getAssetDestinationConfig(
dev,
moonbaseAlpha,
),
Expand Down
9 changes: 2 additions & 7 deletions packages/config/src/ConfigService/ConfigService.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,7 @@ import {
Parachain,
} from '@moonbeam-network/xcm-types';
import { assetsList, dev, glmr, tt1, unit } from '../assets';
import {
equilibriumAlphanet,
hydraDX,
moonbaseAlpha,
moonbeam,
} from '../chains';
import { hydraDX, moonbaseAlpha, moonbeam, pendulumAlphanet } from '../chains';
import { ConfigService } from './ConfigService';

import { AssetConfig } from '../types/AssetConfig';
Expand Down Expand Up @@ -123,7 +118,7 @@ describe('config service', () => {
);

expect(chains).toStrictEqual(
expect.arrayContaining([moonbaseAlpha, equilibriumAlphanet]),
expect.arrayContaining([moonbaseAlpha, pendulumAlphanet]),
);
});
});
Expand Down
28 changes: 0 additions & 28 deletions packages/config/src/chains.ts
Original file line number Diff line number Diff line change
Expand Up @@ -403,33 +403,6 @@ export const equilibrium = new Parachain({
ws: 'wss://node.pol.equilibrium.io',
});

export const equilibriumAlphanet = new Parachain({
assetsData: [
{
asset: dev,
decimals: 9,
id: 1_735_159_154,
},
{
asset: eq,
id: 25_969,
},
{
asset: eqd,
id: 6_648_164,
},
],
ecosystem: Ecosystem.AlphanetRelay,
genesisHash:
'0x0ba4508078664cfd04f00bf17892dd1a0764ce61d90857f76c6a2ea61f008247',
isTestChain: true,
key: 'equilibrium-alphanet',
name: 'EquilibriumAlphanet',
parachainId: 2011,
ss58Format: 68,
ws: 'wss://devnet.equilab.io/alphanet/collator/api/wss',
});

export const hydraDX = new Parachain({
assetsData: [
{
Expand Down Expand Up @@ -1455,7 +1428,6 @@ export const chainsList: AnyChain[] = [
darwiniaCrab,
darwiniaPangoro,
equilibrium,
equilibriumAlphanet,
hydraDX,
integritee,
interlay,
Expand Down
56 changes: 0 additions & 56 deletions packages/config/src/configs/equilibriumAlphanet.ts

This file was deleted.

2 changes: 0 additions & 2 deletions packages/config/src/configs/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import { darwiniaConfig } from './darwinia';
import { darwiniaCrabConfig } from './darwiniaCrab';
import { darwiniaPangoroConfig } from './darwiniaPangoro';
import { equilibriumConfig } from './equilibrium';
import { equilibriumAlphanetConfig } from './equilibriumAlphanet';
import { hydraDxConfig } from './hydraDX';
import { integriteeConfig } from './integritee';
import { interlayConfig } from './interlay';
Expand Down Expand Up @@ -61,7 +60,6 @@ export const chainsConfigList: ChainConfig[] = [
darwiniaConfig,
darwiniaCrabConfig,
darwiniaPangoroConfig,
equilibriumAlphanetConfig,
equilibriumConfig,
hydraDxConfig,
integriteeConfig,
Expand Down
44 changes: 0 additions & 44 deletions packages/config/src/configs/moonbaseAlpha.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ import {
ampe,
atom,
dev,
eq,
eqd,
lit,
otp,
paring,
Expand All @@ -18,7 +16,6 @@ import {
alphanetAssetHub,
alphanetRelay,
darwiniaPangoro,
equilibriumAlphanet,
litentryAlphanet,
moonbaseAlpha,
moonbaseBeta,
Expand All @@ -32,17 +29,6 @@ import { ChainConfig } from '../types/ChainConfig';

export const moonbaseAlphaConfig = new ChainConfig({
assets: [
new AssetConfig({
asset: dev,
balance: BalanceBuilder().substrate().system().account(),
contract: ContractBuilder().Xtokens().transfer(),
destination: equilibriumAlphanet,
destinationFee: {
amount: 4,
asset: dev,
balance: BalanceBuilder().substrate().system().account(),
},
}),
new AssetConfig({
asset: dev,
balance: BalanceBuilder().substrate().system().account(),
Expand Down Expand Up @@ -132,36 +118,6 @@ export const moonbaseAlphaConfig = new ChainConfig({
balance: BalanceBuilder().substrate().system().account(),
},
}),
new AssetConfig({
asset: eq,
balance: BalanceBuilder().substrate().assets().account(),
contract: ContractBuilder().Xtokens().transfer(),
destination: equilibriumAlphanet,
destinationFee: {
amount: 14,
asset: eq,
balance: BalanceBuilder().substrate().assets().account(),
},
fee: {
asset: dev,
balance: BalanceBuilder().substrate().system().account(),
},
}),
new AssetConfig({
asset: eqd,
balance: BalanceBuilder().substrate().assets().account(),
contract: ContractBuilder().Xtokens().transfer(),
destination: equilibriumAlphanet,
destinationFee: {
amount: 4,
asset: eqd,
balance: BalanceBuilder().substrate().assets().account(),
},
fee: {
asset: dev,
balance: BalanceBuilder().substrate().system().account(),
},
}),
new AssetConfig({
asset: lit,
balance: BalanceBuilder().substrate().assets().account(),
Expand Down
6 changes: 1 addition & 5 deletions packages/sdk/src/polkadot/PolkadotService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import {
darwiniaPangoro,
eq,
equilibrium,
equilibriumAlphanet,
paring,
} from '@moonbeam-network/xcm-config';
import {
Expand Down Expand Up @@ -74,10 +73,7 @@ export class PolkadotService {

// TODO: Remove this once Equilibrium is updated
// or find better way if issue appears on other chains
if (
key === 'token' &&
[equilibriumAlphanet.key, equilibrium.key].includes(this.chain.key)
) {
if (key === 'token' && [equilibrium.key].includes(this.chain.key)) {
return eq;
}

Expand Down

0 comments on commit bd7a99b

Please sign in to comment.