Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hydra DX rebranding #279

Merged
merged 2 commits into from
Jun 20, 2024
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
6 changes: 6 additions & 0 deletions .changeset/tough-bobcats-applaud.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'@moonbeam-network/xcm-config': minor
'@moonbeam-network/xcm-sdk': minor
---

Rename Hydra DX to Hydration
11 changes: 8 additions & 3 deletions packages/config/src/ConfigService/ConfigService.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,12 @@ import {
Parachain,
} from '@moonbeam-network/xcm-types';
import { assetsList, dev, glmr, tt1, unit } from '../assets';
import { hydraDX, moonbaseAlpha, moonbeam, pendulumAlphanet } from '../chains';
import {
hydration,
moonbaseAlpha,
moonbeam,
pendulumAlphanet,
} from '../chains';
import { ConfigService } from './ConfigService';

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

const chainConfig = new ChainConfig({
assets: [assetConfig],
chain: hydraDX,
chain: hydration,
});

configService.updateChainConfig(chainConfig);
const updated = configService.getChainConfig(hydraDX);
const updated = configService.getChainConfig(hydration);
expect(updated.getAssetsConfigs()).toStrictEqual(
chainConfig.getAssetsConfigs(),
);
Expand Down
16 changes: 8 additions & 8 deletions packages/config/src/chains.ts
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,7 @@ export const equilibrium = new Parachain({
ws: 'wss://node.pol.equilibrium.io',
});

