diff --git a/.changeset/tall-books-press.md b/.changeset/tall-books-press.md new file mode 100644 index 00000000..b9b14aae --- /dev/null +++ b/.changeset/tall-books-press.md @@ -0,0 +1,5 @@ +--- +'@moonbeam-network/xcm-sdk': patch +--- + +Update snapshots diff --git a/packages/sdk/tests/acceptance/__snapshots__/sdk.test.ts.snap b/packages/sdk/tests/acceptance/__snapshots__/sdk.test.ts.snap index 0287c7c5..6da3641d 100644 --- a/packages/sdk/tests/acceptance/__snapshots__/sdk.test.ts.snap +++ b/packages/sdk/tests/acceptance/__snapshots__/sdk.test.ts.snap @@ -200,6 +200,13 @@ exports[`sdk > getParachainBalances > should get expected balances for HydraDX f exports[`sdk > getParachainBalances > should get expected balances for Moonbase Alpha 1`] = ` [ + s { + "amount": 0n, + "decimals": 18, + "key": "agng", + "originSymbol": "AGNG", + "symbol": "AGNG", + }, s { "amount": 0n, "decimals": 12, @@ -322,6 +329,13 @@ exports[`sdk > getParachainBalances > should get expected balances for Moonbase exports[`sdk > getParachainBalances > should get expected balances for Moonbeam 1`] = ` [ + s { + "amount": 0n, + "decimals": 18, + "key": "peaq", + "originSymbol": "PEAQ", + "symbol": "PEAQ", + }, s { "amount": 0n, "decimals": 12, @@ -591,7 +605,7 @@ exports[`sdk > getParachainBalances > should get expected balances for Moonbeam ] `; -exports[`sdk > getParachainBalances > should get expected balances for Peaq 1`] = ` +exports[`sdk > getParachainBalances > should get expected balances for peaq 1`] = ` [ s { "amount": 0n, @@ -635,791 +649,99 @@ exports[`sdk > getParachainBalances > should get expected balances for Peaq 1`] "originSymbol": "GLMR", "symbol": "GLMR", }, -] -`; - -exports[`sdk > getParachainBalances > should get expected balances for Peaq EVM 1`] = ` -[ - s { - "amount": 0n, - "decimals": 6, - "key": "usdtwh", - "originSymbol": "USDT.Wh", - "symbol": "USDT.Wh", - }, - s { - "amount": 0n, - "decimals": 18, - "key": "weth", - "originSymbol": "WETH", - "symbol": "WETH", - }, s { - "amount": 0n, - "decimals": 8, - "key": "wbtc", - "originSymbol": "WBTC", - "symbol": "WBTC", - }, - s { - "amount": 0n, - "decimals": 18, - "key": "dai", - "originSymbol": "DAI", - "symbol": "DAI", - }, - s { - "amount": 0n, - "decimals": 6, - "key": "usdcwh", - "originSymbol": "USDC.Wh", - "symbol": "USDC.Wh", - }, - s { - "amount": 0n, + "amount": 1313000000000000000n, "decimals": 18, - "key": "glmr", - "originSymbol": "GLMR", - "symbol": "GLMR", + "key": "peaq", + "originSymbol": "PEAQ", + "symbol": "PEAQ", }, ] `; -exports[`sdk > getParachainBalances > should get expected balances for Peaq EVM Alphanet 1`] = ` +exports[`sdk > getParachainBalances > should get expected balances for peaq Alphanet 1`] = ` [ s { - "amount": 330000000000000000n, - "decimals": 18, - "key": "dev", - "originSymbol": "DEV", - "symbol": "DEV", - }, - s { - "amount": 123000000000000000n, - "decimals": 18, - "key": "ftmwh", - "originSymbol": "FTM.wh", - "symbol": "FTM.wh", - }, -] -`; - -exports[`sdk getParachainBalances should get expected balances for Centrifuge for substrate address 1`] = ` -[ - e { - "amount": 570000000000000000n, - "decimals": 18, - "key": "cfg", - "originSymbol": "CFG", - "symbol": "CFG", - }, -] -`; - -exports[`sdk getParachainBalances should get expected balances for Centrifuge 1`] = ` -[ - e { - "amount": 570000000000000000n, - "decimals": 18, - "key": "cfg", - "originSymbol": "CFG", - "symbol": "CFG", - }, -] -`; - -exports[`sdk getParachainBalances should get expected balances for HydraDX 1`] = ` -[ - e { - "amount": 37000000000000n, - "decimals": 18, - "key": "weth", - "originSymbol": "WETH", - "symbol": "WETH", - }, - e { - "amount": 120n, - "decimals": 8, - "key": "wbtc", - "originSymbol": "WBTC", - "symbol": "WBTC", - }, - e { - "amount": 0n, - "decimals": 6, - "key": "usdtwh", - "originSymbol": "USDT.Wh", - "symbol": "USDT.Wh", - }, - e { - "amount": 0n, - "decimals": 6, - "key": "usdcwh", - "originSymbol": "USDC.Wh", - "symbol": "USDC.Wh", - }, - e { - "amount": 0n, - "decimals": 18, - "key": "dai", - "originSymbol": "DAI", - "symbol": "DAI", - }, - e { "amount": 0n, "decimals": 18, - "key": "glmr", - "originSymbol": "GLMR", - "symbol": "GLMR", - }, - e { - "amount": 1000000000000n, - "decimals": 12, - "key": "hdx", - "originSymbol": "HDX", - "symbol": "HDX", - }, -] -`; - -exports[`sdk getParachainBalances should get expected balances for HydraDX Alphanet 1`] = ` -[ - e { - "amount": 178046239082538836n, - "decimals": 18, "key": "ftmwh", "originSymbol": "FTM.wh", "symbol": "FTM.wh", }, - e { - "amount": 0n, - "decimals": 6, - "key": "usdcwh", - "originSymbol": "USDC.Wh", - "symbol": "USDC.Wh", - }, - e { + s { "amount": 0n, "decimals": 18, "key": "dev", "originSymbol": "DEV", "symbol": "DEV", }, - e { - "amount": 3000000000000n, - "decimals": 12, - "key": "hdx", - "originSymbol": "HDX", - "symbol": "HDX", + s { + "amount": 1223300000000000000n, + "decimals": 18, + "key": "agng", + "originSymbol": "AGNG", + "symbol": "AGNG", }, ] `; -exports[`sdk getParachainBalances should get expected balances for HydraDX Alphanet for substrate address 1`] = ` +exports[`sdk > getParachainBalances > should get expected balances for peaq EVM 1`] = ` [ - e { - "amount": 178046239082538836n, - "decimals": 18, - "key": "ftmwh", - "originSymbol": "FTM.wh", - "symbol": "FTM.wh", - }, - e { + s { "amount": 0n, "decimals": 6, - "key": "usdcwh", - "originSymbol": "USDC.Wh", - "symbol": "USDC.Wh", + "key": "usdtwh", + "originSymbol": "USDT.Wh", + "symbol": "USDT.Wh", }, - e { + s { "amount": 0n, "decimals": 18, - "key": "dev", - "originSymbol": "DEV", - "symbol": "DEV", - }, - e { - "amount": 3000000000000n, - "decimals": 12, - "key": "hdx", - "originSymbol": "HDX", - "symbol": "HDX", - }, -] -`; - -exports[`sdk getParachainBalances should get expected balances for HydraDX for substrate address 1`] = ` -[ - e { - "amount": 37000000000000n, - "decimals": 18, "key": "weth", "originSymbol": "WETH", "symbol": "WETH", }, - e { - "amount": 120n, + s { + "amount": 0n, "decimals": 8, "key": "wbtc", "originSymbol": "WBTC", "symbol": "WBTC", }, - e { + s { "amount": 0n, - "decimals": 6, - "key": "usdtwh", - "originSymbol": "USDT.Wh", - "symbol": "USDT.Wh", + "decimals": 18, + "key": "dai", + "originSymbol": "DAI", + "symbol": "DAI", }, - e { + s { "amount": 0n, "decimals": 6, "key": "usdcwh", "originSymbol": "USDC.Wh", "symbol": "USDC.Wh", }, - e { - "amount": 0n, - "decimals": 18, - "key": "dai", - "originSymbol": "DAI", - "symbol": "DAI", - }, - e { + s { "amount": 0n, "decimals": 18, "key": "glmr", "originSymbol": "GLMR", "symbol": "GLMR", }, - e { - "amount": 1000000000000n, - "decimals": 12, - "key": "hdx", - "originSymbol": "HDX", - "symbol": "HDX", - }, ] `; -exports[`sdk getParachainBalances should get expected balances for Moonbase Alpha 1`] = ` +exports[`sdk > getParachainBalances > should get expected balances for peaq EVM Alphanet 1`] = ` [ - e { - "amount": 0n, - "decimals": 18, - "key": "agng", - "originSymbol": "AGNG", - "symbol": "AGNG", - }, - e { - "amount": 0n, - "decimals": 12, - "key": "hdx", - "originSymbol": "HDX", - "symbol": "HDX", - }, - e { - "amount": 1234567890000000000n, + s { + "amount": 330000000000000000n, "decimals": 18, - "key": "ftmwh", - "originSymbol": "FTM.wh", - "symbol": "FTM.wh", - }, - e { - "amount": 10000n, - "decimals": 6, - "key": "usdcwh", - "originSymbol": "USDC.Wh", - "symbol": "USDC.Wh", - }, - e { - "amount": 0n, - "decimals": 12, - "key": "unit", - "originSymbol": "Unit", - "symbol": "Unit", - }, - e { - "amount": 0n, - "decimals": 10, - "key": "tur", - "originSymbol": "TUR", - "symbol": "TUR", + "key": "dev", + "originSymbol": "DEV", + "symbol": "DEV", }, - e { - "amount": 0n, - "decimals": 18, - "key": "tt1", - "originSymbol": "TT1", - "symbol": "TT1", - }, - e { - "amount": 0n, - "decimals": 12, - "key": "pica", - "originSymbol": "PICA", - "symbol": "PICA", - }, - e { - "amount": 0n, - "decimals": 6, - "key": "atom", - "originSymbol": "ATOM", - "symbol": "ATOM", - }, - e { - "amount": 0n, - "decimals": 12, - "key": "otp", - "originSymbol": "OTP", - "symbol": "OTP", - }, - e { - "amount": 0n, - "decimals": 12, - "key": "ampe", - "originSymbol": "AMPE", - "symbol": "AMPE", - }, - e { - "amount": 10000000000000000n, - "decimals": 18, - "key": "alan", - "originSymbol": "ALAN", - "symbol": "ALAN", - }, - e { - "amount": 6543210000000000000n, - "decimals": 18, - "key": "dev", - "originSymbol": "DEV", - "symbol": "DEV", - }, -] -`; - -exports[`sdk getParachainBalances should get expected balances for Moonbase Beta 1`] = ` -[ - e { - "amount": 100000000000000000n, - "decimals": 18, - "key": "ftmwh", - "originSymbol": "FTM.wh", - "symbol": "FTM.wh", - }, - e { - "amount": 0n, - "decimals": 6, - "key": "usdcwh", - "originSymbol": "USDC.Wh", - "symbol": "USDC.Wh", - }, - e { - "amount": 1100000000000000000n, - "decimals": 18, - "key": "alan", - "originSymbol": "ALAN", - "symbol": "ALAN", - }, - e { - "amount": 1100000000000000000n, - "decimals": 18, - "key": "dev", - "originSymbol": "DEV", - "symbol": "DEV", - }, -] -`; - -exports[`sdk getParachainBalances should get expected balances for Moonbeam 1`] = ` -[ - e { - "amount": 0n, - "decimals": 18, - "key": "peaq", - "originSymbol": "PEAQ", - "symbol": "PEAQ", - }, - e { - "amount": 0n, - "decimals": 12, - "key": "bncs", - "originSymbol": "BNCS", - "symbol": "BNCS", - }, - e { - "amount": 0n, - "decimals": 10, - "key": "sub", - "originSymbol": "SUB", - "symbol": "SUB", - }, - e { - "amount": 0n, - "decimals": 10, - "key": "ztg", - "originSymbol": "ZTG", - "symbol": "ZTG", - }, - e { - "amount": 0n, - "decimals": 18, - "key": "fil", - "originSymbol": "FIL", - "symbol": "FIL", - }, - e { - "amount": 0n, - "decimals": 18, - "key": "weth", - "originSymbol": "WETH", - "symbol": "WETH", - }, - e { - "amount": 0n, - "decimals": 8, - "key": "wbtc", - "originSymbol": "WBTC", - "symbol": "WBTC", - }, - e { - "amount": 0n, - "decimals": 18, - "key": "vmanta", - "originSymbol": "vMANTA", - "symbol": "vMANTA", - }, - e { - "amount": 0n, - "decimals": 18, - "key": "vglmr", - "originSymbol": "vGLMR", - "symbol": "vGLMR", - }, - e { - "amount": 0n, - "decimals": 18, - "key": "vfil", - "originSymbol": "vFIL", - "symbol": "vFIL", - }, - e { - "amount": 0n, - "decimals": 10, - "key": "vdot", - "originSymbol": "vDOT", - "symbol": "vDOT", - }, - e { - "amount": 0n, - "decimals": 18, - "key": "vastr", - "originSymbol": "vASTR", - "symbol": "vASTR", - }, - e { - "amount": 0n, - "decimals": 6, - "key": "usdtwh", - "originSymbol": "USDT.Wh", - "symbol": "USDT.Wh", - }, - e { - "amount": 0n, - "decimals": 6, - "key": "usdcwh", - "originSymbol": "USDC.Wh", - "symbol": "USDC.Wh", - }, - e { - "amount": 0n, - "decimals": 18, - "key": "dai", - "originSymbol": "DAI", - "symbol": "DAI", - }, - e { - "amount": 0n, - "decimals": 12, - "key": "hdx", - "originSymbol": "HDX", - "symbol": "HDX", - }, - e { - "amount": 0n, - "decimals": 10, - "key": "ded", - "originSymbol": "DED", - "symbol": "DED", - }, - e { - "amount": 0n, - "decimals": 10, - "key": "pink", - "originSymbol": "PINK", - "symbol": "PINK", - }, - e { - "amount": 0n, - "decimals": 6, - "key": "usdc", - "originSymbol": "USDC", - "symbol": "USDC", - }, - e { - "amount": 0n, - "decimals": 6, - "key": "usdt", - "originSymbol": "USDT", - "symbol": "USDT", - }, - e { - "amount": 0n, - "decimals": 18, - "key": "ring", - "originSymbol": "RING", - "symbol": "RING", - }, - e { - "amount": 0n, - "decimals": 12, - "key": "pha", - "originSymbol": "PHA", - "symbol": "PHA", - }, - e { - "amount": 0n, - "decimals": 12, - "key": "pen", - "originSymbol": "PEN", - "symbol": "PEN", - }, - e { - "amount": 0n, - "decimals": 12, - "key": "para", - "originSymbol": "PARA", - "symbol": "PARA", - }, - e { - "amount": 0n, - "decimals": 12, - "key": "neuro", - "originSymbol": "NEURO", - "symbol": "NEURO", - }, - e { - "amount": 0n, - "decimals": 11, - "key": "nodl", - "originSymbol": "NODL", - "symbol": "NODL", - }, - e { - "amount": 0n, - "decimals": 18, - "key": "manta", - "originSymbol": "MANTA", - "symbol": "MANTA", - }, - e { - "amount": 0n, - "decimals": 10, - "key": "ldot", - "originSymbol": "LDOT", - "symbol": "LDOT", - }, - e { - "amount": 0n, - "decimals": 10, - "key": "intr", - "originSymbol": "INTR", - "symbol": "INTR", - }, - e { - "amount": 0n, - "decimals": 8, - "key": "ibtc", - "originSymbol": "IBTC", - "symbol": "IBTC", - }, - e { - "amount": 0n, - "decimals": 9, - "key": "eqd", - "originSymbol": "EQD", - "symbol": "EQD", - }, - e { - "amount": 0n, - "decimals": 9, - "key": "eq", - "originSymbol": "EQ", - "symbol": "EQ", - }, - e { - "amount": 330000000n, - "decimals": 10, - "key": "dot", - "originSymbol": "DOT", - "symbol": "DOT", - }, - e { - "amount": 0n, - "decimals": 18, - "key": "cfg", - "originSymbol": "CFG", - "symbol": "CFG", - }, - e { - "amount": 0n, - "decimals": 12, - "key": "bnc", - "originSymbol": "BNC", - "symbol": "BNC", - }, - e { - "amount": 0n, - "decimals": 12, - "key": "aseed", - "originSymbol": "aSEED", - "symbol": "aSEED", - }, - e { - "amount": 0n, - "decimals": 18, - "key": "astr", - "originSymbol": "ASTR", - "symbol": "ASTR", - }, - e { - "amount": 0n, - "decimals": 12, - "key": "aca", - "originSymbol": "ACA", - "symbol": "ACA", - }, - e { - "amount": 1330000000000000000n, - "decimals": 18, - "key": "glmr", - "originSymbol": "GLMR", - "symbol": "GLMR", - }, -] -`; - -exports[`sdk getParachainBalances should get expected balances for peaq 1`] = ` -[ - e { - "amount": 0n, - "decimals": 6, - "key": "usdtwh", - "originSymbol": "USDT.Wh", - "symbol": "USDT.Wh", - }, - e { - "amount": 0n, - "decimals": 18, - "key": "weth", - "originSymbol": "WETH", - "symbol": "WETH", - }, - e { - "amount": 0n, - "decimals": 8, - "key": "wbtc", - "originSymbol": "WBTC", - "symbol": "WBTC", - }, - e { - "amount": 0n, - "decimals": 18, - "key": "dai", - "originSymbol": "DAI", - "symbol": "DAI", - }, - e { - "amount": 0n, - "decimals": 6, - "key": "usdcwh", - "originSymbol": "USDC.Wh", - "symbol": "USDC.Wh", - }, - e { - "amount": 0n, - "decimals": 18, - "key": "glmr", - "originSymbol": "GLMR", - "symbol": "GLMR", - }, - e { - "amount": 0n, - "decimals": 18, - "key": "peaq", - "originSymbol": "PEAQ", - "symbol": "PEAQ", - }, -] -`; - -exports[`sdk getParachainBalances should get expected balances for peaq EVM 1`] = ` -[ - e { - "amount": 0n, - "decimals": 6, - "key": "usdtwh", - "originSymbol": "USDT.Wh", - "symbol": "USDT.Wh", - }, - e { - "amount": 0n, - "decimals": 18, - "key": "weth", - "originSymbol": "WETH", - "symbol": "WETH", - }, - e { - "amount": 0n, - "decimals": 8, - "key": "wbtc", - "originSymbol": "WBTC", - "symbol": "WBTC", - }, - e { - "amount": 0n, - "decimals": 18, - "key": "dai", - "originSymbol": "DAI", - "symbol": "DAI", - }, - e { - "amount": 0n, - "decimals": 6, - "key": "usdcwh", - "originSymbol": "USDC.Wh", - "symbol": "USDC.Wh", - }, - e { - "amount": 0n, - "decimals": 18, - "key": "glmr", - "originSymbol": "GLMR", - "symbol": "GLMR", - }, -] -`; - -exports[`sdk getParachainBalances should get expected balances for peaq EVM Alphanet 1`] = ` -[ - e { - "amount": 330000000000000000n, - "decimals": 18, - "key": "dev", - "originSymbol": "DEV", - "symbol": "DEV", - }, - e { + s { "amount": 123000000000000000n, "decimals": 18, "key": "ftmwh", diff --git a/packages/sdk/tests/acceptance/sdk.test.ts b/packages/sdk/tests/acceptance/sdk.test.ts index 1b416e66..a5783592 100644 --- a/packages/sdk/tests/acceptance/sdk.test.ts +++ b/packages/sdk/tests/acceptance/sdk.test.ts @@ -7,6 +7,7 @@ import { moonbaseAlpha, moonbaseBeta, moonbeam, + peaqAlphanet, peaqChain, peaqEvm, peaqEvmAlphanet, @@ -86,6 +87,14 @@ describe('sdk', () => { expect(result).toMatchSnapshot(); }); + it(`should get expected balances for ${peaqAlphanet.name}`, async () => { + const result = await getParachainBalances( + peaqAlphanet, + peaqSubstrateAccount, + ); + + expect(result).toMatchSnapshot(); + }); it(`should get expected balances for ${peaqChain.name}`, async () => { const result = await getParachainBalances( peaqChain,