diff --git a/examples/sdk-simple/package.json b/examples/sdk-simple/package.json index b8d6f375..2f01b454 100644 --- a/examples/sdk-simple/package.json +++ b/examples/sdk-simple/package.json @@ -14,6 +14,6 @@ "@moonbeam-network/xcm-utils": "workspace:*" }, "devDependencies": { - "bun": "^1.1.25" + "bun": "^1.1.31" } } diff --git a/package.json b/package.json index 76053aa7..4a2822e8 100644 --- a/package.json +++ b/package.json @@ -29,7 +29,7 @@ "test:ci": "turbo run test:ci", "test:acc": "turbo run test:acc", "test:acc:u": "turbo run test:acc -- -u", - "sync-deps": "syncpack fix-mismatches", + "sync-deps": "npx syncpack fix-mismatches", "clean": "rm -rf packages/**/build packages/**/.turbo .turbo/", "changeset": "changeset", "changeset:version": "changeset version && pnpm install --lockfile-only", @@ -40,8 +40,8 @@ "@polkadot/api-augment": "^12.4.2", "@polkadot/apps-config": "^0.143.2", "@polkadot/types": "^12.4.2", - "@polkadot/util": "^13.0.2", - "@polkadot/util-crypto": "^13.0.2", + "@polkadot/util": "^13.1.1", + "@polkadot/util-crypto": "^13.1.1", "@wormhole-foundation/sdk-connect": "^0.10.7", "@wormhole-foundation/sdk-evm": "^0.10.7", "@wormhole-foundation/sdk-evm-tokenbridge": "^0.10.7" @@ -49,20 +49,20 @@ "devDependencies": { "@biomejs/biome": "^1.9.1", "@changesets/changelog-github": "^0.5.0", - "@changesets/cli": "^2.27.8", + "@changesets/cli": "^2.27.9", "@slack/webhook": "^7.0.3", "@types/big.js": "^6.2.2", - "bun": "^1.1.27", + "bun": "^1.1.31", "cspell": "^8.14.2", "dotenv": "^16.4.5", "glob": "^11.0.0", "lefthook": "^1.7.15", "prettier": "^3.3.3", "syncpack": "^13.0.0", - "tsup": "^8.2.4", - "turbo": "^2.1.2", - "typescript": "^5.6.2", + "tsup": "^8.3.0", + "turbo": "^2.1.3", + "typescript": "^5.6.3", "viem": "^2.21.7", - "vitest": "^2.1.1" + "vitest": "^2.1.3" } } diff --git a/packages/builder/CHANGELOG.md b/packages/builder/CHANGELOG.md index db2ead6e..bbbe3026 100644 --- a/packages/builder/CHANGELOG.md +++ b/packages/builder/CHANGELOG.md @@ -1,5 +1,25 @@ # @moonbeam-network/xcm-builder +## 2.5.4 + +### Patch Changes + +- [#379](https://github.com/moonbeam-foundation/xcm-sdk/pull/379) [`a724e92`](https://github.com/moonbeam-foundation/xcm-sdk/commit/a724e92f4f7488ced6c4050cea2ad0e98731a5c2) Thanks [@Rihyx](https://github.com/Rihyx)! - fix vulnerability + +- Updated dependencies [[`a724e92`](https://github.com/moonbeam-foundation/xcm-sdk/commit/a724e92f4f7488ced6c4050cea2ad0e98731a5c2)]: + - @moonbeam-network/xcm-types@2.5.2 + - @moonbeam-network/xcm-utils@2.2.2 + +## 2.5.3 + +### Patch Changes + +- [#373](https://github.com/moonbeam-foundation/xcm-sdk/pull/373) [`10755b4`](https://github.com/moonbeam-foundation/xcm-sdk/commit/10755b4164ab7de94578732b4f92d70f8478c1ed) Thanks [@Rihyx](https://github.com/Rihyx)! - update minor and patch dependencies + +- Updated dependencies [[`10755b4`](https://github.com/moonbeam-foundation/xcm-sdk/commit/10755b4164ab7de94578732b4f92d70f8478c1ed)]: + - @moonbeam-network/xcm-types@2.5.1 + - @moonbeam-network/xcm-utils@2.2.1 + ## 2.5.2 ### Patch Changes diff --git a/packages/builder/package.json b/packages/builder/package.json index 14ba345c..7ca6dce9 100644 --- a/packages/builder/package.json +++ b/packages/builder/package.json @@ -1,6 +1,6 @@ { "name": "@moonbeam-network/xcm-builder", - "version": "2.5.2", + "version": "2.5.4", "description": "Moonbeam XCM builder", "scripts": { "build": "tsup", @@ -37,8 +37,8 @@ "@polkadot/api": "^12.4.2", "@polkadot/api-augment": "^12.4.2", "@polkadot/types": "^12.4.2", - "@polkadot/util": "^13.0.2", - "@polkadot/util-crypto": "^13.0.2", + "@polkadot/util": "^13.1.1", + "@polkadot/util-crypto": "^13.1.1", "@wormhole-foundation/sdk-connect": "^0.8.2", "@wormhole-foundation/sdk-evm": "^0.8.2", "viem": "^2.20.0" diff --git a/packages/config/CHANGELOG.md b/packages/config/CHANGELOG.md index c27d14c8..0ccfbe2f 100644 --- a/packages/config/CHANGELOG.md +++ b/packages/config/CHANGELOG.md @@ -1,5 +1,31 @@ # @moonbeam-network/xcm-config +## 2.7.4 + +### Patch Changes + +- [#379](https://github.com/moonbeam-foundation/xcm-sdk/pull/379) [`a724e92`](https://github.com/moonbeam-foundation/xcm-sdk/commit/a724e92f4f7488ced6c4050cea2ad0e98731a5c2) Thanks [@Rihyx](https://github.com/Rihyx)! - fix vulnerability + +- Updated dependencies [[`a724e92`](https://github.com/moonbeam-foundation/xcm-sdk/commit/a724e92f4f7488ced6c4050cea2ad0e98731a5c2)]: + - @moonbeam-network/xcm-builder@2.5.4 + - @moonbeam-network/xcm-types@2.5.2 + +## 2.7.3 + +### Patch Changes + +- [#373](https://github.com/moonbeam-foundation/xcm-sdk/pull/373) [`10755b4`](https://github.com/moonbeam-foundation/xcm-sdk/commit/10755b4164ab7de94578732b4f92d70f8478c1ed) Thanks [@Rihyx](https://github.com/Rihyx)! - update minor and patch dependencies + +- Updated dependencies [[`10755b4`](https://github.com/moonbeam-foundation/xcm-sdk/commit/10755b4164ab7de94578732b4f92d70f8478c1ed)]: + - @moonbeam-network/xcm-builder@2.5.3 + - @moonbeam-network/xcm-types@2.5.1 + +## 2.7.2 + +### Patch Changes + +- [#376](https://github.com/moonbeam-foundation/xcm-sdk/pull/376) [`56e9b57`](https://github.com/moonbeam-foundation/xcm-sdk/commit/56e9b572b6a3070a3f871617c4bcc36abd2a3cdd) Thanks [@mmaurello](https://github.com/mmaurello)! - Enable DOT transfers between Polkadot Asset Hub and Moonbeam + ## 2.7.1 ### Patch Changes diff --git a/packages/config/package.json b/packages/config/package.json index 8d67c9e0..d0644a14 100644 --- a/packages/config/package.json +++ b/packages/config/package.json @@ -1,6 +1,6 @@ { "name": "@moonbeam-network/xcm-config", - "version": "2.7.1", + "version": "2.7.4", "description": "All necessary configuration to transfer assets from Moonbeam, Moonriver, Moonbase to other parachains and back", "scripts": { "build": "tsup", @@ -35,7 +35,7 @@ }, "peerDependencies": { "@polkadot/types": "^12.4.2", - "@polkadot/util": "^13.0.2", - "@polkadot/util-crypto": "^13.0.2" + "@polkadot/util": "^13.1.1", + "@polkadot/util-crypto": "^13.1.1" } } diff --git a/packages/config/src/xcm-configs/moonbeam.ts b/packages/config/src/xcm-configs/moonbeam.ts index 002af9df..c8240c88 100644 --- a/packages/config/src/xcm-configs/moonbeam.ts +++ b/packages/config/src/xcm-configs/moonbeam.ts @@ -370,7 +370,30 @@ export const moonbeamRoutes = new ChainRoutes({ chain: polkadot, balance: BalanceBuilder().substrate().system().account(), fee: { - amount: 0.052, + amount: 0.01, + asset: dot, + }, + }, + contract: ContractBuilder().Xtokens().transfer(), + }, + { + source: { + asset: dot, + balance: BalanceBuilder().substrate().assets().account(), + fee: { + asset: glmr, + balance: BalanceBuilder().substrate().system().account(), + }, + destinationFee: { + balance: BalanceBuilder().substrate().assets().account(), + }, + }, + destination: { + asset: dot, + chain: polkadotAssetHub, + balance: BalanceBuilder().substrate().system().account(), + fee: { + amount: 0.01, asset: dot, }, }, @@ -672,6 +695,9 @@ export const moonbeamRoutes = new ChainRoutes({ amount: 0.2, asset: usdt, balance: BalanceBuilder().substrate().assets().account(), + // TODO change when DOT pays for fees + // asset: dot, + // balance: BalanceBuilder().substrate().system().account(), }, }, contract: ContractBuilder().Xtokens().transferMultiCurrencies(), diff --git a/packages/config/src/xcm-configs/polkadotAssetHub.ts b/packages/config/src/xcm-configs/polkadotAssetHub.ts index 83da012f..b8208799 100644 --- a/packages/config/src/xcm-configs/polkadotAssetHub.ts +++ b/packages/config/src/xcm-configs/polkadotAssetHub.ts @@ -13,6 +13,32 @@ const extra = 0.036; export const polkadotAssetHubRoutes = new ChainRoutes({ chain: polkadotAssetHub, routes: [ + { + source: { + asset: dot, + balance: BalanceBuilder().substrate().system().account(), + fee: { + asset: dot, + balance: BalanceBuilder().substrate().system().account(), + extra, + }, + destinationFee: { + balance: BalanceBuilder().substrate().assets().account(), + }, + }, + destination: { + asset: dot, + chain: moonbeam, + balance: BalanceBuilder().substrate().assets().account(), + fee: { + amount: FeeBuilder() + .xcmPaymentApi() + .xcmPaymentFee({ isAssetReserveChain: false }), + asset: dot, + }, + }, + extrinsic: ExtrinsicBuilder().polkadotXcm().transferAssets().here(), + }, { source: { asset: usdt, diff --git a/packages/sdk/CHANGELOG.md b/packages/sdk/CHANGELOG.md index 69b16abd..9841d32f 100644 --- a/packages/sdk/CHANGELOG.md +++ b/packages/sdk/CHANGELOG.md @@ -1,5 +1,36 @@ # @moonbeam-network/xcm-sdk +## 2.7.4 + +### Patch Changes + +- [#379](https://github.com/moonbeam-foundation/xcm-sdk/pull/379) [`a724e92`](https://github.com/moonbeam-foundation/xcm-sdk/commit/a724e92f4f7488ced6c4050cea2ad0e98731a5c2) Thanks [@Rihyx](https://github.com/Rihyx)! - fix vulnerability + +- Updated dependencies [[`a724e92`](https://github.com/moonbeam-foundation/xcm-sdk/commit/a724e92f4f7488ced6c4050cea2ad0e98731a5c2)]: + - @moonbeam-network/xcm-builder@2.5.4 + - @moonbeam-network/xcm-config@2.7.4 + - @moonbeam-network/xcm-types@2.5.2 + - @moonbeam-network/xcm-utils@2.2.2 + +## 2.7.3 + +### Patch Changes + +- [#373](https://github.com/moonbeam-foundation/xcm-sdk/pull/373) [`10755b4`](https://github.com/moonbeam-foundation/xcm-sdk/commit/10755b4164ab7de94578732b4f92d70f8478c1ed) Thanks [@Rihyx](https://github.com/Rihyx)! - update minor and patch dependencies + +- Updated dependencies [[`10755b4`](https://github.com/moonbeam-foundation/xcm-sdk/commit/10755b4164ab7de94578732b4f92d70f8478c1ed)]: + - @moonbeam-network/xcm-builder@2.5.3 + - @moonbeam-network/xcm-config@2.7.3 + - @moonbeam-network/xcm-types@2.5.1 + - @moonbeam-network/xcm-utils@2.2.1 + +## 2.7.2 + +### Patch Changes + +- Updated dependencies [[`56e9b57`](https://github.com/moonbeam-foundation/xcm-sdk/commit/56e9b572b6a3070a3f871617c4bcc36abd2a3cdd)]: + - @moonbeam-network/xcm-config@2.7.2 + ## 2.7.1 ### Patch Changes diff --git a/packages/sdk/package.json b/packages/sdk/package.json index cfc54326..8b7c1128 100644 --- a/packages/sdk/package.json +++ b/packages/sdk/package.json @@ -1,6 +1,6 @@ { "name": "@moonbeam-network/xcm-sdk", - "version": "2.7.1", + "version": "2.7.4", "description": "The Moonbeam XCM SDK enables developers to easily deposit and withdraw assets to Moonbeam/Moonriver from the relay chain and other parachains in the Polkadot/Kusama ecosystem", "scripts": { "build": "tsup", @@ -45,7 +45,7 @@ "@polkadot/api": "^12.4.2", "@polkadot/api-augment": "^12.4.2", "@polkadot/types": "^12.4.2", - "@polkadot/util": "^13.0.2", + "@polkadot/util": "^13.1.1", "viem": "^2.20.0" }, "devDependencies": { diff --git a/packages/types/CHANGELOG.md b/packages/types/CHANGELOG.md index b07f603b..53e84712 100644 --- a/packages/types/CHANGELOG.md +++ b/packages/types/CHANGELOG.md @@ -1,5 +1,23 @@ # @moonbeam-network/xcm-types +## 2.5.2 + +### Patch Changes + +- [#379](https://github.com/moonbeam-foundation/xcm-sdk/pull/379) [`a724e92`](https://github.com/moonbeam-foundation/xcm-sdk/commit/a724e92f4f7488ced6c4050cea2ad0e98731a5c2) Thanks [@Rihyx](https://github.com/Rihyx)! - fix vulnerability + +- Updated dependencies [[`a724e92`](https://github.com/moonbeam-foundation/xcm-sdk/commit/a724e92f4f7488ced6c4050cea2ad0e98731a5c2)]: + - @moonbeam-network/xcm-utils@2.2.2 + +## 2.5.1 + +### Patch Changes + +- [#373](https://github.com/moonbeam-foundation/xcm-sdk/pull/373) [`10755b4`](https://github.com/moonbeam-foundation/xcm-sdk/commit/10755b4164ab7de94578732b4f92d70f8478c1ed) Thanks [@Rihyx](https://github.com/Rihyx)! - update minor and patch dependencies + +- Updated dependencies [[`10755b4`](https://github.com/moonbeam-foundation/xcm-sdk/commit/10755b4164ab7de94578732b4f92d70f8478c1ed)]: + - @moonbeam-network/xcm-utils@2.2.1 + ## 2.5.0 ### Minor Changes diff --git a/packages/types/package.json b/packages/types/package.json index 0988a403..0d25a527 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -1,6 +1,6 @@ { "name": "@moonbeam-network/xcm-types", - "version": "2.5.0", + "version": "2.5.2", "description": "Moonbeam XCM Types", "scripts": { "build": "tsup", diff --git a/packages/utils/CHANGELOG.md b/packages/utils/CHANGELOG.md index 602bb966..6b3ba5d2 100644 --- a/packages/utils/CHANGELOG.md +++ b/packages/utils/CHANGELOG.md @@ -1,5 +1,17 @@ # @moonbeam-network/xcm-utils +## 2.2.2 + +### Patch Changes + +- [#379](https://github.com/moonbeam-foundation/xcm-sdk/pull/379) [`a724e92`](https://github.com/moonbeam-foundation/xcm-sdk/commit/a724e92f4f7488ced6c4050cea2ad0e98731a5c2) Thanks [@Rihyx](https://github.com/Rihyx)! - fix vulnerability + +## 2.2.1 + +### Patch Changes + +- [#373](https://github.com/moonbeam-foundation/xcm-sdk/pull/373) [`10755b4`](https://github.com/moonbeam-foundation/xcm-sdk/commit/10755b4164ab7de94578732b4f92d70f8478c1ed) Thanks [@Rihyx](https://github.com/Rihyx)! - update minor and patch dependencies + ## 2.2.0 ### Minor Changes diff --git a/packages/utils/package.json b/packages/utils/package.json index 1e955efa..cc239eab 100644 --- a/packages/utils/package.json +++ b/packages/utils/package.json @@ -1,6 +1,6 @@ { "name": "@moonbeam-network/xcm-utils", - "version": "2.2.0", + "version": "2.2.2", "description": "Moonbeam XCM utilities", "scripts": { "build": "tsup", @@ -38,7 +38,7 @@ "peerDependencies": { "@polkadot/api": "^12.4.2", "@polkadot/apps-config": "^0.143.2", - "@polkadot/util": "^13.0.2", + "@polkadot/util": "^13.1.1", "@polkadot/util-crypto": "^13.0.2" } }