diff --git a/.changeset/tough-bobcats-applaud.md b/.changeset/tough-bobcats-applaud.md new file mode 100644 index 00000000..6073b619 --- /dev/null +++ b/.changeset/tough-bobcats-applaud.md @@ -0,0 +1,6 @@ +--- +'@moonbeam-network/xcm-config': minor +'@moonbeam-network/xcm-sdk': minor +--- + +Rename Hydra DX to Hydration diff --git a/packages/config/src/ConfigService/ConfigService.test.ts b/packages/config/src/ConfigService/ConfigService.test.ts index a2c59233..85812eaa 100644 --- a/packages/config/src/ConfigService/ConfigService.test.ts +++ b/packages/config/src/ConfigService/ConfigService.test.ts @@ -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'; @@ -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(), ); diff --git a/packages/config/src/chains.ts b/packages/config/src/chains.ts index ba04bea5..e68505da 100644 --- a/packages/config/src/chains.ts +++ b/packages/config/src/chains.ts @@ -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, @@ -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, @@ -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', @@ -1861,8 +1861,8 @@ export const chainsList: AnyChain[] = [ darwinia, darwiniaCrab, equilibrium, - hydraDX, - hydraDxAlphanet, + hydration, + hydrationAlphanet, integritee, interlay, karura, diff --git a/packages/config/src/configs/hydraDX.ts b/packages/config/src/configs/hydration.ts similarity index 96% rename from packages/config/src/configs/hydraDX.ts rename to packages/config/src/configs/hydration.ts index aa74f427..5d6e4ec7 100644 --- a/packages/config/src/configs/hydraDX.ts +++ b/packages/config/src/configs/hydration.ts @@ -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, @@ -108,5 +108,5 @@ export const hydraDxConfig = new ChainConfig({ }, }), ], - chain: hydraDX, + chain: hydration, }); diff --git a/packages/config/src/configs/hydraDXAlphanet.ts b/packages/config/src/configs/hydrationAlphanet.ts similarity index 93% rename from packages/config/src/configs/hydraDXAlphanet.ts rename to packages/config/src/configs/hydrationAlphanet.ts index df4ec90e..e3658693 100644 --- a/packages/config/src/configs/hydraDXAlphanet.ts +++ b/packages/config/src/configs/hydrationAlphanet.ts @@ -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, @@ -64,5 +64,5 @@ export const hydraDxAlphanetConfig = new ChainConfig({ }, }), ], - chain: hydraDxAlphanet, + chain: hydrationAlphanet, }); diff --git a/packages/config/src/configs/index.ts b/packages/config/src/configs/index.ts index ebb3ee07..32c72eaf 100644 --- a/packages/config/src/configs/index.ts +++ b/packages/config/src/configs/index.ts @@ -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'; @@ -65,8 +65,8 @@ export const chainsConfigList: ChainConfig[] = [ darwiniaConfig, darwiniaCrabConfig, equilibriumConfig, - hydraDxConfig, - hydraDxAlphanetConfig, + hydrationConfig, + hydrationAlphanetConfig, integriteeConfig, interlayConfig, karuraConfig, diff --git a/packages/config/src/configs/moonbaseAlpha.ts b/packages/config/src/configs/moonbaseAlpha.ts index ac78e5be..1492c18c 100644 --- a/packages/config/src/configs/moonbaseAlpha.ts +++ b/packages/config/src/configs/moonbaseAlpha.ts @@ -17,7 +17,7 @@ import { import { alphanetAssetHub, alphanetRelay, - hydraDxAlphanet, + hydrationAlphanet, moonbaseAlpha, moonbaseBeta, originTrailAlphanet, @@ -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, @@ -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, @@ -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, @@ -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, diff --git a/packages/config/src/configs/moonbeam.ts b/packages/config/src/configs/moonbeam.ts index 134ba861..89061783 100644 --- a/packages/config/src/configs/moonbeam.ts +++ b/packages/config/src/configs/moonbeam.ts @@ -47,7 +47,7 @@ import { centrifuge, darwinia, equilibrium, - hydraDX, + hydration, interlay, mantaParachain, moonbeam, @@ -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, @@ -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, @@ -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, @@ -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, @@ -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, @@ -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, @@ -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, diff --git a/packages/sdk/tests/acceptance/__snapshots__/sdk.test.ts.snap b/packages/sdk/tests/acceptance/__snapshots__/sdk.test.ts.snap index d6157dc8..f80c4fde 100644 --- a/packages/sdk/tests/acceptance/__snapshots__/sdk.test.ts.snap +++ b/packages/sdk/tests/acceptance/__snapshots__/sdk.test.ts.snap @@ -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, @@ -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, @@ -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, @@ -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, diff --git a/packages/sdk/tests/acceptance/sdk.test.ts b/packages/sdk/tests/acceptance/sdk.test.ts index 2af3410c..6823ae46 100644 --- a/packages/sdk/tests/acceptance/sdk.test.ts +++ b/packages/sdk/tests/acceptance/sdk.test.ts @@ -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, @@ -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',