From 5d3e8b470fb9c5640ba3d27c6140e2ff09fc897d Mon Sep 17 00:00:00 2001 From: mmaurello <93129175+mmaurello@users.noreply.github.com> Date: Fri, 22 Nov 2024 15:06:25 +0100 Subject: [PATCH] Foreign assets - Snowbridge Assets integration (#383) * add foreignAssets balance checking * add assets configurations * add extrinsic builders for foreign assets * add wsethe and wbtce configurations * add changeset * add tests to new functions * update acceptance snaps --- .changeset/moody-snakes-exercise.md | 6 + .../builder/fixtures/builderParamsMock.ts | 11 ++ .../src/asset-min/AssetMinBuilder.test.ts | 23 ++++ .../builder/src/asset-min/AssetMinBuilder.ts | 35 ++++++ .../AssetMinBuilder.test.ts.snap | 32 ++++++ .../src/balance/BalanceBuilder.test.ts | 25 +++++ .../builder/src/balance/BalanceBuilder.ts | 29 +++++ .../__snapshots__/BalanceBuilder.test.ts.snap | 33 ++++++ .../__snapshots__/polkadotXcm.test.ts.snap | 103 ++++++++++++++++++ .../pallets/polkadotXcm/polkadotXcm.test.ts | 18 +++ .../pallets/polkadotXcm/polkadotXcm.ts | 84 +++++++++++++- packages/config/src/assets.ts | 18 +++ packages/config/src/chains.ts | 33 ++++++ packages/config/src/configs/moonbeam.ts | 48 ++++++++ .../config/src/configs/polkadotAssetHub.ts | 80 +++++++++++++- .../acceptance/__snapshots__/sdk.test.ts.snap | 21 ++++ 16 files changed, 597 insertions(+), 2 deletions(-) create mode 100644 .changeset/moody-snakes-exercise.md diff --git a/.changeset/moody-snakes-exercise.md b/.changeset/moody-snakes-exercise.md new file mode 100644 index 00000000..25d26aa5 --- /dev/null +++ b/.changeset/moody-snakes-exercise.md @@ -0,0 +1,6 @@ +--- +'@moonbeam-network/xcm-builder': minor +'@moonbeam-network/xcm-config': patch +--- + +Add foreign assets configuration and Snowbridge assets tranfers between Asset Hub and Moonbeam diff --git a/packages/builder/fixtures/builderParamsMock.ts b/packages/builder/fixtures/builderParamsMock.ts index 63cdeab4..d90db2e3 100644 --- a/packages/builder/fixtures/builderParamsMock.ts +++ b/packages/builder/fixtures/builderParamsMock.ts @@ -80,3 +80,14 @@ export const buildParachainParamsMock: ExtrinsicConfigBuilderPrams = { palletInstance: 10, source: alphanetAssetHubMock, }; + +export const buildParamsMockEth: ExtrinsicConfigBuilderPrams = { + address: '0xeF46c7649270C912704fB09B75097f6E32208b85', + amount: 99_000_000_000n, + asset: '0xeF46c7649270C912704fB09B75097f6E32208b85', + destination: moonbaseAlphaMock, + fee: 5_000_000_000n, + feeAsset: 'WETH.e', + palletInstance: 10, + source: alphanetAssetHubMock, +}; diff --git a/packages/builder/src/asset-min/AssetMinBuilder.test.ts b/packages/builder/src/asset-min/AssetMinBuilder.test.ts index 93c261a5..e6904596 100644 --- a/packages/builder/src/asset-min/AssetMinBuilder.test.ts +++ b/packages/builder/src/asset-min/AssetMinBuilder.test.ts @@ -78,4 +78,27 @@ describe('assetMinBuilder', () => { }); }); }); + + describe('foreignAssets', () => { + describe('asset', () => { + const config = AssetMinBuilder() + .foreignAssets() + .asset() + .build({ asset: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2' }); + + it('should be correct config', () => { + expect(config).toMatchSnapshot(); + }); + + it('should transform correctly', async () => { + await expect( + config.transform({ + unwrapOrDefault: () => ({ + minBalance: balanceOf(999), + }), + }), + ).resolves.toMatchSnapshot(); + }); + }); + }); }); diff --git a/packages/builder/src/asset-min/AssetMinBuilder.ts b/packages/builder/src/asset-min/AssetMinBuilder.ts index fa2c814a..24b65552 100644 --- a/packages/builder/src/asset-min/AssetMinBuilder.ts +++ b/packages/builder/src/asset-min/AssetMinBuilder.ts @@ -3,6 +3,7 @@ import { Option } from '@polkadot/types'; import { PalletAssetsAssetDetails } from '@polkadot/types/lookup'; +import { getExtrinsicAccount } from '../extrinsic/ExtrinsicBuilder.utils'; import { SubstrateQueryConfig } from '../types/substrate/SubstrateQueryConfig'; import { AssetMinConfigBuilder } from './AssetMinBuilder.interfaces'; @@ -10,6 +11,7 @@ export function AssetMinBuilder() { return { assetRegistry, assets, + foreignAssets, }; } @@ -57,3 +59,36 @@ function assets() { }), }; } + +function foreignAssets() { + return { + asset: (): AssetMinConfigBuilder => ({ + build: ({ asset }) => { + const multilocation = { + parents: 2, + interior: { + X2: [ + { + globalconsensus: { + ethereum: { + chainId: 1, + }, + }, + }, + getExtrinsicAccount(asset as string), + ], + }, + }; + return new SubstrateQueryConfig({ + module: 'foreignAssets', + func: 'asset', + args: [multilocation], + transform: async ( + response: Option, + ): Promise => + response.unwrapOrDefault().minBalance.toBigInt(), + }); + }, + }), + }; +} diff --git a/packages/builder/src/asset-min/__snapshots__/AssetMinBuilder.test.ts.snap b/packages/builder/src/asset-min/__snapshots__/AssetMinBuilder.test.ts.snap index adbc79f6..41839f0a 100644 --- a/packages/builder/src/asset-min/__snapshots__/AssetMinBuilder.test.ts.snap +++ b/packages/builder/src/asset-min/__snapshots__/AssetMinBuilder.test.ts.snap @@ -42,6 +42,38 @@ SubstrateQueryConfig { exports[`assetMinBuilder > assets > asset > should transform correctly 1`] = `999n`; +exports[`assetMinBuilder > foreignAssets > asset > should be correct config 1`] = ` +SubstrateQueryConfig { + "args": [ + { + "interior": { + "X2": [ + { + "globalconsensus": { + "ethereum": { + "chainId": 1, + }, + }, + }, + { + "AccountKey20": { + "key": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", + }, + }, + ], + }, + "parents": 2, + }, + ], + "func": "asset", + "module": "foreignAssets", + "transform": [Function], + "type": "Substrate", +} +`; + +exports[`assetMinBuilder > foreignAssets > asset > should transform correctly 1`] = `999n`; + exports[`assetMinBuilder assetRegistry assetMetadatas should be correct config 1`] = ` SubstrateQueryConfig { "args": [ diff --git a/packages/builder/src/balance/BalanceBuilder.test.ts b/packages/builder/src/balance/BalanceBuilder.test.ts index 556dcc63..d901021c 100644 --- a/packages/builder/src/balance/BalanceBuilder.test.ts +++ b/packages/builder/src/balance/BalanceBuilder.test.ts @@ -47,6 +47,31 @@ describe('balanceBuilder', () => { }); }); + describe('foreignAssets', () => { + describe('account', () => { + const config = BalanceBuilder() + .substrate() + .foreignAssets() + .account() + .build({ + address: account, + asset: `0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2`, + }) as SubstrateQueryConfig; + + it('should be correct config', () => { + expect(config).toMatchSnapshot(); + }); + + it('should transform correctly', async () => { + await expect( + config.transform({ + unwrapOrDefault: () => ({ balance: balanceOf(999) }), + }), + ).resolves.toMatchSnapshot(); + }); + }); + }); + describe('system', () => { describe('account', () => { const config = BalanceBuilder() diff --git a/packages/builder/src/balance/BalanceBuilder.ts b/packages/builder/src/balance/BalanceBuilder.ts index 7675165d..68bf2987 100644 --- a/packages/builder/src/balance/BalanceBuilder.ts +++ b/packages/builder/src/balance/BalanceBuilder.ts @@ -10,6 +10,7 @@ import { import { isString } from '@polkadot/util'; import { evmToAddress } from '@polkadot/util-crypto'; import { ContractConfig } from '../contract'; +import { getExtrinsicAccount } from '../extrinsic/ExtrinsicBuilder.utils'; import { SubstrateQueryConfig } from '../types/substrate/SubstrateQueryConfig'; import { BalanceConfigBuilder, @@ -34,6 +35,7 @@ export function evm() { export function substrate() { return { assets, + foreignAssets, system, tokens, }; @@ -72,6 +74,33 @@ function assets() { }; } +function foreignAssets() { + return { + account: (): BalanceConfigBuilder => ({ + build: ({ address, asset }) => { + const multilocation = { + parents: 2, + interior: { + X2: [ + { GlobalConsensus: { ethereum: { chainId: 1 } } }, + getExtrinsicAccount(asset as string), + ], + }, + }; + + return new SubstrateQueryConfig({ + module: 'foreignAssets', + func: 'account', + args: [multilocation, address], + transform: async ( + response: Option, + ): Promise => response.unwrapOrDefault().balance.toBigInt(), + }); + }, + }), + }; +} + function system() { return { account: (): BalanceConfigBuilder => ({ diff --git a/packages/builder/src/balance/__snapshots__/BalanceBuilder.test.ts.snap b/packages/builder/src/balance/__snapshots__/BalanceBuilder.test.ts.snap index 2369c5e0..f322e223 100644 --- a/packages/builder/src/balance/__snapshots__/BalanceBuilder.test.ts.snap +++ b/packages/builder/src/balance/__snapshots__/BalanceBuilder.test.ts.snap @@ -15,6 +15,39 @@ SubstrateQueryConfig { exports[`balanceBuilder > assets > account > should transform correctly 1`] = `999n`; +exports[`balanceBuilder > foreignAssets > account > should be correct config 1`] = ` +SubstrateQueryConfig { + "args": [ + { + "interior": { + "X2": [ + { + "GlobalConsensus": { + "ethereum": { + "chainId": 1, + }, + }, + }, + { + "AccountKey20": { + "key": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", + }, + }, + ], + }, + "parents": 2, + }, + "", + ], + "func": "account", + "module": "foreignAssets", + "transform": [Function], + "type": "Substrate", +} +`; + +exports[`balanceBuilder > foreignAssets > account > should transform correctly 1`] = `999n`; + exports[`balanceBuilder > system > account > should be correct config 1`] = ` SubstrateQueryConfig { "args": [ diff --git a/packages/builder/src/extrinsic/pallets/polkadotXcm/__snapshots__/polkadotXcm.test.ts.snap b/packages/builder/src/extrinsic/pallets/polkadotXcm/__snapshots__/polkadotXcm.test.ts.snap index 64049ba7..e7fe0738 100644 --- a/packages/builder/src/extrinsic/pallets/polkadotXcm/__snapshots__/polkadotXcm.test.ts.snap +++ b/packages/builder/src/extrinsic/pallets/polkadotXcm/__snapshots__/polkadotXcm.test.ts.snap @@ -462,6 +462,109 @@ exports[`polkadotXcm > limitedReserveWithdrawAssets > x2 > should get correct ar ] `; +exports[`polkadotXcm > transferAssetsUsingTypeAndThen > x2 > should be correct config 1`] = ` +ExtrinsicConfig { + "func": "transferAssetsUsingTypeAndThen", + "getArgs": [Function], + "module": "polkadotXcm", + "type": "Substrate", +} +`; + +exports[`polkadotXcm > transferAssetsUsingTypeAndThen > x2 > should get correct arguments 1`] = ` +[ + { + "V4": { + "interior": { + "X1": [ + { + "Parachain": 1000, + }, + ], + }, + "parents": 1, + }, + }, + { + "V4": [ + { + "fun": { + "fungible": 99000000000n, + }, + "id": { + "interior": { + "X2": [ + { + "globalConsensus": { + "Ethereum": { + "ChainId": 1, + }, + }, + }, + { + "AccountKey20": { + "key": "0xeF46c7649270C912704fB09B75097f6E32208b85", + }, + }, + ], + }, + "parents": 2, + }, + }, + ], + }, + "LocalReserve", + { + "V4": { + "interior": { + "X2": [ + { + "globalConsensus": { + "Ethereum": { + "ChainId": 1, + }, + }, + }, + { + "AccountKey20": { + "key": "0xeF46c7649270C912704fB09B75097f6E32208b85", + }, + }, + ], + }, + "parents": 2, + }, + }, + "LocalReserve", + { + "V4": [ + { + "DepositAsset": { + "assets": { + "Wild": { + "AllCounted": 1, + }, + }, + "beneficiary": { + "interior": { + "X1": [ + { + "AccountKey20": { + "key": "0xeF46c7649270C912704fB09B75097f6E32208b85", + }, + }, + ], + }, + "parents": 0, + }, + }, + }, + ], + }, + "Unlimited", +] +`; + exports[`polkadotXcm limitedReserveTransferAssets here should be correct config 1`] = ` ExtrinsicConfig { "func": "limitedReserveTransferAssets", diff --git a/packages/builder/src/extrinsic/pallets/polkadotXcm/polkadotXcm.test.ts b/packages/builder/src/extrinsic/pallets/polkadotXcm/polkadotXcm.test.ts index 64823acd..4baa0fbf 100644 --- a/packages/builder/src/extrinsic/pallets/polkadotXcm/polkadotXcm.test.ts +++ b/packages/builder/src/extrinsic/pallets/polkadotXcm/polkadotXcm.test.ts @@ -4,6 +4,7 @@ import { describe, expect, it } from 'vitest'; import { buildParachainParamsMock, buildParamsMock, + buildParamsMockEth, buildParamsSameAssetMock, } from '../../../../fixtures'; import { polkadotXcm } from './polkadotXcm'; @@ -119,4 +120,21 @@ describe('polkadotXcm', () => { }); }); }); + + describe('transferAssetsUsingTypeAndThen', () => { + describe('x2', () => { + const extrinsic = polkadotXcm() + .transferAssetsUsingTypeAndThen() + .globalConcensusEthereum() + .build(buildParamsMockEth); + + it('should be correct config', () => { + expect(extrinsic).toMatchSnapshot(); + }); + + it('should get correct arguments', () => { + expect(extrinsic.getArgs()).toMatchSnapshot(); + }); + }); + }); }); diff --git a/packages/builder/src/extrinsic/pallets/polkadotXcm/polkadotXcm.ts b/packages/builder/src/extrinsic/pallets/polkadotXcm/polkadotXcm.ts index a4146e6d..8143c980 100644 --- a/packages/builder/src/extrinsic/pallets/polkadotXcm/polkadotXcm.ts +++ b/packages/builder/src/extrinsic/pallets/polkadotXcm/polkadotXcm.ts @@ -1,5 +1,9 @@ /* eslint-disable sort-keys */ -import { ExtrinsicConfigBuilder } from '../../ExtrinsicBuilder.interfaces'; +import { + ExtrinsicConfigBuilder, + XcmVersion, +} from '../../ExtrinsicBuilder.interfaces'; +import { getExtrinsicAccount } from '../../ExtrinsicBuilder.utils'; import { ExtrinsicConfig } from '../../ExtrinsicConfig'; import { getPolkadotXcmExtrinsicArgs, @@ -213,5 +217,83 @@ export function polkadotXcm() { }), }; }, + transferAssetsUsingTypeAndThen: () => { + const func = 'transferAssetsUsingTypeAndThen'; + return { + // TODO we could pass a parameter globalConcensus in the chain asset + // but we can do it in V3 + globalConcensusEthereum: (): ExtrinsicConfigBuilder => ({ + build: ({ destination, address, amount, asset }) => { + const version = XcmVersion.v4; + return new ExtrinsicConfig({ + module: pallet, + func, + + getArgs: () => [ + { + [version]: { + parents: 1, + interior: { + X1: [ + { + Parachain: destination.parachainId, + }, + ], + }, + }, + }, + { + [version]: [ + { + id: { + parents: 2, + interior: { + X2: [ + { globalConsensus: { Ethereum: { ChainId: 1 } } }, + getExtrinsicAccount(asset as string), + ], + }, + }, + fun: { fungible: amount }, + }, + ], + }, + 'LocalReserve', + { + [version]: { + parents: 2, + interior: { + X2: [ + { globalConsensus: { Ethereum: { ChainId: 1 } } }, + getExtrinsicAccount(asset as string), + ], + }, + }, + }, + 'LocalReserve', + { + [version]: [ + { + DepositAsset: { + assets: { + Wild: { AllCounted: 1 }, + }, + beneficiary: { + parents: 0, + interior: { + X1: [getExtrinsicAccount(address)], + }, + }, + }, + }, + ], + }, + 'Unlimited', + ], + }); + }, + }), + }; + }, }; } diff --git a/packages/config/src/assets.ts b/packages/config/src/assets.ts index 27687606..4f7495ad 100644 --- a/packages/config/src/assets.ts +++ b/packages/config/src/assets.ts @@ -385,6 +385,21 @@ export const ftmwh = new Asset({ originSymbol: 'FTM.wh', }); +export const wbtce = new Asset({ + key: 'wbtce', + originSymbol: 'WBTC.e', +}); + +export const wstethe = new Asset({ + key: 'wstethe', + originSymbol: 'wstETH.e', +}); + +export const wethe = new Asset({ + key: 'wethe', + originSymbol: 'WETH.e', +}); + export const assetsList: Asset[] = [ aca, alan, @@ -457,9 +472,12 @@ export const assetsList: Asset[] = [ vmanta, vmovr, wbtc, + wbtce, weth, + wethe, wftm, wifd, + wstethe, xrt, ztg, ]; diff --git a/packages/config/src/chains.ts b/packages/config/src/chains.ts index 6635d3d0..ed9851a6 100644 --- a/packages/config/src/chains.ts +++ b/packages/config/src/chains.ts @@ -75,8 +75,11 @@ import { vmanta, vmovr, wbtc, + wbtce, weth, + wethe, wifd, + wstethe, xrt, ztg, } from './assets'; @@ -1106,6 +1109,18 @@ export const moonbeam = new EvmParachain({ asset: wifd, id: '61295607754960722617854661686514597014', }, + { + asset: wbtce, + id: '36282181791341254438422467838694599751', + }, + { + asset: wethe, + id: '178794693648360392906933130845919698647', + }, + { + asset: wstethe, + id: '124105859028862849477017063633156007283', + }, ], ecosystem: Ecosystem.Polkadot, genesisHash: @@ -1719,6 +1734,24 @@ export const polkadotAssetHub = new Parachain({ id: 17, palletInstance: 50, }, + { + address: '0x2260fac5e5542a773aa44fbcfedf7c193bc2c599', + asset: wbtce, + decimals: 8, + id: '0x2260fac5e5542a773aa44fbcfedf7c193bc2c599', + }, + { + address: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2', + asset: wethe, + decimals: 18, + id: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2', + }, + { + address: '0x7f39c581f595b53c5cb19bd0b3f8da6c935e2ca0', + asset: wstethe, + decimals: 18, + id: '0x7f39c581f595b53c5cb19bd0b3f8da6c935e2ca0', + }, ], checkSovereignAccountBalances: true, ecosystem: Ecosystem.Polkadot, diff --git a/packages/config/src/configs/moonbeam.ts b/packages/config/src/configs/moonbeam.ts index bb24a3d6..d721cc8d 100644 --- a/packages/config/src/configs/moonbeam.ts +++ b/packages/config/src/configs/moonbeam.ts @@ -37,8 +37,11 @@ import { vglmr, vmanta, wbtc, + wbtce, weth, + wethe, wifd, + wstethe, ztg, } from '../assets'; import { @@ -951,6 +954,51 @@ export const moonbeamConfig = new ChainConfig({ balance: BalanceBuilder().evm().erc20(), }, }), + new AssetConfig({ + asset: wethe, + balance: BalanceBuilder().substrate().assets().account(), + contract: ContractBuilder().Xtokens().transfer(), + destination: polkadotAssetHub, + destinationFee: { + amount: 0.0000035, + asset: wethe, + balance: BalanceBuilder().substrate().assets().account(), + }, + fee: { + asset: glmr, + balance: BalanceBuilder().substrate().system().account(), + }, + }), + new AssetConfig({ + asset: wbtce, + balance: BalanceBuilder().substrate().assets().account(), + contract: ContractBuilder().Xtokens().transfer(), + destination: polkadotAssetHub, + destinationFee: { + amount: 0.0000004, + asset: wbtce, + balance: BalanceBuilder().substrate().assets().account(), + }, + fee: { + asset: glmr, + balance: BalanceBuilder().substrate().system().account(), + }, + }), + new AssetConfig({ + asset: wstethe, + balance: BalanceBuilder().substrate().assets().account(), + contract: ContractBuilder().Xtokens().transfer(), + destination: polkadotAssetHub, + destinationFee: { + amount: 0.000006, + asset: wstethe, + balance: BalanceBuilder().substrate().assets().account(), + }, + fee: { + asset: glmr, + balance: BalanceBuilder().substrate().system().account(), + }, + }), ], chain: moonbeam, }); diff --git a/packages/config/src/configs/polkadotAssetHub.ts b/packages/config/src/configs/polkadotAssetHub.ts index 2d47b8c1..cc79ef69 100644 --- a/packages/config/src/configs/polkadotAssetHub.ts +++ b/packages/config/src/configs/polkadotAssetHub.ts @@ -4,7 +4,19 @@ import { ExtrinsicBuilder, FeeBuilder, } from '@moonbeam-network/xcm-builder'; -import { apillon, ded, dot, pink, stink, usdc, usdt, wifd } from '../assets'; +import { + apillon, + ded, + dot, + pink, + stink, + usdc, + usdt, + wbtce, + wethe, + wifd, + wstethe, +} from '../assets'; import { moonbeam, polkadotAssetHub } from '../chains'; import { AssetConfig } from '../types/AssetConfig'; import { ChainConfig } from '../types/ChainConfig'; @@ -189,6 +201,72 @@ export const polkadotAssetHubConfig = new ChainConfig({ }, min: AssetMinBuilder().assets().asset(), }), + new AssetConfig({ + asset: wethe, + balance: BalanceBuilder().substrate().foreignAssets().account(), + destination: moonbeam, + destinationFee: { + amount: FeeBuilder().xcmPaymentApi().xcmPaymentFee({ + isAssetReserveChain: false, + }), + asset: wethe, + balance: BalanceBuilder().substrate().assets().account(), + }, + extrinsic: ExtrinsicBuilder() + .polkadotXcm() + .transferAssetsUsingTypeAndThen() + .globalConcensusEthereum(), + fee: { + asset: dot, + balance: BalanceBuilder().substrate().system().account(), + xcmDeliveryFeeAmount, + }, + min: AssetMinBuilder().foreignAssets().asset(), + }), + new AssetConfig({ + asset: wbtce, + balance: BalanceBuilder().substrate().foreignAssets().account(), + destination: moonbeam, + destinationFee: { + amount: FeeBuilder().xcmPaymentApi().xcmPaymentFee({ + isAssetReserveChain: false, + }), + asset: wbtce, + balance: BalanceBuilder().substrate().assets().account(), + }, + extrinsic: ExtrinsicBuilder() + .polkadotXcm() + .transferAssetsUsingTypeAndThen() + .globalConcensusEthereum(), + fee: { + asset: dot, + balance: BalanceBuilder().substrate().system().account(), + xcmDeliveryFeeAmount, + }, + min: AssetMinBuilder().foreignAssets().asset(), + }), + new AssetConfig({ + asset: wstethe, + balance: BalanceBuilder().substrate().foreignAssets().account(), + destination: moonbeam, + destinationFee: { + amount: FeeBuilder().xcmPaymentApi().xcmPaymentFee({ + isAssetReserveChain: false, + }), + asset: wstethe, + balance: BalanceBuilder().substrate().assets().account(), + }, + extrinsic: ExtrinsicBuilder() + .polkadotXcm() + .transferAssetsUsingTypeAndThen() + .globalConcensusEthereum(), + fee: { + asset: dot, + balance: BalanceBuilder().substrate().system().account(), + xcmDeliveryFeeAmount, + }, + min: AssetMinBuilder().foreignAssets().asset(), + }), ], chain: polkadotAssetHub, }); diff --git a/packages/sdk/tests/acceptance/__snapshots__/sdk.test.ts.snap b/packages/sdk/tests/acceptance/__snapshots__/sdk.test.ts.snap index 95b3a0e8..121e47b5 100644 --- a/packages/sdk/tests/acceptance/__snapshots__/sdk.test.ts.snap +++ b/packages/sdk/tests/acceptance/__snapshots__/sdk.test.ts.snap @@ -315,6 +315,27 @@ exports[`sdk > getParachainBalances > on 'Moonbase Beta' for address: '0x4E82143 exports[`sdk > getParachainBalances > on 'Moonbeam' for address: '0x4E82143Af671Cc8201Bc7efCBbCED3A69e8…' > should get expected balances 1`] = ` [ + r { + "amount": 0n, + "decimals": 18, + "key": "wstethe", + "originSymbol": "wstETH.e", + "symbol": "wstETH.e", + }, + r { + "amount": 0n, + "decimals": 8, + "key": "wbtce", + "originSymbol": "WBTC.e", + "symbol": "WBTC.e", + }, + r { + "amount": 0n, + "decimals": 18, + "key": "wethe", + "originSymbol": "WETH.e", + "symbol": "WETH.e", + }, r { "amount": 0n, "decimals": 6,