diff --git a/.eslintrc.json b/.eslintrc.json deleted file mode 100644 index 93529f58..00000000 --- a/.eslintrc.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "extends": [ - "airbnb-base", - "airbnb-typescript/base", - "plugin:@typescript-eslint/recommended", - "plugin:import/errors", - "plugin:import/warnings", - "plugin:import/typescript", - "prettier" - ], - "plugins": ["@typescript-eslint", "import", "prettier"], - "parserOptions": { - "project": "./tsconfig.json" - }, - "ignorePatterns": ["**/build"], - "rules": { - "prettier/prettier": "error", - "import/prefer-default-export": "off", - "import/no-default-export": "error", - "import/no-unresolved": "error", - "import/no-cycle": [ - 2, - { - "maxDepth": "∞" - } - ] - } -} diff --git a/.prettierrc.json b/.prettierrc.json deleted file mode 100644 index aea847c4..00000000 --- a/.prettierrc.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "semi": true, - "trailingComma": "all", - "singleQuote": true -} diff --git a/.vscode/settings.json b/.vscode/settings.json index 3f07b82c..761b6f50 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -8,6 +8,7 @@ "aseed", "astar", "ausd", + "axlusdc", "biomejs", "bncs", "composablenodes", @@ -90,14 +91,14 @@ "xfer", "xtokens" ], - "editor.defaultFormatter": "rvest.vs-code-prettier-eslint", + "editor.defaultFormatter": "biomejs.biome", "editor.formatOnPaste": false, "editor.formatOnType": false, "editor.formatOnSave": true, "editor.formatOnSaveMode": "file", "typescript.preferences.importModuleSpecifier": "relative", "editor.codeActionsOnSave": { - "source.organizeImports": "explicit", - "source.fixAll.eslint": "explicit" + "quickfix.biome": "explicit", + "source.organizeImports.biome": "explicit" } } diff --git a/cspell.config.cjs b/cspell.config.cjs index aae45d01..4942df20 100644 --- a/cspell.config.cjs +++ b/cspell.config.cjs @@ -10,6 +10,7 @@ module.exports = { '**/*Abi.ts', '**/*.ts.snap', '**/*.sol', + 'pnpm-lock.yaml', ], words: vscodeConfig['cSpell.words'], }; diff --git a/examples/mrl-simple/index.ts b/examples/mrl-simple/index.ts index ece96acc..7d8a5571 100644 --- a/examples/mrl-simple/index.ts +++ b/examples/mrl-simple/index.ts @@ -1,11 +1,5 @@ import { Mrl } from '@moonbeam-network/mrl'; -import { - fantomTestnet, - ftmwh, - moonbeam, - peaqChain, - polkadot, -} from '@moonbeam-network/xcm-config'; +import { fantomTestnet, ftm, peaqAlphanet } from '@moonbeam-network/xcm-config'; import { Keyring } from '@polkadot/api'; import { cryptoWaitReady } from '@polkadot/util-crypto'; import { http, type Address, createWalletClient } from 'viem'; @@ -28,7 +22,7 @@ if (!EVM_PRIVATE_KEY || !POLKADOT_PRIVATE_KEY) { const account = privateKeyToAccount(EVM_PRIVATE_KEY as Address); const walletClient = createWalletClient({ account, - chain: moonbeam.getViemChain(), + chain: fantomTestnet.getViemChain(), transport: http(), }); @@ -38,7 +32,7 @@ console.log(`\nEVM address: ${account.address}`); await cryptoWaitReady(); const keyring = new Keyring({ - ss58Format: polkadot.ss58Format, + ss58Format: peaqAlphanet.ss58Format, type: 'sr25519', }); const pair = keyring.createFromUri(POLKADOT_PRIVATE_KEY); @@ -55,8 +49,8 @@ main() async function main() { const data = await Mrl() .setSource(fantomTestnet) - .setDestination(peaqChain) - .setAsset(ftmwh) + .setDestination(peaqAlphanet) + .setAsset(ftm) .setAddresses({ sourceAddress: account.address, destinationAddress: pair.address, diff --git a/lefthook.yml b/lefthook.yml index dc03b1a0..6fb018aa 100644 --- a/lefthook.yml +++ b/lefthook.yml @@ -6,4 +6,4 @@ pre-commit: run: pnpm biome check --write --no-errors-on-unmatched --files-ignore-unknown=true --colors=off {staged_files} stage_fixed: true spell: - run: pnpm run spell + run: pnpm cspell --no-summary --no-progress --no-must-find-files --files {staged_files} diff --git a/mkdocs/material-overrides/assets/stylesheets/custom.css b/mkdocs/material-overrides/assets/stylesheets/custom.css index c8d9a218..b516eefa 100644 --- a/mkdocs/material-overrides/assets/stylesheets/custom.css +++ b/mkdocs/material-overrides/assets/stylesheets/custom.css @@ -22,8 +22,8 @@ /** Material theme overrides **/ /* Fonts */ - --header-font: 'Banana Grotesk', sans-serif; - --label-font: 'Space Mono', monospace; + --header-font: "Banana Grotesk", sans-serif; + --label-font: "Space Mono", monospace; /* Borders */ --border-width-thin: 0.5px; @@ -34,11 +34,11 @@ --hover-opacity: 0.7; /** Admonition */ - --md-admonition-icon--code: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCI+PHBhdGggZD0iTTE0LjYsMTYuNkwxOS4yLDEyTDE0LjYsNy40TDE2LDZMMjIsMTJMMTYsMThMMTQuNiwxNi42TTkuNCwxNi42TDQuOCwxMkw5LjQsNy40TDgsNkwyLDEyTDgsMThMOS40LDE2LjZaIiAvPjwvc3ZnPg=='); + --md-admonition-icon--code: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCI+PHBhdGggZD0iTTE0LjYsMTYuNkwxOS4yLDEyTDE0LjYsNy40TDE2LDZMMjIsMTJMMTYsMThMMTQuNiwxNi42TTkuNCwxNi42TDQuOCwxMkw5LjQsNy40TDgsNkwyLDEyTDgsMThMOS40LDE2LjZaIiAvPjwvc3ZnPg=="); } :root, -[data-md-color-scheme='default'] { +[data-md-color-scheme="default"] { --md-accent-fg-color: var(--teal-light); /** Code highlighting color shades **/ @@ -82,8 +82,8 @@ } :root, -[data-md-color-scheme='slate'], -[data-md-color-scheme='slate'][data-md-color-primary='black'] { +[data-md-color-scheme="slate"], +[data-md-color-scheme="slate"][data-md-color-primary="black"] { --md-default-bg-color: var(--dark); --md-accent-fg-color: var(--teal-light); @@ -125,8 +125,8 @@ --border-grid: var(--border-width-thin) solid var(--border-color); } -[data-md-color-primary='black'] .md-tabs, -[data-md-color-primary='black'] .md-header { +[data-md-color-primary="black"] .md-tabs, +[data-md-color-primary="black"] .md-header { background-color: var(--dark); } @@ -181,15 +181,19 @@ body { } @media screen and (min-width: 76.25em) { - [dir='ltr'] .md-header__source { + [dir="ltr"] .md-header__source { margin-left: 0; } } -[data-md-color-scheme=slate] .md-nav__button.md-logo img[src$="#only-light"], -[data-md-color-scheme='default'] .md-nav__button.md-logo img[src$='#only-dark'], -[data-md-color-scheme=slate] .md-header__button.md-logo img[src$="#only-light"], -[data-md-color-scheme='default'] .md-header__button.md-logo img[src$='#only-dark'] { +[data-md-color-scheme="slate"] .md-nav__button.md-logo img[src$="#only-light"], +[data-md-color-scheme="default"] .md-nav__button.md-logo img[src$="#only-dark"], +[data-md-color-scheme="slate"] + .md-header__button.md-logo + img[src$="#only-light"], +[data-md-color-scheme="default"] + .md-header__button.md-logo + img[src$="#only-dark"] { display: none; } @@ -214,13 +218,13 @@ body { border-bottom: var(--border-grid); } -[dir=ltr] .md-search__input::placeholder { +[dir="ltr"] .md-search__input::placeholder { font-family: var(--label-font); text-transform: uppercase; } -.md-header__title--active .md-header__topic+.md-header__topic, -.md-header__topic+.md-header__topic { +.md-header__title--active .md-header__topic + .md-header__topic, +.md-header__topic + .md-header__topic { transition: none; } @@ -264,10 +268,9 @@ body { } } - /* Reference page styling */ /* Grid styling */ -.grid>div:last-child { +.grid > div:last-child { max-height: 1000px; overflow: auto; } @@ -276,7 +279,7 @@ body { grid-gap: 3rem; } -.md-typeset .grid>div:first-child>p:first-child { +.md-typeset .grid > div:first-child > p:first-child { margin-top: 0; } @@ -298,11 +301,10 @@ body { /* Add arrows to left navigation sections */ @media screen and (min-width: 76.25em) { - - .md-nav__item--active .md-nav__link[href='../interfaces/'] .md-ellipsis:after, - .md-nav__item--active .md-nav__link[href='../methods/'] .md-ellipsis:after { + .md-nav__item--active .md-nav__link[href="../interfaces/"] .md-ellipsis:after, + .md-nav__item--active .md-nav__link[href="../methods/"] .md-ellipsis:after { background-color: currentcolor; - content: ''; + content: ""; display: inline-block; -webkit-mask-position: center; mask-position: center; @@ -320,10 +322,12 @@ body { vertical-align: middle; } - .md-nav__item--active .md-nav__link.md-nav__link--active[href='./'] .md-ellipsis:after { + .md-nav__item--active + .md-nav__link.md-nav__link--active[href="./"] + .md-ellipsis:after { transform: rotate(90deg); background-color: currentcolor; - content: ''; + content: ""; display: inline-block; -webkit-mask-position: center; mask-position: center; @@ -341,11 +345,18 @@ body { vertical-align: middle; } - [dir='ltr'] .md-nav--integrated>.md-nav__list>.md-nav__item--active .md-nav--secondary { + [dir="ltr"] + .md-nav--integrated + > .md-nav__list + > .md-nav__item--active + .md-nav--secondary { border-left: 0.05rem solid var(--md-default-fg-color--lightest); } - [dir='ltr'] .md-sidebar--primary:not([hidden])~.md-content>.md-content__inner { + [dir="ltr"] + .md-sidebar--primary:not([hidden]) + ~ .md-content + > .md-content__inner { margin-left: 0; margin-right: 0; } @@ -364,11 +375,11 @@ body { border-color: var(--teal-light-shade-50); } -.md-typeset .note>.admonition-title { +.md-typeset .note > .admonition-title { background-color: var(--teal-dark-transparent-15); } -.md-typeset .note>.admonition-title:before { +.md-typeset .note > .admonition-title:before { background-color: var(--teal-light-shade-50); } @@ -377,13 +388,13 @@ body { border-color: var(--purple-light); } -.md-typeset .code>.admonition-title, -.md-typeset .code>summary { +.md-typeset .code > .admonition-title, +.md-typeset .code > summary { background-color: var(--purple-dark-transparent-15); } -.md-typeset .code>.admonition-title::before, -.md-typeset .code>summary::before { +.md-typeset .code > .admonition-title::before, +.md-typeset .code > summary::before { background-color: var(--purple-light); -webkit-mask-image: var(--md-admonition-icon--code); mask-image: var(--md-admonition-icon--code); @@ -392,4 +403,4 @@ body { /* Tab styling */ .js .md-typeset .tabbed-labels:before { background-color: var(--purple-light); -} \ No newline at end of file +} diff --git a/mkdocs/material-overrides/assets/stylesheets/home.css b/mkdocs/material-overrides/assets/stylesheets/home.css index 3dcd6e7c..e568ed0a 100644 --- a/mkdocs/material-overrides/assets/stylesheets/home.css +++ b/mkdocs/material-overrides/assets/stylesheets/home.css @@ -1,15 +1,15 @@ /* Background image on home page */ -[data-md-color-scheme='slate'] .md-main { +[data-md-color-scheme="slate"] .md-main { /* Set gradient background */ - background: linear-gradient(#000, #291E3A); + background: linear-gradient(#000, #291e3a); /* For older browsers */ - background: -webkit-linear-gradient(#000, #291E3A); - background: -moz-linear-gradient(#000, #291E3A); - background: -o-linear-gradient(#000, #291E3A); + background: -webkit-linear-gradient(#000, #291e3a); + background: -moz-linear-gradient(#000, #291e3a); + background: -o-linear-gradient(#000, #291e3a); } /* Background image on home page */ -[data-md-color-scheme='default'] .md-main { +[data-md-color-scheme="default"] .md-main { /* Set gradient background */ background: linear-gradient(#958fdc, #fff); /* For older browsers */ @@ -101,7 +101,7 @@ justify-content: center; } -.md-typeset pre>code { +.md-typeset pre > code { display: flex; height: 4em; padding: 0; @@ -113,7 +113,7 @@ @media screen and (max-width: 76.234375em) { .code { - display: none + display: none; } } @@ -133,4 +133,4 @@ .feature { width: 100%; } -} \ No newline at end of file +} diff --git a/package.json b/package.json index 01568bbb..3a415d4b 100644 --- a/package.json +++ b/package.json @@ -13,7 +13,7 @@ }, "type": "module", "workspaces": ["packages/*", "examples/*", "scripts"], - "packageManager": "pnpm@9.6.0", + "packageManager": "pnpm@9.10.0", "scripts": { "preinstall": "npx only-allow pnpm", "build": "turbo run build", @@ -42,26 +42,26 @@ "@polkadot/types": "^12.4.2", "@polkadot/util": "^13.0.2", "@polkadot/util-crypto": "^13.0.2", - "@wormhole-foundation/sdk-connect": "^0.8.2", - "@wormhole-foundation/sdk-evm": "^0.8.2" + "@wormhole-foundation/sdk-connect": "^0.10.7", + "@wormhole-foundation/sdk-evm": "^0.10.7" }, "devDependencies": { - "@biomejs/biome": "^1.8.3", + "@biomejs/biome": "^1.9.1", "@changesets/changelog-github": "^0.5.0", - "@changesets/cli": "^2.27.7", + "@changesets/cli": "^2.27.8", "@slack/webhook": "^7.0.3", "@types/big.js": "^6.2.2", - "bun": "^1.1.25", - "cspell": "^8.13.1", + "bun": "^1.1.27", + "cspell": "^8.14.2", "dotenv": "^16.4.5", "glob": "^11.0.0", - "lefthook": "^1.7.11", + "lefthook": "^1.7.15", "prettier": "^3.3.3", "syncpack": "^13.0.0", "tsup": "^8.2.4", - "turbo": "^2.0.14", - "typescript": "^5.5.4", - "viem": "^2.20.0", - "vitest": "^2.0.5" + "turbo": "^2.1.2", + "typescript": "^5.6.2", + "viem": "^2.21.7", + "vitest": "^2.1.1" } } diff --git a/packages/builder/fixtures/builderParamsMock.ts b/packages/builder/fixtures/builderParamsMock.ts index f77b7851..5fcaad0a 100644 --- a/packages/builder/fixtures/builderParamsMock.ts +++ b/packages/builder/fixtures/builderParamsMock.ts @@ -105,7 +105,7 @@ export const buildParamsMock: BuilderPrams = { destinationApi: apiMock, fee: testAssetAmount2, source: alphanetAssetHubMock, - sourceAddress: '5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY,', + sourceAddress: '5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY', sourceApi: apiMock, }; @@ -116,18 +116,19 @@ export const buildParamsSameAssetMock: BuilderPrams = { destinationApi: apiMock, fee: testAssetAmount, source: alphanetAssetHubMock, - sourceAddress: '5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY,', + sourceAddress: '5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY', sourceApi: apiMock, }; export const buildParachainParamsMock: BuilderPrams = { asset: testAssetAmount, destination: interlayTestnetMock, + /* cspell:disable-next-line */ destinationAddress: 'wd84XqsQ4LVzhmTBVd4s5ApGt9sBnnk8K7Q5PhBwwhxwqgm1u', destinationApi: apiMock, fee: testAssetAmount2, source: alphanetAssetHubMock, - sourceAddress: '5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY,', + sourceAddress: '5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY', sourceApi: apiMock, }; diff --git a/packages/builder/src/balance/BalanceBuilder.interfaces.ts b/packages/builder/src/balance/BalanceBuilder.interfaces.ts index fe38b8e1..38d12ad7 100644 --- a/packages/builder/src/balance/BalanceBuilder.interfaces.ts +++ b/packages/builder/src/balance/BalanceBuilder.interfaces.ts @@ -2,10 +2,11 @@ import type { ChainAsset } from '@moonbeam-network/xcm-types'; import type { Struct, u128 } from '@polkadot/types'; import type { ConfigBuilder } from '../builder.interfaces'; import type { ContractConfig } from '../contract'; +import type { EvmQueryConfig } from '../types/evm/EvmQueryConfig'; import type { SubstrateQueryConfig } from '../types/substrate/SubstrateQueryConfig'; export type BalanceConfigBuilder = ConfigBuilder< - ContractConfig | SubstrateQueryConfig, + ContractConfig | SubstrateQueryConfig | EvmQueryConfig, BalanceBuilderPrams >; diff --git a/packages/builder/src/balance/BalanceBuilder.ts b/packages/builder/src/balance/BalanceBuilder.ts index 40729982..ff05f805 100644 --- a/packages/builder/src/balance/BalanceBuilder.ts +++ b/packages/builder/src/balance/BalanceBuilder.ts @@ -5,7 +5,9 @@ import type { PalletBalancesAccountData, } from '@polkadot/types/lookup'; import { evmToAddress } from '@polkadot/util-crypto'; +import type { Address } from 'viem'; import { ContractConfig } from '../contract'; +import { EvmQueryConfig } from '../types/evm/EvmQueryConfig'; import { SubstrateQueryConfig } from '../types/substrate/SubstrateQueryConfig'; import type { BalanceConfigBuilder, @@ -25,6 +27,7 @@ export function BalanceBuilder() { export function evm() { return { erc20, + native, }; } @@ -46,6 +49,16 @@ function erc20(): BalanceConfigBuilder { }; } +function native(): BalanceConfigBuilder { + return { + build: ({ address }) => { + return new EvmQueryConfig({ + func: 'getBalance', + args: [{ address: address as Address }], + }); + }, + }; +} export function substrate() { return { assets, diff --git a/packages/builder/src/contract/ContractBuilder.interfaces.ts b/packages/builder/src/contract/ContractBuilder.interfaces.ts index 234747c6..674fb395 100644 --- a/packages/builder/src/contract/ContractBuilder.interfaces.ts +++ b/packages/builder/src/contract/ContractBuilder.interfaces.ts @@ -1,4 +1,4 @@ import type { ConfigBuilder } from '../builder.interfaces'; -import type { ContractConfig } from '../types/ContractConfig'; +import type { ContractConfig } from '../types/evm/ContractConfig'; export type ContractConfigBuilder = ConfigBuilder; diff --git a/packages/builder/src/contract/contracts/Xtokens/Xtokens.ts b/packages/builder/src/contract/contracts/Xtokens/Xtokens.ts index 91d3ef9d..739bdc71 100644 --- a/packages/builder/src/contract/contracts/Xtokens/Xtokens.ts +++ b/packages/builder/src/contract/contracts/Xtokens/Xtokens.ts @@ -2,7 +2,7 @@ import { type AnyParachain, EvmParachain } from '@moonbeam-network/xcm-types'; import { formatAssetIdToERC20 } from '@moonbeam-network/xcm-utils'; import { u8aToHex } from '@polkadot/util'; import { decodeAddress, evmToAddress } from '@polkadot/util-crypto'; -import { ContractConfig } from '../../../types/ContractConfig'; +import { ContractConfig } from '../../../types/evm/ContractConfig'; import type { ContractConfigBuilder } from '../../ContractBuilder.interfaces'; import { XTOKENS_ABI } from './XtokensABI'; diff --git a/packages/builder/src/contract/index.ts b/packages/builder/src/contract/index.ts index 6ddb0254..34f251b1 100644 --- a/packages/builder/src/contract/index.ts +++ b/packages/builder/src/contract/index.ts @@ -1,3 +1,3 @@ +export * from '../types/evm/ContractConfig'; export * from './ContractBuilder'; export * from './ContractBuilder.interfaces'; -export * from '../types/ContractConfig'; diff --git a/packages/builder/src/index.ts b/packages/builder/src/index.ts index 5e69a6d4..b553cf95 100644 --- a/packages/builder/src/index.ts +++ b/packages/builder/src/index.ts @@ -7,5 +7,4 @@ export * from './contract'; export * from './extrinsic'; export * from './fee'; export * from './mrl'; -export * from './types/BaseConfig'; -export * from './types/substrate/SubstrateQueryConfig'; +export * from './types'; diff --git a/packages/builder/src/mrl/providers/wormhole/extrinsic/ethereumXcm/ethereumXcm.ts b/packages/builder/src/mrl/providers/wormhole/extrinsic/ethereumXcm/ethereumXcm.ts index 31bd83b4..88b28fe1 100644 --- a/packages/builder/src/mrl/providers/wormhole/extrinsic/ethereumXcm/ethereumXcm.ts +++ b/packages/builder/src/mrl/providers/wormhole/extrinsic/ethereumXcm/ethereumXcm.ts @@ -1,6 +1,6 @@ import { type Address, encodeFunctionData } from 'viem'; import { ERC20_ABI } from '../../../../../balance/Erc20Abi'; -import type { ContractConfig } from '../../../../../types/ContractConfig'; +import type { ContractConfig } from '../../../../../types/evm/ContractConfig'; import { ExtrinsicConfig } from '../../../../../types/substrate/ExtrinsicConfig'; import { BATCH_CONTRACT_ADDRESS } from '../../../../MrlBuilder.constants'; import type { MrlConfigBuilder } from '../../../../MrlBuilder.interfaces'; diff --git a/packages/builder/src/mrl/providers/wormhole/extrinsic/polkadotXcm/__snapshots__/polkadotXcm.test.ts.snap b/packages/builder/src/mrl/providers/wormhole/extrinsic/polkadotXcm/__snapshots__/polkadotXcm.test.ts.snap index e516c7b7..0b1f33a1 100644 --- a/packages/builder/src/mrl/providers/wormhole/extrinsic/polkadotXcm/__snapshots__/polkadotXcm.test.ts.snap +++ b/packages/builder/src/mrl/providers/wormhole/extrinsic/polkadotXcm/__snapshots__/polkadotXcm.test.ts.snap @@ -97,7 +97,7 @@ exports[`polkadotXcm > send > should get correct arguments 2`] = ` "interior": { "X1": { "AccountKey20": { - "key": "0x00add9a9a17514029de846b1c01bfab05ceb6321", + "key": "0x88275533b5d43292c86d05985c3a6e226fee2bae", }, }, }, diff --git a/packages/builder/src/mrl/providers/wormhole/extrinsic/polkadotXcm/polkadotXcm.ts b/packages/builder/src/mrl/providers/wormhole/extrinsic/polkadotXcm/polkadotXcm.ts index 2ad942c4..c1945ad0 100644 --- a/packages/builder/src/mrl/providers/wormhole/extrinsic/polkadotXcm/polkadotXcm.ts +++ b/packages/builder/src/mrl/providers/wormhole/extrinsic/polkadotXcm/polkadotXcm.ts @@ -88,7 +88,7 @@ export function polkadotXcm() { ); const { address20 } = getMultilocationDerivedAddresses({ - address: destinationAddress, + address: sourceAddress, paraId: moonChain.parachainId, isParents: true, }); diff --git a/packages/builder/src/mrl/providers/wormhole/index.ts b/packages/builder/src/mrl/providers/wormhole/index.ts index 0038ef1f..540fbfa8 100644 --- a/packages/builder/src/mrl/providers/wormhole/index.ts +++ b/packages/builder/src/mrl/providers/wormhole/index.ts @@ -2,9 +2,9 @@ import { contract } from './contract'; import { extrinsic } from './extrinsic'; import { wormhole as whBuilder } from './wormhole'; -export * from './wormhole/wormholeFactory'; -export * from './wormhole/WormholeConfig'; export * from './extrinsic/ethereumXcm/BatchContractAbi'; +export * from './wormhole/WormholeConfig'; +export * from './wormhole/wormholeFactory'; export function wormhole() { return { diff --git a/packages/builder/src/mrl/providers/wormhole/wormhole/WormholeConfig.ts b/packages/builder/src/mrl/providers/wormhole/wormhole/WormholeConfig.ts index 8eb93765..af2b0847 100644 --- a/packages/builder/src/mrl/providers/wormhole/wormhole/WormholeConfig.ts +++ b/packages/builder/src/mrl/providers/wormhole/wormhole/WormholeConfig.ts @@ -1,15 +1,17 @@ import type { Network, Wormhole } from '@wormhole-foundation/sdk-connect'; export type WormholeTransferFunctions = 'tokenTransfer'; -export type Args = Parameters[WormholeTransferFunctions]>; +export type WormholeFunctionArgs = Parameters< + Wormhole[WormholeTransferFunctions] +>; export interface WormholeConfigConstructorParams { - args: Args; + args: WormholeFunctionArgs; func: WormholeTransferFunctions; } export class WormholeConfig { - readonly args: Args; + readonly args: WormholeFunctionArgs; readonly func: WormholeTransferFunctions; diff --git a/packages/builder/src/mrl/providers/wormhole/wormhole/__snapshots__/wormhole.test.ts.snap b/packages/builder/src/mrl/providers/wormhole/wormhole/__snapshots__/wormhole.test.ts.snap index 41076552..0620751e 100644 --- a/packages/builder/src/mrl/providers/wormhole/wormhole/__snapshots__/wormhole.test.ts.snap +++ b/packages/builder/src/mrl/providers/wormhole/wormhole/__snapshots__/wormhole.test.ts.snap @@ -4,10 +4,7 @@ exports[`wormhole > tokenTransfer with isAutomatic=false > should be correct con WormholeConfig { "args": [ { - "address": EvmAddress { - "address": "0x98891e5FD24Ef33A488A47101F65D212Ff6E650E", - "type": "Native", - }, + "address": "native", "chain": "Fantom", }, 99000000000n, @@ -36,10 +33,7 @@ exports[`wormhole > tokenTransfer with isAutomatic=true > should be correct conf WormholeConfig { "args": [ { - "address": EvmAddress { - "address": "0x98891e5FD24Ef33A488A47101F65D212Ff6E650E", - "type": "Native", - }, + "address": "native", "chain": "Fantom", }, 99000000000n, diff --git a/packages/builder/src/mrl/providers/wormhole/wormhole/wormhole.ts b/packages/builder/src/mrl/providers/wormhole/wormhole/wormhole.ts index 6e58616a..ca156dd9 100644 --- a/packages/builder/src/mrl/providers/wormhole/wormhole/wormhole.ts +++ b/packages/builder/src/mrl/providers/wormhole/wormhole/wormhole.ts @@ -25,16 +25,18 @@ export function wormhole() { source, sourceAddress, }) => { - if (!asset.address) { + const isNativeAsset = asset.isSame(source.nativeAsset); + const isDestinationMoonChain = destination.isEqual(moonChain); + const tokenAddress = isNativeAsset ? 'native' : asset.address; + + if (!tokenAddress) { throw new Error(`Asset ${asset.key} has no address`); } - const isDestinationMoonChain = destination.isEqual(moonChain); - const wh = wormholeFactory(source); const whSource = wh.getChain(source.getWormholeName()); const whMoonChain = wh.getChain(moonChain.getWormholeName()); - const whAsset = Wormhole.tokenId(whSource.chain, asset.address); + const whAsset = Wormhole.tokenId(whSource.chain, tokenAddress); const whSourceAddress = Wormhole.chainAddress( whSource.chain, sourceAddress, diff --git a/packages/builder/src/types/ContractConfig.ts b/packages/builder/src/types/evm/ContractConfig.ts similarity index 92% rename from packages/builder/src/types/ContractConfig.ts rename to packages/builder/src/types/evm/ContractConfig.ts index a9f0a442..223bb03e 100644 --- a/packages/builder/src/types/ContractConfig.ts +++ b/packages/builder/src/types/evm/ContractConfig.ts @@ -1,5 +1,5 @@ import { type Abi, encodeFunctionData } from 'viem'; -import { BaseConfig, type BaseConfigConstructorParams } from './BaseConfig'; +import { BaseConfig, type BaseConfigConstructorParams } from '../BaseConfig'; export interface ContractConfigConstructorParams extends BaseConfigConstructorParams { diff --git a/packages/builder/src/types/evm/EvmQueryConfig.ts b/packages/builder/src/types/evm/EvmQueryConfig.ts new file mode 100644 index 00000000..92479806 --- /dev/null +++ b/packages/builder/src/types/evm/EvmQueryConfig.ts @@ -0,0 +1,25 @@ +import type { HttpTransport, PublicClient } from 'viem'; + +export type EvmQueryFunctions = 'getBalance'; +export type EvmFunctionArgs = Parameters< + PublicClient[EvmQueryFunctions] +>; + +export interface EvmQueryConfigParams { + readonly args: EvmFunctionArgs; + readonly func: EvmQueryFunctions; +} + +export class EvmQueryConfig { + readonly args: EvmFunctionArgs; + readonly func: EvmQueryFunctions; + + static is(obj: unknown): obj is EvmQueryConfig { + return obj instanceof EvmQueryConfig; + } + + constructor({ args, func }: EvmQueryConfigParams) { + this.args = args; + this.func = func; + } +} diff --git a/packages/builder/src/types/evm/index.ts b/packages/builder/src/types/evm/index.ts new file mode 100644 index 00000000..b92fa440 --- /dev/null +++ b/packages/builder/src/types/evm/index.ts @@ -0,0 +1,2 @@ +export * from './ContractConfig'; +export * from './EvmQueryConfig'; diff --git a/packages/builder/src/types/index.ts b/packages/builder/src/types/index.ts new file mode 100644 index 00000000..041193c8 --- /dev/null +++ b/packages/builder/src/types/index.ts @@ -0,0 +1,2 @@ +export * from './evm'; +export * from './substrate'; diff --git a/packages/builder/src/types/substrate/index.ts b/packages/builder/src/types/substrate/index.ts new file mode 100644 index 00000000..5a5a3b00 --- /dev/null +++ b/packages/builder/src/types/substrate/index.ts @@ -0,0 +1,3 @@ +export * from './ExtrinsicConfig'; +export * from './SubstrateCallConfig'; +export * from './SubstrateQueryConfig'; diff --git a/packages/config/src/ConfigService/ConfigService.test.ts b/packages/config/src/ConfigService/ConfigService.test.ts index d77660e9..789da130 100644 --- a/packages/config/src/ConfigService/ConfigService.test.ts +++ b/packages/config/src/ConfigService/ConfigService.test.ts @@ -205,11 +205,12 @@ describe('config service', () => { chain: hydration, routes: [ { - asset: glmr, source: { + asset: glmr, balance: BalanceBuilder().substrate().tokens().accounts(), }, destination: { + asset: glmr, chain: moonbeam, balance: BalanceBuilder().substrate().tokens().accounts(), fee: { diff --git a/packages/config/src/ConfigService/ConfigService.ts b/packages/config/src/ConfigService/ConfigService.ts index cfe4ab00..837e672f 100644 --- a/packages/config/src/ConfigService/ConfigService.ts +++ b/packages/config/src/ConfigService/ConfigService.ts @@ -51,7 +51,7 @@ export class ConfigService { .filter((routes) => routes.chain.ecosystem === ecosystem) .map((routes) => routes.getRoutes()) .flat(2) - .map((route) => route.asset), + .map((route) => route.source.asset), ), ).sort((a, b) => a.key.localeCompare(b.key)); } diff --git a/packages/config/src/chains.ts b/packages/config/src/chains.ts index cc26c208..e801f6f4 100644 --- a/packages/config/src/chains.ts +++ b/packages/config/src/chains.ts @@ -469,6 +469,9 @@ export const fantomTestnet = new EvmChain({ name: 'Fantom Testnet', nativeAsset: ftm, rpc: 'https://rpc.testnet.fantom.network', + wh: { + name: 'Fantom', + }, }); export const hydration = new Parachain({ @@ -944,6 +947,9 @@ export const moonbaseAlpha = new EvmParachain({ rpc: 'https://rpc.api.moonbase.moonbeam.network', ss58Format: 1287, ws: ['wss://wss.api.moonbase.moonbeam.network'], + wh: { + name: 'Moonbeam', + }, }); export const moonbaseBeta = new EvmParachain({ diff --git a/packages/config/src/mrl-configs/fantomTestnet.ts b/packages/config/src/mrl-configs/fantomTestnet.ts index 6157a54a..a728ce44 100644 --- a/packages/config/src/mrl-configs/fantomTestnet.ts +++ b/packages/config/src/mrl-configs/fantomTestnet.ts @@ -1,33 +1,37 @@ -import { - BalanceBuilder, - FeeBuilder, - MrlBuilder, -} from '@moonbeam-network/xcm-builder'; -import { ftmwh, hdx } from '../assets'; -import { fantomTestnet, hydrationAlphanet } from '../chains'; +import { BalanceBuilder, MrlBuilder } from '@moonbeam-network/xcm-builder'; +import { dev, ftm, ftmwh } from '../assets'; +import { fantomTestnet, peaqAlphanet } from '../chains'; import { ChainRoutes } from '../types/ChainRoutes'; export const fantomTestnetRoutes = new ChainRoutes({ chain: fantomTestnet, routes: [ { - asset: ftmwh, source: { - balance: BalanceBuilder().substrate().system().account(), // TODO: + asset: ftm, + balance: BalanceBuilder().evm().native(), + destinationFee: { + asset: ftm, + balance: BalanceBuilder().evm().native(), + }, }, destination: { - chain: hydrationAlphanet, - balance: BalanceBuilder().substrate().system().account(), // TODO: + asset: ftmwh, + chain: peaqAlphanet, + balance: BalanceBuilder().substrate().assets().account(), fee: { - // TODO: - amount: FeeBuilder().assetManager().assetTypeUnitsPerSecond(), - asset: hdx, - balance: BalanceBuilder().substrate().system().account(), + asset: ftmwh, + amount: 0.01, }, }, mrl: { - isAutomatic: true, + isAutomatic: false, transfer: MrlBuilder().wormhole().wormhole().tokenTransfer(), + moonChainFee: { + asset: dev, + amount: 0.1, + balance: BalanceBuilder().substrate().system().account(), + }, }, }, ], diff --git a/packages/config/src/mrl-configs/hydrationAlphanet.ts b/packages/config/src/mrl-configs/hydrationAlphanet.ts deleted file mode 100644 index 08ebc9f0..00000000 --- a/packages/config/src/mrl-configs/hydrationAlphanet.ts +++ /dev/null @@ -1,34 +0,0 @@ -import { - BalanceBuilder, - FeeBuilder, - MrlBuilder, -} from '@moonbeam-network/xcm-builder'; -import { ftmwh, hdx } from '../assets'; -import { fantomTestnet, hydrationAlphanet } from '../chains'; -import { ChainRoutes } from '../types/ChainRoutes'; - -export const hydrationAlphanetRoutes = new ChainRoutes({ - chain: hydrationAlphanet, - routes: [ - { - asset: ftmwh, - source: { - balance: BalanceBuilder().substrate().system().account(), // TODO: - }, - destination: { - chain: fantomTestnet, - balance: BalanceBuilder().substrate().system().account(), // TODO: - fee: { - // TODO: - amount: FeeBuilder().assetManager().assetTypeUnitsPerSecond(), - asset: hdx, - balance: BalanceBuilder().substrate().system().account(), - }, - }, - mrl: { - isAutomatic: true, - transfer: MrlBuilder().wormhole().extrinsic().polkadotXcm().send(), // TODO: - }, - }, - ], -}); diff --git a/packages/config/src/mrl-configs/index.ts b/packages/config/src/mrl-configs/index.ts index 49b14507..b7f3a12b 100644 --- a/packages/config/src/mrl-configs/index.ts +++ b/packages/config/src/mrl-configs/index.ts @@ -1,11 +1,7 @@ import type { ChainRoutes } from '../types/ChainRoutes'; import { fantomTestnetRoutes } from './fantomTestnet'; -import { hydrationAlphanetRoutes } from './hydrationAlphanet'; -export const mrlRoutesList: ChainRoutes[] = [ - fantomTestnetRoutes, - hydrationAlphanetRoutes, -]; +export const mrlRoutesList: ChainRoutes[] = [fantomTestnetRoutes]; export const mrlRoutesMap = new Map( mrlRoutesList.map((config) => [config.chain.key, config]), diff --git a/packages/config/src/types/AssetRoute.ts b/packages/config/src/types/AssetRoute.ts index 823af3dc..8f7d5f4a 100644 --- a/packages/config/src/types/AssetRoute.ts +++ b/packages/config/src/types/AssetRoute.ts @@ -6,10 +6,14 @@ import type { FeeConfigBuilder, MrlConfigBuilder, } from '@moonbeam-network/xcm-builder'; -import type { AnyChain, Asset, SetOptional } from '@moonbeam-network/xcm-types'; +import type { + AnyChain, + Asset, + ChainAsset, + SetOptional, +} from '@moonbeam-network/xcm-types'; export interface AssetRouteConstructorParams { - asset: Asset; source: SourceConfig; destination: DestinationConfig; contract?: ContractConfigBuilder; @@ -18,10 +22,12 @@ export interface AssetRouteConstructorParams { } export interface SourceConfig { + asset: Asset; chain: AnyChain; balance: BalanceConfigBuilder; fee?: FeeConfig; destinationFee?: { + asset?: Asset; balance: BalanceConfigBuilder; }; min?: AssetMinConfigBuilder; @@ -42,6 +48,7 @@ export interface FeeConfig { export interface MrlConfig { isAutomatic: boolean; transfer: MrlConfigBuilder; + moonChainFee: MoonChainFeeConfig; } export interface DestinationFeeConfig @@ -49,9 +56,11 @@ export interface DestinationFeeConfig amount: number | FeeConfigBuilder; } -export class AssetRoute { - readonly asset: Asset; +export interface MoonChainFeeConfig extends FeeConfig { + amount: number | FeeConfigBuilder; +} +export class AssetRoute { readonly source: SourceConfig; readonly destination: DestinationConfig; @@ -63,18 +72,22 @@ export class AssetRoute { readonly mrl?: MrlConfig; constructor({ - asset, source, destination, contract, extrinsic, mrl, }: AssetRouteConstructorParams) { - this.asset = asset; this.source = source; this.destination = destination; this.contract = contract; this.extrinsic = extrinsic; this.mrl = mrl; } + + getDestinationFeeAssetOnSource(): ChainAsset { + return this.source.chain.getChainAsset( + this.source.destinationFee?.asset || this.destination.fee.asset, + ); + } } diff --git a/packages/config/src/types/ChainRoutes.ts b/packages/config/src/types/ChainRoutes.ts index f1922522..35046e9e 100644 --- a/packages/config/src/types/ChainRoutes.ts +++ b/packages/config/src/types/ChainRoutes.ts @@ -23,14 +23,14 @@ export class ChainRoutes { constructor({ chain, routes }: ChainRoutesConstructorParams) { this.chain = chain; this.#routes = new Map( - routes.map(({ asset, source, destination, contract, extrinsic }) => [ - `${asset.key}-${destination.chain.key}`, + routes.map(({ source, destination, contract, extrinsic, mrl }) => [ + `${source.asset.key}-${destination.chain.key}`, new AssetRoute({ - asset, source: { ...source, chain }, destination, contract, extrinsic, + mrl, }), ]), ); @@ -43,7 +43,7 @@ export class ChainRoutes { getAssetRoutes(keyOrAsset: string | AnyAsset): AssetRoute[] { const key = getKey(keyOrAsset); - return this.getRoutes().filter((cfg) => cfg.asset.key === key); + return this.getRoutes().filter((route) => route.source.asset.key === key); } getAssetDestinations(keyOrAsset: string | AnyAsset): AnyChain[] { @@ -56,8 +56,8 @@ export class ChainRoutes { const key = getKey(keyOrChain); return this.getRoutes() - .filter((cfg) => cfg.destination.chain.key === key) - .map((cfg) => cfg.asset); + .filter((route) => route.destination.chain.key === key) + .map((route) => route.source.asset); } getAssetRoute( diff --git a/packages/config/src/xcm-configs/acala.ts b/packages/config/src/xcm-configs/acala.ts index 8a184bf2..d0d42e88 100644 --- a/packages/config/src/xcm-configs/acala.ts +++ b/packages/config/src/xcm-configs/acala.ts @@ -12,14 +12,15 @@ export const acalaRoutes = new ChainRoutes({ chain: acala, routes: [ { - asset: aca, source: { + asset: aca, balance: BalanceBuilder().substrate().system().account(), destinationFee: { balance: BalanceBuilder().substrate().system().account(), }, }, destination: { + asset: aca, chain: moonbeam, balance: BalanceBuilder().substrate().assets().account(), fee: { @@ -30,8 +31,8 @@ export const acalaRoutes = new ChainRoutes({ extrinsic: ExtrinsicBuilder().xTokens().transfer(), }, { - asset: aseed, source: { + asset: aseed, balance: BalanceBuilder().substrate().tokens().accounts(), fee: { asset: aca, @@ -43,6 +44,7 @@ export const acalaRoutes = new ChainRoutes({ }, }, destination: { + asset: aseed, chain: moonbeam, balance: BalanceBuilder().substrate().assets().account(), fee: { @@ -53,8 +55,8 @@ export const acalaRoutes = new ChainRoutes({ extrinsic: ExtrinsicBuilder().xTokens().transfer(), }, { - asset: glmr, source: { + asset: glmr, balance: BalanceBuilder().substrate().tokens().accounts(), fee: { asset: aca, @@ -66,6 +68,7 @@ export const acalaRoutes = new ChainRoutes({ }, }, destination: { + asset: glmr, chain: moonbeam, balance: BalanceBuilder().substrate().system().account(), fee: { @@ -76,8 +79,8 @@ export const acalaRoutes = new ChainRoutes({ extrinsic: ExtrinsicBuilder().xTokens().transfer(), }, { - asset: ldot, source: { + asset: ldot, balance: BalanceBuilder().substrate().tokens().accounts(), fee: { asset: aca, @@ -89,6 +92,7 @@ export const acalaRoutes = new ChainRoutes({ }, }, destination: { + asset: ldot, chain: moonbeam, balance: BalanceBuilder().substrate().assets().account(), fee: { diff --git a/packages/config/src/xcm-configs/alphanetAssetHub.ts b/packages/config/src/xcm-configs/alphanetAssetHub.ts index 277b28b8..b27c9514 100644 --- a/packages/config/src/xcm-configs/alphanetAssetHub.ts +++ b/packages/config/src/xcm-configs/alphanetAssetHub.ts @@ -12,8 +12,8 @@ export const alphanetAssetHubRoutes = new ChainRoutes({ chain: alphanetAssetHub, routes: [ { - asset: tt1, source: { + asset: tt1, balance: BalanceBuilder().substrate().assets().account(), fee: { asset: unit, @@ -25,6 +25,7 @@ export const alphanetAssetHubRoutes = new ChainRoutes({ }, }, destination: { + asset: tt1, chain: moonbaseAlpha, balance: BalanceBuilder().substrate().assets().account(), fee: { diff --git a/packages/config/src/xcm-configs/alphanetRelay.ts b/packages/config/src/xcm-configs/alphanetRelay.ts index e7b72532..7bc8590f 100644 --- a/packages/config/src/xcm-configs/alphanetRelay.ts +++ b/packages/config/src/xcm-configs/alphanetRelay.ts @@ -11,14 +11,15 @@ export const alphanetRelayRoutes = new ChainRoutes({ chain: alphanetRelay, routes: [ { - asset: unit, source: { + asset: unit, balance: BalanceBuilder().substrate().system().account(), destinationFee: { balance: BalanceBuilder().substrate().system().account(), }, }, destination: { + asset: unit, chain: moonbaseAlpha, balance: BalanceBuilder().substrate().assets().account(), fee: { diff --git a/packages/config/src/xcm-configs/astar.ts b/packages/config/src/xcm-configs/astar.ts index 396cd1ea..8e8b121b 100644 --- a/packages/config/src/xcm-configs/astar.ts +++ b/packages/config/src/xcm-configs/astar.ts @@ -11,14 +11,15 @@ export const astarRoutes = new ChainRoutes({ chain: astar, routes: [ { - asset: astr, source: { + asset: astr, balance: BalanceBuilder().substrate().system().account(), destinationFee: { balance: BalanceBuilder().substrate().system().account(), }, }, destination: { + asset: astr, chain: moonbeam, balance: BalanceBuilder().substrate().assets().account(), fee: { @@ -32,8 +33,8 @@ export const astarRoutes = new ChainRoutes({ .here(), }, { - asset: glmr, source: { + asset: glmr, balance: BalanceBuilder().substrate().assets().account(), fee: { asset: astr, @@ -44,6 +45,7 @@ export const astarRoutes = new ChainRoutes({ }, }, destination: { + asset: glmr, chain: moonbeam, balance: BalanceBuilder().substrate().system().account(), fee: { diff --git a/packages/config/src/xcm-configs/bifrostKusama.ts b/packages/config/src/xcm-configs/bifrostKusama.ts index 34b579a1..492df67c 100644 --- a/packages/config/src/xcm-configs/bifrostKusama.ts +++ b/packages/config/src/xcm-configs/bifrostKusama.ts @@ -12,14 +12,15 @@ export const bifrostKusamaRoutes = new ChainRoutes({ chain: bifrostKusama, routes: [ { - asset: bnc, source: { + asset: bnc, balance: BalanceBuilder().substrate().system().account(), destinationFee: { balance: BalanceBuilder().substrate().system().account(), }, }, destination: { + asset: bnc, chain: moonriver, balance: BalanceBuilder().substrate().assets().account(), fee: { @@ -30,8 +31,8 @@ export const bifrostKusamaRoutes = new ChainRoutes({ extrinsic: ExtrinsicBuilder().xTokens().transfer(), }, { - asset: movr, source: { + asset: movr, balance: BalanceBuilder().substrate().tokens().accounts(), fee: { asset: bnc, @@ -43,6 +44,7 @@ export const bifrostKusamaRoutes = new ChainRoutes({ }, }, destination: { + asset: movr, chain: moonriver, balance: BalanceBuilder().substrate().system().account(), fee: { @@ -53,8 +55,8 @@ export const bifrostKusamaRoutes = new ChainRoutes({ extrinsic: ExtrinsicBuilder().xTokens().transfer(), }, { - asset: vbnc, source: { + asset: vbnc, balance: BalanceBuilder().substrate().tokens().accounts(), fee: { asset: bnc, @@ -66,6 +68,7 @@ export const bifrostKusamaRoutes = new ChainRoutes({ }, }, destination: { + asset: vbnc, chain: moonriver, balance: BalanceBuilder().evm().erc20(), fee: { @@ -76,8 +79,8 @@ export const bifrostKusamaRoutes = new ChainRoutes({ extrinsic: ExtrinsicBuilder().xTokens().transferMultiCurrencies(), }, { - asset: vksm, source: { + asset: vksm, balance: BalanceBuilder().substrate().tokens().accounts(), fee: { asset: bnc, @@ -89,6 +92,7 @@ export const bifrostKusamaRoutes = new ChainRoutes({ }, }, destination: { + asset: vksm, chain: moonriver, balance: BalanceBuilder().evm().erc20(), fee: { @@ -99,8 +103,8 @@ export const bifrostKusamaRoutes = new ChainRoutes({ extrinsic: ExtrinsicBuilder().xTokens().transferMultiCurrencies(), }, { - asset: vmovr, source: { + asset: vmovr, balance: BalanceBuilder().substrate().tokens().accounts(), fee: { asset: bnc, @@ -112,6 +116,7 @@ export const bifrostKusamaRoutes = new ChainRoutes({ }, }, destination: { + asset: vmovr, chain: moonriver, balance: BalanceBuilder().evm().erc20(), fee: { diff --git a/packages/config/src/xcm-configs/bifrostPolkadot.ts b/packages/config/src/xcm-configs/bifrostPolkadot.ts index 28f17692..3c67ebab 100644 --- a/packages/config/src/xcm-configs/bifrostPolkadot.ts +++ b/packages/config/src/xcm-configs/bifrostPolkadot.ts @@ -22,14 +22,15 @@ export const bifrostPolkadotRoutes = new ChainRoutes({ chain: bifrostPolkadot, routes: [ { - asset: bnc, source: { + asset: bnc, balance: BalanceBuilder().substrate().system().account(), destinationFee: { balance: BalanceBuilder().substrate().system().account(), }, }, destination: { + asset: bnc, chain: moonbeam, balance: BalanceBuilder().substrate().assets().account(), fee: { @@ -40,8 +41,8 @@ export const bifrostPolkadotRoutes = new ChainRoutes({ extrinsic: ExtrinsicBuilder().xTokens().transfer(), }, { - asset: fil, source: { + asset: fil, balance: BalanceBuilder().substrate().tokens().accounts(), fee: { asset: bnc, @@ -53,6 +54,7 @@ export const bifrostPolkadotRoutes = new ChainRoutes({ }, }, destination: { + asset: fil, chain: moonbeam, balance: BalanceBuilder().evm().erc20(), fee: { @@ -63,8 +65,8 @@ export const bifrostPolkadotRoutes = new ChainRoutes({ extrinsic: ExtrinsicBuilder().xTokens().transferMultiCurrencies(), }, { - asset: glmr, source: { + asset: glmr, balance: BalanceBuilder().substrate().tokens().accounts(), fee: { asset: bnc, @@ -76,6 +78,7 @@ export const bifrostPolkadotRoutes = new ChainRoutes({ }, }, destination: { + asset: glmr, chain: moonbeam, balance: BalanceBuilder().substrate().assets().account(), fee: { @@ -86,8 +89,8 @@ export const bifrostPolkadotRoutes = new ChainRoutes({ extrinsic: ExtrinsicBuilder().xTokens().transfer(), }, { - asset: vastr, source: { + asset: vastr, balance: BalanceBuilder().substrate().tokens().accounts(), fee: { asset: bnc, @@ -99,6 +102,7 @@ export const bifrostPolkadotRoutes = new ChainRoutes({ }, }, destination: { + asset: vastr, chain: moonbeam, balance: BalanceBuilder().evm().erc20(), fee: { @@ -109,8 +113,8 @@ export const bifrostPolkadotRoutes = new ChainRoutes({ extrinsic: ExtrinsicBuilder().xTokens().transferMultiCurrencies(), }, { - asset: vdot, source: { + asset: vdot, balance: BalanceBuilder().substrate().tokens().accounts(), fee: { asset: bnc, @@ -122,6 +126,7 @@ export const bifrostPolkadotRoutes = new ChainRoutes({ }, }, destination: { + asset: vdot, chain: moonbeam, balance: BalanceBuilder().evm().erc20(), fee: { @@ -132,8 +137,8 @@ export const bifrostPolkadotRoutes = new ChainRoutes({ extrinsic: ExtrinsicBuilder().xTokens().transfer(), }, { - asset: vfil, source: { + asset: vfil, balance: BalanceBuilder().substrate().tokens().accounts(), fee: { asset: bnc, @@ -145,6 +150,7 @@ export const bifrostPolkadotRoutes = new ChainRoutes({ }, }, destination: { + asset: vfil, chain: moonbeam, balance: BalanceBuilder().evm().erc20(), fee: { @@ -155,8 +161,8 @@ export const bifrostPolkadotRoutes = new ChainRoutes({ extrinsic: ExtrinsicBuilder().xTokens().transferMultiCurrencies(), }, { - asset: vglmr, source: { + asset: vglmr, balance: BalanceBuilder().substrate().tokens().accounts(), fee: { asset: bnc, @@ -168,6 +174,7 @@ export const bifrostPolkadotRoutes = new ChainRoutes({ }, }, destination: { + asset: vglmr, chain: moonbeam, balance: BalanceBuilder().evm().erc20(), fee: { @@ -178,8 +185,8 @@ export const bifrostPolkadotRoutes = new ChainRoutes({ extrinsic: ExtrinsicBuilder().xTokens().transferMultiCurrencies(), }, { - asset: vmanta, source: { + asset: vmanta, balance: BalanceBuilder().substrate().tokens().accounts(), fee: { asset: bnc, @@ -191,6 +198,7 @@ export const bifrostPolkadotRoutes = new ChainRoutes({ }, }, destination: { + asset: vmanta, chain: moonbeam, balance: BalanceBuilder().evm().erc20(), fee: { @@ -201,8 +209,8 @@ export const bifrostPolkadotRoutes = new ChainRoutes({ extrinsic: ExtrinsicBuilder().xTokens().transferMultiCurrencies(), }, { - asset: bncs, source: { + asset: bncs, balance: BalanceBuilder().substrate().tokens().accounts(), fee: { asset: bnc, @@ -214,6 +222,7 @@ export const bifrostPolkadotRoutes = new ChainRoutes({ }, }, destination: { + asset: bncs, chain: moonbeam, balance: BalanceBuilder().substrate().assets().account(), fee: { diff --git a/packages/config/src/xcm-configs/calamari.ts b/packages/config/src/xcm-configs/calamari.ts index 80b9b094..e27475d0 100644 --- a/packages/config/src/xcm-configs/calamari.ts +++ b/packages/config/src/xcm-configs/calamari.ts @@ -12,14 +12,15 @@ export const calamariRoutes = new ChainRoutes({ chain: calamari, routes: [ { - asset: kma, source: { + asset: kma, balance: BalanceBuilder().substrate().system().account(), destinationFee: { balance: BalanceBuilder().substrate().system().account(), }, }, destination: { + asset: kma, chain: moonriver, balance: BalanceBuilder().substrate().assets().account(), fee: { @@ -30,8 +31,8 @@ export const calamariRoutes = new ChainRoutes({ extrinsic: ExtrinsicBuilder().xTokens().transfer(), }, { - asset: movr, source: { + asset: movr, balance: BalanceBuilder().substrate().assets().account(), fee: { asset: kma, @@ -43,6 +44,7 @@ export const calamariRoutes = new ChainRoutes({ }, }, destination: { + asset: movr, chain: moonriver, balance: BalanceBuilder().substrate().system().account(), fee: { diff --git a/packages/config/src/xcm-configs/centrifuge.ts b/packages/config/src/xcm-configs/centrifuge.ts index a524b411..317df5b2 100644 --- a/packages/config/src/xcm-configs/centrifuge.ts +++ b/packages/config/src/xcm-configs/centrifuge.ts @@ -11,14 +11,15 @@ export const centrifugeRoutes = new ChainRoutes({ chain: centrifuge, routes: [ { - asset: cfg, source: { + asset: cfg, balance: BalanceBuilder().substrate().system().account(), destinationFee: { balance: BalanceBuilder().substrate().system().account(), }, }, destination: { + asset: cfg, chain: moonbeam, balance: BalanceBuilder().substrate().assets().account(), fee: { diff --git a/packages/config/src/xcm-configs/crustShadow.ts b/packages/config/src/xcm-configs/crustShadow.ts index ff22d447..d021e625 100644 --- a/packages/config/src/xcm-configs/crustShadow.ts +++ b/packages/config/src/xcm-configs/crustShadow.ts @@ -11,14 +11,15 @@ export const crustShadowRoutes = new ChainRoutes({ chain: crustShadow, routes: [ { - asset: csm, source: { + asset: csm, balance: BalanceBuilder().substrate().system().account(), destinationFee: { balance: BalanceBuilder().substrate().system().account(), }, }, destination: { + asset: csm, chain: moonriver, balance: BalanceBuilder().substrate().assets().account(), fee: { @@ -32,8 +33,8 @@ export const crustShadowRoutes = new ChainRoutes({ .here(), }, { - asset: movr, source: { + asset: movr, balance: BalanceBuilder().substrate().assets().account(), fee: { asset: csm, @@ -44,6 +45,7 @@ export const crustShadowRoutes = new ChainRoutes({ }, }, destination: { + asset: movr, chain: moonriver, balance: BalanceBuilder().substrate().system().account(), fee: { diff --git a/packages/config/src/xcm-configs/darwinia.ts b/packages/config/src/xcm-configs/darwinia.ts index d72cd017..aaf20e3c 100644 --- a/packages/config/src/xcm-configs/darwinia.ts +++ b/packages/config/src/xcm-configs/darwinia.ts @@ -11,14 +11,15 @@ export const darwiniaRoutes = new ChainRoutes({ chain: darwinia, routes: [ { - asset: ring, source: { + asset: ring, balance: BalanceBuilder().substrate().system().account(), destinationFee: { balance: BalanceBuilder().substrate().system().account(), }, }, destination: { + asset: ring, chain: moonbeam, balance: BalanceBuilder().substrate().assets().account(), fee: { diff --git a/packages/config/src/xcm-configs/darwiniaCrab.ts b/packages/config/src/xcm-configs/darwiniaCrab.ts index b798f434..bd819f4f 100644 --- a/packages/config/src/xcm-configs/darwiniaCrab.ts +++ b/packages/config/src/xcm-configs/darwiniaCrab.ts @@ -11,14 +11,15 @@ export const darwiniaCrabRoutes = new ChainRoutes({ chain: darwiniaCrab, routes: [ { - asset: crab, source: { + asset: crab, balance: BalanceBuilder().substrate().system().account(), destinationFee: { balance: BalanceBuilder().substrate().system().account(), }, }, destination: { + asset: crab, chain: moonriver, balance: BalanceBuilder().substrate().assets().account(), fee: { diff --git a/packages/config/src/xcm-configs/hydration.ts b/packages/config/src/xcm-configs/hydration.ts index 56bff8c9..496c01ff 100644 --- a/packages/config/src/xcm-configs/hydration.ts +++ b/packages/config/src/xcm-configs/hydration.ts @@ -11,14 +11,15 @@ export const hydrationRoutes = new ChainRoutes({ chain: hydration, routes: [ { - asset: hdx, source: { + asset: hdx, balance: BalanceBuilder().substrate().system().account(), destinationFee: { balance: BalanceBuilder().substrate().system().account(), }, }, destination: { + asset: hdx, chain: moonbeam, balance: BalanceBuilder().substrate().assets().account(), fee: { @@ -29,14 +30,15 @@ export const hydrationRoutes = new ChainRoutes({ extrinsic: ExtrinsicBuilder().xTokens().transfer(), }, { - asset: glmr, source: { + asset: glmr, balance: BalanceBuilder().substrate().tokens().accounts(), destinationFee: { balance: BalanceBuilder().substrate().tokens().accounts(), }, }, destination: { + asset: glmr, chain: moonbeam, balance: BalanceBuilder().substrate().system().account(), fee: { @@ -47,8 +49,8 @@ export const hydrationRoutes = new ChainRoutes({ extrinsic: ExtrinsicBuilder().xTokens().transfer(), }, { - asset: dai, source: { + asset: dai, balance: BalanceBuilder().substrate().tokens().accounts(), fee: { asset: hdx, @@ -59,6 +61,7 @@ export const hydrationRoutes = new ChainRoutes({ }, }, destination: { + asset: dai, chain: moonbeam, balance: BalanceBuilder().evm().erc20(), fee: { @@ -69,8 +72,8 @@ export const hydrationRoutes = new ChainRoutes({ extrinsic: ExtrinsicBuilder().xTokens().transferMultiCurrencies(), }, { - asset: usdcwh, source: { + asset: usdcwh, balance: BalanceBuilder().substrate().tokens().accounts(), fee: { asset: hdx, @@ -81,6 +84,7 @@ export const hydrationRoutes = new ChainRoutes({ }, }, destination: { + asset: usdcwh, chain: moonbeam, balance: BalanceBuilder().evm().erc20(), fee: { @@ -91,8 +95,8 @@ export const hydrationRoutes = new ChainRoutes({ extrinsic: ExtrinsicBuilder().xTokens().transferMultiCurrencies(), }, { - asset: usdtwh, source: { + asset: usdtwh, balance: BalanceBuilder().substrate().tokens().accounts(), fee: { asset: hdx, @@ -103,6 +107,7 @@ export const hydrationRoutes = new ChainRoutes({ }, }, destination: { + asset: usdtwh, chain: moonbeam, balance: BalanceBuilder().evm().erc20(), fee: { @@ -113,8 +118,8 @@ export const hydrationRoutes = new ChainRoutes({ extrinsic: ExtrinsicBuilder().xTokens().transferMultiCurrencies(), }, { - asset: wbtc, source: { + asset: wbtc, balance: BalanceBuilder().substrate().tokens().accounts(), fee: { asset: hdx, @@ -125,6 +130,7 @@ export const hydrationRoutes = new ChainRoutes({ }, }, destination: { + asset: wbtc, chain: moonbeam, balance: BalanceBuilder().evm().erc20(), fee: { @@ -135,8 +141,8 @@ export const hydrationRoutes = new ChainRoutes({ extrinsic: ExtrinsicBuilder().xTokens().transferMultiCurrencies(), }, { - asset: weth, source: { + asset: weth, balance: BalanceBuilder().substrate().tokens().accounts(), fee: { asset: hdx, @@ -147,6 +153,7 @@ export const hydrationRoutes = new ChainRoutes({ }, }, destination: { + asset: weth, chain: moonbeam, balance: BalanceBuilder().evm().erc20(), fee: { diff --git a/packages/config/src/xcm-configs/hydrationAlphanet.ts b/packages/config/src/xcm-configs/hydrationAlphanet.ts index f4db08f7..3e944ec3 100644 --- a/packages/config/src/xcm-configs/hydrationAlphanet.ts +++ b/packages/config/src/xcm-configs/hydrationAlphanet.ts @@ -12,14 +12,15 @@ export const hydrationAlphanetRoutes = new ChainRoutes({ chain: hydrationAlphanet, routes: [ { - asset: hdx, source: { + asset: hdx, balance: BalanceBuilder().substrate().system().account(), destinationFee: { balance: BalanceBuilder().substrate().system().account(), }, }, destination: { + asset: hdx, chain: moonbaseAlpha, balance: BalanceBuilder().substrate().assets().account(), fee: { @@ -30,14 +31,15 @@ export const hydrationAlphanetRoutes = new ChainRoutes({ extrinsic: ExtrinsicBuilder().xTokens().transfer(), }, { - asset: dev, source: { + asset: dev, balance: BalanceBuilder().substrate().tokens().accounts(), destinationFee: { balance: BalanceBuilder().substrate().tokens().accounts(), }, }, destination: { + asset: dev, chain: moonbaseAlpha, balance: BalanceBuilder().substrate().system().account(), fee: { @@ -48,8 +50,8 @@ export const hydrationAlphanetRoutes = new ChainRoutes({ extrinsic: ExtrinsicBuilder().xTokens().transfer(), }, { - asset: usdcwh, source: { + asset: usdcwh, balance: BalanceBuilder().substrate().tokens().accounts(), fee: { asset: hdx, @@ -60,6 +62,7 @@ export const hydrationAlphanetRoutes = new ChainRoutes({ }, }, destination: { + asset: usdcwh, chain: moonbaseAlpha, balance: BalanceBuilder().evm().erc20(), fee: { @@ -70,8 +73,8 @@ export const hydrationAlphanetRoutes = new ChainRoutes({ extrinsic: ExtrinsicBuilder().xTokens().transferMultiCurrencies(), }, { - asset: ftmwh, source: { + asset: ftmwh, balance: BalanceBuilder().substrate().tokens().accounts(), fee: { asset: hdx, @@ -82,6 +85,7 @@ export const hydrationAlphanetRoutes = new ChainRoutes({ }, }, destination: { + asset: ftmwh, chain: moonbaseAlpha, balance: BalanceBuilder().evm().erc20(), fee: { diff --git a/packages/config/src/xcm-configs/integritee.ts b/packages/config/src/xcm-configs/integritee.ts index 34f97b02..aed013f7 100644 --- a/packages/config/src/xcm-configs/integritee.ts +++ b/packages/config/src/xcm-configs/integritee.ts @@ -11,14 +11,15 @@ export const integriteeRoutes = new ChainRoutes({ chain: integritee, routes: [ { - asset: teer, source: { + asset: teer, balance: BalanceBuilder().substrate().system().account(), destinationFee: { balance: BalanceBuilder().substrate().system().account(), }, }, destination: { + asset: teer, chain: moonriver, balance: BalanceBuilder().substrate().assets().account(), fee: { diff --git a/packages/config/src/xcm-configs/interlay.ts b/packages/config/src/xcm-configs/interlay.ts index 308dbdaa..52ff61cd 100644 --- a/packages/config/src/xcm-configs/interlay.ts +++ b/packages/config/src/xcm-configs/interlay.ts @@ -11,14 +11,15 @@ export const interlayRoutes = new ChainRoutes({ chain: interlay, routes: [ { - asset: intr, source: { + asset: intr, balance: BalanceBuilder().substrate().tokens().accounts(), destinationFee: { balance: BalanceBuilder().substrate().tokens().accounts(), }, }, destination: { + asset: intr, chain: moonbeam, balance: BalanceBuilder().substrate().assets().account(), fee: { @@ -29,8 +30,8 @@ export const interlayRoutes = new ChainRoutes({ extrinsic: ExtrinsicBuilder().xTokens().transfer(), }, { - asset: ibtc, source: { + asset: ibtc, balance: BalanceBuilder().substrate().tokens().accounts(), fee: { asset: intr, @@ -41,6 +42,7 @@ export const interlayRoutes = new ChainRoutes({ }, }, destination: { + asset: ibtc, chain: moonbeam, balance: BalanceBuilder().substrate().assets().account(), fee: { @@ -51,14 +53,15 @@ export const interlayRoutes = new ChainRoutes({ extrinsic: ExtrinsicBuilder().xTokens().transferMultiCurrencies(), }, { - asset: glmr, source: { + asset: glmr, balance: BalanceBuilder().substrate().tokens().accounts(), destinationFee: { balance: BalanceBuilder().substrate().tokens().accounts(), }, }, destination: { + asset: glmr, chain: moonbeam, balance: BalanceBuilder().substrate().system().account(), fee: { diff --git a/packages/config/src/xcm-configs/karura.ts b/packages/config/src/xcm-configs/karura.ts index 864cca8b..1b91cb5d 100644 --- a/packages/config/src/xcm-configs/karura.ts +++ b/packages/config/src/xcm-configs/karura.ts @@ -12,14 +12,15 @@ export const karuraRoutes = new ChainRoutes({ chain: karura, routes: [ { - asset: kar, source: { + asset: kar, balance: BalanceBuilder().substrate().system().account(), destinationFee: { balance: BalanceBuilder().substrate().system().account(), }, }, destination: { + asset: kar, chain: moonriver, balance: BalanceBuilder().substrate().assets().account(), fee: { @@ -30,8 +31,8 @@ export const karuraRoutes = new ChainRoutes({ extrinsic: ExtrinsicBuilder().xTokens().transfer(), }, { - asset: aseed, source: { + asset: aseed, balance: BalanceBuilder().substrate().tokens().accounts(), fee: { asset: kar, @@ -43,6 +44,7 @@ export const karuraRoutes = new ChainRoutes({ }, }, destination: { + asset: aseed, chain: moonriver, balance: BalanceBuilder().substrate().assets().account(), fee: { @@ -53,8 +55,8 @@ export const karuraRoutes = new ChainRoutes({ extrinsic: ExtrinsicBuilder().xTokens().transfer(), }, { - asset: movr, source: { + asset: movr, balance: BalanceBuilder().substrate().tokens().accounts(), fee: { asset: kar, @@ -66,6 +68,7 @@ export const karuraRoutes = new ChainRoutes({ }, }, destination: { + asset: movr, chain: moonriver, balance: BalanceBuilder().substrate().system().account(), fee: { diff --git a/packages/config/src/xcm-configs/khala.ts b/packages/config/src/xcm-configs/khala.ts index 45574968..73665cd3 100644 --- a/packages/config/src/xcm-configs/khala.ts +++ b/packages/config/src/xcm-configs/khala.ts @@ -11,14 +11,15 @@ export const khalaRouts = new ChainRoutes({ chain: khala, routes: [ { - asset: pha, source: { + asset: pha, balance: BalanceBuilder().substrate().system().account(), destinationFee: { balance: BalanceBuilder().substrate().system().account(), }, }, destination: { + asset: pha, chain: moonriver, balance: BalanceBuilder().substrate().assets().account(), fee: { @@ -29,8 +30,8 @@ export const khalaRouts = new ChainRoutes({ extrinsic: ExtrinsicBuilder().xTransfer().transfer().here(), }, { - asset: movr, source: { + asset: movr, balance: BalanceBuilder().substrate().assets().account(), fee: { asset: pha, @@ -41,6 +42,7 @@ export const khalaRouts = new ChainRoutes({ }, }, destination: { + asset: movr, chain: moonriver, balance: BalanceBuilder().substrate().system().account(), fee: { diff --git a/packages/config/src/xcm-configs/kintsugi.ts b/packages/config/src/xcm-configs/kintsugi.ts index 06aa24fe..32f77853 100644 --- a/packages/config/src/xcm-configs/kintsugi.ts +++ b/packages/config/src/xcm-configs/kintsugi.ts @@ -11,14 +11,15 @@ export const kintsugiRoutes = new ChainRoutes({ chain: kintsugi, routes: [ { - asset: kint, source: { + asset: kint, balance: BalanceBuilder().substrate().tokens().accounts(), destinationFee: { balance: BalanceBuilder().substrate().tokens().accounts(), }, }, destination: { + asset: kint, chain: moonriver, balance: BalanceBuilder().substrate().assets().account(), fee: { @@ -29,8 +30,8 @@ export const kintsugiRoutes = new ChainRoutes({ extrinsic: ExtrinsicBuilder().xTokens().transfer(), }, { - asset: kbtc, source: { + asset: kbtc, balance: BalanceBuilder().substrate().tokens().accounts(), fee: { asset: kint, @@ -41,6 +42,7 @@ export const kintsugiRoutes = new ChainRoutes({ }, }, destination: { + asset: kbtc, chain: moonriver, balance: BalanceBuilder().substrate().assets().account(), fee: { diff --git a/packages/config/src/xcm-configs/kusama.ts b/packages/config/src/xcm-configs/kusama.ts index 65e5dd6d..af98970d 100644 --- a/packages/config/src/xcm-configs/kusama.ts +++ b/packages/config/src/xcm-configs/kusama.ts @@ -11,8 +11,8 @@ export const kusamaRoutes = new ChainRoutes({ chain: kusama, routes: [ { - asset: ksm, source: { + asset: ksm, balance: BalanceBuilder().substrate().system().account(), fee: { asset: ksm, @@ -24,6 +24,7 @@ export const kusamaRoutes = new ChainRoutes({ }, }, destination: { + asset: ksm, chain: moonriver, balance: BalanceBuilder().substrate().assets().account(), fee: { diff --git a/packages/config/src/xcm-configs/kusamaAssetHub.ts b/packages/config/src/xcm-configs/kusamaAssetHub.ts index 88441033..88353cc6 100644 --- a/packages/config/src/xcm-configs/kusamaAssetHub.ts +++ b/packages/config/src/xcm-configs/kusamaAssetHub.ts @@ -14,8 +14,8 @@ export const kusamaAssetHubRoutes = new ChainRoutes({ chain: kusamaAssetHub, routes: [ { - asset: rmrk, source: { + asset: rmrk, balance: BalanceBuilder().substrate().assets().account(), fee: { asset: ksm, @@ -28,6 +28,7 @@ export const kusamaAssetHubRoutes = new ChainRoutes({ }, }, destination: { + asset: rmrk, chain: moonriver, balance: BalanceBuilder().substrate().assets().account(), fee: { @@ -41,8 +42,8 @@ export const kusamaAssetHubRoutes = new ChainRoutes({ .X2(), }, { - asset: usdt, source: { + asset: usdt, balance: BalanceBuilder().substrate().assets().account(), fee: { asset: ksm, @@ -55,6 +56,7 @@ export const kusamaAssetHubRoutes = new ChainRoutes({ }, }, destination: { + asset: usdt, chain: moonriver, balance: BalanceBuilder().substrate().assets().account(), fee: { diff --git a/packages/config/src/xcm-configs/mangataKusama.ts b/packages/config/src/xcm-configs/mangataKusama.ts index 9587ef7b..ba379f8f 100644 --- a/packages/config/src/xcm-configs/mangataKusama.ts +++ b/packages/config/src/xcm-configs/mangataKusama.ts @@ -11,14 +11,15 @@ export const mangataKusamaRoutes = new ChainRoutes({ chain: mangataKusama, routes: [ { - asset: mgx, source: { + asset: mgx, balance: BalanceBuilder().substrate().tokens().accounts(), destinationFee: { balance: BalanceBuilder().substrate().tokens().accounts(), }, }, destination: { + asset: mgx, chain: moonriver, balance: BalanceBuilder().substrate().assets().account(), fee: { @@ -29,8 +30,8 @@ export const mangataKusamaRoutes = new ChainRoutes({ extrinsic: ExtrinsicBuilder().xTokens().transfer(), }, { - asset: movr, source: { + asset: movr, balance: BalanceBuilder().substrate().tokens().accounts(), fee: { asset: mgx, @@ -41,6 +42,7 @@ export const mangataKusamaRoutes = new ChainRoutes({ }, }, destination: { + asset: movr, chain: moonriver, balance: BalanceBuilder().substrate().system().account(), fee: { diff --git a/packages/config/src/xcm-configs/mantaParachain.ts b/packages/config/src/xcm-configs/mantaParachain.ts index 7227998a..3fb4b4f2 100644 --- a/packages/config/src/xcm-configs/mantaParachain.ts +++ b/packages/config/src/xcm-configs/mantaParachain.ts @@ -12,14 +12,15 @@ export const mantaParachainRoutes = new ChainRoutes({ chain: mantaParachain, routes: [ { - asset: manta, source: { + asset: manta, balance: BalanceBuilder().substrate().system().account(), destinationFee: { balance: BalanceBuilder().substrate().system().account(), }, }, destination: { + asset: manta, chain: moonbeam, balance: BalanceBuilder().substrate().assets().account(), fee: { @@ -30,8 +31,8 @@ export const mantaParachainRoutes = new ChainRoutes({ extrinsic: ExtrinsicBuilder().xTokens().transfer(), }, { - asset: glmr, source: { + asset: glmr, balance: BalanceBuilder().substrate().assets().account(), fee: { asset: manta, @@ -43,6 +44,7 @@ export const mantaParachainRoutes = new ChainRoutes({ }, }, destination: { + asset: glmr, chain: moonbeam, balance: BalanceBuilder().substrate().system().account(), fee: { diff --git a/packages/config/src/xcm-configs/moonbaseAlpha.ts b/packages/config/src/xcm-configs/moonbaseAlpha.ts index 4bd9d8b7..16ca63ce 100644 --- a/packages/config/src/xcm-configs/moonbaseAlpha.ts +++ b/packages/config/src/xcm-configs/moonbaseAlpha.ts @@ -33,14 +33,15 @@ export const moonbaseAlphaRoutes = new ChainRoutes({ chain: moonbaseAlpha, routes: [ { - asset: dev, source: { + asset: dev, balance: BalanceBuilder().substrate().system().account(), destinationFee: { balance: BalanceBuilder().substrate().system().account(), }, }, destination: { + asset: dev, chain: turingAlphanet, balance: BalanceBuilder().substrate().tokens().accounts(), fee: { @@ -51,14 +52,15 @@ export const moonbaseAlphaRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transfer(), }, { - asset: dev, source: { + asset: dev, balance: BalanceBuilder().substrate().system().account(), destinationFee: { balance: BalanceBuilder().substrate().system().account(), }, }, destination: { + asset: dev, chain: moonbaseBeta, balance: BalanceBuilder().substrate().assets().account(), fee: { @@ -69,14 +71,15 @@ export const moonbaseAlphaRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transfer(), }, { - asset: dev, source: { + asset: dev, balance: BalanceBuilder().substrate().system().account(), destinationFee: { balance: BalanceBuilder().substrate().system().account(), }, }, destination: { + asset: dev, chain: pendulumAlphanet, balance: BalanceBuilder().substrate().tokens().accounts(), fee: { @@ -87,14 +90,15 @@ export const moonbaseAlphaRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transfer(), }, { - asset: dev, source: { + asset: dev, balance: BalanceBuilder().substrate().system().account(), destinationFee: { balance: BalanceBuilder().substrate().system().account(), }, }, destination: { + asset: dev, chain: picassoAlphanet, balance: BalanceBuilder().substrate().tokens().accounts(), fee: { @@ -105,8 +109,8 @@ export const moonbaseAlphaRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transfer(), }, { - asset: alan, source: { + asset: alan, balance: BalanceBuilder().evm().erc20(), fee: { asset: dev, @@ -117,6 +121,7 @@ export const moonbaseAlphaRoutes = new ChainRoutes({ }, }, destination: { + asset: alan, chain: moonbaseBeta, balance: BalanceBuilder().substrate().assets().account(), fee: { @@ -144,8 +149,8 @@ export const moonbaseAlphaRoutes = new ChainRoutes({ // }, // }), { - asset: ampe, source: { + asset: ampe, balance: BalanceBuilder().substrate().assets().account(), fee: { asset: dev, @@ -156,6 +161,7 @@ export const moonbaseAlphaRoutes = new ChainRoutes({ }, }, destination: { + asset: ampe, chain: pendulumAlphanet, balance: BalanceBuilder().substrate().system().account(), fee: { @@ -166,8 +172,8 @@ export const moonbaseAlphaRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transfer(), }, { - asset: otp, source: { + asset: otp, balance: BalanceBuilder().substrate().assets().account(), fee: { asset: dev, @@ -178,6 +184,7 @@ export const moonbaseAlphaRoutes = new ChainRoutes({ }, }, destination: { + asset: otp, chain: originTrailAlphanet, balance: BalanceBuilder().substrate().system().account(), fee: { @@ -188,8 +195,8 @@ export const moonbaseAlphaRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transfer(), }, { - asset: atom, source: { + asset: atom, balance: BalanceBuilder().substrate().assets().account(), fee: { asset: dev, @@ -200,6 +207,7 @@ export const moonbaseAlphaRoutes = new ChainRoutes({ }, }, destination: { + asset: atom, chain: picassoAlphanet, balance: BalanceBuilder().substrate().tokens().accounts(), fee: { @@ -210,8 +218,8 @@ export const moonbaseAlphaRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transfer(), }, { - asset: pica, source: { + asset: pica, balance: BalanceBuilder().substrate().assets().account(), fee: { asset: dev, @@ -222,6 +230,7 @@ export const moonbaseAlphaRoutes = new ChainRoutes({ }, }, destination: { + asset: pica, chain: picassoAlphanet, balance: BalanceBuilder().substrate().system().account(), fee: { @@ -232,8 +241,8 @@ export const moonbaseAlphaRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transfer(), }, { - asset: tt1, source: { + asset: tt1, balance: BalanceBuilder().substrate().assets().account(), fee: { asset: dev, @@ -244,6 +253,7 @@ export const moonbaseAlphaRoutes = new ChainRoutes({ }, }, destination: { + asset: tt1, chain: alphanetAssetHub, balance: BalanceBuilder().substrate().assets().account(), fee: { @@ -254,8 +264,8 @@ export const moonbaseAlphaRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transfer(), }, { - asset: tur, source: { + asset: tur, balance: BalanceBuilder().substrate().assets().account(), fee: { asset: dev, @@ -266,6 +276,7 @@ export const moonbaseAlphaRoutes = new ChainRoutes({ }, }, destination: { + asset: tur, chain: turingAlphanet, balance: BalanceBuilder().substrate().system().account(), fee: { @@ -276,8 +287,8 @@ export const moonbaseAlphaRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transfer(), }, { - asset: unit, source: { + asset: unit, balance: BalanceBuilder().substrate().assets().account(), fee: { asset: dev, @@ -288,6 +299,7 @@ export const moonbaseAlphaRoutes = new ChainRoutes({ }, }, destination: { + asset: unit, chain: alphanetRelay, balance: BalanceBuilder().substrate().system().account(), fee: { @@ -298,8 +310,8 @@ export const moonbaseAlphaRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transfer(), }, { - asset: usdcwh, source: { + asset: usdcwh, balance: BalanceBuilder().evm().erc20(), fee: { asset: dev, @@ -310,6 +322,7 @@ export const moonbaseAlphaRoutes = new ChainRoutes({ }, }, destination: { + asset: usdcwh, chain: hydrationAlphanet, balance: BalanceBuilder().substrate().tokens().accounts(), fee: { @@ -320,8 +333,8 @@ export const moonbaseAlphaRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transfer(), }, { - asset: ftmwh, source: { + asset: ftmwh, balance: BalanceBuilder().evm().erc20(), fee: { asset: dev, @@ -332,6 +345,7 @@ export const moonbaseAlphaRoutes = new ChainRoutes({ }, }, destination: { + asset: ftmwh, chain: hydrationAlphanet, balance: BalanceBuilder().substrate().tokens().accounts(), fee: { @@ -342,8 +356,8 @@ export const moonbaseAlphaRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transfer(), }, { - asset: ftmwh, source: { + asset: ftmwh, balance: BalanceBuilder().evm().erc20(), fee: { asset: dev, @@ -354,6 +368,7 @@ export const moonbaseAlphaRoutes = new ChainRoutes({ }, }, destination: { + asset: ftmwh, chain: peaqAlphanet, balance: BalanceBuilder().substrate().assets().account(), fee: { @@ -364,14 +379,15 @@ export const moonbaseAlphaRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transfer(), }, { - asset: dev, source: { + asset: dev, balance: BalanceBuilder().substrate().system().account(), destinationFee: { balance: BalanceBuilder().substrate().system().account(), }, }, destination: { + asset: dev, chain: hydrationAlphanet, balance: BalanceBuilder().substrate().tokens().accounts(), fee: { @@ -382,8 +398,8 @@ export const moonbaseAlphaRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transfer(), }, { - asset: hdx, source: { + asset: hdx, balance: BalanceBuilder().substrate().assets().account(), fee: { asset: dev, @@ -394,6 +410,7 @@ export const moonbaseAlphaRoutes = new ChainRoutes({ }, }, destination: { + asset: hdx, chain: hydrationAlphanet, balance: BalanceBuilder().substrate().system().account(), fee: { @@ -404,14 +421,15 @@ export const moonbaseAlphaRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transfer(), }, { - asset: dev, source: { + asset: dev, balance: BalanceBuilder().substrate().system().account(), destinationFee: { balance: BalanceBuilder().substrate().system().account(), }, }, destination: { + asset: dev, chain: peaqAlphanet, balance: BalanceBuilder().substrate().assets().account(), fee: { @@ -422,8 +440,8 @@ export const moonbaseAlphaRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transfer(), }, { - asset: ftmwh, source: { + asset: ftmwh, balance: BalanceBuilder().evm().erc20(), fee: { asset: dev, @@ -434,6 +452,7 @@ export const moonbaseAlphaRoutes = new ChainRoutes({ }, }, destination: { + asset: ftmwh, chain: peaqAlphanet, balance: BalanceBuilder().substrate().assets().account(), fee: { @@ -444,8 +463,8 @@ export const moonbaseAlphaRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transfer(), }, { - asset: agng, source: { + asset: agng, balance: BalanceBuilder().substrate().assets().account(), fee: { asset: dev, @@ -456,6 +475,7 @@ export const moonbaseAlphaRoutes = new ChainRoutes({ }, }, destination: { + asset: agng, chain: peaqAlphanet, balance: BalanceBuilder().substrate().system().account(), fee: { @@ -466,14 +486,15 @@ export const moonbaseAlphaRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transfer(), }, { - asset: dev, source: { + asset: dev, balance: BalanceBuilder().substrate().system().account(), destinationFee: { balance: BalanceBuilder().substrate().system().account(), }, }, destination: { + asset: dev, chain: peaqEvmAlphanet, balance: BalanceBuilder().evm().erc20(), fee: { @@ -484,8 +505,8 @@ export const moonbaseAlphaRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transferWithEvmTo32(), }, { - asset: ftmwh, source: { + asset: ftmwh, balance: BalanceBuilder().evm().erc20(), fee: { asset: dev, @@ -496,6 +517,7 @@ export const moonbaseAlphaRoutes = new ChainRoutes({ }, }, destination: { + asset: ftmwh, chain: peaqEvmAlphanet, balance: BalanceBuilder().evm().erc20(), fee: { diff --git a/packages/config/src/xcm-configs/moonbaseBeta.ts b/packages/config/src/xcm-configs/moonbaseBeta.ts index a64afd6e..98b21662 100644 --- a/packages/config/src/xcm-configs/moonbaseBeta.ts +++ b/packages/config/src/xcm-configs/moonbaseBeta.ts @@ -10,8 +10,8 @@ export const moonbaseBetaRoutes = new ChainRoutes({ chain: moonbaseBeta, routes: [ { - asset: dev, source: { + asset: dev, balance: BalanceBuilder().substrate().assets().account(), fee: { asset: betaDEV, @@ -22,6 +22,7 @@ export const moonbaseBetaRoutes = new ChainRoutes({ }, }, destination: { + asset: dev, chain: moonbaseAlpha, balance: BalanceBuilder().substrate().system().account(), fee: { @@ -32,8 +33,8 @@ export const moonbaseBetaRoutes = new ChainRoutes({ extrinsic: ExtrinsicBuilder().xTokens().transfer(), }, { - asset: alan, source: { + asset: alan, balance: BalanceBuilder().substrate().assets().account(), fee: { asset: betaDEV, @@ -44,6 +45,7 @@ export const moonbaseBetaRoutes = new ChainRoutes({ }, }, destination: { + asset: alan, chain: moonbaseAlpha, balance: BalanceBuilder().evm().erc20(), fee: { @@ -54,8 +56,8 @@ export const moonbaseBetaRoutes = new ChainRoutes({ extrinsic: ExtrinsicBuilder().xTokens().transferMultiCurrencies(), }, { - asset: usdcwh, source: { + asset: usdcwh, balance: BalanceBuilder().substrate().assets().account(), fee: { asset: betaDEV, @@ -66,6 +68,7 @@ export const moonbaseBetaRoutes = new ChainRoutes({ }, }, destination: { + asset: usdcwh, chain: moonbaseAlpha, balance: BalanceBuilder().evm().erc20(), fee: { @@ -76,8 +79,8 @@ export const moonbaseBetaRoutes = new ChainRoutes({ extrinsic: ExtrinsicBuilder().xTokens().transferMultiCurrencies(), }, { - asset: ftmwh, source: { + asset: ftmwh, balance: BalanceBuilder().substrate().assets().account(), fee: { asset: betaDEV, @@ -88,6 +91,7 @@ export const moonbaseBetaRoutes = new ChainRoutes({ }, }, destination: { + asset: ftmwh, chain: moonbaseAlpha, balance: BalanceBuilder().evm().erc20(), fee: { diff --git a/packages/config/src/xcm-configs/moonbeam.ts b/packages/config/src/xcm-configs/moonbeam.ts index 61816bfa..12c7f2e3 100644 --- a/packages/config/src/xcm-configs/moonbeam.ts +++ b/packages/config/src/xcm-configs/moonbeam.ts @@ -70,14 +70,15 @@ export const moonbeamRoutes = new ChainRoutes({ chain: moonbeam, routes: [ { - asset: glmr, source: { + asset: glmr, balance: BalanceBuilder().substrate().system().account(), destinationFee: { balance: BalanceBuilder().substrate().system().account(), }, }, destination: { + asset: glmr, chain: acala, balance: BalanceBuilder().substrate().tokens().accounts(), fee: { @@ -88,14 +89,15 @@ export const moonbeamRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transfer(), }, { - asset: glmr, source: { + asset: glmr, balance: BalanceBuilder().substrate().system().account(), destinationFee: { balance: BalanceBuilder().substrate().system().account(), }, }, destination: { + asset: glmr, chain: astar, balance: BalanceBuilder().substrate().assets().account(), fee: { @@ -106,14 +108,15 @@ export const moonbeamRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transfer(), }, { - asset: glmr, source: { + asset: glmr, balance: BalanceBuilder().substrate().system().account(), destinationFee: { balance: BalanceBuilder().substrate().system().account(), }, }, destination: { + asset: glmr, chain: bifrostPolkadot, balance: BalanceBuilder().substrate().tokens().accounts(), fee: { @@ -124,14 +127,15 @@ export const moonbeamRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transfer(), }, { - asset: glmr, source: { + asset: glmr, balance: BalanceBuilder().substrate().system().account(), destinationFee: { balance: BalanceBuilder().substrate().system().account(), }, }, destination: { + asset: glmr, chain: hydration, balance: BalanceBuilder().substrate().tokens().accounts(), fee: { @@ -142,14 +146,15 @@ export const moonbeamRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transfer(), }, { - asset: glmr, source: { + asset: glmr, balance: BalanceBuilder().substrate().system().account(), destinationFee: { balance: BalanceBuilder().substrate().system().account(), }, }, destination: { + asset: glmr, chain: interlay, balance: BalanceBuilder().substrate().tokens().accounts(), fee: { @@ -160,14 +165,15 @@ export const moonbeamRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transfer(), }, { - asset: glmr, source: { + asset: glmr, balance: BalanceBuilder().substrate().system().account(), destinationFee: { balance: BalanceBuilder().substrate().system().account(), }, }, destination: { + asset: glmr, chain: mantaParachain, balance: BalanceBuilder().substrate().assets().account(), fee: { @@ -178,14 +184,15 @@ export const moonbeamRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transfer(), }, { - asset: glmr, source: { + asset: glmr, balance: BalanceBuilder().substrate().system().account(), destinationFee: { balance: BalanceBuilder().substrate().system().account(), }, }, destination: { + asset: glmr, chain: parallel, balance: BalanceBuilder().substrate().assets().account(), fee: { @@ -196,14 +203,15 @@ export const moonbeamRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transfer(), }, { - asset: glmr, source: { + asset: glmr, balance: BalanceBuilder().substrate().system().account(), destinationFee: { balance: BalanceBuilder().substrate().system().account(), }, }, destination: { + asset: glmr, chain: phala, balance: BalanceBuilder().substrate().assets().account(), fee: { @@ -214,14 +222,15 @@ export const moonbeamRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transfer(), }, { - asset: glmr, source: { + asset: glmr, balance: BalanceBuilder().substrate().system().account(), destinationFee: { balance: BalanceBuilder().substrate().system().account(), }, }, destination: { + asset: glmr, chain: pendulum, balance: BalanceBuilder().substrate().tokens().accounts(), fee: { @@ -232,14 +241,15 @@ export const moonbeamRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transfer(), }, { - asset: glmr, source: { + asset: glmr, balance: BalanceBuilder().substrate().system().account(), destinationFee: { balance: BalanceBuilder().substrate().system().account(), }, }, destination: { + asset: glmr, chain: zeitgeist, balance: BalanceBuilder().substrate().tokens().accounts(), fee: { @@ -250,8 +260,8 @@ export const moonbeamRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transfer(), }, { - asset: aca, source: { + asset: aca, balance: BalanceBuilder().substrate().assets().account(), fee: { asset: glmr, @@ -262,6 +272,7 @@ export const moonbeamRoutes = new ChainRoutes({ }, }, destination: { + asset: aca, chain: acala, balance: BalanceBuilder().substrate().system().account(), fee: { @@ -272,8 +283,8 @@ export const moonbeamRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transfer(), }, { - asset: astr, source: { + asset: astr, balance: BalanceBuilder().substrate().assets().account(), fee: { asset: glmr, @@ -284,6 +295,7 @@ export const moonbeamRoutes = new ChainRoutes({ }, }, destination: { + asset: astr, chain: astar, balance: BalanceBuilder().substrate().system().account(), fee: { @@ -294,8 +306,8 @@ export const moonbeamRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transfer(), }, { - asset: aseed, source: { + asset: aseed, balance: BalanceBuilder().substrate().assets().account(), fee: { asset: glmr, @@ -306,6 +318,7 @@ export const moonbeamRoutes = new ChainRoutes({ }, }, destination: { + asset: aseed, chain: acala, balance: BalanceBuilder().substrate().tokens().accounts(), fee: { @@ -316,8 +329,8 @@ export const moonbeamRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transfer(), }, { - asset: bnc, source: { + asset: bnc, balance: BalanceBuilder().substrate().assets().account(), fee: { asset: glmr, @@ -328,6 +341,7 @@ export const moonbeamRoutes = new ChainRoutes({ }, }, destination: { + asset: bnc, chain: bifrostPolkadot, balance: BalanceBuilder().substrate().system().account(), fee: { @@ -338,8 +352,8 @@ export const moonbeamRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transfer(), }, { - asset: cfg, source: { + asset: cfg, balance: BalanceBuilder().substrate().assets().account(), fee: { asset: glmr, @@ -350,6 +364,7 @@ export const moonbeamRoutes = new ChainRoutes({ }, }, destination: { + asset: cfg, chain: centrifuge, balance: BalanceBuilder().substrate().system().account(), fee: { @@ -360,8 +375,8 @@ export const moonbeamRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transfer(), }, { - asset: dot, source: { + asset: dot, balance: BalanceBuilder().substrate().assets().account(), fee: { asset: glmr, @@ -372,6 +387,7 @@ export const moonbeamRoutes = new ChainRoutes({ }, }, destination: { + asset: dot, chain: polkadot, balance: BalanceBuilder().substrate().system().account(), fee: { @@ -382,8 +398,8 @@ export const moonbeamRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transfer(), }, { - asset: ibtc, source: { + asset: ibtc, balance: BalanceBuilder().substrate().assets().account(), fee: { asset: glmr, @@ -394,6 +410,7 @@ export const moonbeamRoutes = new ChainRoutes({ }, }, destination: { + asset: ibtc, chain: interlay, balance: BalanceBuilder().substrate().tokens().accounts(), fee: { @@ -404,8 +421,8 @@ export const moonbeamRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transfer(), }, { - asset: intr, source: { + asset: intr, balance: BalanceBuilder().substrate().assets().account(), fee: { asset: glmr, @@ -416,6 +433,7 @@ export const moonbeamRoutes = new ChainRoutes({ }, }, destination: { + asset: intr, chain: interlay, balance: BalanceBuilder().substrate().tokens().accounts(), fee: { @@ -426,8 +444,8 @@ export const moonbeamRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transfer(), }, { - asset: ldot, source: { + asset: ldot, balance: BalanceBuilder().substrate().assets().account(), fee: { asset: glmr, @@ -438,6 +456,7 @@ export const moonbeamRoutes = new ChainRoutes({ }, }, destination: { + asset: ldot, chain: acala, balance: BalanceBuilder().substrate().tokens().accounts(), fee: { @@ -448,8 +467,8 @@ export const moonbeamRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transfer(), }, { - asset: manta, source: { + asset: manta, balance: BalanceBuilder().substrate().assets().account(), fee: { asset: glmr, @@ -460,6 +479,7 @@ export const moonbeamRoutes = new ChainRoutes({ }, }, destination: { + asset: manta, chain: mantaParachain, balance: BalanceBuilder().substrate().system().account(), fee: { @@ -470,8 +490,8 @@ export const moonbeamRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transfer(), }, { - asset: nodl, source: { + asset: nodl, balance: BalanceBuilder().substrate().assets().account(), fee: { asset: glmr, @@ -482,6 +502,7 @@ export const moonbeamRoutes = new ChainRoutes({ }, }, destination: { + asset: nodl, balance: BalanceBuilder().substrate().system().account(), chain: nodle, fee: { @@ -492,8 +513,8 @@ export const moonbeamRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transfer(), }, { - asset: neuro, source: { + asset: neuro, balance: BalanceBuilder().substrate().assets().account(), fee: { asset: glmr, @@ -504,6 +525,7 @@ export const moonbeamRoutes = new ChainRoutes({ }, }, destination: { + asset: neuro, chain: neuroweb, balance: BalanceBuilder().substrate().system().account(), fee: { @@ -514,8 +536,8 @@ export const moonbeamRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transfer(), }, { - asset: para, source: { + asset: para, balance: BalanceBuilder().substrate().assets().account(), fee: { asset: glmr, @@ -526,6 +548,7 @@ export const moonbeamRoutes = new ChainRoutes({ }, }, destination: { + asset: para, chain: parallel, balance: BalanceBuilder().substrate().system().account(), fee: { @@ -536,8 +559,8 @@ export const moonbeamRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transfer(), }, { - asset: pen, source: { + asset: pen, balance: BalanceBuilder().substrate().assets().account(), fee: { asset: glmr, @@ -548,6 +571,7 @@ export const moonbeamRoutes = new ChainRoutes({ }, }, destination: { + asset: pen, chain: pendulum, balance: BalanceBuilder().substrate().system().account(), fee: { @@ -558,8 +582,8 @@ export const moonbeamRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transfer(), }, { - asset: pha, source: { + asset: pha, balance: BalanceBuilder().substrate().assets().account(), fee: { asset: glmr, @@ -570,6 +594,7 @@ export const moonbeamRoutes = new ChainRoutes({ }, }, destination: { + asset: pha, chain: phala, balance: BalanceBuilder().substrate().system().account(), fee: { @@ -580,8 +605,8 @@ export const moonbeamRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transfer(), }, { - asset: ring, source: { + asset: ring, balance: BalanceBuilder().substrate().assets().account(), fee: { asset: glmr, @@ -592,6 +617,7 @@ export const moonbeamRoutes = new ChainRoutes({ }, }, destination: { + asset: ring, chain: darwinia, balance: BalanceBuilder().substrate().system().account(), fee: { @@ -602,8 +628,8 @@ export const moonbeamRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transfer(), }, { - asset: usdt, source: { + asset: usdt, balance: BalanceBuilder().substrate().assets().account(), fee: { asset: glmr, @@ -614,6 +640,7 @@ export const moonbeamRoutes = new ChainRoutes({ }, }, destination: { + asset: usdt, chain: polkadotAssetHub, balance: BalanceBuilder().substrate().assets().account(), fee: { @@ -624,8 +651,8 @@ export const moonbeamRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transfer(), }, { - asset: usdc, source: { + asset: usdc, balance: BalanceBuilder().evm().erc20(), fee: { asset: glmr, @@ -636,6 +663,7 @@ export const moonbeamRoutes = new ChainRoutes({ }, }, destination: { + asset: usdc, chain: polkadotAssetHub, balance: BalanceBuilder().substrate().assets().account(), fee: { @@ -646,8 +674,8 @@ export const moonbeamRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transfer(), }, { - asset: pink, source: { + asset: pink, balance: BalanceBuilder().substrate().assets().account(), fee: { asset: glmr, @@ -658,6 +686,7 @@ export const moonbeamRoutes = new ChainRoutes({ }, }, destination: { + asset: pink, chain: polkadotAssetHub, balance: BalanceBuilder().substrate().assets().account(), fee: { @@ -668,8 +697,8 @@ export const moonbeamRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transferMultiCurrencies(), }, { - asset: ded, source: { + asset: ded, balance: BalanceBuilder().substrate().assets().account(), fee: { asset: glmr, @@ -680,6 +709,7 @@ export const moonbeamRoutes = new ChainRoutes({ }, }, destination: { + asset: ded, chain: polkadotAssetHub, balance: BalanceBuilder().substrate().assets().account(), fee: { @@ -690,8 +720,8 @@ export const moonbeamRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transferMultiCurrencies(), }, { - asset: stink, source: { + asset: stink, balance: BalanceBuilder().substrate().assets().account(), fee: { asset: glmr, @@ -702,6 +732,7 @@ export const moonbeamRoutes = new ChainRoutes({ }, }, destination: { + asset: stink, chain: polkadotAssetHub, balance: BalanceBuilder().substrate().assets().account(), fee: { @@ -712,8 +743,8 @@ export const moonbeamRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transferMultiCurrencies(), }, { - asset: apillon, source: { + asset: apillon, balance: BalanceBuilder().substrate().assets().account(), fee: { asset: glmr, @@ -724,6 +755,7 @@ export const moonbeamRoutes = new ChainRoutes({ }, }, destination: { + asset: apillon, chain: polkadotAssetHub, balance: BalanceBuilder().substrate().assets().account(), fee: { @@ -734,8 +766,8 @@ export const moonbeamRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transferMultiCurrencies(), }, { - asset: hdx, source: { + asset: hdx, balance: BalanceBuilder().substrate().assets().account(), fee: { asset: glmr, @@ -746,6 +778,7 @@ export const moonbeamRoutes = new ChainRoutes({ }, }, destination: { + asset: hdx, chain: hydration, balance: BalanceBuilder().substrate().system().account(), fee: { @@ -756,8 +789,8 @@ export const moonbeamRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transfer(), }, { - asset: dai, source: { + asset: dai, balance: BalanceBuilder().evm().erc20(), fee: { asset: glmr, @@ -768,6 +801,7 @@ export const moonbeamRoutes = new ChainRoutes({ }, }, destination: { + asset: dai, chain: hydration, balance: BalanceBuilder().substrate().tokens().accounts(), fee: { @@ -778,8 +812,8 @@ export const moonbeamRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transfer(), }, { - asset: usdcwh, source: { + asset: usdcwh, balance: BalanceBuilder().evm().erc20(), fee: { asset: glmr, @@ -790,6 +824,7 @@ export const moonbeamRoutes = new ChainRoutes({ }, }, destination: { + asset: usdcwh, chain: hydration, balance: BalanceBuilder().substrate().tokens().accounts(), fee: { @@ -800,8 +835,8 @@ export const moonbeamRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transfer(), }, { - asset: usdcwh, source: { + asset: usdcwh, balance: BalanceBuilder().evm().erc20(), fee: { asset: glmr, @@ -812,6 +847,7 @@ export const moonbeamRoutes = new ChainRoutes({ }, }, destination: { + asset: usdcwh, chain: zeitgeist, balance: BalanceBuilder().substrate().tokens().accounts(), fee: { @@ -822,8 +858,8 @@ export const moonbeamRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transfer(), }, { - asset: usdtwh, source: { + asset: usdtwh, balance: BalanceBuilder().evm().erc20(), fee: { asset: glmr, @@ -834,6 +870,7 @@ export const moonbeamRoutes = new ChainRoutes({ }, }, destination: { + asset: usdtwh, chain: hydration, balance: BalanceBuilder().substrate().tokens().accounts(), fee: { @@ -844,8 +881,8 @@ export const moonbeamRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transfer(), }, { - asset: vastr, source: { + asset: vastr, balance: BalanceBuilder().evm().erc20(), fee: { asset: glmr, @@ -856,6 +893,7 @@ export const moonbeamRoutes = new ChainRoutes({ }, }, destination: { + asset: vastr, chain: bifrostPolkadot, balance: BalanceBuilder().substrate().tokens().accounts(), fee: { @@ -866,8 +904,8 @@ export const moonbeamRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transfer(), }, { - asset: vdot, source: { + asset: vdot, balance: BalanceBuilder().evm().erc20(), fee: { asset: glmr, @@ -878,6 +916,7 @@ export const moonbeamRoutes = new ChainRoutes({ }, }, destination: { + asset: vdot, balance: BalanceBuilder().substrate().tokens().accounts(), chain: bifrostPolkadot, fee: { @@ -888,8 +927,8 @@ export const moonbeamRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transfer(), }, { - asset: vfil, source: { + asset: vfil, balance: BalanceBuilder().evm().erc20(), fee: { asset: glmr, @@ -900,6 +939,7 @@ export const moonbeamRoutes = new ChainRoutes({ }, }, destination: { + asset: vfil, chain: bifrostPolkadot, balance: BalanceBuilder().substrate().tokens().accounts(), fee: { @@ -910,8 +950,8 @@ export const moonbeamRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transfer(), }, { - asset: vglmr, source: { + asset: vglmr, balance: BalanceBuilder().evm().erc20(), fee: { asset: glmr, @@ -922,6 +962,7 @@ export const moonbeamRoutes = new ChainRoutes({ }, }, destination: { + asset: vglmr, chain: bifrostPolkadot, balance: BalanceBuilder().substrate().tokens().accounts(), fee: { @@ -932,8 +973,8 @@ export const moonbeamRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transfer(), }, { - asset: vmanta, source: { + asset: vmanta, balance: BalanceBuilder().evm().erc20(), fee: { asset: glmr, @@ -944,6 +985,7 @@ export const moonbeamRoutes = new ChainRoutes({ }, }, destination: { + asset: vmanta, chain: bifrostPolkadot, balance: BalanceBuilder().substrate().tokens().accounts(), fee: { @@ -954,8 +996,8 @@ export const moonbeamRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transfer(), }, { - asset: wbtc, source: { + asset: wbtc, balance: BalanceBuilder().evm().erc20(), fee: { asset: glmr, @@ -966,6 +1008,7 @@ export const moonbeamRoutes = new ChainRoutes({ }, }, destination: { + asset: wbtc, chain: hydration, balance: BalanceBuilder().substrate().tokens().accounts(), fee: { @@ -976,8 +1019,8 @@ export const moonbeamRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transfer(), }, { - asset: weth, source: { + asset: weth, balance: BalanceBuilder().evm().erc20(), fee: { asset: glmr, @@ -988,6 +1031,7 @@ export const moonbeamRoutes = new ChainRoutes({ }, }, destination: { + asset: weth, chain: hydration, balance: BalanceBuilder().substrate().tokens().accounts(), fee: { @@ -998,8 +1042,8 @@ export const moonbeamRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transfer(), }, { - asset: fil, source: { + asset: fil, balance: BalanceBuilder().evm().erc20(), fee: { asset: glmr, @@ -1010,6 +1054,7 @@ export const moonbeamRoutes = new ChainRoutes({ }, }, destination: { + asset: fil, chain: bifrostPolkadot, balance: BalanceBuilder().substrate().tokens().accounts(), fee: { @@ -1020,8 +1065,8 @@ export const moonbeamRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transfer(), }, { - asset: ztg, source: { + asset: ztg, balance: BalanceBuilder().substrate().assets().account(), fee: { asset: glmr, @@ -1032,6 +1077,7 @@ export const moonbeamRoutes = new ChainRoutes({ }, }, destination: { + asset: ztg, chain: zeitgeist, balance: BalanceBuilder().substrate().system().account(), fee: { @@ -1042,8 +1088,8 @@ export const moonbeamRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transfer(), }, { - asset: sub, source: { + asset: sub, balance: BalanceBuilder().substrate().assets().account(), fee: { asset: glmr, @@ -1054,6 +1100,7 @@ export const moonbeamRoutes = new ChainRoutes({ }, }, destination: { + asset: sub, chain: subsocial, balance: BalanceBuilder().substrate().system().account(), fee: { @@ -1064,8 +1111,8 @@ export const moonbeamRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transfer(), }, { - asset: bncs, source: { + asset: bncs, balance: BalanceBuilder().substrate().assets().account(), fee: { asset: glmr, @@ -1076,6 +1123,7 @@ export const moonbeamRoutes = new ChainRoutes({ }, }, destination: { + asset: bncs, chain: bifrostPolkadot, balance: BalanceBuilder().substrate().tokens().accounts(), fee: { @@ -1086,14 +1134,15 @@ export const moonbeamRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transfer(), }, { - asset: glmr, source: { + asset: glmr, balance: BalanceBuilder().substrate().system().account(), destinationFee: { balance: BalanceBuilder().substrate().system().account(), }, }, destination: { + asset: glmr, chain: peaqChain, balance: BalanceBuilder().substrate().assets().account(), fee: { @@ -1104,8 +1153,8 @@ export const moonbeamRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transfer(), }, { - asset: usdcwh, source: { + asset: usdcwh, balance: BalanceBuilder().evm().erc20(), fee: { asset: glmr, @@ -1116,6 +1165,7 @@ export const moonbeamRoutes = new ChainRoutes({ }, }, destination: { + asset: usdcwh, chain: peaqChain, balance: BalanceBuilder().substrate().assets().account(), fee: { @@ -1126,8 +1176,8 @@ export const moonbeamRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transfer(), }, { - asset: usdtwh, source: { + asset: usdtwh, balance: BalanceBuilder().evm().erc20(), fee: { asset: glmr, @@ -1138,6 +1188,7 @@ export const moonbeamRoutes = new ChainRoutes({ }, }, destination: { + asset: usdtwh, chain: peaqChain, balance: BalanceBuilder().substrate().assets().account(), fee: { @@ -1148,8 +1199,8 @@ export const moonbeamRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transfer(), }, { - asset: dai, source: { + asset: dai, balance: BalanceBuilder().evm().erc20(), fee: { asset: glmr, @@ -1160,6 +1211,7 @@ export const moonbeamRoutes = new ChainRoutes({ }, }, destination: { + asset: dai, chain: peaqChain, balance: BalanceBuilder().substrate().assets().account(), fee: { @@ -1170,8 +1222,8 @@ export const moonbeamRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transfer(), }, { - asset: weth, source: { + asset: weth, balance: BalanceBuilder().evm().erc20(), fee: { asset: glmr, @@ -1182,6 +1234,7 @@ export const moonbeamRoutes = new ChainRoutes({ }, }, destination: { + asset: weth, chain: peaqChain, balance: BalanceBuilder().substrate().assets().account(), fee: { @@ -1192,8 +1245,8 @@ export const moonbeamRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transfer(), }, { - asset: wbtc, source: { + asset: wbtc, balance: BalanceBuilder().evm().erc20(), fee: { asset: glmr, @@ -1204,6 +1257,7 @@ export const moonbeamRoutes = new ChainRoutes({ }, }, destination: { + asset: wbtc, chain: peaqChain, balance: BalanceBuilder().substrate().assets().account(), fee: { @@ -1214,8 +1268,8 @@ export const moonbeamRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transfer(), }, { - asset: peaq, source: { + asset: peaq, balance: BalanceBuilder().substrate().assets().account(), fee: { asset: glmr, @@ -1226,6 +1280,7 @@ export const moonbeamRoutes = new ChainRoutes({ }, }, destination: { + asset: peaq, chain: peaqChain, balance: BalanceBuilder().substrate().system().account(), fee: { @@ -1236,14 +1291,15 @@ export const moonbeamRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transfer(), }, { - asset: glmr, source: { + asset: glmr, balance: BalanceBuilder().substrate().system().account(), destinationFee: { balance: BalanceBuilder().substrate().system().account(), }, }, destination: { + asset: glmr, chain: peaqEvm, balance: BalanceBuilder().evm().erc20(), fee: { @@ -1254,8 +1310,8 @@ export const moonbeamRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transferWithEvmTo32(), }, { - asset: usdcwh, source: { + asset: usdcwh, balance: BalanceBuilder().evm().erc20(), fee: { asset: glmr, @@ -1266,6 +1322,7 @@ export const moonbeamRoutes = new ChainRoutes({ }, }, destination: { + asset: usdcwh, chain: peaqEvm, balance: BalanceBuilder().evm().erc20(), fee: { @@ -1276,8 +1333,8 @@ export const moonbeamRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transferWithEvmTo32(), }, { - asset: usdtwh, source: { + asset: usdtwh, balance: BalanceBuilder().evm().erc20(), fee: { asset: glmr, @@ -1288,6 +1345,7 @@ export const moonbeamRoutes = new ChainRoutes({ }, }, destination: { + asset: usdtwh, chain: peaqEvm, balance: BalanceBuilder().evm().erc20(), fee: { @@ -1298,8 +1356,8 @@ export const moonbeamRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transferWithEvmTo32(), }, { - asset: dai, source: { + asset: dai, balance: BalanceBuilder().evm().erc20(), fee: { asset: glmr, @@ -1310,6 +1368,7 @@ export const moonbeamRoutes = new ChainRoutes({ }, }, destination: { + asset: dai, chain: peaqEvm, balance: BalanceBuilder().evm().erc20(), fee: { @@ -1320,8 +1379,8 @@ export const moonbeamRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transferWithEvmTo32(), }, { - asset: weth, source: { + asset: weth, balance: BalanceBuilder().evm().erc20(), fee: { asset: glmr, @@ -1332,6 +1391,7 @@ export const moonbeamRoutes = new ChainRoutes({ }, }, destination: { + asset: weth, chain: peaqEvm, balance: BalanceBuilder().evm().erc20(), fee: { @@ -1342,8 +1402,8 @@ export const moonbeamRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transferWithEvmTo32(), }, { - asset: wbtc, source: { + asset: wbtc, balance: BalanceBuilder().evm().erc20(), fee: { asset: glmr, @@ -1354,6 +1414,7 @@ export const moonbeamRoutes = new ChainRoutes({ }, }, destination: { + asset: wbtc, chain: peaqEvm, balance: BalanceBuilder().evm().erc20(), fee: { @@ -1364,8 +1425,8 @@ export const moonbeamRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transferWithEvmTo32(), }, { - asset: wifd, source: { + asset: wifd, balance: BalanceBuilder().substrate().assets().account(), fee: { asset: glmr, @@ -1376,6 +1437,7 @@ export const moonbeamRoutes = new ChainRoutes({ }, }, destination: { + asset: wifd, chain: polkadotAssetHub, balance: BalanceBuilder().substrate().assets().account(), fee: { @@ -1386,14 +1448,15 @@ export const moonbeamRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transferMultiCurrencies(), }, { - asset: axlusdc, source: { + asset: axlusdc, balance: BalanceBuilder().evm().erc20(), destinationFee: { balance: BalanceBuilder().substrate().system().account(), }, }, destination: { + asset: axlusdc, chain: pendulum, balance: BalanceBuilder().substrate().tokens().accounts(), fee: { diff --git a/packages/config/src/xcm-configs/moonriver.ts b/packages/config/src/xcm-configs/moonriver.ts index 2de54c47..7e21134f 100644 --- a/packages/config/src/xcm-configs/moonriver.ts +++ b/packages/config/src/xcm-configs/moonriver.ts @@ -49,14 +49,15 @@ export const moonriverRoutes = new ChainRoutes({ chain: moonriver, routes: [ { - asset: movr, source: { + asset: movr, balance: BalanceBuilder().substrate().system().account(), destinationFee: { balance: BalanceBuilder().substrate().system().account(), }, }, destination: { + asset: movr, chain: bifrostKusama, balance: BalanceBuilder().substrate().tokens().accounts(), fee: { @@ -67,14 +68,15 @@ export const moonriverRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transfer(), }, { - asset: movr, source: { + asset: movr, balance: BalanceBuilder().substrate().system().account(), destinationFee: { balance: BalanceBuilder().substrate().system().account(), }, }, destination: { + asset: movr, chain: calamari, balance: BalanceBuilder().substrate().system().account(), fee: { @@ -85,14 +87,15 @@ export const moonriverRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transfer(), }, { - asset: movr, source: { + asset: movr, balance: BalanceBuilder().substrate().system().account(), destinationFee: { balance: BalanceBuilder().substrate().system().account(), }, }, destination: { + asset: movr, chain: crustShadow, balance: BalanceBuilder().substrate().assets().account(), fee: { @@ -103,14 +106,15 @@ export const moonriverRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transfer(), }, { - asset: movr, source: { + asset: movr, balance: BalanceBuilder().substrate().system().account(), destinationFee: { balance: BalanceBuilder().substrate().system().account(), }, }, destination: { + asset: movr, chain: karura, balance: BalanceBuilder().substrate().tokens().accounts(), fee: { @@ -121,14 +125,15 @@ export const moonriverRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transfer(), }, { - asset: movr, source: { + asset: movr, balance: BalanceBuilder().substrate().system().account(), destinationFee: { balance: BalanceBuilder().substrate().system().account(), }, }, destination: { + asset: movr, chain: khala, balance: BalanceBuilder().substrate().assets().account(), fee: { @@ -139,14 +144,15 @@ export const moonriverRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transfer(), }, { - asset: movr, source: { + asset: movr, balance: BalanceBuilder().substrate().system().account(), destinationFee: { balance: BalanceBuilder().substrate().system().account(), }, }, destination: { + asset: movr, chain: mangataKusama, balance: BalanceBuilder().substrate().tokens().accounts(), fee: { @@ -157,14 +163,15 @@ export const moonriverRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transfer(), }, { - asset: movr, source: { + asset: movr, balance: BalanceBuilder().substrate().system().account(), destinationFee: { balance: BalanceBuilder().substrate().system().account(), }, }, destination: { + asset: movr, chain: shiden, balance: BalanceBuilder().substrate().assets().account(), fee: { @@ -175,14 +182,15 @@ export const moonriverRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transfer(), }, { - asset: movr, source: { + asset: movr, balance: BalanceBuilder().substrate().system().account(), destinationFee: { balance: BalanceBuilder().substrate().system().account(), }, }, destination: { + asset: movr, chain: turing, balance: BalanceBuilder().substrate().tokens().accounts(), fee: { @@ -193,14 +201,15 @@ export const moonriverRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transfer(), }, { - asset: movr, source: { + asset: movr, balance: BalanceBuilder().substrate().system().account(), destinationFee: { balance: BalanceBuilder().substrate().system().account(), }, }, destination: { + asset: movr, chain: picasso, balance: BalanceBuilder().substrate().tokens().accounts(), fee: { @@ -211,8 +220,8 @@ export const moonriverRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transfer(), }, { - asset: aseed, source: { + asset: movr, balance: BalanceBuilder().substrate().assets().account(), fee: { asset: movr, @@ -223,6 +232,7 @@ export const moonriverRoutes = new ChainRoutes({ }, }, destination: { + asset: movr, chain: karura, balance: BalanceBuilder().substrate().tokens().accounts(), fee: { @@ -233,8 +243,8 @@ export const moonriverRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transfer(), }, { - asset: bnc, source: { + asset: bnc, balance: BalanceBuilder().substrate().assets().account(), fee: { asset: movr, @@ -245,6 +255,7 @@ export const moonriverRoutes = new ChainRoutes({ }, }, destination: { + asset: bnc, chain: bifrostKusama, balance: BalanceBuilder().substrate().system().account(), fee: { @@ -255,8 +266,8 @@ export const moonriverRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transfer(), }, { - asset: crab, source: { + asset: crab, balance: BalanceBuilder().substrate().assets().account(), fee: { asset: movr, @@ -267,6 +278,7 @@ export const moonriverRoutes = new ChainRoutes({ }, }, destination: { + asset: crab, chain: darwiniaCrab, balance: BalanceBuilder().substrate().system().account(), fee: { @@ -277,8 +289,8 @@ export const moonriverRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transfer(), }, { - asset: csm, source: { + asset: csm, balance: BalanceBuilder().substrate().assets().account(), fee: { asset: movr, @@ -289,6 +301,7 @@ export const moonriverRoutes = new ChainRoutes({ }, }, destination: { + asset: csm, chain: crustShadow, balance: BalanceBuilder().substrate().system().account(), fee: { @@ -299,8 +312,8 @@ export const moonriverRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transfer(), }, { - asset: kar, source: { + asset: kar, balance: BalanceBuilder().substrate().assets().account(), fee: { asset: movr, @@ -311,6 +324,7 @@ export const moonriverRoutes = new ChainRoutes({ }, }, destination: { + asset: kar, chain: karura, balance: BalanceBuilder().substrate().system().account(), fee: { @@ -321,8 +335,8 @@ export const moonriverRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transfer(), }, { - asset: kbtc, source: { + asset: kbtc, balance: BalanceBuilder().substrate().assets().account(), fee: { asset: movr, @@ -333,6 +347,7 @@ export const moonriverRoutes = new ChainRoutes({ }, }, destination: { + asset: kbtc, chain: kintsugi, balance: BalanceBuilder().substrate().tokens().accounts(), fee: { @@ -343,8 +358,8 @@ export const moonriverRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transfer(), }, { - asset: kint, source: { + asset: kint, balance: BalanceBuilder().substrate().assets().account(), fee: { asset: movr, @@ -355,6 +370,7 @@ export const moonriverRoutes = new ChainRoutes({ }, }, destination: { + asset: kint, chain: kintsugi, balance: BalanceBuilder().substrate().tokens().accounts(), fee: { @@ -365,8 +381,8 @@ export const moonriverRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transfer(), }, { - asset: kma, source: { + asset: kma, balance: BalanceBuilder().substrate().assets().account(), fee: { asset: movr, @@ -377,6 +393,7 @@ export const moonriverRoutes = new ChainRoutes({ }, }, destination: { + asset: kma, chain: calamari, balance: BalanceBuilder().substrate().system().account(), fee: { @@ -387,8 +404,8 @@ export const moonriverRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transfer(), }, { - asset: ksm, source: { + asset: ksm, balance: BalanceBuilder().substrate().assets().account(), fee: { asset: movr, @@ -399,6 +416,7 @@ export const moonriverRoutes = new ChainRoutes({ }, }, destination: { + asset: ksm, chain: kusama, balance: BalanceBuilder().substrate().system().account(), fee: { @@ -409,8 +427,8 @@ export const moonriverRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transfer(), }, { - asset: mgx, source: { + asset: mgx, balance: BalanceBuilder().substrate().assets().account(), fee: { asset: movr, @@ -421,6 +439,7 @@ export const moonriverRoutes = new ChainRoutes({ }, }, destination: { + asset: mgx, chain: mangataKusama, balance: BalanceBuilder().substrate().tokens().accounts(), fee: { @@ -431,8 +450,8 @@ export const moonriverRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transfer(), }, { - asset: pha, source: { + asset: pha, balance: BalanceBuilder().substrate().assets().account(), fee: { asset: movr, @@ -443,6 +462,7 @@ export const moonriverRoutes = new ChainRoutes({ }, }, destination: { + asset: pha, chain: khala, balance: BalanceBuilder().substrate().system().account(), fee: { @@ -453,8 +473,8 @@ export const moonriverRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transfer(), }, { - asset: pica, source: { + asset: pica, balance: BalanceBuilder().substrate().assets().account(), fee: { asset: movr, @@ -465,6 +485,7 @@ export const moonriverRoutes = new ChainRoutes({ }, }, destination: { + asset: pica, chain: picasso, balance: BalanceBuilder().substrate().system().account(), fee: { @@ -475,8 +496,8 @@ export const moonriverRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transfer(), }, { - asset: rmrk, source: { + asset: rmrk, balance: BalanceBuilder().substrate().assets().account(), fee: { asset: movr, @@ -487,6 +508,7 @@ export const moonriverRoutes = new ChainRoutes({ }, }, destination: { + asset: rmrk, chain: kusamaAssetHub, balance: BalanceBuilder().substrate().assets().account(), fee: { @@ -497,8 +519,8 @@ export const moonriverRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transfer(), }, { - asset: sdn, source: { + asset: sdn, balance: BalanceBuilder().substrate().assets().account(), fee: { asset: movr, @@ -509,6 +531,7 @@ export const moonriverRoutes = new ChainRoutes({ }, }, destination: { + asset: sdn, chain: shiden, balance: BalanceBuilder().substrate().system().account(), fee: { @@ -519,8 +542,8 @@ export const moonriverRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transfer(), }, { - asset: teer, source: { + asset: teer, balance: BalanceBuilder().substrate().assets().account(), fee: { asset: movr, @@ -531,6 +554,7 @@ export const moonriverRoutes = new ChainRoutes({ }, }, destination: { + asset: teer, chain: integritee, balance: BalanceBuilder().substrate().system().account(), fee: { @@ -541,8 +565,8 @@ export const moonriverRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transfer(), }, { - asset: tnkr, source: { + asset: tnkr, balance: BalanceBuilder().substrate().assets().account(), fee: { asset: movr, @@ -553,6 +577,7 @@ export const moonriverRoutes = new ChainRoutes({ }, }, destination: { + asset: tnkr, chain: tinkernet, balance: BalanceBuilder().substrate().system().account(), fee: { @@ -563,8 +588,8 @@ export const moonriverRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transfer(), }, { - asset: tur, source: { + asset: tur, balance: BalanceBuilder().substrate().assets().account(), fee: { asset: movr, @@ -575,6 +600,7 @@ export const moonriverRoutes = new ChainRoutes({ }, }, destination: { + asset: tur, chain: turing, balance: BalanceBuilder().substrate().system().account(), fee: { @@ -585,8 +611,8 @@ export const moonriverRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transfer(), }, { - asset: usdt, source: { + asset: usdt, balance: BalanceBuilder().substrate().assets().account(), fee: { asset: movr, @@ -597,6 +623,7 @@ export const moonriverRoutes = new ChainRoutes({ }, }, destination: { + asset: usdt, chain: kusamaAssetHub, balance: BalanceBuilder().substrate().assets().account(), fee: { @@ -607,8 +634,8 @@ export const moonriverRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transfer(), }, { - asset: xrt, source: { + asset: xrt, balance: BalanceBuilder().substrate().assets().account(), fee: { asset: movr, @@ -619,6 +646,7 @@ export const moonriverRoutes = new ChainRoutes({ }, }, destination: { + asset: xrt, chain: robonomics, balance: BalanceBuilder().substrate().system().account(), fee: { @@ -629,8 +657,8 @@ export const moonriverRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transfer(), }, { - asset: vbnc, source: { + asset: vbnc, balance: BalanceBuilder().evm().erc20(), fee: { asset: movr, @@ -641,6 +669,7 @@ export const moonriverRoutes = new ChainRoutes({ }, }, destination: { + asset: vbnc, chain: bifrostKusama, balance: BalanceBuilder().substrate().tokens().accounts(), fee: { @@ -651,8 +680,8 @@ export const moonriverRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transfer(), }, { - asset: vksm, source: { + asset: vksm, balance: BalanceBuilder().evm().erc20(), fee: { asset: movr, @@ -663,6 +692,7 @@ export const moonriverRoutes = new ChainRoutes({ }, }, destination: { + asset: vksm, chain: bifrostKusama, balance: BalanceBuilder().substrate().tokens().accounts(), fee: { @@ -673,8 +703,8 @@ export const moonriverRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transfer(), }, { - asset: vmovr, source: { + asset: vmovr, balance: BalanceBuilder().evm().erc20(), fee: { asset: movr, @@ -685,6 +715,7 @@ export const moonriverRoutes = new ChainRoutes({ }, }, destination: { + asset: vmovr, chain: bifrostKusama, balance: BalanceBuilder().substrate().tokens().accounts(), fee: { diff --git a/packages/config/src/xcm-configs/neuroweb.ts b/packages/config/src/xcm-configs/neuroweb.ts index 5118e64b..9f54aa30 100644 --- a/packages/config/src/xcm-configs/neuroweb.ts +++ b/packages/config/src/xcm-configs/neuroweb.ts @@ -11,14 +11,15 @@ export const neurowebRoutes = new ChainRoutes({ chain: neuroweb, routes: [ { - asset: neuro, source: { + asset: neuro, balance: BalanceBuilder().substrate().system().account(), destinationFee: { balance: BalanceBuilder().substrate().system().account(), }, }, destination: { + asset: neuro, chain: moonbeam, balance: BalanceBuilder().substrate().assets().account(), fee: { diff --git a/packages/config/src/xcm-configs/nodle.ts b/packages/config/src/xcm-configs/nodle.ts index f62892b5..0dd07a2b 100644 --- a/packages/config/src/xcm-configs/nodle.ts +++ b/packages/config/src/xcm-configs/nodle.ts @@ -11,14 +11,15 @@ export const nodleRoutes = new ChainRoutes({ chain: nodle, routes: [ { - asset: nodl, source: { + asset: nodl, balance: BalanceBuilder().substrate().system().account(), destinationFee: { balance: BalanceBuilder().substrate().system().account(), }, }, destination: { + asset: nodl, chain: moonbeam, balance: BalanceBuilder().substrate().assets().account(), fee: { diff --git a/packages/config/src/xcm-configs/originTrailAlphanet.ts b/packages/config/src/xcm-configs/originTrailAlphanet.ts index 5d642b2d..b8c4a9c3 100644 --- a/packages/config/src/xcm-configs/originTrailAlphanet.ts +++ b/packages/config/src/xcm-configs/originTrailAlphanet.ts @@ -11,14 +11,15 @@ export const originTrailAlphanetRoutes = new ChainRoutes({ chain: originTrailAlphanet, routes: [ { - asset: otp, source: { + asset: otp, balance: BalanceBuilder().substrate().system().account(), destinationFee: { balance: BalanceBuilder().substrate().system().account(), }, }, destination: { + asset: otp, chain: moonbaseAlpha, balance: BalanceBuilder().substrate().assets().account(), fee: { diff --git a/packages/config/src/xcm-configs/parallel.ts b/packages/config/src/xcm-configs/parallel.ts index 7b59e26e..f43c6847 100644 --- a/packages/config/src/xcm-configs/parallel.ts +++ b/packages/config/src/xcm-configs/parallel.ts @@ -11,14 +11,15 @@ export const parallelRoutes = new ChainRoutes({ chain: parallel, routes: [ { - asset: para, source: { + asset: para, balance: BalanceBuilder().substrate().system().account(), destinationFee: { balance: BalanceBuilder().substrate().system().account(), }, }, destination: { + asset: para, chain: moonbeam, balance: BalanceBuilder().substrate().assets().account(), fee: { @@ -32,8 +33,8 @@ export const parallelRoutes = new ChainRoutes({ .X2(), }, { - asset: glmr, source: { + asset: glmr, balance: BalanceBuilder().substrate().assets().account(), fee: { asset: para, @@ -44,6 +45,7 @@ export const parallelRoutes = new ChainRoutes({ }, }, destination: { + asset: glmr, chain: moonbeam, balance: BalanceBuilder().substrate().system().account(), fee: { diff --git a/packages/config/src/xcm-configs/peaq.ts b/packages/config/src/xcm-configs/peaq.ts index edb9c367..c32527cd 100644 --- a/packages/config/src/xcm-configs/peaq.ts +++ b/packages/config/src/xcm-configs/peaq.ts @@ -12,14 +12,15 @@ export const peaqRoutes = new ChainRoutes({ chain: peaqChain, routes: [ { - asset: peaq, source: { + asset: peaq, balance: BalanceBuilder().substrate().system().account(), destinationFee: { balance: BalanceBuilder().substrate().system().account(), }, }, destination: { + asset: peaq, chain: moonbeam, balance: BalanceBuilder().substrate().assets().account(), fee: { @@ -30,8 +31,8 @@ export const peaqRoutes = new ChainRoutes({ extrinsic: ExtrinsicBuilder().xTokens().transfer(), }, { - asset: glmr, source: { + asset: glmr, balance: BalanceBuilder().substrate().assets().account(), min: AssetMinBuilder().assets().asset(), destinationFee: { @@ -39,6 +40,7 @@ export const peaqRoutes = new ChainRoutes({ }, }, destination: { + asset: glmr, chain: moonbeam, balance: BalanceBuilder().substrate().system().account(), fee: { @@ -49,8 +51,8 @@ export const peaqRoutes = new ChainRoutes({ extrinsic: ExtrinsicBuilder().xTokens().transfer(), }, { - asset: usdcwh, source: { + asset: usdcwh, balance: BalanceBuilder().substrate().assets().account(), fee: { asset: peaq, @@ -62,6 +64,7 @@ export const peaqRoutes = new ChainRoutes({ }, }, destination: { + asset: usdcwh, chain: moonbeam, balance: BalanceBuilder().evm().erc20(), fee: { @@ -72,8 +75,8 @@ export const peaqRoutes = new ChainRoutes({ extrinsic: ExtrinsicBuilder().xTokens().transferMultiCurrencies(), }, { - asset: dai, source: { + asset: dai, balance: BalanceBuilder().substrate().assets().account(), fee: { asset: peaq, @@ -85,6 +88,7 @@ export const peaqRoutes = new ChainRoutes({ }, }, destination: { + asset: dai, chain: moonbeam, balance: BalanceBuilder().evm().erc20(), fee: { @@ -95,8 +99,8 @@ export const peaqRoutes = new ChainRoutes({ extrinsic: ExtrinsicBuilder().xTokens().transferMultiCurrencies(), }, { - asset: wbtc, source: { + asset: wbtc, balance: BalanceBuilder().substrate().assets().account(), fee: { asset: peaq, @@ -108,6 +112,7 @@ export const peaqRoutes = new ChainRoutes({ }, }, destination: { + asset: wbtc, chain: moonbeam, balance: BalanceBuilder().evm().erc20(), fee: { @@ -118,8 +123,8 @@ export const peaqRoutes = new ChainRoutes({ extrinsic: ExtrinsicBuilder().xTokens().transferMultiCurrencies(), }, { - asset: weth, source: { + asset: weth, balance: BalanceBuilder().substrate().assets().account(), fee: { asset: peaq, @@ -131,6 +136,7 @@ export const peaqRoutes = new ChainRoutes({ }, }, destination: { + asset: weth, chain: moonbeam, balance: BalanceBuilder().evm().erc20(), fee: { @@ -141,8 +147,8 @@ export const peaqRoutes = new ChainRoutes({ extrinsic: ExtrinsicBuilder().xTokens().transferMultiCurrencies(), }, { - asset: usdtwh, source: { + asset: usdtwh, balance: BalanceBuilder().substrate().assets().account(), fee: { asset: peaq, @@ -154,6 +160,7 @@ export const peaqRoutes = new ChainRoutes({ }, }, destination: { + asset: usdtwh, chain: moonbeam, balance: BalanceBuilder().evm().erc20(), fee: { diff --git a/packages/config/src/xcm-configs/peaqAlphanet.ts b/packages/config/src/xcm-configs/peaqAlphanet.ts index 7d5390a0..16adf200 100644 --- a/packages/config/src/xcm-configs/peaqAlphanet.ts +++ b/packages/config/src/xcm-configs/peaqAlphanet.ts @@ -12,14 +12,15 @@ export const peaqAlphanetRoutes = new ChainRoutes({ chain: peaqAlphanet, routes: [ { - asset: agng, source: { + asset: agng, balance: BalanceBuilder().substrate().system().account(), destinationFee: { balance: BalanceBuilder().substrate().system().account(), }, }, destination: { + asset: agng, chain: moonbaseAlpha, balance: BalanceBuilder().substrate().assets().account(), fee: { @@ -30,8 +31,8 @@ export const peaqAlphanetRoutes = new ChainRoutes({ extrinsic: ExtrinsicBuilder().xTokens().transfer(), }, { - asset: dev, source: { + asset: dev, balance: BalanceBuilder().substrate().assets().account(), min: AssetMinBuilder().assets().asset(), destinationFee: { @@ -39,6 +40,7 @@ export const peaqAlphanetRoutes = new ChainRoutes({ }, }, destination: { + asset: dev, chain: moonbaseAlpha, balance: BalanceBuilder().substrate().system().account(), fee: { @@ -49,8 +51,8 @@ export const peaqAlphanetRoutes = new ChainRoutes({ extrinsic: ExtrinsicBuilder().xTokens().transfer(), }, { - asset: ftmwh, source: { + asset: ftmwh, balance: BalanceBuilder().substrate().assets().account(), fee: { asset: agng, @@ -62,6 +64,7 @@ export const peaqAlphanetRoutes = new ChainRoutes({ }, }, destination: { + asset: ftmwh, chain: moonbaseAlpha, balance: BalanceBuilder().evm().erc20(), fee: { diff --git a/packages/config/src/xcm-configs/peaqEvm.ts b/packages/config/src/xcm-configs/peaqEvm.ts index 1cadc0e1..b1099291 100644 --- a/packages/config/src/xcm-configs/peaqEvm.ts +++ b/packages/config/src/xcm-configs/peaqEvm.ts @@ -11,8 +11,8 @@ export const peaqEvmRoutes = new ChainRoutes({ chain: peaqEvm, routes: [ { - asset: glmr, source: { + asset: glmr, balance: BalanceBuilder().evm().erc20(), fee: { asset: peaq, @@ -24,6 +24,7 @@ export const peaqEvmRoutes = new ChainRoutes({ }, }, destination: { + asset: glmr, chain: moonbeam, balance: BalanceBuilder().substrate().system().account(), fee: { @@ -34,8 +35,8 @@ export const peaqEvmRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transfer(), }, { - asset: usdcwh, source: { + asset: usdcwh, balance: BalanceBuilder().evm().erc20(), fee: { asset: peaq, @@ -47,6 +48,7 @@ export const peaqEvmRoutes = new ChainRoutes({ }, }, destination: { + asset: usdcwh, chain: moonbeam, balance: BalanceBuilder().evm().erc20(), fee: { @@ -57,8 +59,8 @@ export const peaqEvmRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transferMultiCurrencies(), }, { - asset: dai, source: { + asset: dai, balance: BalanceBuilder().evm().erc20(), fee: { asset: peaq, @@ -70,6 +72,7 @@ export const peaqEvmRoutes = new ChainRoutes({ }, }, destination: { + asset: dai, chain: moonbeam, balance: BalanceBuilder().evm().erc20(), fee: { @@ -80,8 +83,8 @@ export const peaqEvmRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transferMultiCurrencies(), }, { - asset: wbtc, source: { + asset: wbtc, balance: BalanceBuilder().evm().erc20(), fee: { asset: peaq, @@ -93,6 +96,7 @@ export const peaqEvmRoutes = new ChainRoutes({ }, }, destination: { + asset: wbtc, chain: moonbeam, balance: BalanceBuilder().evm().erc20(), fee: { @@ -103,8 +107,8 @@ export const peaqEvmRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transferMultiCurrencies(), }, { - asset: weth, source: { + asset: weth, balance: BalanceBuilder().evm().erc20(), fee: { asset: peaq, @@ -116,6 +120,7 @@ export const peaqEvmRoutes = new ChainRoutes({ }, }, destination: { + asset: weth, chain: moonbeam, balance: BalanceBuilder().evm().erc20(), fee: { @@ -126,8 +131,8 @@ export const peaqEvmRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transferMultiCurrencies(), }, { - asset: usdtwh, source: { + asset: usdtwh, balance: BalanceBuilder().evm().erc20(), fee: { asset: peaq, @@ -139,6 +144,7 @@ export const peaqEvmRoutes = new ChainRoutes({ }, }, destination: { + asset: usdtwh, chain: moonbeam, balance: BalanceBuilder().evm().erc20(), fee: { diff --git a/packages/config/src/xcm-configs/peaqEvmAlphanet.ts b/packages/config/src/xcm-configs/peaqEvmAlphanet.ts index ea9e804b..b4dc0cb5 100644 --- a/packages/config/src/xcm-configs/peaqEvmAlphanet.ts +++ b/packages/config/src/xcm-configs/peaqEvmAlphanet.ts @@ -11,8 +11,8 @@ export const peaqEvmAlphanetRoutes = new ChainRoutes({ chain: peaqEvmAlphanet, routes: [ { - asset: ftmwh, source: { + asset: ftmwh, balance: BalanceBuilder().evm().erc20(), fee: { asset: agng, @@ -24,6 +24,7 @@ export const peaqEvmAlphanetRoutes = new ChainRoutes({ }, }, destination: { + asset: ftmwh, chain: moonbaseAlpha, balance: BalanceBuilder().evm().erc20(), fee: { @@ -34,8 +35,8 @@ export const peaqEvmAlphanetRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transferMultiCurrencies(), }, { - asset: dev, source: { + asset: dev, balance: BalanceBuilder().evm().erc20(), fee: { asset: agng, @@ -47,6 +48,7 @@ export const peaqEvmAlphanetRoutes = new ChainRoutes({ }, }, destination: { + asset: dev, chain: moonbaseAlpha, balance: BalanceBuilder().substrate().system().account(), fee: { diff --git a/packages/config/src/xcm-configs/pendulum.ts b/packages/config/src/xcm-configs/pendulum.ts index 7b1c3cf5..93742002 100644 --- a/packages/config/src/xcm-configs/pendulum.ts +++ b/packages/config/src/xcm-configs/pendulum.ts @@ -11,14 +11,15 @@ export const pendulumRoutes = new ChainRoutes({ chain: pendulum, routes: [ { - asset: pen, source: { + asset: pen, balance: BalanceBuilder().substrate().system().account(), destinationFee: { balance: BalanceBuilder().substrate().system().account(), }, }, destination: { + asset: pen, chain: moonbeam, balance: BalanceBuilder().substrate().assets().account(), fee: { @@ -29,8 +30,8 @@ export const pendulumRoutes = new ChainRoutes({ extrinsic: ExtrinsicBuilder().xTokens().transfer(), }, { - asset: glmr, source: { + asset: glmr, balance: BalanceBuilder().substrate().tokens().accounts(), fee: { asset: pen, @@ -41,6 +42,7 @@ export const pendulumRoutes = new ChainRoutes({ }, }, destination: { + asset: glmr, chain: moonbeam, balance: BalanceBuilder().substrate().system().account(), fee: { @@ -51,8 +53,8 @@ export const pendulumRoutes = new ChainRoutes({ extrinsic: ExtrinsicBuilder().xTokens().transfer(), }, { - asset: axlusdc, source: { + asset: axlusdc, balance: BalanceBuilder().substrate().tokens().accounts(), fee: { asset: pen, @@ -63,6 +65,7 @@ export const pendulumRoutes = new ChainRoutes({ }, }, destination: { + asset: axlusdc, chain: moonbeam, balance: BalanceBuilder().evm().erc20(), fee: { diff --git a/packages/config/src/xcm-configs/pendulumAlphanet.ts b/packages/config/src/xcm-configs/pendulumAlphanet.ts index 299e8e01..fb3d50a9 100644 --- a/packages/config/src/xcm-configs/pendulumAlphanet.ts +++ b/packages/config/src/xcm-configs/pendulumAlphanet.ts @@ -11,14 +11,15 @@ export const pendulumAlphanetRoutes = new ChainRoutes({ chain: pendulumAlphanet, routes: [ { - asset: ampe, source: { + asset: ampe, balance: BalanceBuilder().substrate().system().account(), destinationFee: { balance: BalanceBuilder().substrate().system().account(), }, }, destination: { + asset: ampe, chain: moonbaseAlpha, balance: BalanceBuilder().substrate().assets().account(), fee: { @@ -29,8 +30,8 @@ export const pendulumAlphanetRoutes = new ChainRoutes({ extrinsic: ExtrinsicBuilder().xTokens().transfer(), }, { - asset: dev, source: { + asset: dev, balance: BalanceBuilder().substrate().tokens().accounts(), fee: { asset: ampe, @@ -41,6 +42,7 @@ export const pendulumAlphanetRoutes = new ChainRoutes({ }, }, destination: { + asset: dev, chain: moonbaseAlpha, balance: BalanceBuilder().substrate().system().account(), fee: { diff --git a/packages/config/src/xcm-configs/phala.ts b/packages/config/src/xcm-configs/phala.ts index 1c0bc68b..98c79132 100644 --- a/packages/config/src/xcm-configs/phala.ts +++ b/packages/config/src/xcm-configs/phala.ts @@ -11,14 +11,15 @@ export const phalaRoutes = new ChainRoutes({ chain: phala, routes: [ { - asset: pha, source: { + asset: pha, balance: BalanceBuilder().substrate().system().account(), destinationFee: { balance: BalanceBuilder().substrate().system().account(), }, }, destination: { + asset: pha, chain: moonbeam, balance: BalanceBuilder().substrate().assets().account(), fee: { @@ -29,8 +30,8 @@ export const phalaRoutes = new ChainRoutes({ extrinsic: ExtrinsicBuilder().xTransfer().transfer().here(), }, { - asset: glmr, source: { + asset: glmr, balance: BalanceBuilder().substrate().assets().account(), fee: { asset: pha, @@ -41,6 +42,7 @@ export const phalaRoutes = new ChainRoutes({ }, }, destination: { + asset: glmr, chain: moonbeam, balance: BalanceBuilder().substrate().system().account(), fee: { diff --git a/packages/config/src/xcm-configs/picasso.ts b/packages/config/src/xcm-configs/picasso.ts index 62469db1..b4161eaf 100644 --- a/packages/config/src/xcm-configs/picasso.ts +++ b/packages/config/src/xcm-configs/picasso.ts @@ -11,14 +11,15 @@ export const picassoRoutes = new ChainRoutes({ chain: picasso, routes: [ { - asset: pica, source: { + asset: pica, balance: BalanceBuilder().substrate().system().account(), destinationFee: { balance: BalanceBuilder().substrate().system().account(), }, }, destination: { + asset: pica, chain: moonriver, balance: BalanceBuilder().substrate().assets().account(), fee: { @@ -29,8 +30,8 @@ export const picassoRoutes = new ChainRoutes({ extrinsic: ExtrinsicBuilder().xTokens().transfer(), }, { - asset: movr, source: { + asset: movr, balance: BalanceBuilder().substrate().tokens().accounts(), fee: { asset: pica, @@ -41,6 +42,7 @@ export const picassoRoutes = new ChainRoutes({ }, }, destination: { + asset: movr, chain: moonriver, balance: BalanceBuilder().substrate().system().account(), fee: { diff --git a/packages/config/src/xcm-configs/picassoAlphanet.ts b/packages/config/src/xcm-configs/picassoAlphanet.ts index e9ad4ab1..d5a182d1 100644 --- a/packages/config/src/xcm-configs/picassoAlphanet.ts +++ b/packages/config/src/xcm-configs/picassoAlphanet.ts @@ -11,14 +11,15 @@ export const picassoAlphanetRoutes = new ChainRoutes({ chain: picassoAlphanet, routes: [ { - asset: pica, source: { + asset: pica, balance: BalanceBuilder().substrate().system().account(), destinationFee: { balance: BalanceBuilder().substrate().system().account(), }, }, destination: { + asset: pica, chain: moonbaseAlpha, balance: BalanceBuilder().substrate().assets().account(), fee: { @@ -29,8 +30,8 @@ export const picassoAlphanetRoutes = new ChainRoutes({ extrinsic: ExtrinsicBuilder().xTokens().transfer(), }, { - asset: atom, source: { + asset: atom, balance: BalanceBuilder().substrate().tokens().accounts(), fee: { asset: pica, @@ -41,6 +42,7 @@ export const picassoAlphanetRoutes = new ChainRoutes({ }, }, destination: { + asset: atom, chain: moonbaseAlpha, balance: BalanceBuilder().substrate().assets().account(), fee: { @@ -51,8 +53,8 @@ export const picassoAlphanetRoutes = new ChainRoutes({ extrinsic: ExtrinsicBuilder().xTokens().transferMultiCurrencies(), }, { - asset: dev, source: { + asset: dev, balance: BalanceBuilder().substrate().tokens().accounts(), fee: { asset: pica, @@ -63,6 +65,7 @@ export const picassoAlphanetRoutes = new ChainRoutes({ }, }, destination: { + asset: dev, chain: moonbaseAlpha, balance: BalanceBuilder().substrate().system().account(), fee: { diff --git a/packages/config/src/xcm-configs/polkadot.ts b/packages/config/src/xcm-configs/polkadot.ts index 8e96f887..8706112f 100644 --- a/packages/config/src/xcm-configs/polkadot.ts +++ b/packages/config/src/xcm-configs/polkadot.ts @@ -11,8 +11,8 @@ export const polkadotRoutes = new ChainRoutes({ chain: polkadot, routes: [ { - asset: dot, source: { + asset: dot, balance: BalanceBuilder().substrate().system().account(), fee: { asset: dot, @@ -24,6 +24,7 @@ export const polkadotRoutes = new ChainRoutes({ }, }, destination: { + asset: dot, chain: moonbeam, balance: BalanceBuilder().substrate().assets().account(), fee: { diff --git a/packages/config/src/xcm-configs/polkadotAssetHub.ts b/packages/config/src/xcm-configs/polkadotAssetHub.ts index f5baa08d..38f6bd68 100644 --- a/packages/config/src/xcm-configs/polkadotAssetHub.ts +++ b/packages/config/src/xcm-configs/polkadotAssetHub.ts @@ -14,8 +14,8 @@ export const polkadotAssetHubRoutes = new ChainRoutes({ chain: polkadotAssetHub, routes: [ { - asset: usdt, source: { + asset: usdt, balance: BalanceBuilder().substrate().assets().account(), fee: { asset: dot, @@ -28,6 +28,7 @@ export const polkadotAssetHubRoutes = new ChainRoutes({ }, }, destination: { + asset: usdt, chain: moonbeam, balance: BalanceBuilder().substrate().assets().account(), fee: { @@ -41,8 +42,8 @@ export const polkadotAssetHubRoutes = new ChainRoutes({ .X2(), }, { - asset: usdc, source: { + asset: usdc, balance: BalanceBuilder().substrate().assets().account(), fee: { asset: dot, @@ -55,6 +56,7 @@ export const polkadotAssetHubRoutes = new ChainRoutes({ }, }, destination: { + asset: usdc, chain: moonbeam, balance: BalanceBuilder().evm().erc20(), fee: { @@ -68,8 +70,8 @@ export const polkadotAssetHubRoutes = new ChainRoutes({ .X2(), }, { - asset: pink, source: { + asset: pink, balance: BalanceBuilder().substrate().assets().account(), fee: { asset: dot, @@ -82,6 +84,7 @@ export const polkadotAssetHubRoutes = new ChainRoutes({ }, }, destination: { + asset: pink, chain: moonbeam, balance: BalanceBuilder().substrate().assets().account(), fee: { @@ -95,8 +98,8 @@ export const polkadotAssetHubRoutes = new ChainRoutes({ .X2(), }, { - asset: ded, source: { + asset: ded, balance: BalanceBuilder().substrate().assets().account(), fee: { asset: dot, @@ -109,6 +112,7 @@ export const polkadotAssetHubRoutes = new ChainRoutes({ }, }, destination: { + asset: ded, chain: moonbeam, balance: BalanceBuilder().substrate().assets().account(), fee: { @@ -122,8 +126,8 @@ export const polkadotAssetHubRoutes = new ChainRoutes({ .X2(), }, { - asset: stink, source: { + asset: stink, balance: BalanceBuilder().substrate().assets().account(), fee: { asset: dot, @@ -136,6 +140,7 @@ export const polkadotAssetHubRoutes = new ChainRoutes({ }, }, destination: { + asset: stink, chain: moonbeam, balance: BalanceBuilder().substrate().assets().account(), fee: { @@ -149,8 +154,8 @@ export const polkadotAssetHubRoutes = new ChainRoutes({ .X2(), }, { - asset: apillon, source: { + asset: apillon, balance: BalanceBuilder().substrate().assets().account(), fee: { asset: dot, @@ -163,6 +168,7 @@ export const polkadotAssetHubRoutes = new ChainRoutes({ }, }, destination: { + asset: apillon, chain: moonbeam, balance: BalanceBuilder().substrate().assets().account(), fee: { @@ -176,8 +182,8 @@ export const polkadotAssetHubRoutes = new ChainRoutes({ .X2(), }, { - asset: wifd, source: { + asset: wifd, balance: BalanceBuilder().substrate().assets().account(), fee: { asset: dot, @@ -190,6 +196,7 @@ export const polkadotAssetHubRoutes = new ChainRoutes({ }, }, destination: { + asset: wifd, chain: moonbeam, balance: BalanceBuilder().substrate().assets().account(), fee: { diff --git a/packages/config/src/xcm-configs/robonomics.ts b/packages/config/src/xcm-configs/robonomics.ts index 3caa4e3f..315c71ba 100644 --- a/packages/config/src/xcm-configs/robonomics.ts +++ b/packages/config/src/xcm-configs/robonomics.ts @@ -11,14 +11,15 @@ export const robonomicsRoutes = new ChainRoutes({ chain: robonomics, routes: [ { - asset: xrt, source: { + asset: xrt, balance: BalanceBuilder().substrate().system().account(), destinationFee: { balance: BalanceBuilder().substrate().system().account(), }, }, destination: { + asset: xrt, chain: moonriver, balance: BalanceBuilder().substrate().assets().account(), fee: { diff --git a/packages/config/src/xcm-configs/shiden.ts b/packages/config/src/xcm-configs/shiden.ts index 7688cd26..9c122e17 100644 --- a/packages/config/src/xcm-configs/shiden.ts +++ b/packages/config/src/xcm-configs/shiden.ts @@ -11,14 +11,15 @@ export const shidenRoutes = new ChainRoutes({ chain: shiden, routes: [ { - asset: sdn, source: { + asset: sdn, balance: BalanceBuilder().substrate().system().account(), destinationFee: { balance: BalanceBuilder().substrate().system().account(), }, }, destination: { + asset: sdn, chain: moonriver, balance: BalanceBuilder().substrate().assets().account(), fee: { @@ -32,8 +33,8 @@ export const shidenRoutes = new ChainRoutes({ .here(), }, { - asset: movr, source: { + asset: movr, balance: BalanceBuilder().substrate().assets().account(), fee: { asset: sdn, @@ -44,6 +45,7 @@ export const shidenRoutes = new ChainRoutes({ }, }, destination: { + asset: movr, chain: moonriver, balance: BalanceBuilder().substrate().system().account(), fee: { diff --git a/packages/config/src/xcm-configs/subsocial.ts b/packages/config/src/xcm-configs/subsocial.ts index 2e188bd1..0e32140d 100644 --- a/packages/config/src/xcm-configs/subsocial.ts +++ b/packages/config/src/xcm-configs/subsocial.ts @@ -11,14 +11,15 @@ export const subsocialRoutes = new ChainRoutes({ chain: subsocial, routes: [ { - asset: sub, source: { + asset: sub, balance: BalanceBuilder().substrate().system().account(), destinationFee: { balance: BalanceBuilder().substrate().system().account(), }, }, destination: { + asset: sub, chain: moonbeam, balance: BalanceBuilder().substrate().assets().account(), fee: { diff --git a/packages/config/src/xcm-configs/tinkernet.ts b/packages/config/src/xcm-configs/tinkernet.ts index 3328f619..327708f5 100644 --- a/packages/config/src/xcm-configs/tinkernet.ts +++ b/packages/config/src/xcm-configs/tinkernet.ts @@ -11,14 +11,15 @@ export const tinkernetRoutes = new ChainRoutes({ chain: tinkernet, routes: [ { - asset: tnkr, source: { + asset: tnkr, balance: BalanceBuilder().substrate().system().account(), destinationFee: { balance: BalanceBuilder().substrate().system().account(), }, }, destination: { + asset: tnkr, chain: moonriver, balance: BalanceBuilder().substrate().assets().account(), fee: { diff --git a/packages/config/src/xcm-configs/turing.ts b/packages/config/src/xcm-configs/turing.ts index ad80f0b5..98f43c5a 100644 --- a/packages/config/src/xcm-configs/turing.ts +++ b/packages/config/src/xcm-configs/turing.ts @@ -11,14 +11,15 @@ export const turingRoutes = new ChainRoutes({ chain: turing, routes: [ { - asset: tur, source: { + asset: tur, balance: BalanceBuilder().substrate().system().account(), destinationFee: { balance: BalanceBuilder().substrate().system().account(), }, }, destination: { + asset: tur, chain: moonriver, balance: BalanceBuilder().substrate().assets().account(), fee: { @@ -32,8 +33,8 @@ export const turingRoutes = new ChainRoutes({ .X1(), }, { - asset: movr, source: { + asset: movr, balance: BalanceBuilder().substrate().tokens().accounts(), fee: { asset: tur, @@ -44,6 +45,7 @@ export const turingRoutes = new ChainRoutes({ }, }, destination: { + asset: movr, chain: moonriver, balance: BalanceBuilder().substrate().system().account(), fee: { diff --git a/packages/config/src/xcm-configs/turingAlphanet.ts b/packages/config/src/xcm-configs/turingAlphanet.ts index abf5145d..c70091ae 100644 --- a/packages/config/src/xcm-configs/turingAlphanet.ts +++ b/packages/config/src/xcm-configs/turingAlphanet.ts @@ -11,14 +11,15 @@ export const turingAlphanetRoutes = new ChainRoutes({ chain: turingAlphanet, routes: [ { - asset: tur, source: { + asset: tur, balance: BalanceBuilder().substrate().system().account(), destinationFee: { balance: BalanceBuilder().substrate().system().account(), }, }, destination: { + asset: tur, chain: moonbaseAlpha, balance: BalanceBuilder().substrate().assets().account(), fee: { @@ -32,8 +33,8 @@ export const turingAlphanetRoutes = new ChainRoutes({ .X1(), }, { - asset: dev, source: { + asset: dev, balance: BalanceBuilder().substrate().tokens().accounts(), fee: { asset: tur, @@ -44,6 +45,7 @@ export const turingAlphanetRoutes = new ChainRoutes({ }, }, destination: { + asset: dev, chain: moonbaseAlpha, balance: BalanceBuilder().substrate().system().account(), fee: { diff --git a/packages/config/src/xcm-configs/zeitgeist.ts b/packages/config/src/xcm-configs/zeitgeist.ts index bfa304ab..588e0aaf 100644 --- a/packages/config/src/xcm-configs/zeitgeist.ts +++ b/packages/config/src/xcm-configs/zeitgeist.ts @@ -11,14 +11,15 @@ export const zeitgeistRoutes = new ChainRoutes({ chain: zeitgeist, routes: [ { - asset: ztg, source: { + asset: ztg, balance: BalanceBuilder().substrate().system().account(), destinationFee: { balance: BalanceBuilder().substrate().system().account(), }, }, destination: { + asset: ztg, chain: moonbeam, balance: BalanceBuilder().substrate().assets().account(), fee: { @@ -29,8 +30,8 @@ export const zeitgeistRoutes = new ChainRoutes({ extrinsic: ExtrinsicBuilder().xTokens().transfer(), }, { - asset: usdcwh, source: { + asset: usdcwh, balance: BalanceBuilder().substrate().tokens().accounts(), fee: { asset: ztg, @@ -41,6 +42,7 @@ export const zeitgeistRoutes = new ChainRoutes({ }, }, destination: { + asset: usdcwh, chain: moonbeam, balance: BalanceBuilder().evm().erc20(), fee: { @@ -51,14 +53,15 @@ export const zeitgeistRoutes = new ChainRoutes({ extrinsic: ExtrinsicBuilder().xTokens().transferMultiCurrencies(), }, { - asset: glmr, source: { + asset: glmr, balance: BalanceBuilder().substrate().tokens().accounts(), destinationFee: { balance: BalanceBuilder().substrate().tokens().accounts(), }, }, destination: { + asset: glmr, chain: moonbeam, balance: BalanceBuilder().substrate().system().account(), fee: { diff --git a/packages/mrl/src/getTransferData/getMoonChainData.ts b/packages/mrl/src/getTransferData/getMoonChainData.ts new file mode 100644 index 00000000..c426a73a --- /dev/null +++ b/packages/mrl/src/getTransferData/getMoonChainData.ts @@ -0,0 +1,69 @@ +import { type AssetRoute, getMoonChain } from '@moonbeam-network/xcm-config'; +import { getBalance, getDestinationFee } from '@moonbeam-network/xcm-sdk'; +import { Parachain } from '@moonbeam-network/xcm-types'; +import { getMultilocationDerivedAddresses } from '@moonbeam-network/xcm-utils'; +import type { + DestinationTransferData, + MoonChainTransferData, +} from '../mrl.interfaces'; + +export interface GetMoonChainDataParams { + destinationData: DestinationTransferData; + route: AssetRoute; + sourceAddress: string; +} + +export async function getMoonChainData({ + destinationData, + route, + sourceAddress, +}: GetMoonChainDataParams): Promise { + if (!route.mrl) { + throw new Error( + `MRL config is not defined for source chain ${route.source.chain.name} and asset ${route.source.asset.originSymbol}`, + ); + } + + const moonChain = getMoonChain(route.source.chain); + const asset = moonChain.getChainAsset(route.source.asset); + const isDestinationMoonChain = route.destination.chain.isEqual(moonChain); + + if (isDestinationMoonChain) { + return { + balance: destinationData.balance, + chain: destinationData.chain, + fee: destinationData.fee, + }; + } + + const fee = await getDestinationFee({ + asset, + chain: moonChain, + fee: route.mrl.moonChainFee.amount, + }); + + let address = sourceAddress; + + if (Parachain.is(route.source.chain)) { + const { address20 } = getMultilocationDerivedAddresses({ + address: sourceAddress, + paraId: moonChain.parachainId, + isParents: true, + }); + + address = address20; + } + + const balance = await getBalance({ + address, + asset, + builder: route.mrl.moonChainFee.balance, + chain: moonChain, + }); + + return { + balance, + chain: moonChain, + fee, + }; +} diff --git a/packages/mrl/src/getTransferData/getSourceData.ts b/packages/mrl/src/getTransferData/getSourceData.ts index 6f0aa956..6f971303 100644 --- a/packages/mrl/src/getTransferData/getSourceData.ts +++ b/packages/mrl/src/getTransferData/getSourceData.ts @@ -1,7 +1,7 @@ import { ContractConfig, type ExtrinsicConfig, - type WormholeConfig, + WormholeConfig, } from '@moonbeam-network/xcm-builder'; import type { AssetRoute, FeeConfig } from '@moonbeam-network/xcm-config'; import { @@ -21,6 +21,7 @@ import type { EvmChain, EvmParachain, } from '@moonbeam-network/xcm-types'; +import { WormholeService } from '../services/wormhole'; import { buildTransfer } from './getTransferData.utils'; export interface GetSourceDataParams { @@ -38,13 +39,13 @@ export async function getSourceData({ }: GetSourceDataParams): Promise { if (!route.mrl) { throw new Error( - `MrlConfigBuilder is not defined for source chain ${route.source.chain.name} and asset ${route.asset.originSymbol}`, + `MrlConfigBuilder is not defined for source chain ${route.source.chain.name} and asset ${route.source.asset.originSymbol}`, ); } const source = route.source.chain; const destination = route.destination.chain; - const asset = source.getChainAsset(route.asset); + const asset = source.getChainAsset(route.source.asset); const feeAsset = route.source.fee ? source.getChainAsset(route.source.fee.asset) : asset; @@ -133,7 +134,16 @@ export async function getFee({ feeConfig, sourceAddress, }: GetFeeParams): Promise { - // TODO: What do we do if transfer is WormholeConfig? + if (WormholeConfig.is(transfer)) { + const wh = WormholeService.create(chain as EvmChain | EvmParachain); + const fee = await wh.getFee(transfer); + + console.log('fee', fee); + + // TODO: finish + // biome-ignore lint/suspicious/noExplicitAny: + return {} as any; + } if (ContractConfig.is(transfer)) { return getContractFee({ diff --git a/packages/mrl/src/getTransferData/getTransferData.ts b/packages/mrl/src/getTransferData/getTransferData.ts index 61217d57..1072c43a 100644 --- a/packages/mrl/src/getTransferData/getTransferData.ts +++ b/packages/mrl/src/getTransferData/getTransferData.ts @@ -10,7 +10,6 @@ import { type Signers, convertToChainDecimals, getDestinationData, - getMin, } from '@moonbeam-network/xcm-sdk'; import { AssetAmount, @@ -21,8 +20,13 @@ import { toBigInt } from '@moonbeam-network/xcm-utils'; import Big from 'big.js'; import type { TransferData } from '../mrl.interfaces'; import { WormholeService } from '../services/wormhole'; +import { getMoonChainData } from './getMoonChainData'; import { getSourceData } from './getSourceData'; -import { buildTransfer } from './getTransferData.utils'; +import { + buildTransfer, + getMoonChainFeeValueOnSource, + getMrlMin, +} from './getTransferData.utils'; export interface GetTransferDataParams { route: AssetRoute; @@ -37,7 +41,7 @@ export async function getTransferData({ }: GetTransferDataParams): Promise { if (!route.mrl) { throw new Error( - `MrlConfigBuilder is not defined for source chain ${route.source.chain.name} and asset ${route.asset.originSymbol}`, + `MrlConfigBuilder is not defined for source chain ${route.source.chain.name} and asset ${route.source.asset.originSymbol}`, ); } @@ -46,10 +50,11 @@ export async function getTransferData({ destinationAddress, }); - // Here we need to convert the fee on the destination chain to an asset on source chain. + // NOTE: Here we need to convert the fee on the destination chain + // to an asset on source chain. const destinationFee = convertToChainDecimals({ asset: destinationData.fee, - chain: route.source.chain, + target: route.getDestinationFeeAssetOnSource(), }); const sourceData = await getSourceData({ @@ -59,24 +64,42 @@ export async function getTransferData({ sourceAddress, }); + const moonChainData = await getMoonChainData({ + destinationData, + route, + sourceAddress, + }); + return { destination: destinationData, getEstimate(amount: number | string) { + const isSameAssetPayingDestinationFee = + sourceData.balance.isSame(destinationFee); const bigAmount = Big( toBigInt(amount, sourceData.balance.decimals).toString(), ); - const result = bigAmount.minus( - sourceData.balance.isSame(destinationFee) - ? destinationFee.toBig() - : Big(0), - ); + const fee = getMoonChainFeeValueOnSource({ + destinationData, + moonChainData, + sourceData, + }); + const result = bigAmount + .minus( + isSameAssetPayingDestinationFee ? destinationFee.toBig() : Big(0), + ) + .minus(fee); return sourceData.balance.copyWith({ amount: result.lt(0) ? 0n : BigInt(result.toFixed()), }); }, max: sourceData.max, - min: getMin(destinationData), + min: getMrlMin({ + destinationData, + moonChainData, + sourceData, + }), + moonChain: moonChainData, source: sourceData, async transfer( amount, @@ -86,7 +109,7 @@ export async function getTransferData({ const bigintAmount = toBigInt(amount, sourceData.balance.decimals); const asset = AssetAmount.fromChainAsset( - route.source.chain.getChainAsset(route.asset), + route.source.chain.getChainAsset(route.source.asset), { amount: bigintAmount }, ); diff --git a/packages/mrl/src/getTransferData/getTransferData.utils.ts b/packages/mrl/src/getTransferData/getTransferData.utils.ts index d152c456..a4568260 100644 --- a/packages/mrl/src/getTransferData/getTransferData.utils.ts +++ b/packages/mrl/src/getTransferData/getTransferData.utils.ts @@ -14,24 +14,78 @@ import { moonbaseAlpha, moonbeam, } from '@moonbeam-network/xcm-config'; -import { PolkadotService } from '@moonbeam-network/xcm-sdk'; +import { + type DestinationChainTransferData, + PolkadotService, + type SourceChainTransferData, + convertToChainDecimals, + getMin, +} from '@moonbeam-network/xcm-sdk'; import { type AssetAmount, EvmParachain } from '@moonbeam-network/xcm-types'; import { getMultilocationDerivedAddresses, getPolkadotApi, } from '@moonbeam-network/xcm-utils'; +import Big from 'big.js'; import { http, type Address, createPublicClient, encodeFunctionData, } from 'viem'; +import type { MoonChainTransferData } from '../mrl.interfaces'; const MOON_CHAIN_AUTOMATIC_GAS_ESTIMATION = { [moonbeam.key]: 657226n, [moonbaseAlpha.key]: 1271922n, }; +export interface DataParams { + destinationData: DestinationChainTransferData; + moonChainData: MoonChainTransferData; + sourceData: SourceChainTransferData; +} + +export function getMoonChainFeeValueOnSource({ + destinationData, + moonChainData, + sourceData, +}: DataParams): Big { + const isSourceParachain = EvmParachain.isAnyParachain(sourceData.chain); + const isDestinationMoonChain = destinationData.chain.isEqual( + moonChainData.chain, + ); + const isSameAssetPayingMoonChainFee = sourceData.balance.isSame( + moonChainData.fee, + ); + + return !isDestinationMoonChain && + isSourceParachain && + isSameAssetPayingMoonChainFee + ? convertToChainDecimals({ + asset: moonChainData.fee, + target: sourceData.chain.getChainAsset(moonChainData.fee), + }).toBig() + : Big(0); +} + +export function getMrlMin({ + destinationData, + moonChainData, + sourceData, +}: DataParams): AssetAmount { + const min = getMin(destinationData); + const fee = getMoonChainFeeValueOnSource({ + destinationData, + moonChainData, + sourceData, + }); + + return min.copyWith({ + amount: BigInt(min.toBig().add(fee).toFixed()), + }); +} + export interface BuildTransferParams { asset: AssetAmount; destinationAddress: string; @@ -49,7 +103,7 @@ export async function buildTransfer({ }: BuildTransferParams) { if (!route.mrl) { throw new Error( - `MrlConfigBuilder is not defined for source chain ${route.source.chain.name} and asset ${route.asset.originSymbol}`, + `MrlConfigBuilder is not defined for source chain ${route.source.chain.name} and asset ${route.source.asset.originSymbol}`, ); } diff --git a/packages/mrl/src/mrl.interfaces.ts b/packages/mrl/src/mrl.interfaces.ts index 0f282958..29e02134 100644 --- a/packages/mrl/src/mrl.interfaces.ts +++ b/packages/mrl/src/mrl.interfaces.ts @@ -13,6 +13,7 @@ export interface TransferData { getEstimate(amount: number | string): AssetAmount; max: AssetAmount; min: AssetAmount; + moonChain: MoonChainTransferData; source: SourceTransferData; transfer( amount: bigint | number | string, @@ -21,7 +22,6 @@ export interface TransferData { } export interface SourceTransferData extends ChainTransferData { - chain: AnyChain; destinationFeeBalance: AssetAmount; feeBalance: AssetAmount; max: AssetAmount; @@ -29,6 +29,8 @@ export interface SourceTransferData extends ChainTransferData { export interface DestinationTransferData extends ChainTransferData {} +export type MoonChainTransferData = Omit; + export interface ChainTransferData { chain: AnyChain; balance: AssetAmount; diff --git a/packages/sdk/src/getTransferData/getDestinationData.ts b/packages/sdk/src/getTransferData/getDestinationData.ts index a6896abd..c64c615b 100644 --- a/packages/sdk/src/getTransferData/getDestinationData.ts +++ b/packages/sdk/src/getTransferData/getDestinationData.ts @@ -17,7 +17,7 @@ export async function getDestinationData({ destinationAddress, }: GetDestinationDataParams): Promise { const destination = route.destination.chain; - const asset = destination.getChainAsset(route.asset); + const asset = destination.getChainAsset(route.destination.asset); const balance = await getBalance({ address: destinationAddress, asset, diff --git a/packages/sdk/src/getTransferData/getSourceData.ts b/packages/sdk/src/getTransferData/getSourceData.ts index 8e5865b6..1ad2e258 100644 --- a/packages/sdk/src/getTransferData/getSourceData.ts +++ b/packages/sdk/src/getTransferData/getSourceData.ts @@ -38,7 +38,7 @@ export async function getSourceData({ const destination = route.destination.chain as AnyParachain; const [sourcePolkadot, destinationPolkadot] = await PolkadotService.createMulti([source, destination]); - const asset = source.getChainAsset(route.asset); + const asset = source.getChainAsset(route.source.asset); const feeAsset = route.source.fee ? source.getChainAsset(route.source.fee.asset) : asset; @@ -182,7 +182,9 @@ export async function getAssetsBalances({ routes, }: GetAssetsBalancesParams): Promise { const uniqueRoutes = routes.reduce((acc: AssetRoute[], route: AssetRoute) => { - if (!acc.some((a: AssetRoute) => a.asset.isEqual(route.asset))) { + if ( + !acc.some((a: AssetRoute) => a.source.asset.isEqual(route.source.asset)) + ) { // biome-ignore lint/performance/noAccumulatingSpread: I think this is fine here return [route, ...acc]; } @@ -194,7 +196,7 @@ export async function getAssetsBalances({ uniqueRoutes.map(async (route: AssetRoute) => getBalance({ address, - asset: chain.getChainAsset(route.asset), + asset: chain.getChainAsset(route.source.asset), builder: route.source.balance, chain, }), diff --git a/packages/sdk/src/getTransferData/getTransferData.ts b/packages/sdk/src/getTransferData/getTransferData.ts index 41be9ce6..a8b8d26f 100644 --- a/packages/sdk/src/getTransferData/getTransferData.ts +++ b/packages/sdk/src/getTransferData/getTransferData.ts @@ -29,10 +29,11 @@ export async function getTransferData({ destinationAddress, }); - // Here we need to convert the fee on the destination chain to an asset on source chain. + // NOTE: Here we need to convert the fee on the destination chain + // to an asset on source chain. const destinationFee = convertToChainDecimals({ asset: destinationData.fee, - chain: route.source.chain, + target: route.getDestinationFeeAssetOnSource(), }); const sourceData = await getSourceData({ @@ -69,7 +70,7 @@ export async function getTransferData({ const destination = route.destination.chain as AnyParachain; const bigintAmount = toBigInt(amount, sourceData.balance.decimals); const asset = AssetAmount.fromChainAsset( - route.source.chain.getChainAsset(route.asset), + route.source.chain.getChainAsset(route.source.asset), { amount: bigintAmount }, ); const [sourcePolkadot, destinationPolkadot] = diff --git a/packages/sdk/src/getTransferData/getTransferData.utils.ts b/packages/sdk/src/getTransferData/getTransferData.utils.ts index 00a9bbba..e1de03f8 100644 --- a/packages/sdk/src/getTransferData/getTransferData.utils.ts +++ b/packages/sdk/src/getTransferData/getTransferData.utils.ts @@ -2,6 +2,7 @@ import { type AssetMinConfigBuilder, type BalanceConfigBuilder, ContractConfig, + EvmQueryConfig, type ExtrinsicConfig, type FeeConfigBuilder, SubstrateQueryConfig, @@ -51,14 +52,20 @@ export async function getBalance({ return amount.copyWith({ amount: converted }); } - if ( - ContractConfig.is(config) && - (EvmChain.is(chain) || EvmParachain.is(chain)) - ) { + if (EvmChain.is(chain) || EvmParachain.is(chain)) { const evm = EvmService.create(chain); - const balance = await evm.getBalance(address, config); - return amount.copyWith({ amount: balance }); + if (ContractConfig.is(config)) { + const balance = await evm.getBalance(address, config); + + return amount.copyWith({ amount: balance }); + } + + if (EvmQueryConfig.is(config)) { + const balance = await evm.query(config); + + return amount.copyWith({ amount: balance }); + } } throw new Error( @@ -185,17 +192,15 @@ export async function getDestinationFee({ export interface ConvertToChainDecimalsParams { asset: AssetAmount; - chain: AnyChain; + target: ChainAsset; } export function convertToChainDecimals({ asset, - chain, + target, }: ConvertToChainDecimalsParams): AssetAmount { - const targetAsset = chain.getChainAsset(asset); - - return AssetAmount.fromChainAsset(targetAsset, { - amount: asset.convertDecimals(targetAsset.decimals).amount, + return AssetAmount.fromChainAsset(target, { + amount: asset.convertDecimals(target.decimals).amount, }); } @@ -240,7 +245,7 @@ export async function getDestinationFeeBalance({ return getBalance({ address: sourceAddress, - asset: route.source.chain.getChainAsset(route.destination.fee.asset), + asset: route.getDestinationFeeAssetOnSource(), builder: route.source.destinationFee?.balance, chain: route.source.chain, }); diff --git a/packages/sdk/src/services/evm/EvmService.ts b/packages/sdk/src/services/evm/EvmService.ts index 9772231d..ed335d3b 100644 --- a/packages/sdk/src/services/evm/EvmService.ts +++ b/packages/sdk/src/services/evm/EvmService.ts @@ -1,4 +1,7 @@ -import type { ContractConfig } from '@moonbeam-network/xcm-builder'; +import type { + ContractConfig, + EvmQueryConfig, +} from '@moonbeam-network/xcm-builder'; import type { EvmChain, EvmParachain } from '@moonbeam-network/xcm-types'; import { http, @@ -27,6 +30,10 @@ export class EvmService { }); } + async query(query: EvmQueryConfig) { + return this.client[query.func](...query.args); + } + async getFee(address: string, contract: ContractConfig): Promise { const gas = await this.client.estimateContractGas({ abi: contract.abi, diff --git a/packages/sdk/tests/acceptance/__snapshots__/sdk.test.ts.snap b/packages/sdk/tests/acceptance/__snapshots__/sdk.test.ts.snap index ea676e8c..f7b9e1cd 100644 --- a/packages/sdk/tests/acceptance/__snapshots__/sdk.test.ts.snap +++ b/packages/sdk/tests/acceptance/__snapshots__/sdk.test.ts.snap @@ -2,7 +2,7 @@ exports[`sdk > getParachainBalances > on 'Centrifuge' for address: '4fAKSBMGVT9jt1jkuJvXgvMbmqV2BuspFWWEm…' > should get expected balances 1`] = ` [ - e { + _AssetAmount { "address": undefined, "amount": 570000000000000000n, "decimals": 18, @@ -19,7 +19,7 @@ exports[`sdk > getParachainBalances > on 'Centrifuge' for address: '4fAKSBMGVT9j exports[`sdk > getParachainBalances > on 'Centrifuge' for address: '5FtGz8bgoCQ6pNAYLWCfxKx9ekLnX1ewP9q2T…' > should get expected balances 1`] = ` [ - e { + _AssetAmount { "address": undefined, "amount": 570000000000000000n, "decimals": 18, @@ -36,7 +36,7 @@ exports[`sdk > getParachainBalances > on 'Centrifuge' for address: '5FtGz8bgoCQ6 exports[`sdk > getParachainBalances > on 'Hydration Alphanet' for address: '5FtGz8bgoCQ6pNAYLWCfxKx9ekLnX1ewP9q2T…' > should get expected balances 1`] = ` [ - e { + _AssetAmount { "address": undefined, "amount": 178046239082538836n, "decimals": 18, @@ -48,7 +48,7 @@ exports[`sdk > getParachainBalances > on 'Hydration Alphanet' for address: '5FtG "originSymbol": "FTM.wh", "symbol": undefined, }, - e { + _AssetAmount { "address": undefined, "amount": 0n, "decimals": 6, @@ -60,7 +60,7 @@ exports[`sdk > getParachainBalances > on 'Hydration Alphanet' for address: '5FtG "originSymbol": "USDC.Wh", "symbol": undefined, }, - e { + _AssetAmount { "address": undefined, "amount": 0n, "decimals": 18, @@ -72,7 +72,7 @@ exports[`sdk > getParachainBalances > on 'Hydration Alphanet' for address: '5FtG "originSymbol": "DEV", "symbol": undefined, }, - e { + _AssetAmount { "address": undefined, "amount": 3000000000000n, "decimals": 12, @@ -89,7 +89,7 @@ exports[`sdk > getParachainBalances > on 'Hydration Alphanet' for address: '5FtG exports[`sdk > getParachainBalances > on 'Hydration Alphanet' for address: '7MR8Qxy9sJmN6bfHMggAtFY5DwLxfrssLuTnP…' > should get expected balances 1`] = ` [ - e { + _AssetAmount { "address": undefined, "amount": 178046239082538836n, "decimals": 18, @@ -101,7 +101,7 @@ exports[`sdk > getParachainBalances > on 'Hydration Alphanet' for address: '7MR8 "originSymbol": "FTM.wh", "symbol": undefined, }, - e { + _AssetAmount { "address": undefined, "amount": 0n, "decimals": 6, @@ -113,7 +113,7 @@ exports[`sdk > getParachainBalances > on 'Hydration Alphanet' for address: '7MR8 "originSymbol": "USDC.Wh", "symbol": undefined, }, - e { + _AssetAmount { "address": undefined, "amount": 0n, "decimals": 18, @@ -125,7 +125,7 @@ exports[`sdk > getParachainBalances > on 'Hydration Alphanet' for address: '7MR8 "originSymbol": "DEV", "symbol": undefined, }, - e { + _AssetAmount { "address": undefined, "amount": 3000000000000n, "decimals": 12, @@ -142,7 +142,7 @@ exports[`sdk > getParachainBalances > on 'Hydration Alphanet' for address: '7MR8 exports[`sdk > getParachainBalances > on 'Hydration' for address: '5FtGz8bgoCQ6pNAYLWCfxKx9ekLnX1ewP9q2T…' > should get expected balances 1`] = ` [ - e { + _AssetAmount { "address": undefined, "amount": 37000000000000n, "decimals": 18, @@ -154,7 +154,7 @@ exports[`sdk > getParachainBalances > on 'Hydration' for address: '5FtGz8bgoCQ6p "originSymbol": "WETH", "symbol": undefined, }, - e { + _AssetAmount { "address": undefined, "amount": 120n, "decimals": 8, @@ -166,7 +166,7 @@ exports[`sdk > getParachainBalances > on 'Hydration' for address: '5FtGz8bgoCQ6p "originSymbol": "WBTC", "symbol": undefined, }, - e { + _AssetAmount { "address": undefined, "amount": 0n, "decimals": 6, @@ -178,7 +178,7 @@ exports[`sdk > getParachainBalances > on 'Hydration' for address: '5FtGz8bgoCQ6p "originSymbol": "USDT.Wh", "symbol": undefined, }, - e { + _AssetAmount { "address": undefined, "amount": 0n, "decimals": 6, @@ -190,7 +190,7 @@ exports[`sdk > getParachainBalances > on 'Hydration' for address: '5FtGz8bgoCQ6p "originSymbol": "USDC.Wh", "symbol": undefined, }, - e { + _AssetAmount { "address": undefined, "amount": 0n, "decimals": 18, @@ -202,7 +202,7 @@ exports[`sdk > getParachainBalances > on 'Hydration' for address: '5FtGz8bgoCQ6p "originSymbol": "DAI", "symbol": undefined, }, - e { + _AssetAmount { "address": undefined, "amount": 0n, "decimals": 18, @@ -214,7 +214,7 @@ exports[`sdk > getParachainBalances > on 'Hydration' for address: '5FtGz8bgoCQ6p "originSymbol": "GLMR", "symbol": undefined, }, - e { + _AssetAmount { "address": undefined, "amount": 1000000000000n, "decimals": 12, @@ -231,7 +231,7 @@ exports[`sdk > getParachainBalances > on 'Hydration' for address: '5FtGz8bgoCQ6p exports[`sdk > getParachainBalances > on 'Hydration' for address: '7MR8Qxy9sJmN6bfHMggAtFY5DwLxfrssLuTnP…' > should get expected balances 1`] = ` [ - e { + _AssetAmount { "address": undefined, "amount": 37000000000000n, "decimals": 18, @@ -243,7 +243,7 @@ exports[`sdk > getParachainBalances > on 'Hydration' for address: '7MR8Qxy9sJmN6 "originSymbol": "WETH", "symbol": undefined, }, - e { + _AssetAmount { "address": undefined, "amount": 120n, "decimals": 8, @@ -255,7 +255,7 @@ exports[`sdk > getParachainBalances > on 'Hydration' for address: '7MR8Qxy9sJmN6 "originSymbol": "WBTC", "symbol": undefined, }, - e { + _AssetAmount { "address": undefined, "amount": 0n, "decimals": 6, @@ -267,7 +267,7 @@ exports[`sdk > getParachainBalances > on 'Hydration' for address: '7MR8Qxy9sJmN6 "originSymbol": "USDT.Wh", "symbol": undefined, }, - e { + _AssetAmount { "address": undefined, "amount": 0n, "decimals": 6, @@ -279,7 +279,7 @@ exports[`sdk > getParachainBalances > on 'Hydration' for address: '7MR8Qxy9sJmN6 "originSymbol": "USDC.Wh", "symbol": undefined, }, - e { + _AssetAmount { "address": undefined, "amount": 0n, "decimals": 18, @@ -291,7 +291,7 @@ exports[`sdk > getParachainBalances > on 'Hydration' for address: '7MR8Qxy9sJmN6 "originSymbol": "DAI", "symbol": undefined, }, - e { + _AssetAmount { "address": undefined, "amount": 0n, "decimals": 18, @@ -303,7 +303,7 @@ exports[`sdk > getParachainBalances > on 'Hydration' for address: '7MR8Qxy9sJmN6 "originSymbol": "GLMR", "symbol": undefined, }, - e { + _AssetAmount { "address": undefined, "amount": 1000000000000n, "decimals": 12, @@ -320,7 +320,7 @@ exports[`sdk > getParachainBalances > on 'Hydration' for address: '7MR8Qxy9sJmN6 exports[`sdk > getParachainBalances > on 'Moonbase Alpha' for address: '0x4E82143Af671Cc8201Bc7efCBbCED3A69e8…' > should get expected balances 1`] = ` [ - e { + _AssetAmount { "address": "0xFFfFFFFF38794F8c53fC7325ea07463dc6965e20", "amount": 0n, "decimals": 18, @@ -332,7 +332,7 @@ exports[`sdk > getParachainBalances > on 'Moonbase Alpha' for address: '0x4E8214 "originSymbol": "AGNG", "symbol": undefined, }, - e { + _AssetAmount { "address": "0xFFFfFfff345Dc44DDAE98Df024Eb494321E73FcC", "amount": 0n, "decimals": 12, @@ -344,7 +344,7 @@ exports[`sdk > getParachainBalances > on 'Moonbase Alpha' for address: '0x4E8214 "originSymbol": "HDX", "symbol": undefined, }, - e { + _AssetAmount { "address": "0x566c1cebc6A4AFa1C122E039C4BEBe77043148Ee", "amount": 1234567890000000000n, "decimals": 18, @@ -354,7 +354,7 @@ exports[`sdk > getParachainBalances > on 'Moonbase Alpha' for address: '0x4E8214 "originSymbol": "FTM.wh", "symbol": undefined, }, - e { + _AssetAmount { "address": "0xE5dE10C4b744bac6b783fAF8d9B9fDFF14Acc3c9", "amount": 10000n, "decimals": 6, @@ -364,7 +364,7 @@ exports[`sdk > getParachainBalances > on 'Moonbase Alpha' for address: '0x4E8214 "originSymbol": "USDC.Wh", "symbol": undefined, }, - e { + _AssetAmount { "address": "0xFfFFfFff1FcaCBd218EDc0EbA20Fc2308C778080", "amount": 0n, "decimals": 12, @@ -376,7 +376,7 @@ exports[`sdk > getParachainBalances > on 'Moonbase Alpha' for address: '0x4E8214 "originSymbol": "Unit", "symbol": undefined, }, - e { + _AssetAmount { "address": "0xfFffffFf6448d0746f2a66342B67ef9CAf89478E", "amount": 0n, "decimals": 10, @@ -388,7 +388,7 @@ exports[`sdk > getParachainBalances > on 'Moonbase Alpha' for address: '0x4E8214 "originSymbol": "TUR", "symbol": undefined, }, - e { + _AssetAmount { "address": "0xfFffFfFf75976211C786fe4d73d2477e222786Ac", "amount": 0n, "decimals": 18, @@ -400,7 +400,7 @@ exports[`sdk > getParachainBalances > on 'Moonbase Alpha' for address: '0x4E8214 "originSymbol": "TT1", "symbol": undefined, }, - e { + _AssetAmount { "address": "0xFFFfFFFF10DD5Fd142163a40Ce0dae8c56e2801f", "amount": 0n, "decimals": 6, @@ -412,7 +412,7 @@ exports[`sdk > getParachainBalances > on 'Moonbase Alpha' for address: '0x4E8214 "originSymbol": "PICA", "symbol": undefined, }, - e { + _AssetAmount { "address": "0xffffffffb7cdb201c395c238350568f17cfbd3b5", "amount": 0n, "decimals": 6, @@ -424,7 +424,7 @@ exports[`sdk > getParachainBalances > on 'Moonbase Alpha' for address: '0x4E8214 "originSymbol": "ATOM", "symbol": undefined, }, - e { + _AssetAmount { "address": "0xFfffffFfB3229c8E7657eABEA704d5e75246e544", "amount": 0n, "decimals": 12, @@ -436,7 +436,7 @@ exports[`sdk > getParachainBalances > on 'Moonbase Alpha' for address: '0x4E8214 "originSymbol": "OTP", "symbol": undefined, }, - e { + _AssetAmount { "address": "0xfFfFfffF7fee8415e1c2AC3A15C48D3546B95e16", "amount": 0n, "decimals": 12, @@ -448,7 +448,7 @@ exports[`sdk > getParachainBalances > on 'Moonbase Alpha' for address: '0x4E8214 "originSymbol": "AMPE", "symbol": undefined, }, - e { + _AssetAmount { "address": "0x9133c5a22024118804089f1fB752b7B2ce2a6351", "amount": 10000000000000000n, "decimals": 18, @@ -458,7 +458,7 @@ exports[`sdk > getParachainBalances > on 'Moonbase Alpha' for address: '0x4E8214 "originSymbol": "ALAN", "symbol": undefined, }, - e { + _AssetAmount { "address": "0x0000000000000000000000000000000000000802", "amount": 6543210000000000000n, "decimals": 18, @@ -475,7 +475,7 @@ exports[`sdk > getParachainBalances > on 'Moonbase Alpha' for address: '0x4E8214 exports[`sdk > getParachainBalances > on 'Moonbase Beta' for address: '0x4E82143Af671Cc8201Bc7efCBbCED3A69e8…' > should get expected balances 1`] = ` [ - e { + _AssetAmount { "address": undefined, "amount": 100000000000000000n, "decimals": 18, @@ -490,7 +490,7 @@ exports[`sdk > getParachainBalances > on 'Moonbase Beta' for address: '0x4E82143 "originSymbol": "FTM.wh", "symbol": undefined, }, - e { + _AssetAmount { "address": undefined, "amount": 0n, "decimals": 6, @@ -505,7 +505,7 @@ exports[`sdk > getParachainBalances > on 'Moonbase Beta' for address: '0x4E82143 "originSymbol": "USDC.Wh", "symbol": undefined, }, - e { + _AssetAmount { "address": undefined, "amount": 1100000000000000000n, "decimals": 18, @@ -520,7 +520,7 @@ exports[`sdk > getParachainBalances > on 'Moonbase Beta' for address: '0x4E82143 "originSymbol": "ALAN", "symbol": undefined, }, - e { + _AssetAmount { "address": undefined, "amount": 1100000000000000000n, "decimals": 18, @@ -540,7 +540,7 @@ exports[`sdk > getParachainBalances > on 'Moonbase Beta' for address: '0x4E82143 exports[`sdk > getParachainBalances > on 'Moonbeam' for address: '0x4E82143Af671Cc8201Bc7efCBbCED3A69e8…' > should get expected balances 1`] = ` [ - e { + _AssetAmount { "address": "0xCa01a1D0993565291051daFF390892518ACfAD3A", "amount": 0n, "decimals": 6, @@ -550,7 +550,7 @@ exports[`sdk > getParachainBalances > on 'Moonbeam' for address: '0x4E82143Af671 "originSymbol": "axlUSDC", "symbol": undefined, }, - e { + _AssetAmount { "address": "0xffffffff2e1d1ac9ea1686255befe995b31abc96", "amount": 0n, "decimals": 18, @@ -562,7 +562,7 @@ exports[`sdk > getParachainBalances > on 'Moonbeam' for address: '0x4E82143Af671 "originSymbol": "WIFD", "symbol": undefined, }, - e { + _AssetAmount { "address": "0xFffFFFFFEC4908b74688a01374f789B48E9a3eab", "amount": 0n, "decimals": 18, @@ -574,7 +574,7 @@ exports[`sdk > getParachainBalances > on 'Moonbeam' for address: '0x4E82143Af671 "originSymbol": "PEAQ", "symbol": undefined, }, - e { + _AssetAmount { "address": "0xfFfffffF6aF229AE7f0F4e0188157e189a487D59", "amount": 0n, "decimals": 12, @@ -586,7 +586,7 @@ exports[`sdk > getParachainBalances > on 'Moonbeam' for address: '0x4E82143Af671 "originSymbol": "BNCS", "symbol": undefined, }, - e { + _AssetAmount { "address": "0xfFfFffFf43B4560Bc0C451a3386E082bff50aC90", "amount": 0n, "decimals": 10, @@ -598,7 +598,7 @@ exports[`sdk > getParachainBalances > on 'Moonbeam' for address: '0x4E82143Af671 "originSymbol": "SUB", "symbol": undefined, }, - e { + _AssetAmount { "address": "0xFFFFfffF71815ab6142E0E20c7259126C6B40612", "amount": 0n, "decimals": 10, @@ -610,7 +610,7 @@ exports[`sdk > getParachainBalances > on 'Moonbeam' for address: '0x4E82143Af671 "originSymbol": "ZTG", "symbol": undefined, }, - e { + _AssetAmount { "address": "0xfFFfFFFF6C57e17D210DF507c82807149fFd70B2", "amount": 0n, "decimals": 18, @@ -620,7 +620,7 @@ exports[`sdk > getParachainBalances > on 'Moonbeam' for address: '0x4E82143Af671 "originSymbol": "FIL", "symbol": undefined, }, - e { + _AssetAmount { "address": "0xab3f0245B83feB11d15AAffeFD7AD465a59817eD", "amount": 0n, "decimals": 18, @@ -630,7 +630,7 @@ exports[`sdk > getParachainBalances > on 'Moonbeam' for address: '0x4E82143Af671 "originSymbol": "WETH", "symbol": undefined, }, - e { + _AssetAmount { "address": "0xE57eBd2d67B462E9926e04a8e33f01cD0D64346D", "amount": 0n, "decimals": 8, @@ -640,7 +640,7 @@ exports[`sdk > getParachainBalances > on 'Moonbeam' for address: '0x4E82143Af671 "originSymbol": "WBTC", "symbol": undefined, }, - e { + _AssetAmount { "address": "0xFFfFFfFfdA2a05FB50e7ae99275F4341AEd43379", "amount": 0n, "decimals": 18, @@ -652,7 +652,7 @@ exports[`sdk > getParachainBalances > on 'Moonbeam' for address: '0x4E82143Af671 "originSymbol": "vMANTA", "symbol": undefined, }, - e { + _AssetAmount { "address": "0xFfFfFFff99dABE1a8De0EA22bAa6FD48fdE96F6c", "amount": 0n, "decimals": 18, @@ -664,7 +664,7 @@ exports[`sdk > getParachainBalances > on 'Moonbeam' for address: '0x4E82143Af671 "originSymbol": "vGLMR", "symbol": undefined, }, - e { + _AssetAmount { "address": "0xFffffFffCd0aD0EA6576B7b285295c85E94cf4c1", "amount": 0n, "decimals": 18, @@ -676,7 +676,7 @@ exports[`sdk > getParachainBalances > on 'Moonbeam' for address: '0x4E82143Af671 "originSymbol": "vFIL", "symbol": undefined, }, - e { + _AssetAmount { "address": "0xFFFfffFf15e1b7E3dF971DD813Bc394deB899aBf", "amount": 0n, "decimals": 10, @@ -688,7 +688,7 @@ exports[`sdk > getParachainBalances > on 'Moonbeam' for address: '0x4E82143Af671 "originSymbol": "vDOT", "symbol": undefined, }, - e { + _AssetAmount { "address": "0xFffFffff55C732C47639231a4C4373245763d26E", "amount": 0n, "decimals": 18, @@ -700,7 +700,7 @@ exports[`sdk > getParachainBalances > on 'Moonbeam' for address: '0x4E82143Af671 "originSymbol": "vASTR", "symbol": undefined, }, - e { + _AssetAmount { "address": "0xc30E9cA94CF52f3Bf5692aaCF81353a27052c46f", "amount": 0n, "decimals": 6, @@ -710,7 +710,7 @@ exports[`sdk > getParachainBalances > on 'Moonbeam' for address: '0x4E82143Af671 "originSymbol": "USDT.Wh", "symbol": undefined, }, - e { + _AssetAmount { "address": "0x931715FEE2d06333043d11F658C8CE934aC61D0c", "amount": 0n, "decimals": 6, @@ -720,7 +720,7 @@ exports[`sdk > getParachainBalances > on 'Moonbeam' for address: '0x4E82143Af671 "originSymbol": "USDC.Wh", "symbol": undefined, }, - e { + _AssetAmount { "address": "0x06e605775296e851FF43b4dAa541Bb0984E9D6fD", "amount": 0n, "decimals": 18, @@ -730,7 +730,7 @@ exports[`sdk > getParachainBalances > on 'Moonbeam' for address: '0x4E82143Af671 "originSymbol": "DAI", "symbol": undefined, }, - e { + _AssetAmount { "address": "0xFFFfFfff345Dc44DDAE98Df024Eb494321E73FcC", "amount": 0n, "decimals": 12, @@ -742,7 +742,7 @@ exports[`sdk > getParachainBalances > on 'Moonbeam' for address: '0x4E82143Af671 "originSymbol": "HDX", "symbol": undefined, }, - e { + _AssetAmount { "address": "0xffffffff8a9736b44ebf188972725bed67bf694e", "amount": 0n, "decimals": 18, @@ -754,7 +754,7 @@ exports[`sdk > getParachainBalances > on 'Moonbeam' for address: '0x4E82143Af671 "originSymbol": "NCTR", "symbol": undefined, }, - e { + _AssetAmount { "address": "0xffffffff54c556bd1d0f64ec6c78f1b477525e56", "amount": 0n, "decimals": 10, @@ -766,7 +766,7 @@ exports[`sdk > getParachainBalances > on 'Moonbeam' for address: '0x4E82143Af671 "originSymbol": "STINK", "symbol": undefined, }, - e { + _AssetAmount { "address": "0xfFffFFFf5da2d7214D268375cf8fb1715705FdC6", "amount": 0n, "decimals": 10, @@ -778,7 +778,7 @@ exports[`sdk > getParachainBalances > on 'Moonbeam' for address: '0x4E82143Af671 "originSymbol": "DED", "symbol": undefined, }, - e { + _AssetAmount { "address": "0xfFfFFfFf30478fAFBE935e466da114E14fB3563d", "amount": 0n, "decimals": 10, @@ -790,7 +790,7 @@ exports[`sdk > getParachainBalances > on 'Moonbeam' for address: '0x4E82143Af671 "originSymbol": "PINK", "symbol": undefined, }, - e { + _AssetAmount { "address": "0xFFfffffF7D2B0B761Af01Ca8e25242976ac0aD7D", "amount": 0n, "decimals": 6, @@ -802,7 +802,7 @@ exports[`sdk > getParachainBalances > on 'Moonbeam' for address: '0x4E82143Af671 "originSymbol": "USDC", "symbol": undefined, }, - e { + _AssetAmount { "address": "0xFFFFFFfFea09FB06d082fd1275CD48b191cbCD1d", "amount": 0n, "decimals": 6, @@ -814,7 +814,7 @@ exports[`sdk > getParachainBalances > on 'Moonbeam' for address: '0x4E82143Af671 "originSymbol": "USDT", "symbol": undefined, }, - e { + _AssetAmount { "address": "0xFfffFfff5e90e365eDcA87fB4c8306Df1E91464f", "amount": 0n, "decimals": 18, @@ -826,7 +826,7 @@ exports[`sdk > getParachainBalances > on 'Moonbeam' for address: '0x4E82143Af671 "originSymbol": "RING", "symbol": undefined, }, - e { + _AssetAmount { "address": "0xFFFfFfFf63d24eCc8eB8a7b5D0803e900F7b6cED", "amount": 0n, "decimals": 12, @@ -838,7 +838,7 @@ exports[`sdk > getParachainBalances > on 'Moonbeam' for address: '0x4E82143Af671 "originSymbol": "PHA", "symbol": undefined, }, - e { + _AssetAmount { "address": "0xffFFfFFf2257622F345E1ACDe0D4f46D7d1D77D0", "amount": 0n, "decimals": 12, @@ -850,7 +850,7 @@ exports[`sdk > getParachainBalances > on 'Moonbeam' for address: '0x4E82143Af671 "originSymbol": "PEN", "symbol": undefined, }, - e { + _AssetAmount { "address": "0xFfFffFFF18898CB5Fe1E88E668152B4f4052A947", "amount": 0n, "decimals": 12, @@ -862,7 +862,7 @@ exports[`sdk > getParachainBalances > on 'Moonbeam' for address: '0x4E82143Af671 "originSymbol": "PARA", "symbol": undefined, }, - e { + _AssetAmount { "address": "0xFfffffFfB3229c8E7657eABEA704d5e75246e544", "amount": 0n, "decimals": 12, @@ -874,7 +874,7 @@ exports[`sdk > getParachainBalances > on 'Moonbeam' for address: '0x4E82143Af671 "originSymbol": "NEURO", "symbol": undefined, }, - e { + _AssetAmount { "address": "0xfffffffFe896ba7Cb118b9Fa571c6dC0a99dEfF1", "amount": 0n, "decimals": 11, @@ -886,7 +886,7 @@ exports[`sdk > getParachainBalances > on 'Moonbeam' for address: '0x4E82143Af671 "originSymbol": "NODL", "symbol": undefined, }, - e { + _AssetAmount { "address": "0xfFFffFFf7D3875460d4509eb8d0362c611B4E841", "amount": 0n, "decimals": 18, @@ -898,7 +898,7 @@ exports[`sdk > getParachainBalances > on 'Moonbeam' for address: '0x4E82143Af671 "originSymbol": "MANTA", "symbol": undefined, }, - e { + _AssetAmount { "address": "0xFFfFfFffA9cfFfa9834235Fe53f4733F1b8B28d4", "amount": 0n, "decimals": 10, @@ -910,7 +910,7 @@ exports[`sdk > getParachainBalances > on 'Moonbeam' for address: '0x4E82143Af671 "originSymbol": "LDOT", "symbol": undefined, }, - e { + _AssetAmount { "address": "0xFffFFFFF4C1cbCd97597339702436d4F18a375Ab", "amount": 0n, "decimals": 10, @@ -922,7 +922,7 @@ exports[`sdk > getParachainBalances > on 'Moonbeam' for address: '0x4E82143Af671 "originSymbol": "INTR", "symbol": undefined, }, - e { + _AssetAmount { "address": "0xFFFFFfFf5AC1f9A51A93F5C527385edF7Fe98A52", "amount": 0n, "decimals": 8, @@ -934,7 +934,7 @@ exports[`sdk > getParachainBalances > on 'Moonbeam' for address: '0x4E82143Af671 "originSymbol": "IBTC", "symbol": undefined, }, - e { + _AssetAmount { "address": "0xFfFFfFff1FcaCBd218EDc0EbA20Fc2308C778080", "amount": 330000000n, "decimals": 10, @@ -946,7 +946,7 @@ exports[`sdk > getParachainBalances > on 'Moonbeam' for address: '0x4E82143Af671 "originSymbol": "DOT", "symbol": undefined, }, - e { + _AssetAmount { "address": "0xFFfFfFff44bD9D2FFEE20B25D1Cf9E78Edb6Eae3", "amount": 0n, "decimals": 18, @@ -958,7 +958,7 @@ exports[`sdk > getParachainBalances > on 'Moonbeam' for address: '0x4E82143Af671 "originSymbol": "CFG", "symbol": undefined, }, - e { + _AssetAmount { "address": "0xFFffffFf7cC06abdF7201b350A1265c62C8601d2", "amount": 0n, "decimals": 12, @@ -970,7 +970,7 @@ exports[`sdk > getParachainBalances > on 'Moonbeam' for address: '0x4E82143Af671 "originSymbol": "BNC", "symbol": undefined, }, - e { + _AssetAmount { "address": "0xfFfFFFFF52C56A9257bB97f4B2b6F7B2D624ecda", "amount": 0n, "decimals": 12, @@ -982,7 +982,7 @@ exports[`sdk > getParachainBalances > on 'Moonbeam' for address: '0x4E82143Af671 "originSymbol": "aSEED", "symbol": undefined, }, - e { + _AssetAmount { "address": "0xFfFFFfffA893AD19e540E172C10d78D4d479B5Cf", "amount": 0n, "decimals": 18, @@ -994,7 +994,7 @@ exports[`sdk > getParachainBalances > on 'Moonbeam' for address: '0x4E82143Af671 "originSymbol": "ASTR", "symbol": undefined, }, - e { + _AssetAmount { "address": "0xffffFFffa922Fef94566104a6e5A35a4fCDDAA9f", "amount": 0n, "decimals": 12, @@ -1006,7 +1006,7 @@ exports[`sdk > getParachainBalances > on 'Moonbeam' for address: '0x4E82143Af671 "originSymbol": "ACA", "symbol": undefined, }, - e { + _AssetAmount { "address": "0x0000000000000000000000000000000000000802", "amount": 1330000000000000000n, "decimals": 18, @@ -1023,7 +1023,7 @@ exports[`sdk > getParachainBalances > on 'Moonbeam' for address: '0x4E82143Af671 exports[`sdk > getParachainBalances > on 'peaq Alphanet' for address: '5FtGz8bgoCQ6pNAYLWCfxKx9ekLnX1ewP9q2T…' > should get expected balances 1`] = ` [ - e { + _AssetAmount { "address": undefined, "amount": 0n, "decimals": 18, @@ -1035,7 +1035,7 @@ exports[`sdk > getParachainBalances > on 'peaq Alphanet' for address: '5FtGz8bgo "originSymbol": "FTM.wh", "symbol": undefined, }, - e { + _AssetAmount { "address": undefined, "amount": 0n, "decimals": 18, @@ -1047,7 +1047,7 @@ exports[`sdk > getParachainBalances > on 'peaq Alphanet' for address: '5FtGz8bgo "originSymbol": "DEV", "symbol": undefined, }, - e { + _AssetAmount { "address": undefined, "amount": 1223300000000000000n, "decimals": 18, @@ -1064,7 +1064,7 @@ exports[`sdk > getParachainBalances > on 'peaq Alphanet' for address: '5FtGz8bgo exports[`sdk > getParachainBalances > on 'peaq EVM Alphanet' for address: '0x4E82143Af671Cc8201Bc7efCBbCED3A69e8…' > should get expected balances 1`] = ` [ - e { + _AssetAmount { "address": "0xFfFfFffF000000000000000000000000000003e8", "amount": 330000000000000000n, "decimals": 18, @@ -1077,7 +1077,7 @@ exports[`sdk > getParachainBalances > on 'peaq EVM Alphanet' for address: '0x4E8 "originSymbol": "DEV", "symbol": undefined, }, - e { + _AssetAmount { "address": "0xFffFffFF000000000000000000000000000003E9", "amount": 123000000000000000n, "decimals": 18, @@ -1095,7 +1095,7 @@ exports[`sdk > getParachainBalances > on 'peaq EVM Alphanet' for address: '0x4E8 exports[`sdk > getParachainBalances > on 'peaq EVM' for address: '0x4E82143Af671Cc8201Bc7efCBbCED3A69e8…' > should get expected balances 1`] = ` [ - e { + _AssetAmount { "address": "0xfFffffFF000000000000000000000000000003Ed", "amount": 0n, "decimals": 6, @@ -1108,7 +1108,7 @@ exports[`sdk > getParachainBalances > on 'peaq EVM' for address: '0x4E82143Af671 "originSymbol": "USDT.Wh", "symbol": undefined, }, - e { + _AssetAmount { "address": "0xFFFfFfFf000000000000000000000000000003ea", "amount": 0n, "decimals": 18, @@ -1121,7 +1121,7 @@ exports[`sdk > getParachainBalances > on 'peaq EVM' for address: '0x4E82143Af671 "originSymbol": "WETH", "symbol": undefined, }, - e { + _AssetAmount { "address": "0xfffFFFFF000000000000000000000000000003eb", "amount": 0n, "decimals": 8, @@ -1134,7 +1134,7 @@ exports[`sdk > getParachainBalances > on 'peaq EVM' for address: '0x4E82143Af671 "originSymbol": "WBTC", "symbol": undefined, }, - e { + _AssetAmount { "address": "0xfFffFFFF000000000000000000000000000003Ec", "amount": 0n, "decimals": 18, @@ -1147,7 +1147,7 @@ exports[`sdk > getParachainBalances > on 'peaq EVM' for address: '0x4E82143Af671 "originSymbol": "DAI", "symbol": undefined, }, - e { + _AssetAmount { "address": "0xFffFffFF000000000000000000000000000003E9", "amount": 0n, "decimals": 6, @@ -1160,7 +1160,7 @@ exports[`sdk > getParachainBalances > on 'peaq EVM' for address: '0x4E82143Af671 "originSymbol": "USDC.Wh", "symbol": undefined, }, - e { + _AssetAmount { "address": "0xFfFfFffF000000000000000000000000000003e8", "amount": 0n, "decimals": 18, @@ -1178,7 +1178,7 @@ exports[`sdk > getParachainBalances > on 'peaq EVM' for address: '0x4E82143Af671 exports[`sdk > getParachainBalances > on 'peaq' for address: '5FtGz8bgoCQ6pNAYLWCfxKx9ekLnX1ewP9q2T…' > should get expected balances 1`] = ` [ - e { + _AssetAmount { "address": undefined, "amount": 0n, "decimals": 6, @@ -1190,7 +1190,7 @@ exports[`sdk > getParachainBalances > on 'peaq' for address: '5FtGz8bgoCQ6pNAYLW "originSymbol": "USDT.Wh", "symbol": undefined, }, - e { + _AssetAmount { "address": undefined, "amount": 0n, "decimals": 18, @@ -1202,7 +1202,7 @@ exports[`sdk > getParachainBalances > on 'peaq' for address: '5FtGz8bgoCQ6pNAYLW "originSymbol": "WETH", "symbol": undefined, }, - e { + _AssetAmount { "address": undefined, "amount": 0n, "decimals": 8, @@ -1214,7 +1214,7 @@ exports[`sdk > getParachainBalances > on 'peaq' for address: '5FtGz8bgoCQ6pNAYLW "originSymbol": "WBTC", "symbol": undefined, }, - e { + _AssetAmount { "address": undefined, "amount": 0n, "decimals": 18, @@ -1226,7 +1226,7 @@ exports[`sdk > getParachainBalances > on 'peaq' for address: '5FtGz8bgoCQ6pNAYLW "originSymbol": "DAI", "symbol": undefined, }, - e { + _AssetAmount { "address": undefined, "amount": 0n, "decimals": 6, @@ -1238,7 +1238,7 @@ exports[`sdk > getParachainBalances > on 'peaq' for address: '5FtGz8bgoCQ6pNAYLW "originSymbol": "USDC.Wh", "symbol": undefined, }, - e { + _AssetAmount { "address": undefined, "amount": 0n, "decimals": 18, @@ -1250,7 +1250,7 @@ exports[`sdk > getParachainBalances > on 'peaq' for address: '5FtGz8bgoCQ6pNAYLW "originSymbol": "GLMR", "symbol": undefined, }, - e { + _AssetAmount { "address": undefined, "amount": 1313000000000000000n, "decimals": 18, diff --git a/packages/types/src/asset/AssetAmount.ts b/packages/types/src/asset/AssetAmount.ts index 6a502f52..0974b30d 100644 --- a/packages/types/src/asset/AssetAmount.ts +++ b/packages/types/src/asset/AssetAmount.ts @@ -37,7 +37,7 @@ export class AssetAmount extends ChainAsset { }); } - isSame(asset: AssetAmount): boolean { + isSame(asset: ChainAsset | AssetAmount): boolean { return super.isEqual(asset) && this.decimals === asset.decimals; } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index a36d217b..facda147 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -27,20 +27,20 @@ importers: specifier: ^13.0.2 version: 13.0.2(@polkadot/util@13.0.2) '@wormhole-foundation/sdk-connect': - specifier: ^0.8.2 - version: 0.8.2 + specifier: ^0.10.7 + version: 0.10.7 '@wormhole-foundation/sdk-evm': - specifier: ^0.8.2 - version: 0.8.2(bufferutil@4.0.8)(utf-8-validate@5.0.10) + specifier: ^0.10.7 + version: 0.10.7(bufferutil@4.0.8)(utf-8-validate@5.0.10) devDependencies: '@biomejs/biome': - specifier: ^1.8.3 - version: 1.8.3 + specifier: ^1.9.1 + version: 1.9.1 '@changesets/changelog-github': specifier: ^0.5.0 version: 0.5.0 '@changesets/cli': - specifier: ^2.27.7 + specifier: ^2.27.8 version: 2.27.8 '@slack/webhook': specifier: ^7.0.3 @@ -49,10 +49,10 @@ importers: specifier: ^6.2.2 version: 6.2.2 bun: - specifier: ^1.1.25 + specifier: ^1.1.27 version: 1.1.27 cspell: - specifier: ^8.13.1 + specifier: ^8.14.2 version: 8.14.2 dotenv: specifier: ^16.4.5 @@ -61,29 +61,29 @@ importers: specifier: ^11.0.0 version: 11.0.0 lefthook: - specifier: ^1.7.11 + specifier: ^1.7.15 version: 1.7.15 prettier: specifier: ^3.3.3 version: 3.3.3 syncpack: specifier: ^13.0.0 - version: 13.0.0(typescript@5.5.4) + version: 13.0.0(typescript@5.6.2) tsup: specifier: ^8.2.4 - version: 8.2.4(postcss@8.4.45)(typescript@5.5.4)(yaml@2.5.1) + version: 8.2.4(postcss@8.4.45)(typescript@5.6.2)(yaml@2.5.1) turbo: - specifier: ^2.0.14 - version: 2.1.1 + specifier: ^2.1.2 + version: 2.1.2 typescript: - specifier: ^5.5.4 - version: 5.5.4 + specifier: ^5.6.2 + version: 5.6.2 viem: - specifier: ^2.20.0 - version: 2.21.3(bufferutil@4.0.8)(typescript@5.5.4)(utf-8-validate@5.0.10) + specifier: ^2.21.7 + version: 2.21.7(bufferutil@4.0.8)(typescript@5.6.2)(utf-8-validate@5.0.10) vitest: - specifier: ^2.0.5 - version: 2.0.5(@types/node@22.5.4) + specifier: ^2.1.1 + version: 2.1.1(@types/node@22.5.4) examples/mrl-simple: dependencies: @@ -151,7 +151,7 @@ importers: version: 6.2.1 viem: specifier: ^2.20.0 - version: 2.21.3(bufferutil@4.0.8)(typescript@5.5.4)(utf-8-validate@5.0.10) + version: 2.21.3(bufferutil@4.0.8)(typescript@5.6.2)(utf-8-validate@5.0.10) packages/config: dependencies: @@ -214,7 +214,7 @@ importers: version: 6.2.1 viem: specifier: ^2.20.0 - version: 2.21.3(bufferutil@4.0.8)(typescript@5.5.4)(utf-8-validate@5.0.10) + version: 2.21.3(bufferutil@4.0.8)(typescript@5.6.2)(utf-8-validate@5.0.10) packages/sdk: dependencies: @@ -247,7 +247,7 @@ importers: version: 6.2.1 viem: specifier: ^2.20.0 - version: 2.21.3(bufferutil@4.0.8)(typescript@5.5.4)(utf-8-validate@5.0.10) + version: 2.21.3(bufferutil@4.0.8)(typescript@5.6.2)(utf-8-validate@5.0.10) devDependencies: '@types/big.js': specifier: ^6.2.2 @@ -263,7 +263,7 @@ importers: version: 6.2.1 viem: specifier: ^2.20.0 - version: 2.21.3(bufferutil@4.0.8)(typescript@5.5.4)(utf-8-validate@5.0.10) + version: 2.21.3(bufferutil@4.0.8)(typescript@5.6.2)(utf-8-validate@5.0.10) devDependencies: '@types/big.js': specifier: ^6.2.2 @@ -325,10 +325,6 @@ packages: '@adraffy/ens-normalize@1.10.1': resolution: {integrity: sha512-96Z2IP3mYmF1Xg2cDm8f1gWGf/HUVedQ3FMifV4kG/PQ4yEP51xDtRAEfhVNt5f/uzpNkZHwWQuUcu6D6K+Ekw==} - '@ampproject/remapping@2.3.0': - resolution: {integrity: sha512-30iZtAPgz+LTIYoeivqYo853f02jBYSd5uGnGpkFV0M3xOt9aN73erkgYAmZU43x4VfqcnLxW9Kpg3R5LC4YYw==} - engines: {node: '>=6.0.0'} - '@babel/code-frame@7.24.7': resolution: {integrity: sha512-BcYH1CVJBO9tvyIZ2jVeXgSIMvGZ2FDRvDdOIVQyuklNKSsx+eppDEBq/g47Ayw+RqNFE+URvOShmf+f/qwAlA==} engines: {node: '>=6.9.0'} @@ -350,55 +346,55 @@ packages: peerDependencies: '@polkadot/api': ^10.7.3 - '@biomejs/biome@1.8.3': - resolution: {integrity: sha512-/uUV3MV+vyAczO+vKrPdOW0Iaet7UnJMU4bNMinggGJTAnBPjCoLEYcyYtYHNnUNYlv4xZMH6hVIQCAozq8d5w==} + '@biomejs/biome@1.9.1': + resolution: {integrity: sha512-Ps0Rg0zg3B1zpx+zQHMz5b0n0PBNCAaXttHEDTVrJD5YXR6Uj3T+abTDgeS3wsu4z5i2whqcE1lZxGyWH4bZYg==} engines: {node: '>=14.21.3'} hasBin: true - '@biomejs/cli-darwin-arm64@1.8.3': - resolution: {integrity: sha512-9DYOjclFpKrH/m1Oz75SSExR8VKvNSSsLnVIqdnKexj6NwmiMlKk94Wa1kZEdv6MCOHGHgyyoV57Cw8WzL5n3A==} + '@biomejs/cli-darwin-arm64@1.9.1': + resolution: {integrity: sha512-js0brHswq/BoeKgfSEUJYOjUOlML6p65Nantti+PsoQ61u9+YVGIZ7325LK7iUpDH8KVJT+Bx7K2b/6Q//W1Pw==} engines: {node: '>=14.21.3'} cpu: [arm64] os: [darwin] - '@biomejs/cli-darwin-x64@1.8.3': - resolution: {integrity: sha512-UeW44L/AtbmOF7KXLCoM+9PSgPo0IDcyEUfIoOXYeANaNXXf9mLUwV1GeF2OWjyic5zj6CnAJ9uzk2LT3v/wAw==} + '@biomejs/cli-darwin-x64@1.9.1': + resolution: {integrity: sha512-2zVyjUg5rN0k8XrytkubQWLbp2r/AS5wPhXs4vgVjvqbLnzo32EGX8p61gzroF2dH9DCUCfskdrigCGqNdEbpg==} engines: {node: '>=14.21.3'} cpu: [x64] os: [darwin] - '@biomejs/cli-linux-arm64-musl@1.8.3': - resolution: {integrity: sha512-9yjUfOFN7wrYsXt/T/gEWfvVxKlnh3yBpnScw98IF+oOeCYb5/b/+K7YNqKROV2i1DlMjg9g/EcN9wvj+NkMuQ==} + '@biomejs/cli-linux-arm64-musl@1.9.1': + resolution: {integrity: sha512-L/JmXKvhsZ1lTgqOr3tWkzuY/NRppdIscHeC9aaiR72WjnBgJS94mawl9BWmGB3aWBc0q6oSDWnBS7617EMMmA==} engines: {node: '>=14.21.3'} cpu: [arm64] os: [linux] - '@biomejs/cli-linux-arm64@1.8.3': - resolution: {integrity: sha512-fed2ji8s+I/m8upWpTJGanqiJ0rnlHOK3DdxsyVLZQ8ClY6qLuPc9uehCREBifRJLl/iJyQpHIRufLDeotsPtw==} + '@biomejs/cli-linux-arm64@1.9.1': + resolution: {integrity: sha512-QgxwfnG+r2aer5RNGR67Ey91Tv7xXW8E9YckHhwuyWjdLEvKWkrSJrhVG/6ub0kVvTSNkYOuT/7/jMOFBuUbRA==} engines: {node: '>=14.21.3'} cpu: [arm64] os: [linux] - '@biomejs/cli-linux-x64-musl@1.8.3': - resolution: {integrity: sha512-UHrGJX7PrKMKzPGoEsooKC9jXJMa28TUSMjcIlbDnIO4EAavCoVmNQaIuUSH0Ls2mpGMwUIf+aZJv657zfWWjA==} + '@biomejs/cli-linux-x64-musl@1.9.1': + resolution: {integrity: sha512-gY+eFLIAW45v3WicQHicvjRfA0ntMZHx7h937bXwBMFNFoKmB6rMi6+fKQ6/hiS6juhsFxZdZIz20m15s49J6A==} engines: {node: '>=14.21.3'} cpu: [x64] os: [linux] - '@biomejs/cli-linux-x64@1.8.3': - resolution: {integrity: sha512-I8G2QmuE1teISyT8ie1HXsjFRz9L1m5n83U1O6m30Kw+kPMPSKjag6QGUn+sXT8V+XWIZxFFBoTDEDZW2KPDDw==} + '@biomejs/cli-linux-x64@1.9.1': + resolution: {integrity: sha512-F0INygtzI2L2n2R1KtYHGr3YWDt9Up1zrUluwembM+iJ1dXN3qzlSb7deFUsSJm4FaIPriqs6Xa56ukdQW6UeQ==} engines: {node: '>=14.21.3'} cpu: [x64] os: [linux] - '@biomejs/cli-win32-arm64@1.8.3': - resolution: {integrity: sha512-J+Hu9WvrBevfy06eU1Na0lpc7uR9tibm9maHynLIoAjLZpQU3IW+OKHUtyL8p6/3pT2Ju5t5emReeIS2SAxhkQ==} + '@biomejs/cli-win32-arm64@1.9.1': + resolution: {integrity: sha512-7Jahxar3OB+aTPOgXisMJmMKMsjcK+UmdlG3UIOQjzN/ZFEsPV+GT3bfrVjZDQaCw/zes0Cqd7VTWFjFTC/+MQ==} engines: {node: '>=14.21.3'} cpu: [arm64] os: [win32] - '@biomejs/cli-win32-x64@1.8.3': - resolution: {integrity: sha512-/PJ59vA1pnQeKahemaQf4Nyj7IKUvGQSc3Ze1uIGi+Wvr1xF7rGobSrAAG01T/gUDG21vkDsZYM03NAmPiVkqg==} + '@biomejs/cli-win32-x64@1.9.1': + resolution: {integrity: sha512-liSRWjWzFhyG7s1jg/Bbv9FL+ha/CEd5tFO3+dFIJNplL4TnvAivtyfRVi/tu/pNjISbV1k9JwdBewtAKAgA0w==} engines: {node: '>=14.21.3'} cpu: [x64] os: [win32] @@ -1208,6 +1204,10 @@ packages: resolution: {integrity: sha512-BkG2tQpUUO0iUm65nSqP8hwHkNfN8jQw8apqflJNt9H8EkEL6v7sqwbLvGqtlxM9wzdxbg7lrWp3oHg4rOP31g==} engines: {node: '>=18'} + '@polkadot/api-augment@13.0.1': + resolution: {integrity: sha512-r5R2U8PSPNGBsz+HxZ1JYq/KkDSnDh1aBb+H16wKj2uByXKhedpuGt/z1Myvhfm084ccTloZjXDbfpSdYBLi4Q==} + engines: {node: '>=18'} + '@polkadot/api-augment@7.15.1': resolution: {integrity: sha512-7csQLS6zuYuGq7W1EkTBz1ZmxyRvx/Qpz7E7zPSwxmY8Whb7Yn2effU9XF0eCcRpyfSW8LodF8wMmLxGYs1OaQ==} engines: {node: '>=14.0.0'} @@ -1224,6 +1224,10 @@ packages: resolution: {integrity: sha512-XYI7Po8i6C4lYZah7Xo0v7zOAawBUfkmtx0YxsLY/665Sup8oqzEj666xtV9qjBzR9coNhQonIFOn+9fh27Ncw==} engines: {node: '>=18'} + '@polkadot/api-base@13.0.1': + resolution: {integrity: sha512-TDkgcSZLd3YQ3j9Zx6coEEiBazaK6y3CboaIuUbPNxR9DchlVdIJWSm/1Agh76opsEABK9SjDfsWzVw0TStidA==} + engines: {node: '>=18'} + '@polkadot/api-base@7.15.1': resolution: {integrity: sha512-UlhLdljJPDwGpm5FxOjvJNFTxXMRFaMuVNx6EklbuetbBEJ/Amihhtj0EJRodxQwtZ4ZtPKYKt+g+Dn7OJJh4g==} engines: {node: '>=14.0.0'} @@ -1240,6 +1244,10 @@ packages: resolution: {integrity: sha512-R0AMANEnqs5AiTaiQX2FXCxUlOibeDSgqlkyG1/0KDsdr6PO/l3dJOgEO+grgAwh4hdqzk4I9uQpdKxG83f2Gw==} engines: {node: '>=18'} + '@polkadot/api-derive@13.0.1': + resolution: {integrity: sha512-TiPSFp6l9ks0HLJoEWHyqKKz28eoWz3xqglFG10As0udU8J1u8trPyr+SLWHT0DVsto3u9CP+OneWWMA7fTlCw==} + engines: {node: '>=18'} + '@polkadot/api-derive@7.15.1': resolution: {integrity: sha512-CsOQppksQBaa34L1fWRzmfQQpoEBwfH0yTTQxgj3h7rFYGVPxEKGeFjo1+IgI2vXXvOO73Z8E4H/MnbxvKrs1Q==} engines: {node: '>=14.0.0'} @@ -1256,6 +1264,10 @@ packages: resolution: {integrity: sha512-e1KS048471iBWZU10TJNEYOZqLO+8h8ajmVqpaIBOVkamN7tmacBxmHgq0+IA8VrGxjxtYNa1xF5Sqrg76uBEg==} engines: {node: '>=18'} + '@polkadot/api@13.0.1': + resolution: {integrity: sha512-st+Y5I8+7/3PCtO651viU4C7PcbDZJHB93acPjqCGzpekwrxOmnBEsupw8CcJwyRVzj/7qMadkSd0b/Uc8JqIA==} + engines: {node: '>=18'} + '@polkadot/api@7.15.1': resolution: {integrity: sha512-z0z6+k8+R9ixRMWzfsYrNDnqSV5zHKmyhTCL0I7+1I081V18MJTCFUKubrh0t1gD0/FCt3U9Ibvr4IbtukYLrQ==} engines: {node: '>=14.0.0'} @@ -1353,6 +1365,10 @@ packages: resolution: {integrity: sha512-IEco5pnso+fYkZNMlMAN5i4XAxdXPv0PZ0HNuWlCwF/MmRvWl8pq5JFtY1FiByHEbeuHwMIUhHM5SDKQ85q9Hg==} engines: {node: '>=18'} + '@polkadot/rpc-augment@13.0.1': + resolution: {integrity: sha512-igXNG8mONVgqS4Olt7+WmPoX7G/QL/xrHkPOAD2sbS8+p8LC2gDe/+vVFIkKtEKAHgYSel3vZT3iIppjtEG6gw==} + engines: {node: '>=18'} + '@polkadot/rpc-augment@7.15.1': resolution: {integrity: sha512-sK0+mphN7nGz/eNPsshVi0qd0+N0Pqxuebwc1YkUGP0f9EkDxzSGp6UjGcSwWVaAtk9WZZ1MpK1Jwb/2GrKV7Q==} engines: {node: '>=14.0.0'} @@ -1369,6 +1385,10 @@ packages: resolution: {integrity: sha512-yaveqxNcmyluyNgsBT5tpnCa/md0CGbOtRK7K82LWsz7gsbh0x80GBbJrQGxsUybg1gPeZbO1q9IigwA6fY8ag==} engines: {node: '>=18'} + '@polkadot/rpc-core@13.0.1': + resolution: {integrity: sha512-+z7/4RUsJKiELEunZgXvi4GkGgjPhQd3+RYwCCN455efJ15SHPgdREsAOwUSBO5/dODqXeqZYojKAUIxMlJNqw==} + engines: {node: '>=18'} + '@polkadot/rpc-core@7.15.1': resolution: {integrity: sha512-4Sb0e0PWmarCOizzxQAE1NQSr5z0n+hdkrq3+aPohGu9Rh4PodG+OWeIBy7Ov/3GgdhNQyBLG+RiVtliXecM3g==} engines: {node: '>=14.0.0'} @@ -1385,6 +1405,10 @@ packages: resolution: {integrity: sha512-cAhfN937INyxwW1AdjABySdCKhC7QCIONRDHDea1aLpiuxq/w+QwjxauR9fCNGh3lTaAwwnmZ5WfFU2PtkDMGQ==} engines: {node: '>=18'} + '@polkadot/rpc-provider@13.0.1': + resolution: {integrity: sha512-rl7jizh0b9FI2Z81vbpm+ui6cND3zxMMC8SSxkIzemC0t1L6O/I+zaPYwNpqVpa7wIeZbSfe69SrvtjeZBcn2g==} + engines: {node: '>=18'} + '@polkadot/rpc-provider@7.15.1': resolution: {integrity: sha512-n0RWfSaD/r90JXeJkKry1aGZwJeBUUiMpXUQ9Uvp6DYBbYEDs0fKtWLpdT3PdFrMbe5y3kwQmNLxwe6iF4+mzg==} engines: {node: '>=14.0.0'} @@ -1401,6 +1425,10 @@ packages: resolution: {integrity: sha512-3fDCOy2BEMuAtMYl4crKg76bv/0pDNEuzpAzV4EBUMIlJwypmjy5sg3gUPCMcA+ckX3xb8DhkWU4ceUdS7T2KQ==} engines: {node: '>=18'} + '@polkadot/types-augment@13.0.1': + resolution: {integrity: sha512-MKS8OAiKHgeeLwyjPukHRwlUlrTkdPTVdsFs6H3yWUr0G2I2nIgHuOTK/8OYVBMplNnLgPsNtpEpY+VduAEefQ==} + engines: {node: '>=18'} + '@polkadot/types-augment@7.15.1': resolution: {integrity: sha512-aqm7xT/66TCna0I2utpIekoquKo0K5pnkA/7WDzZ6gyD8he2h0IXfe8xWjVmuyhjxrT/C/7X1aUF2Z0xlOCwzQ==} engines: {node: '>=14.0.0'} @@ -1417,6 +1445,10 @@ packages: resolution: {integrity: sha512-DiPGRFWtVMepD9i05eC3orSbGtpN7un/pXOrXu0oriU+oxLkpvZH68ZsPNtJhKdQy03cAYtvB8elJOFJZYqoqQ==} engines: {node: '>=18'} + '@polkadot/types-codec@13.0.1': + resolution: {integrity: sha512-E+8Ny8wr/BEGqchoLejP8Z6qmQQaJmBui1rlwWgKCypI4gnDvhNa+hHheIgrUfSzNwUgsxC/04G9fIRnCaxDpw==} + engines: {node: '>=18'} + '@polkadot/types-codec@7.15.1': resolution: {integrity: sha512-nI11dT7FGaeDd/fKPD8iJRFGhosOJoyjhZ0gLFFDlKCaD3AcGBRTTY8HFJpP/5QXXhZzfZsD93fVKrosnegU0Q==} engines: {node: '>=14.0.0'} @@ -1433,6 +1465,10 @@ packages: resolution: {integrity: sha512-nOpeAKZLdSqNMfzS3waQXgyPPaNt8rUHEmR5+WNv6c/Ke/vyf710wjxiTewfp0wpBgtdrimlgG4DLX1J9Ms1LA==} engines: {node: '>=18'} + '@polkadot/types-create@13.0.1': + resolution: {integrity: sha512-ge5ZmZOQoCqSOB1JtcZZFq2ysh4rnS9xrwC5BVbtk9GZaop5hRmLLmCXqDn49zEsgynRWHgOiKMP8T9AvOigMg==} + engines: {node: '>=18'} + '@polkadot/types-create@7.15.1': resolution: {integrity: sha512-+HiaHn7XOwP0kv/rVdORlVkNuMoxuvt+jd67A/CeEreJiXqRLu+S61Mdk7wi6719PTaOal1hTDFfyGrtUd8FSQ==} engines: {node: '>=14.0.0'} @@ -1449,6 +1485,10 @@ packages: resolution: {integrity: sha512-bvhO4KQu/dgPmdwQXsweSMRiRisJ7Bp38lZVEIFykfd2qYyRW3OQEbIPKYpx9raD+fDATU0bTiKQnELrSGhYXw==} engines: {node: '>=18'} + '@polkadot/types-known@13.0.1': + resolution: {integrity: sha512-ZWtQSrDoO290RJu7mZDo1unKcfz1O3ylQkKH7g3oh6Mzmq9I4q7jeS1kS22rJml45berAPIVqZ3zFfODTl6ngA==} + engines: {node: '>=18'} + '@polkadot/types-known@4.17.1': resolution: {integrity: sha512-YkOwGrO+k9aVrBR8FgYHnfJKhOfpdgC5ZRYNL/xJ9oa7lBYqPts9ENAxeBmJS/5IGeDF9f32MNyrCP2umeCXWg==} engines: {node: '>=14.0.0'} @@ -1473,6 +1513,10 @@ packages: resolution: {integrity: sha512-bz6JSt23UEZ2eXgN4ust6z5QF9pO5uNH7UzCP+8I/Nm85ZipeBYj2Wu6pLlE3Hw30hWZpuPxMDOKoEhN5bhLgw==} engines: {node: '>=18'} + '@polkadot/types-support@13.0.1': + resolution: {integrity: sha512-UeGnjvyZSegFgzZ6HlR4H7+1itJBAEkGm9NKwEvZTTZJ0dG4zdxbHLNPURJ9UhDYCZ7bOGqkcB49o+hWY25dDA==} + engines: {node: '>=18'} + '@polkadot/types-support@7.15.1': resolution: {integrity: sha512-FIK251ffVo+NaUXLlaJeB5OvT7idDd3uxaoBM6IwsS87rzt2CcWMyCbu0uX89AHZUhSviVx7xaBxfkGEqMePWA==} engines: {node: '>=14.0.0'} @@ -1489,6 +1533,10 @@ packages: resolution: {integrity: sha512-ivYtt7hYcRvo69ULb1BJA9BE1uefijXcaR089Dzosr9+sMzvsB1yslNQReOq+Wzq6h6AQj4qex6qVqjWZE6Z4A==} engines: {node: '>=18'} + '@polkadot/types@13.0.1': + resolution: {integrity: sha512-01uOx24Fjvhjt1CvKOL+oy1eExAsF4EVuwgZhwAL+WkD0zqlOlAhqlXn5Wg7sY80yzwmgDTLd8Oej/pHFOdCBQ==} + engines: {node: '>=18'} + '@polkadot/types@4.17.1': resolution: {integrity: sha512-rjW4OFdwvFekzN3ATLibC2JPSd8AWt5YepJhmuCPdwH26r3zB8bEC6dM7YQExLVUmygVPvgXk5ffHI6RAdXBMg==} engines: {node: '>=14.0.0'} @@ -2049,34 +2097,60 @@ packages: '@polkadot/api': ^10.10.1 '@polkadot/types': ^10.10.1 - '@vitest/expect@2.0.5': - resolution: {integrity: sha512-yHZtwuP7JZivj65Gxoi8upUN2OzHTi3zVfjwdpu2WrvCZPLwsJ2Ey5ILIPccoW23dd/zQBlJ4/dhi7DWNyXCpA==} + '@vitest/expect@2.1.1': + resolution: {integrity: sha512-YeueunS0HiHiQxk+KEOnq/QMzlUuOzbU1Go+PgAsHvvv3tUkJPm9xWt+6ITNTlzsMXUjmgm5T+U7KBPK2qQV6w==} - '@vitest/pretty-format@2.0.5': - resolution: {integrity: sha512-h8k+1oWHfwTkyTkb9egzwNMfJAEx4veaPSnMeKbVSjp4euqGSbQlm5+6VHwTr7u4FJslVVsUG5nopCaAYdOmSQ==} + '@vitest/mocker@2.1.1': + resolution: {integrity: sha512-LNN5VwOEdJqCmJ/2XJBywB11DLlkbY0ooDJW3uRX5cZyYCrc4PI/ePX0iQhE3BiEGiQmK4GE7Q/PqCkkaiPnrA==} + peerDependencies: + '@vitest/spy': 2.1.1 + msw: ^2.3.5 + vite: ^5.0.0 + peerDependenciesMeta: + msw: + optional: true + vite: + optional: true - '@vitest/runner@2.0.5': - resolution: {integrity: sha512-TfRfZa6Bkk9ky4tW0z20WKXFEwwvWhRY+84CnSEtq4+3ZvDlJyY32oNTJtM7AW9ihW90tX/1Q78cb6FjoAs+ig==} + '@vitest/pretty-format@2.1.1': + resolution: {integrity: sha512-SjxPFOtuINDUW8/UkElJYQSFtnWX7tMksSGW0vfjxMneFqxVr8YJ979QpMbDW7g+BIiq88RAGDjf7en6rvLPPQ==} - '@vitest/snapshot@2.0.5': - resolution: {integrity: sha512-SgCPUeDFLaM0mIUHfaArq8fD2WbaXG/zVXjRupthYfYGzc8ztbFbu6dUNOblBG7XLMR1kEhS/DNnfCZ2IhdDew==} + '@vitest/runner@2.1.1': + resolution: {integrity: sha512-uTPuY6PWOYitIkLPidaY5L3t0JJITdGTSwBtwMjKzo5O6RCOEncz9PUN+0pDidX8kTHYjO0EwUIvhlGpnGpxmA==} - '@vitest/spy@2.0.5': - resolution: {integrity: sha512-c/jdthAhvJdpfVuaexSrnawxZz6pywlTPe84LUB2m/4t3rl2fTo9NFGBG4oWgaD+FTgDDV8hJ/nibT7IfH3JfA==} + '@vitest/snapshot@2.1.1': + resolution: {integrity: sha512-BnSku1WFy7r4mm96ha2FzN99AZJgpZOWrAhtQfoxjUU5YMRpq1zmHRq7a5K9/NjqonebO7iVDla+VvZS8BOWMw==} - '@vitest/utils@2.0.5': - resolution: {integrity: sha512-d8HKbqIcya+GR67mkZbrzhS5kKhtp8dQLcmRZLGTscGVg7yImT82cIrhtn2L8+VujWcy6KZweApgNmPsTAO/UQ==} + '@vitest/spy@2.1.1': + resolution: {integrity: sha512-ZM39BnZ9t/xZ/nF4UwRH5il0Sw93QnZXd9NAZGRpIgj0yvVwPpLd702s/Cx955rGaMlyBQkZJ2Ir7qyY48VZ+g==} + + '@vitest/utils@2.1.1': + resolution: {integrity: sha512-Y6Q9TsI+qJ2CC0ZKj6VBb+T8UPz593N113nnUykqwANqhgf3QkZeHFlusgKLTqrnVHbj/XDKZcDHol+dxVT+rQ==} + + '@wormhole-foundation/sdk-base@0.10.7': + resolution: {integrity: sha512-2UEy0BREBT8mtJFzkTx8zsBtw8s1LppHQ8r+1CPT1McMLPYcHSVRAg8OBOYsdhx2N2iyvMjJgGIeE1I0Y6c8Vg==} '@wormhole-foundation/sdk-base@0.8.2': resolution: {integrity: sha512-LuR1X+6Ge0yyMZNg2F5WZUko4rR7SaKPTOpfsje381c/D9Mu7shQTwgtsE6o5IwZpMdoYKFzB8oRjHqAC23soA==} + '@wormhole-foundation/sdk-connect@0.10.7': + resolution: {integrity: sha512-NzJXVG4auD6JuMsysLQUGiK4NVJ8p1me59Rjys87I+wBRszLfe6gRy0/tKhXT/ArjXzYPKNRsgymFi7mYXEe8w==} + engines: {node: '>=16'} + '@wormhole-foundation/sdk-connect@0.8.2': resolution: {integrity: sha512-wXkrgfpAUDqV4CZND/Qn08jay2my1z7DwyJ84yPkYSsExfaTIPSSrj6fqpZrj2iDOALvIzMApJQPswyaYIIG/w==} engines: {node: '>=16'} + '@wormhole-foundation/sdk-definitions@0.10.7': + resolution: {integrity: sha512-9FUVqxbp91TjWofp2/3C/wCYlkdkt0ceM6Copc0zVDvD7sW8RpKVceWCttTZs843aKkRnGAkM+zLdT8kW/UUSw==} + '@wormhole-foundation/sdk-definitions@0.8.2': resolution: {integrity: sha512-anUH5p/DVj7jnmOPL65yGn+Yt8LafFw9gcOYeU/lFvW8T1pqhxdFyydyW4LSriZzZO2mD9qi8Sv5/ndJf0sUXg==} + '@wormhole-foundation/sdk-evm@0.10.7': + resolution: {integrity: sha512-SLZBlvllNXBiJAI0n5GTFyRwKG19CBT/i/hFbzH/xx0JJ72J0HpUklm02fyEe4I/Qg2pRoJvN65Z4/YdYLcMnw==} + engines: {node: '>=16'} + '@wormhole-foundation/sdk-evm@0.8.2': resolution: {integrity: sha512-TfnQMIqdYFjUs11vzpN75Kv75ri/nsvyScqmLvIgLb8eybMNeSDeldEMEWYXmaQgaqYX0/+UelvEoHOaKfdF5g==} engines: {node: '>=16'} @@ -2203,6 +2277,7 @@ packages: bun@1.1.27: resolution: {integrity: sha512-FLnMaOuVVuhjPIfmlRtAE42B2x+oSWO6jW8MZ/Ss179qokN//nzIhuj/07bdA016U6d11HyLvvGb6eaH0HKhBQ==} + cpu: [arm64, x64] os: [darwin, linux, win32] hasBin: true @@ -2534,10 +2609,6 @@ packages: resolution: {integrity: sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==} engines: {node: '>=10'} - execa@8.0.1: - resolution: {integrity: sha512-VyhnebXciFV2DESc+p6B+y0LjSm0krU4OgJN44qFAhBY0TJ+1V61tYD2+wHusZ6F9n5K+vl8k0sTy7PEfV4qpg==} - engines: {node: '>=16.17'} - ext@1.7.0: resolution: {integrity: sha512-6hxeJYaL110a9b5TEJSj0gojyHQAmA2ch5Os+ySCiA1QGdS697XWY1pzsrSjqA9LDEEgdB/KypIlR59RcLuHYw==} @@ -2649,10 +2720,6 @@ packages: resolution: {integrity: sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==} engines: {node: '>=10'} - get-stream@8.0.1: - resolution: {integrity: sha512-VaUJspBffn/LMCJVoMvSAdmscJyS1auj5Zulnn5UoYcY531UWmdwhRWkcGKnGU93m5HSXP9LP2usOryrBtQowA==} - engines: {node: '>=16'} - glob-parent@5.1.2: resolution: {integrity: sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==} engines: {node: '>= 6'} @@ -2710,10 +2777,6 @@ packages: resolution: {integrity: sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==} engines: {node: '>=10.17.0'} - human-signals@5.0.0: - resolution: {integrity: sha512-AXcZb6vzzrFAUE61HnN4mpLqd/cSIwNQjtNWR0euPm6y0iqx3G4gOXaIDdtdDwZmhwe82LA6+zinmW4UBWVePQ==} - engines: {node: '>=16.17.0'} - iconv-lite@0.4.24: resolution: {integrity: sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==} engines: {node: '>=0.10.0'} @@ -2774,10 +2837,6 @@ packages: resolution: {integrity: sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==} engines: {node: '>=8'} - is-stream@3.0.0: - resolution: {integrity: sha512-LnQR4bZ9IADDRSkvpqMGvt/tEJWclzklNgSw48V5EAaAeDd6qGvN8ei6k5p0tvxSR171VmGyHuTiAOfxAbr8kA==} - engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} - is-subdir@1.2.0: resolution: {integrity: sha512-2AT6j+gXe/1ueqbW6fLZJiIw3F8iXGJtt0yDrZaBhAZEG1raiTxKWU+IPqMCzQAXOUCKdA4UDMgacKH25XG2Cw==} engines: {node: '>=4'} @@ -2988,10 +3047,6 @@ packages: resolution: {integrity: sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==} engines: {node: '>=6'} - mimic-fn@4.0.0: - resolution: {integrity: sha512-vqiC06CuhBTUdZH+RYl8sFrL096vA45Ok5ISO6sE/Mr1jRbGH4Csnhi8f3wKVl7x8mO4Au7Ir9D3Oyv1VYMFJw==} - engines: {node: '>=12'} - minimalistic-assert@1.0.1: resolution: {integrity: sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==} @@ -3075,10 +3130,6 @@ packages: resolution: {integrity: sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==} engines: {node: '>=8'} - npm-run-path@5.3.0: - resolution: {integrity: sha512-ppwTtiJZq0O/ai0z7yfudtBpWIoxM8yE6nHi1X47eFR2EWORqfbu6CnPlNsjeN683eT0qG6H/Pyf9fCcvjnnnQ==} - engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} - object-assign@4.1.1: resolution: {integrity: sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==} engines: {node: '>=0.10.0'} @@ -3087,10 +3138,6 @@ packages: resolution: {integrity: sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==} engines: {node: '>=6'} - onetime@6.0.0: - resolution: {integrity: sha512-1FlR+gjXK7X+AsAHso35MnyN5KqGwJRi/31ft6x0M194ht7S+rWAvd7PHss9xSKMzE0asv1pyIHaJYq+BbacAQ==} - engines: {node: '>=12'} - ora@8.0.1: resolution: {integrity: sha512-ANIvzobt1rls2BDny5fWZ3ZVKyD6nscLvfFRpQgfWsythlcsVUC9kL0zq6j2Z5z9wwp1kd7wpsD/T9qNPVLCaQ==} engines: {node: '>=18'} @@ -3151,10 +3198,6 @@ packages: resolution: {integrity: sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==} engines: {node: '>=8'} - path-key@4.0.0: - resolution: {integrity: sha512-haREypq7xkM7ErfgIyA0z+Bj4AGKlMSdlQE2jvJo6huWD1EdkKYV+G/T4nq0YEF2vgTT8kqMFKo1uHn950r4SQ==} - engines: {node: '>=12'} - path-scurry@1.11.1: resolution: {integrity: sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==} engines: {node: '>=16 || 14 >=14.18'} @@ -3475,10 +3518,6 @@ packages: resolution: {integrity: sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==} engines: {node: '>=6'} - strip-final-newline@3.0.0: - resolution: {integrity: sha512-dOESqjYr96iWYylGObzd39EuNTa5VJxyvVAEm5Jnh7KGo75V43Hk1odPQkNDyXNmUR6k+gEiDVXnjB8HJ3crXw==} - engines: {node: '>=12'} - styled-components@6.1.13: resolution: {integrity: sha512-M0+N2xSnAtwcVAQeFEsGWFFxXDftHUD7XrKla06QbpUMmbmtFBMMTcKWvFXtWxuD5qQkB8iU5gk6QASlx2ZRMw==} engines: {node: '>= 16'} @@ -3521,6 +3560,9 @@ packages: tinybench@2.9.0: resolution: {integrity: sha512-0+DUvqWMValLmha6lr4kD8iAMK1HzV0/aKnCtWb9v9641TnP/MFb7Pc2bxoxQjTXAErryXVgUOfv2YqNllqGeg==} + tinyexec@0.3.0: + resolution: {integrity: sha512-tVGE0mVJPGb0chKhqmsoosjsS+qUnJVGJpZgsHYQcGoPlG3B51R3PouqTgEGH2Dc9jjFyOqOpix6ZHNMXp1FZg==} + tinypool@1.0.1: resolution: {integrity: sha512-URZYihUbRPcGv95En+sz6MfghfIc2OJ1sv/RmhWZLouPY0/8Vo80viwPvg3dlaS9fuq7fQMEfgRRK7BBZThBEA==} engines: {node: ^18.0.0 || >=20.0.0} @@ -3591,38 +3633,38 @@ packages: typescript: optional: true - turbo-darwin-64@2.1.1: - resolution: {integrity: sha512-aYNuJpZlCoi0Htd79fl/2DywpewGKijdXeOfg9KzNuPVKzSMYlAXuAlNGh0MKjiOcyqxQGL7Mq9LFhwA0VpDpQ==} + turbo-darwin-64@2.1.2: + resolution: {integrity: sha512-3TEBxHWh99h2yIzkuIigMEOXt/ItYQp0aPiJjPd1xN4oDcsKK5AxiFKPH9pdtfIBzYsY59kQhZiFj0ELnSP7Bw==} cpu: [x64] os: [darwin] - turbo-darwin-arm64@2.1.1: - resolution: {integrity: sha512-tifJKD8yHY48rHXPMcM8o1jI/Jk2KCaXiNjTKvvy9Zsim61BZksNVLelIbrRoCGwAN6PUBZO2lGU5iL/TQJ5Pw==} + turbo-darwin-arm64@2.1.2: + resolution: {integrity: sha512-he0miWNq2WxJzsH82jS2Z4MXpnkzn9SH8a79iPXiJkq25QREImucscM4RPasXm8wARp91pyysJMq6aasD45CeA==} cpu: [arm64] os: [darwin] - turbo-linux-64@2.1.1: - resolution: {integrity: sha512-Js6d/bSQe9DuV9c7ITXYpsU/ADzFHABdz1UIHa7Oqjj9VOEbFeA9WpAn0c+mdJrVD+IXJFbbDZUjN7VYssmtcg==} + turbo-linux-64@2.1.2: + resolution: {integrity: sha512-fKUBcc0rK8Vdqv5a/E3CSpMBLG1bzwv+Q0Q83F8fG2ZfNCNKGbcEYABdonNZkkx141Rj03cZQFCgxu3MVEGU+A==} cpu: [x64] os: [linux] - turbo-linux-arm64@2.1.1: - resolution: {integrity: sha512-LidzTCq0yvQ+N8w8Qub9FmhQ/mmEIeoqFi7DSupekEV2EjvE9jw/zYc9Pk67X+g7dHVfgOnvVzmrjChdxpFePw==} + turbo-linux-arm64@2.1.2: + resolution: {integrity: sha512-sV8Bpmm0WiuxgbhxymcC7wSsuxfBBieI98GegSwbr/bs1ANAgzCg93urIrdKdQ3/b31zZxQwcaP4FBF1wx1Qdg==} cpu: [arm64] os: [linux] - turbo-windows-64@2.1.1: - resolution: {integrity: sha512-GKc9ZywKwy4xLDhwXd6H07yzl0TB52HjXMrFLyHGhCVnf/w0oq4sLJv2sjbvuarPjsyx4xnCBJ3m3oyL2XmFtA==} + turbo-windows-64@2.1.2: + resolution: {integrity: sha512-wcmIJZI9ORT9ykHGliFE6kWRQrlH930QGSjSgWC8uFChFFuOyUlvC7ttcxuSvU9VqC7NF4C+GVAcFJQ8lTjN7g==} cpu: [x64] os: [win32] - turbo-windows-arm64@2.1.1: - resolution: {integrity: sha512-oFKkMj11KKUv3xSK9/fhAEQTxLUp1Ol1EOktwc32+SFtEU0uls7kosAz0b+qe8k3pJGEMFdDPdqoEjyJidbxtQ==} + turbo-windows-arm64@2.1.2: + resolution: {integrity: sha512-zdnXjrhk7YO6CP+Q5wPueEvOCLH4lDa6C4rrwiakcWcPgcQGbVozJlo4uaQ6awo8HLWQEvOwu84RkWTdLAc/Hw==} cpu: [arm64] os: [win32] - turbo@2.1.1: - resolution: {integrity: sha512-u9gUDkmR9dFS8b5kAYqIETK4OnzsS4l2ragJ0+soSMHh6VEeNHjTfSjk1tKxCqLyziCrPogadxP680J+v6yGHw==} + turbo@2.1.2: + resolution: {integrity: sha512-Jb0rbU4iHEVQ18An/YfakdIv9rKnd3zUfSE117EngrfWXFHo3RndVH96US3GsT8VHpwTncPePDBT2t06PaFLrw==} hasBin: true tweetnacl@1.0.3: @@ -3639,8 +3681,8 @@ packages: engines: {node: '>=4.2.0'} hasBin: true - typescript@5.5.4: - resolution: {integrity: sha512-Mtq29sKDAEYP7aljRgtPOpTvOfbwRWlS6dPRzwjdE+C0R4brX/GUyhHSecbHMFLNBLcJIPt9nl9yG5TZ1weH+Q==} + typescript@5.6.2: + resolution: {integrity: sha512-NW8ByodCSNCwZeghjN3o+JX5OFH0Ojg6sadjEKY4huZ52TqbJTJnDo5+Tw98lSy63NZvi4n+ez5m2u5d4PkZyw==} engines: {node: '>=14.17'} hasBin: true @@ -3678,8 +3720,16 @@ packages: typescript: optional: true - vite-node@2.0.5: - resolution: {integrity: sha512-LdsW4pxj0Ot69FAoXZ1yTnA9bjGohr2yNBU7QKRxpz8ITSkhuDl6h3zS/tvgz4qrNjeRnvrWeXQ8ZF7Um4W00Q==} + viem@2.21.7: + resolution: {integrity: sha512-PFgppakInuHX31wHDx1dzAjhj4t6Po6WrWtutDi33z2vabIT0Wv8qT6tl7DLqfLy2NkTqfN2mdshYLeoI5ZHvQ==} + peerDependencies: + typescript: '>=5.0.4' + peerDependenciesMeta: + typescript: + optional: true + + vite-node@2.1.1: + resolution: {integrity: sha512-N/mGckI1suG/5wQI35XeR9rsMsPqKXzq1CdUndzVstBj/HvyxxGctwnK6WX43NGt5L3Z5tcRf83g4TITKJhPrA==} engines: {node: ^18.0.0 || >=20.0.0} hasBin: true @@ -3714,15 +3764,15 @@ packages: terser: optional: true - vitest@2.0.5: - resolution: {integrity: sha512-8GUxONfauuIdeSl5f9GTgVEpg5BTOlplET4WEDaeY2QBiN8wSm68vxN/tb5z405OwppfoCavnwXafiaYBC/xOA==} + vitest@2.1.1: + resolution: {integrity: sha512-97We7/VC0e9X5zBVkvt7SGQMGrRtn3KtySFQG5fpaMlS+l62eeXRQO633AYhSTC3z7IMebnPPNjGXVGNRFlxBA==} engines: {node: ^18.0.0 || >=20.0.0} hasBin: true peerDependencies: '@edge-runtime/vm': '*' '@types/node': ^18.0.0 || >=20.0.0 - '@vitest/browser': 2.0.5 - '@vitest/ui': 2.0.5 + '@vitest/browser': 2.1.1 + '@vitest/ui': 2.1.1 happy-dom: '*' jsdom: '*' peerDependenciesMeta: @@ -3843,11 +3893,6 @@ snapshots: '@adraffy/ens-normalize@1.10.1': {} - '@ampproject/remapping@2.3.0': - dependencies: - '@jridgewell/gen-mapping': 0.3.5 - '@jridgewell/trace-mapping': 0.3.25 - '@babel/code-frame@7.24.7': dependencies: '@babel/highlight': 7.24.7 @@ -3870,39 +3915,39 @@ snapshots: dependencies: '@polkadot/api': 12.4.2(bufferutil@4.0.8)(utf-8-validate@5.0.10) - '@biomejs/biome@1.8.3': + '@biomejs/biome@1.9.1': optionalDependencies: - '@biomejs/cli-darwin-arm64': 1.8.3 - '@biomejs/cli-darwin-x64': 1.8.3 - '@biomejs/cli-linux-arm64': 1.8.3 - '@biomejs/cli-linux-arm64-musl': 1.8.3 - '@biomejs/cli-linux-x64': 1.8.3 - '@biomejs/cli-linux-x64-musl': 1.8.3 - '@biomejs/cli-win32-arm64': 1.8.3 - '@biomejs/cli-win32-x64': 1.8.3 - - '@biomejs/cli-darwin-arm64@1.8.3': + '@biomejs/cli-darwin-arm64': 1.9.1 + '@biomejs/cli-darwin-x64': 1.9.1 + '@biomejs/cli-linux-arm64': 1.9.1 + '@biomejs/cli-linux-arm64-musl': 1.9.1 + '@biomejs/cli-linux-x64': 1.9.1 + '@biomejs/cli-linux-x64-musl': 1.9.1 + '@biomejs/cli-win32-arm64': 1.9.1 + '@biomejs/cli-win32-x64': 1.9.1 + + '@biomejs/cli-darwin-arm64@1.9.1': optional: true - '@biomejs/cli-darwin-x64@1.8.3': + '@biomejs/cli-darwin-x64@1.9.1': optional: true - '@biomejs/cli-linux-arm64-musl@1.8.3': + '@biomejs/cli-linux-arm64-musl@1.9.1': optional: true - '@biomejs/cli-linux-arm64@1.8.3': + '@biomejs/cli-linux-arm64@1.9.1': optional: true - '@biomejs/cli-linux-x64-musl@1.8.3': + '@biomejs/cli-linux-x64-musl@1.9.1': optional: true - '@biomejs/cli-linux-x64@1.8.3': + '@biomejs/cli-linux-x64@1.9.1': optional: true - '@biomejs/cli-win32-arm64@1.8.3': + '@biomejs/cli-win32-arm64@1.9.1': optional: true - '@biomejs/cli-win32-x64@1.8.3': + '@biomejs/cli-win32-x64@1.9.1': optional: true '@changesets/apply-release-plan@7.0.5': @@ -4713,6 +4758,20 @@ snapshots: - supports-color - utf-8-validate + '@polkadot/api-augment@13.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)': + dependencies: + '@polkadot/api-base': 13.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10) + '@polkadot/rpc-augment': 13.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10) + '@polkadot/types': 13.0.1 + '@polkadot/types-augment': 13.0.1 + '@polkadot/types-codec': 13.0.1 + '@polkadot/util': 13.0.2 + tslib: 2.7.0 + transitivePeerDependencies: + - bufferutil + - supports-color + - utf-8-validate + '@polkadot/api-augment@7.15.1': dependencies: '@babel/runtime': 7.25.6 @@ -4764,6 +4823,18 @@ snapshots: - supports-color - utf-8-validate + '@polkadot/api-base@13.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)': + dependencies: + '@polkadot/rpc-core': 13.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10) + '@polkadot/types': 13.0.1 + '@polkadot/util': 13.0.2 + rxjs: 7.8.1 + tslib: 2.7.0 + transitivePeerDependencies: + - bufferutil + - supports-color + - utf-8-validate + '@polkadot/api-base@7.15.1': dependencies: '@babel/runtime': 7.25.6 @@ -4821,6 +4892,23 @@ snapshots: - supports-color - utf-8-validate + '@polkadot/api-derive@13.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)': + dependencies: + '@polkadot/api': 13.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10) + '@polkadot/api-augment': 13.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10) + '@polkadot/api-base': 13.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10) + '@polkadot/rpc-core': 13.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10) + '@polkadot/types': 13.0.1 + '@polkadot/types-codec': 13.0.1 + '@polkadot/util': 13.0.2 + '@polkadot/util-crypto': 13.0.2(@polkadot/util@13.0.2) + rxjs: 7.8.1 + tslib: 2.7.0 + transitivePeerDependencies: + - bufferutil + - supports-color + - utf-8-validate + '@polkadot/api-derive@7.15.1': dependencies: '@babel/runtime': 7.25.6 @@ -4902,6 +4990,30 @@ snapshots: - supports-color - utf-8-validate + '@polkadot/api@13.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)': + dependencies: + '@polkadot/api-augment': 13.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10) + '@polkadot/api-base': 13.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10) + '@polkadot/api-derive': 13.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10) + '@polkadot/keyring': 13.0.2(@polkadot/util-crypto@13.0.2(@polkadot/util@13.0.2))(@polkadot/util@13.0.2) + '@polkadot/rpc-augment': 13.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10) + '@polkadot/rpc-core': 13.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10) + '@polkadot/rpc-provider': 13.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10) + '@polkadot/types': 13.0.1 + '@polkadot/types-augment': 13.0.1 + '@polkadot/types-codec': 13.0.1 + '@polkadot/types-create': 13.0.1 + '@polkadot/types-known': 13.0.1 + '@polkadot/util': 13.0.2 + '@polkadot/util-crypto': 13.0.2(@polkadot/util@13.0.2) + eventemitter3: 5.0.1 + rxjs: 7.8.1 + tslib: 2.7.0 + transitivePeerDependencies: + - bufferutil + - supports-color + - utf-8-validate + '@polkadot/api@7.15.1': dependencies: '@babel/runtime': 7.25.6 @@ -5127,6 +5239,18 @@ snapshots: - supports-color - utf-8-validate + '@polkadot/rpc-augment@13.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)': + dependencies: + '@polkadot/rpc-core': 13.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10) + '@polkadot/types': 13.0.1 + '@polkadot/types-codec': 13.0.1 + '@polkadot/util': 13.0.2 + tslib: 2.7.0 + transitivePeerDependencies: + - bufferutil + - supports-color + - utf-8-validate + '@polkadot/rpc-augment@7.15.1': dependencies: '@babel/runtime': 7.25.6 @@ -5176,6 +5300,19 @@ snapshots: - supports-color - utf-8-validate + '@polkadot/rpc-core@13.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)': + dependencies: + '@polkadot/rpc-augment': 13.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10) + '@polkadot/rpc-provider': 13.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10) + '@polkadot/types': 13.0.1 + '@polkadot/util': 13.0.2 + rxjs: 7.8.1 + tslib: 2.7.0 + transitivePeerDependencies: + - bufferutil + - supports-color + - utf-8-validate + '@polkadot/rpc-core@7.15.1': dependencies: '@babel/runtime': 7.25.6 @@ -5243,6 +5380,27 @@ snapshots: - supports-color - utf-8-validate + '@polkadot/rpc-provider@13.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)': + dependencies: + '@polkadot/keyring': 13.0.2(@polkadot/util-crypto@13.0.2(@polkadot/util@13.0.2))(@polkadot/util@13.0.2) + '@polkadot/types': 13.0.1 + '@polkadot/types-support': 13.0.1 + '@polkadot/util': 13.0.2 + '@polkadot/util-crypto': 13.0.2(@polkadot/util@13.0.2) + '@polkadot/x-fetch': 13.0.2 + '@polkadot/x-global': 13.0.2 + '@polkadot/x-ws': 13.0.2(bufferutil@4.0.8)(utf-8-validate@5.0.10) + eventemitter3: 5.0.1 + mock-socket: 9.3.1 + nock: 13.5.5 + tslib: 2.7.0 + optionalDependencies: + '@substrate/connect': 0.8.11(bufferutil@4.0.8)(utf-8-validate@5.0.10) + transitivePeerDependencies: + - bufferutil + - supports-color + - utf-8-validate + '@polkadot/rpc-provider@7.15.1': dependencies: '@babel/runtime': 7.25.6 @@ -5297,6 +5455,13 @@ snapshots: '@polkadot/util': 13.0.2 tslib: 2.7.0 + '@polkadot/types-augment@13.0.1': + dependencies: + '@polkadot/types': 13.0.1 + '@polkadot/types-codec': 13.0.1 + '@polkadot/util': 13.0.2 + tslib: 2.7.0 + '@polkadot/types-augment@7.15.1': dependencies: '@babel/runtime': 7.25.6 @@ -5323,6 +5488,12 @@ snapshots: '@polkadot/x-bigint': 13.0.2 tslib: 2.7.0 + '@polkadot/types-codec@13.0.1': + dependencies: + '@polkadot/util': 13.0.2 + '@polkadot/x-bigint': 13.0.2 + tslib: 2.7.0 + '@polkadot/types-codec@7.15.1': dependencies: '@babel/runtime': 7.25.6 @@ -5346,6 +5517,12 @@ snapshots: '@polkadot/util': 13.0.2 tslib: 2.7.0 + '@polkadot/types-create@13.0.1': + dependencies: + '@polkadot/types-codec': 13.0.1 + '@polkadot/util': 13.0.2 + tslib: 2.7.0 + '@polkadot/types-create@7.15.1': dependencies: '@babel/runtime': 7.25.6 @@ -5376,6 +5553,15 @@ snapshots: '@polkadot/util': 13.0.2 tslib: 2.7.0 + '@polkadot/types-known@13.0.1': + dependencies: + '@polkadot/networks': 13.0.2 + '@polkadot/types': 13.0.1 + '@polkadot/types-codec': 13.0.1 + '@polkadot/types-create': 13.0.1 + '@polkadot/util': 13.0.2 + tslib: 2.7.0 + '@polkadot/types-known@4.17.1': dependencies: '@babel/runtime': 7.25.6 @@ -5418,6 +5604,11 @@ snapshots: '@polkadot/util': 13.0.2 tslib: 2.7.0 + '@polkadot/types-support@13.0.1': + dependencies: + '@polkadot/util': 13.0.2 + tslib: 2.7.0 + '@polkadot/types-support@7.15.1': dependencies: '@babel/runtime': 7.25.6 @@ -5450,6 +5641,17 @@ snapshots: rxjs: 7.8.1 tslib: 2.7.0 + '@polkadot/types@13.0.1': + dependencies: + '@polkadot/keyring': 13.0.2(@polkadot/util-crypto@13.0.2(@polkadot/util@13.0.2))(@polkadot/util@13.0.2) + '@polkadot/types-augment': 13.0.1 + '@polkadot/types-codec': 13.0.1 + '@polkadot/types-create': 13.0.1 + '@polkadot/util': 13.0.2 + '@polkadot/util-crypto': 13.0.2(@polkadot/util@13.0.2) + rxjs: 7.8.1 + tslib: 2.7.0 + '@polkadot/types@4.17.1': dependencies: '@babel/runtime': 7.25.6 @@ -6077,7 +6279,7 @@ snapshots: '@subsocial/definitions@0.8.14(bufferutil@4.0.8)(utf-8-validate@5.0.10)': dependencies: - '@polkadot/api': 12.4.2(bufferutil@4.0.8)(utf-8-validate@5.0.10) + '@polkadot/api': 13.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10) lodash.camelcase: 4.3.0 transitivePeerDependencies: - bufferutil @@ -6234,43 +6436,62 @@ snapshots: '@polkadot/api': 12.4.2(bufferutil@4.0.8)(utf-8-validate@5.0.10) '@polkadot/types': 12.4.2 - '@vitest/expect@2.0.5': + '@vitest/expect@2.1.1': dependencies: - '@vitest/spy': 2.0.5 - '@vitest/utils': 2.0.5 + '@vitest/spy': 2.1.1 + '@vitest/utils': 2.1.1 chai: 5.1.1 tinyrainbow: 1.2.0 - '@vitest/pretty-format@2.0.5': + '@vitest/mocker@2.1.1(@vitest/spy@2.1.1)(vite@5.4.3(@types/node@22.5.4))': + dependencies: + '@vitest/spy': 2.1.1 + estree-walker: 3.0.3 + magic-string: 0.30.11 + optionalDependencies: + vite: 5.4.3(@types/node@22.5.4) + + '@vitest/pretty-format@2.1.1': dependencies: tinyrainbow: 1.2.0 - '@vitest/runner@2.0.5': + '@vitest/runner@2.1.1': dependencies: - '@vitest/utils': 2.0.5 + '@vitest/utils': 2.1.1 pathe: 1.1.2 - '@vitest/snapshot@2.0.5': + '@vitest/snapshot@2.1.1': dependencies: - '@vitest/pretty-format': 2.0.5 + '@vitest/pretty-format': 2.1.1 magic-string: 0.30.11 pathe: 1.1.2 - '@vitest/spy@2.0.5': + '@vitest/spy@2.1.1': dependencies: tinyspy: 3.0.0 - '@vitest/utils@2.0.5': + '@vitest/utils@2.1.1': dependencies: - '@vitest/pretty-format': 2.0.5 - estree-walker: 3.0.3 + '@vitest/pretty-format': 2.1.1 loupe: 3.1.1 tinyrainbow: 1.2.0 + '@wormhole-foundation/sdk-base@0.10.7': + dependencies: + '@scure/base': 1.1.8 + '@wormhole-foundation/sdk-base@0.8.2': dependencies: '@scure/base': 1.1.8 + '@wormhole-foundation/sdk-connect@0.10.7': + dependencies: + '@wormhole-foundation/sdk-base': 0.10.7 + '@wormhole-foundation/sdk-definitions': 0.10.7 + axios: 1.7.7 + transitivePeerDependencies: + - debug + '@wormhole-foundation/sdk-connect@0.8.2': dependencies: '@wormhole-foundation/sdk-base': 0.8.2 @@ -6279,12 +6500,27 @@ snapshots: transitivePeerDependencies: - debug + '@wormhole-foundation/sdk-definitions@0.10.7': + dependencies: + '@noble/curves': 1.6.0 + '@noble/hashes': 1.5.0 + '@wormhole-foundation/sdk-base': 0.10.7 + '@wormhole-foundation/sdk-definitions@0.8.2': dependencies: '@noble/curves': 1.6.0 '@noble/hashes': 1.5.0 '@wormhole-foundation/sdk-base': 0.8.2 + '@wormhole-foundation/sdk-evm@0.10.7(bufferutil@4.0.8)(utf-8-validate@5.0.10)': + dependencies: + '@wormhole-foundation/sdk-connect': 0.10.7 + ethers: 6.13.2(bufferutil@4.0.8)(utf-8-validate@5.0.10) + transitivePeerDependencies: + - bufferutil + - debug + - utf-8-validate + '@wormhole-foundation/sdk-evm@0.8.2(bufferutil@4.0.8)(utf-8-validate@5.0.10)': dependencies: '@wormhole-foundation/sdk-connect': 0.8.2 @@ -6298,9 +6534,9 @@ snapshots: '@zeroio/type-definitions@0.0.14': {} - abitype@1.0.5(typescript@5.5.4): + abitype@1.0.5(typescript@5.6.2): optionalDependencies: - typescript: 5.5.4 + typescript: 5.6.2 aes-js@4.0.0-beta.5: {} @@ -6510,14 +6746,14 @@ snapshots: core-util-is@1.0.3: {} - cosmiconfig@9.0.0(typescript@5.5.4): + cosmiconfig@9.0.0(typescript@5.6.2): dependencies: env-paths: 2.2.1 import-fresh: 3.3.0 js-yaml: 4.1.0 parse-json: 5.2.0 optionalDependencies: - typescript: 5.5.4 + typescript: 5.6.2 create-hash@1.2.0: dependencies: @@ -6833,18 +7069,6 @@ snapshots: signal-exit: 3.0.7 strip-final-newline: 2.0.0 - execa@8.0.1: - dependencies: - cross-spawn: 7.0.3 - get-stream: 8.0.1 - human-signals: 5.0.0 - is-stream: 3.0.0 - merge-stream: 2.0.0 - npm-run-path: 5.3.0 - onetime: 6.0.0 - signal-exit: 4.1.0 - strip-final-newline: 3.0.0 - ext@1.7.0: dependencies: type: 2.7.3 @@ -6948,8 +7172,6 @@ snapshots: get-stream@6.0.1: {} - get-stream@8.0.1: {} - glob-parent@5.1.2: dependencies: is-glob: 4.0.3 @@ -7025,8 +7247,6 @@ snapshots: human-signals@2.1.0: {} - human-signals@5.0.0: {} - iconv-lite@0.4.24: dependencies: safer-buffer: 2.1.2 @@ -7068,8 +7288,6 @@ snapshots: is-stream@2.0.1: {} - is-stream@3.0.0: {} - is-subdir@1.2.0: dependencies: better-path-resolve: 1.0.0 @@ -7247,8 +7465,6 @@ snapshots: mimic-fn@2.1.0: {} - mimic-fn@4.0.0: {} - minimalistic-assert@1.0.1: {} minimalistic-crypto-utils@1.0.1: {} @@ -7325,20 +7541,12 @@ snapshots: dependencies: path-key: 3.1.1 - npm-run-path@5.3.0: - dependencies: - path-key: 4.0.0 - object-assign@4.1.1: {} onetime@5.1.2: dependencies: mimic-fn: 2.1.0 - onetime@6.0.0: - dependencies: - mimic-fn: 4.0.0 - ora@8.0.1: dependencies: chalk: 5.3.0 @@ -7396,8 +7604,6 @@ snapshots: path-key@3.1.1: {} - path-key@4.0.0: {} - path-scurry@1.11.1: dependencies: lru-cache: 10.4.3 @@ -7698,8 +7904,6 @@ snapshots: strip-final-newline@2.0.0: {} - strip-final-newline@3.0.0: {} - styled-components@6.1.13(react-dom@18.3.1(react@18.3.1))(react@18.3.1): dependencies: '@emotion/is-prop-valid': 1.2.2 @@ -7730,13 +7934,13 @@ snapshots: dependencies: has-flag: 3.0.0 - syncpack@13.0.0(typescript@5.5.4): + syncpack@13.0.0(typescript@5.6.2): dependencies: '@effect/schema': 0.71.1(effect@3.6.5) chalk: 5.3.0 chalk-template: 1.1.0 commander: 12.1.0 - cosmiconfig: 9.0.0(typescript@5.5.4) + cosmiconfig: 9.0.0(typescript@5.6.2) effect: 3.6.5 enquirer: 2.4.1 fast-check: 3.21.0 @@ -7767,6 +7971,8 @@ snapshots: tinybench@2.9.0: {} + tinyexec@0.3.0: {} + tinypool@1.0.1: {} tinyrainbow@1.2.0: {} @@ -7803,7 +8009,7 @@ snapshots: tslib@2.7.0: {} - tsup@8.2.4(postcss@8.4.45)(typescript@5.5.4)(yaml@2.5.1): + tsup@8.2.4(postcss@8.4.45)(typescript@5.6.2)(yaml@2.5.1): dependencies: bundle-require: 5.0.0(esbuild@0.23.1) cac: 6.7.14 @@ -7823,39 +8029,39 @@ snapshots: tree-kill: 1.2.2 optionalDependencies: postcss: 8.4.45 - typescript: 5.5.4 + typescript: 5.6.2 transitivePeerDependencies: - jiti - supports-color - tsx - yaml - turbo-darwin-64@2.1.1: + turbo-darwin-64@2.1.2: optional: true - turbo-darwin-arm64@2.1.1: + turbo-darwin-arm64@2.1.2: optional: true - turbo-linux-64@2.1.1: + turbo-linux-64@2.1.2: optional: true - turbo-linux-arm64@2.1.1: + turbo-linux-arm64@2.1.2: optional: true - turbo-windows-64@2.1.1: + turbo-windows-64@2.1.2: optional: true - turbo-windows-arm64@2.1.1: + turbo-windows-arm64@2.1.2: optional: true - turbo@2.1.1: + turbo@2.1.2: optionalDependencies: - turbo-darwin-64: 2.1.1 - turbo-darwin-arm64: 2.1.1 - turbo-linux-64: 2.1.1 - turbo-linux-arm64: 2.1.1 - turbo-windows-64: 2.1.1 - turbo-windows-arm64: 2.1.1 + turbo-darwin-64: 2.1.2 + turbo-darwin-arm64: 2.1.2 + turbo-linux-64: 2.1.2 + turbo-linux-arm64: 2.1.2 + turbo-windows-64: 2.1.2 + turbo-windows-arm64: 2.1.2 tweetnacl@1.0.3: {} @@ -7867,7 +8073,7 @@ snapshots: typescript@4.9.5: {} - typescript@5.5.4: {} + typescript@5.6.2: {} undici-types@6.19.8: {} @@ -7885,30 +8091,47 @@ snapshots: validate-npm-package-name@5.0.1: {} - viem@2.21.3(bufferutil@4.0.8)(typescript@5.5.4)(utf-8-validate@5.0.10): + viem@2.21.3(bufferutil@4.0.8)(typescript@5.6.2)(utf-8-validate@5.0.10): dependencies: '@adraffy/ens-normalize': 1.10.0 '@noble/curves': 1.4.0 '@noble/hashes': 1.4.0 '@scure/bip32': 1.4.0 '@scure/bip39': 1.4.0 - abitype: 1.0.5(typescript@5.5.4) + abitype: 1.0.5(typescript@5.6.2) isows: 1.0.4(ws@8.17.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)) webauthn-p256: 0.0.5 ws: 8.17.1(bufferutil@4.0.8)(utf-8-validate@5.0.10) optionalDependencies: - typescript: 5.5.4 + typescript: 5.6.2 transitivePeerDependencies: - bufferutil - utf-8-validate - zod - vite-node@2.0.5(@types/node@22.5.4): + viem@2.21.7(bufferutil@4.0.8)(typescript@5.6.2)(utf-8-validate@5.0.10): + dependencies: + '@adraffy/ens-normalize': 1.10.0 + '@noble/curves': 1.4.0 + '@noble/hashes': 1.4.0 + '@scure/bip32': 1.4.0 + '@scure/bip39': 1.4.0 + abitype: 1.0.5(typescript@5.6.2) + isows: 1.0.4(ws@8.17.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)) + webauthn-p256: 0.0.5 + ws: 8.17.1(bufferutil@4.0.8)(utf-8-validate@5.0.10) + optionalDependencies: + typescript: 5.6.2 + transitivePeerDependencies: + - bufferutil + - utf-8-validate + - zod + + vite-node@2.1.1(@types/node@22.5.4): dependencies: cac: 6.7.14 debug: 4.3.7 pathe: 1.1.2 - tinyrainbow: 1.2.0 vite: 5.4.3(@types/node@22.5.4) transitivePeerDependencies: - '@types/node' @@ -7930,32 +8153,33 @@ snapshots: '@types/node': 22.5.4 fsevents: 2.3.3 - vitest@2.0.5(@types/node@22.5.4): + vitest@2.1.1(@types/node@22.5.4): dependencies: - '@ampproject/remapping': 2.3.0 - '@vitest/expect': 2.0.5 - '@vitest/pretty-format': 2.0.5 - '@vitest/runner': 2.0.5 - '@vitest/snapshot': 2.0.5 - '@vitest/spy': 2.0.5 - '@vitest/utils': 2.0.5 + '@vitest/expect': 2.1.1 + '@vitest/mocker': 2.1.1(@vitest/spy@2.1.1)(vite@5.4.3(@types/node@22.5.4)) + '@vitest/pretty-format': 2.1.1 + '@vitest/runner': 2.1.1 + '@vitest/snapshot': 2.1.1 + '@vitest/spy': 2.1.1 + '@vitest/utils': 2.1.1 chai: 5.1.1 debug: 4.3.7 - execa: 8.0.1 magic-string: 0.30.11 pathe: 1.1.2 std-env: 3.7.0 tinybench: 2.9.0 + tinyexec: 0.3.0 tinypool: 1.0.1 tinyrainbow: 1.2.0 vite: 5.4.3(@types/node@22.5.4) - vite-node: 2.0.5(@types/node@22.5.4) + vite-node: 2.1.1(@types/node@22.5.4) why-is-node-running: 2.3.0 optionalDependencies: '@types/node': 22.5.4 transitivePeerDependencies: - less - lightningcss + - msw - sass - sass-embedded - stylus diff --git a/tsup.config.ts b/tsup.config.ts index c079ed45..9c0a1f99 100644 --- a/tsup.config.ts +++ b/tsup.config.ts @@ -5,7 +5,7 @@ export const baseConfig: Options = { format: 'esm', outDir: 'build', target: 'es2022', - minify: true, + minify: false, splitting: false, sourcemap: true, clean: true,