export const hydraDX = new Parachain({
export const hydration = new Parachain({
assetsData: [
{
asset: hdx,
Expand Down Expand Up @@ -442,14 +442,14 @@ export const hydraDX = new Parachain({
ecosystem: Ecosystem.Polkadot,
genesisHash:
'0xafdc188f45c71dacbaa0b62e16a91f726c7b8699a9748cdf715459de6b7f366d',
key: 'hydra-dx',
name: 'HydraDX',
key: 'hydration',
name: 'Hydration',
parachainId: 2034,
ss58Format: 63,
ws: 'wss://hydradx-rpc.dwellir.com',
});

export const hydraDxAlphanet = new Parachain({
export const hydrationAlphanet = new Parachain({
assetsData: [
{
asset: hdx,
Expand Down Expand Up @@ -481,8 +481,8 @@ export const hydraDxAlphanet = new Parachain({
genesisHash:
'0x025980095be141a99f983631c49271af15cab61c4ce0d73db73192443932669a',
isTestChain: true,
key: 'hydra-dx-Alphanet',
name: 'HydraDX Alphanet',
key: 'hydration-Alphanet',
name: 'Hydration Alphanet',
parachainId: 2034,
ss58Format: 63,
ws: 'wss://hydradx-moonbase-rpc.play.hydration.cloud',
Expand Down Expand Up @@ -1861,8 +1861,8 @@ export const chainsList: AnyChain[] = [
darwinia,
darwiniaCrab,
equilibrium,
hydraDX,
hydraDxAlphanet,
hydration,
hydrationAlphanet,
integritee,
interlay,
karura,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ import {
FeeBuilder,
} from '@moonbeam-network/xcm-builder';
import { dai, glmr, hdx, usdcwh, usdtwh, wbtc, weth } from '../assets';
import { hydraDX, moonbeam } from '../chains';
import { hydration, moonbeam } from '../chains';
import { AssetConfig } from '../types/AssetConfig';
import { ChainConfig } from '../types/ChainConfig';

export const hydraDxConfig = new ChainConfig({
export const hydrationConfig = new ChainConfig({
assets: [
new AssetConfig({
asset: hdx,
Expand Down Expand Up @@ -108,5 +108,5 @@ export const hydraDxConfig = new ChainConfig({
},
}),
],
chain: hydraDX,
chain: hydration,
});
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ import {
FeeBuilder,
} from '@moonbeam-network/xcm-builder';
import { dev, ftmwh, hdx, usdcwh } from '../assets';
import { hydraDxAlphanet, moonbaseAlpha } from '../chains';
import { hydrationAlphanet, moonbaseAlpha } from '../chains';
import { AssetConfig } from '../types/AssetConfig';
import { ChainConfig } from '../types/ChainConfig';

// FIXME: has to be verified
export const hydraDxAlphanetConfig = new ChainConfig({
export const hydrationAlphanetConfig = new ChainConfig({
assets: [
new AssetConfig({
asset: hdx,
Expand Down Expand Up @@ -64,5 +64,5 @@ export const hydraDxAlphanetConfig = new ChainConfig({
},
}),
],
chain: hydraDxAlphanet,
chain: hydrationAlphanet,
});
8 changes: 4 additions & 4 deletions packages/config/src/configs/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ import { crustShadowConfig } from './crustShadow';
import { darwiniaConfig } from './darwinia';
import { darwiniaCrabConfig } from './darwiniaCrab';
import { equilibriumConfig } from './equilibrium';
import { hydraDxConfig } from './hydraDX';
import { hydraDxAlphanetConfig } from './hydraDXAlphanet';
import { hydrationConfig } from './hydration';
import { hydrationAlphanetConfig } from './hydrationAlphanet';
import { integriteeConfig } from './integritee';
import { interlayConfig } from './interlay';
import { karuraConfig } from './karura';
Expand Down Expand Up @@ -65,8 +65,8 @@ export const chainsConfigList: ChainConfig[] = [
darwiniaConfig,
darwiniaCrabConfig,
equilibriumConfig,
hydraDxConfig,
hydraDxAlphanetConfig,
hydrationConfig,
hydrationAlphanetConfig,
integriteeConfig,
interlayConfig,
karuraConfig,
Expand Down
10 changes: 5 additions & 5 deletions packages/config/src/configs/moonbaseAlpha.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import {
import {
alphanetAssetHub,
alphanetRelay,
hydraDxAlphanet,
hydrationAlphanet,
moonbaseAlpha,
moonbaseBeta,
originTrailAlphanet,
Expand Down Expand Up @@ -215,7 +215,7 @@ export const moonbaseAlphaConfig = new ChainConfig({
asset: usdcwh,
balance: BalanceBuilder().evm().erc20(),
contract: ContractBuilder().Xtokens().transfer(),
destination: hydraDxAlphanet,
destination: hydrationAlphanet,
destinationFee: {
amount: 0.1,
asset: usdcwh,
Expand All @@ -230,7 +230,7 @@ export const moonbaseAlphaConfig = new ChainConfig({
asset: ftmwh,
balance: BalanceBuilder().evm().erc20(),
contract: ContractBuilder().Xtokens().transfer(),
destination: hydraDxAlphanet,
destination: hydrationAlphanet,
destinationFee: {
amount: 0.01,
asset: ftmwh,
Expand Down Expand Up @@ -260,7 +260,7 @@ export const moonbaseAlphaConfig = new ChainConfig({
asset: dev,
balance: BalanceBuilder().substrate().system().account(),
contract: ContractBuilder().Xtokens().transfer(),
destination: hydraDxAlphanet,
destination: hydrationAlphanet,
destinationFee: {
amount: 0.0002,
asset: dev,
Expand All @@ -271,7 +271,7 @@ export const moonbaseAlphaConfig = new ChainConfig({
asset: hdx,
balance: BalanceBuilder().substrate().assets().account(),
contract: ContractBuilder().Xtokens().transfer(),
destination: hydraDxAlphanet,
destination: hydrationAlphanet,
destinationFee: {
amount: 0.5,
asset: hdx,
Expand Down
16 changes: 8 additions & 8 deletions packages/config/src/configs/moonbeam.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ import {
centrifuge,
darwinia,
equilibrium,
hydraDX,
hydration,
interlay,
mantaParachain,
moonbeam,
Expand Down Expand Up @@ -116,7 +116,7 @@ export const moonbeamConfig = new ChainConfig({
asset: glmr,
balance: BalanceBuilder().substrate().system().account(),
contract: ContractBuilder().Xtokens().transfer(),
destination: hydraDX,
destination: hydration,
destinationFee: {
amount: 0.05,
asset: glmr,
Expand Down Expand Up @@ -523,7 +523,7 @@ export const moonbeamConfig = new ChainConfig({
asset: hdx,
balance: BalanceBuilder().substrate().assets().account(),
contract: ContractBuilder().Xtokens().transfer(),
destination: hydraDX,
destination: hydration,
destinationFee: {
amount: 0.6,
asset: hdx,
Expand All @@ -538,7 +538,7 @@ export const moonbeamConfig = new ChainConfig({
asset: dai,
balance: BalanceBuilder().evm().erc20(),
contract: ContractBuilder().Xtokens().transfer(),
destination: hydraDX,
destination: hydration,
destinationFee: {
amount: 0.004,
asset: dai,
Expand All @@ -553,7 +553,7 @@ export const moonbeamConfig = new ChainConfig({
asset: usdcwh,
balance: BalanceBuilder().evm().erc20(),
contract: ContractBuilder().Xtokens().transfer(),
destination: hydraDX,
destination: hydration,
destinationFee: {
amount: 0.004,
asset: usdcwh,
Expand Down Expand Up @@ -583,7 +583,7 @@ export const moonbeamConfig = new ChainConfig({
asset: usdtwh,
balance: BalanceBuilder().evm().erc20(),
contract: ContractBuilder().Xtokens().transfer(),
destination: hydraDX,
destination: hydration,
destinationFee: {
amount: 0.004,
asset: usdtwh,
Expand Down Expand Up @@ -673,7 +673,7 @@ export const moonbeamConfig = new ChainConfig({
asset: wbtc,
balance: BalanceBuilder().evm().erc20(),
contract: ContractBuilder().Xtokens().transfer(),
destination: hydraDX,
destination: hydration,
destinationFee: {
amount: 0.0000001,
asset: wbtc,
Expand All @@ -688,7 +688,7 @@ export const moonbeamConfig = new ChainConfig({
asset: weth,
balance: BalanceBuilder().evm().erc20(),
contract: ContractBuilder().Xtokens().transfer(),
destination: hydraDX,
destination: hydration,
destinationFee: {
amount: 0.000002,
asset: weth,
Expand Down
8 changes: 4 additions & 4 deletions packages/sdk/tests/acceptance/__snapshots__/sdk.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ exports[`sdk > getParachainBalances > on 'Centrifuge' for address: '5FtGz8bgoCQ6
]
`;

exports[`sdk > getParachainBalances > on 'HydraDX Alphanet' for address: '5FtGz8bgoCQ6pNAYLWCfxKx9ekLnX1ewP9q2T…' > should get expected balances 1`] = `
exports[`sdk > getParachainBalances > on 'Hydration Alphanet' for address: '5FtGz8bgoCQ6pNAYLWCfxKx9ekLnX1ewP9q2T…' > should get expected balances 1`] = `
[
a {
"amount": 178046239082538836n,
Expand Down Expand Up @@ -57,7 +57,7 @@ exports[`sdk > getParachainBalances > on 'HydraDX Alphanet' for address: '5FtGz8
]
`;

exports[`sdk > getParachainBalances > on 'HydraDX Alphanet' for address: '7MR8Qxy9sJmN6bfHMggAtFY5DwLxfrssLuTnP…' > should get expected balances 1`] = `
exports[`sdk > getParachainBalances > on 'Hydration Alphanet' for address: '7MR8Qxy9sJmN6bfHMggAtFY5DwLxfrssLuTnP…' > should get expected balances 1`] = `
[
a {
"amount": 178046239082538836n,
Expand Down Expand Up @@ -90,7 +90,7 @@ exports[`sdk > getParachainBalances > on 'HydraDX Alphanet' for address: '7MR8Qx
]
`;

exports[`sdk > getParachainBalances > on 'HydraDX' for address: '5FtGz8bgoCQ6pNAYLWCfxKx9ekLnX1ewP9q2T…' > should get expected balances 1`] = `
exports[`sdk > getParachainBalances > on 'Hydration' for address: '5FtGz8bgoCQ6pNAYLWCfxKx9ekLnX1ewP9q2T…' > should get expected balances 1`] = `
[
a {
"amount": 37000000000000n,
Expand Down Expand Up @@ -144,7 +144,7 @@ exports[`sdk > getParachainBalances > on 'HydraDX' for address: '5FtGz8bgoCQ6pNA
]
`;

exports[`sdk > getParachainBalances > on 'HydraDX' for address: '7MR8Qxy9sJmN6bfHMggAtFY5DwLxfrssLuTnP…' > should get expected balances 1`] = `
exports[`sdk > getParachainBalances > on 'Hydration' for address: '7MR8Qxy9sJmN6bfHMggAtFY5DwLxfrssLuTnP…' > should get expected balances 1`] = `
[
a {
"amount": 37000000000000n,
Expand Down
16 changes: 8 additions & 8 deletions packages/sdk/tests/acceptance/sdk.test.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
/* eslint-disable sort-keys */
// eslint-disable-next-line import/no-extraneous-dependencies
import { describe, expect, it } from 'vitest';
import {
centrifuge,
hydraDX,
hydraDxAlphanet,
hydration,
hydrationAlphanet,
moonbaseAlpha,
moonbaseBeta,
moonbeam,
Expand All @@ -14,24 +13,25 @@ import {
peaqEvmAlphanet,
} from '@moonbeam-network/xcm-config';
import { AnyChain } from '@moonbeam-network/xcm-types';
import { describe, expect, it } from 'vitest';
import { getParachainBalances } from '../../src/sdk';

// E2E balance test wallet
const hydraDXAddress = '7MR8Qxy9sJmN6bfHMggAtFY5DwLxfrssLuTnP5rmkpD92oPH';
const hydrationAddress = '7MR8Qxy9sJmN6bfHMggAtFY5DwLxfrssLuTnP5rmkpD92oPH';
const moonEvmAddress = '0x4E82143Af671Cc8201Bc7efCBbCED3A69e84405e';
const substrateAddress = '5FtGz8bgoCQ6pNAYLWCfxKx9ekLnX1ewP9q2TjMT2riu7sf9';

const config: { chain: AnyChain; address: string }[] = [
{ chain: moonbeam, address: moonEvmAddress },
{ chain: hydraDX, address: hydraDXAddress },
{ chain: hydraDX, address: substrateAddress },
{ chain: hydration, address: hydrationAddress },
{ chain: hydration, address: substrateAddress },
{
chain: centrifuge,
address: '4fAKSBMGVT9jt1jkuJvXgvMbmqV2BuspFWWEmdVeFj9yRudb',
},
{ chain: centrifuge, address: substrateAddress },
{ chain: hydraDxAlphanet, address: hydraDXAddress },
{ chain: hydraDxAlphanet, address: substrateAddress },
{ chain: hydrationAlphanet, address: hydrationAddress },
{ chain: hydrationAlphanet, address: substrateAddress },
{
chain: moonbaseBeta,
address: '0x4E82143Af671Cc8201Bc7efCBbCED3A69e84405e',
Expand Down
Loading