From 7337008cd15ed93c32bbe5c8da2429d69664e866 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 2 Nov 2023 11:46:15 +0100 Subject: [PATCH 1/3] Version Packages (#156) Co-authored-by: github-actions[bot] --- .changeset/slimy-lies-exercise.md | 6 ------ examples/sdk-simple/package.json | 4 ++-- package-lock.json | 10 +++++----- packages/config/CHANGELOG.md | 6 ++++++ packages/config/package.json | 2 +- packages/sdk/CHANGELOG.md | 9 +++++++++ packages/sdk/package.json | 4 ++-- 7 files changed, 25 insertions(+), 16 deletions(-) delete mode 100644 .changeset/slimy-lies-exercise.md diff --git a/.changeset/slimy-lies-exercise.md b/.changeset/slimy-lies-exercise.md deleted file mode 100644 index db9cb136..00000000 --- a/.changeset/slimy-lies-exercise.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -'@moonbeam-network/xcm-config': patch -'@moonbeam-network/xcm-sdk': patch ---- - -USDT Wormhole integration diff --git a/examples/sdk-simple/package.json b/examples/sdk-simple/package.json index b926851a..c2038f47 100644 --- a/examples/sdk-simple/package.json +++ b/examples/sdk-simple/package.json @@ -12,8 +12,8 @@ "author": "", "license": "MIT", "dependencies": { - "@moonbeam-network/xcm-config": "1.3.8", - "@moonbeam-network/xcm-sdk": "1.4.3", + "@moonbeam-network/xcm-config": "1.3.9", + "@moonbeam-network/xcm-sdk": "1.4.4", "@moonbeam-network/xcm-utils": "1.0.3" }, "devDependencies": { diff --git a/package-lock.json b/package-lock.json index f7501718..1c66ca1a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -49,8 +49,8 @@ "version": "1.0.0", "license": "MIT", "dependencies": { - "@moonbeam-network/xcm-config": "1.3.8", - "@moonbeam-network/xcm-sdk": "1.4.3", + "@moonbeam-network/xcm-config": "1.3.9", + "@moonbeam-network/xcm-sdk": "1.4.4", "@moonbeam-network/xcm-utils": "1.0.3" }, "devDependencies": { @@ -16951,7 +16951,7 @@ }, "packages/config": { "name": "@moonbeam-network/xcm-config", - "version": "1.3.8", + "version": "1.3.9", "license": "MIT", "dependencies": { "@moonbeam-network/xcm-builder": "1.0.8", @@ -16965,11 +16965,11 @@ }, "packages/sdk": { "name": "@moonbeam-network/xcm-sdk", - "version": "1.4.3", + "version": "1.4.4", "license": "MIT", "dependencies": { "@moonbeam-network/xcm-builder": "1.0.8", - "@moonbeam-network/xcm-config": "1.3.8", + "@moonbeam-network/xcm-config": "1.3.9", "@moonbeam-network/xcm-types": "1.0.1", "@moonbeam-network/xcm-utils": "1.0.3", "big.js": "^6.2.1" diff --git a/packages/config/CHANGELOG.md b/packages/config/CHANGELOG.md index 1e7fb408..8d165e67 100644 --- a/packages/config/CHANGELOG.md +++ b/packages/config/CHANGELOG.md @@ -1,5 +1,11 @@ # @moonbeam-network/xcm-config +## 1.3.9 + +### Patch Changes + +- [#155](https://github.com/PureStake/xcm-sdk/pull/155) [`a6f48df`](https://github.com/PureStake/xcm-sdk/commit/a6f48df94bd662c120676c8d72a697ef59181220) Thanks [@mmaurello](https://github.com/mmaurello)! - USDT Wormhole integration + ## 1.3.8 ### Patch Changes diff --git a/packages/config/package.json b/packages/config/package.json index afd290f1..715fb1c3 100644 --- a/packages/config/package.json +++ b/packages/config/package.json @@ -1,6 +1,6 @@ { "name": "@moonbeam-network/xcm-config", - "version": "1.3.8", + "version": "1.3.9", "description": "All necessary configuration to transfer assets from Moonbeam, Moonriver, Moonbase to other parachains and back", "scripts": { "build": "tsup", diff --git a/packages/sdk/CHANGELOG.md b/packages/sdk/CHANGELOG.md index 4d0e1741..e3a35f58 100644 --- a/packages/sdk/CHANGELOG.md +++ b/packages/sdk/CHANGELOG.md @@ -1,5 +1,14 @@ # @moonbeam-network/xcm-sdk +## 1.4.4 + +### Patch Changes + +- [#155](https://github.com/PureStake/xcm-sdk/pull/155) [`a6f48df`](https://github.com/PureStake/xcm-sdk/commit/a6f48df94bd662c120676c8d72a697ef59181220) Thanks [@mmaurello](https://github.com/mmaurello)! - USDT Wormhole integration + +- Updated dependencies [[`a6f48df`](https://github.com/PureStake/xcm-sdk/commit/a6f48df94bd662c120676c8d72a697ef59181220)]: + - @moonbeam-network/xcm-config@1.3.9 + ## 1.4.3 ### Patch Changes diff --git a/packages/sdk/package.json b/packages/sdk/package.json index ede9928f..b935cecb 100644 --- a/packages/sdk/package.json +++ b/packages/sdk/package.json @@ -1,6 +1,6 @@ { "name": "@moonbeam-network/xcm-sdk", - "version": "1.4.3", + "version": "1.4.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", @@ -48,7 +48,7 @@ "main": "./build/index.cjs", "dependencies": { "@moonbeam-network/xcm-builder": "1.0.8", - "@moonbeam-network/xcm-config": "1.3.8", + "@moonbeam-network/xcm-config": "1.3.9", "@moonbeam-network/xcm-types": "1.0.1", "@moonbeam-network/xcm-utils": "1.0.3", "big.js": "^6.2.1" From 7103bb0cacf9e448968cd9aafd0e512b82fa348b Mon Sep 17 00:00:00 2001 From: mmaurello <93129175+mmaurello@users.noreply.github.com> Date: Thu, 2 Nov 2023 15:21:52 +0100 Subject: [PATCH 2/3] revert change for getting decimals in destination fees, due to an error (#157) * revert change for getting decimals in destination fees, due to an error * add changeset --- .changeset/quiet-hotels-exist.md | 6 ++++++ packages/config/src/chains.ts | 2 +- packages/config/src/configs/bifrostPolkadot.ts | 8 ++++---- .../sdk/src/getTransferData/getDestinationData.ts | 11 ++--------- 4 files changed, 13 insertions(+), 14 deletions(-) create mode 100644 .changeset/quiet-hotels-exist.md diff --git a/.changeset/quiet-hotels-exist.md b/.changeset/quiet-hotels-exist.md new file mode 100644 index 00000000..c7bde967 --- /dev/null +++ b/.changeset/quiet-hotels-exist.md @@ -0,0 +1,6 @@ +--- +'@moonbeam-network/xcm-config': patch +'@moonbeam-network/xcm-sdk': patch +--- + +Revert decimals change in destination fee diff --git a/packages/config/src/chains.ts b/packages/config/src/chains.ts index 9384ed9a..b60b4192 100644 --- a/packages/config/src/chains.ts +++ b/packages/config/src/chains.ts @@ -182,7 +182,7 @@ export const bifrostKusama = new Parachain({ name: 'Bifrost', parachainId: 2001, ss58Format: 6, - ws: 'wss://bifrost-rpc.liebi.com/ws', + ws: 'wss://us.bifrost-rpc.liebi.com/ws', }); export const bifrostPolkadot = new Parachain({ diff --git a/packages/config/src/configs/bifrostPolkadot.ts b/packages/config/src/configs/bifrostPolkadot.ts index f6d24020..f7542e73 100644 --- a/packages/config/src/configs/bifrostPolkadot.ts +++ b/packages/config/src/configs/bifrostPolkadot.ts @@ -59,11 +59,11 @@ export const bifrostPolkadotConfig = new ChainConfig({ balance: BalanceBuilder().substrate().tokens().accounts(), destination: moonbeam, destinationFee: { - amount: 0.01, - asset: vdot, - balance: BalanceBuilder().substrate().tokens().accounts(), + amount: 0.2, + asset: bnc, + balance: BalanceBuilder().substrate().system().account(), }, - extrinsic: ExtrinsicBuilder().xTokens().transfer(), + extrinsic: ExtrinsicBuilder().xTokens().transferMultiCurrencies(), fee: { asset: bnc, balance: BalanceBuilder().substrate().system().account(), diff --git a/packages/sdk/src/getTransferData/getDestinationData.ts b/packages/sdk/src/getTransferData/getDestinationData.ts index ed56e1cc..d6e51256 100644 --- a/packages/sdk/src/getTransferData/getDestinationData.ts +++ b/packages/sdk/src/getTransferData/getDestinationData.ts @@ -71,19 +71,12 @@ export interface GetFeeParams { } export async function getFee({ - address, config, - evmSigner, polkadot, }: GetFeeParams): Promise { const { amount, asset } = config.source.config.destinationFee; - const decimals = await getDecimals({ - address, - asset, - config: config.destination.config, - evmSigner, - polkadot, - }); + // TODO we have to consider correctly here when an asset is ERC20 to get it from contract + const decimals = await polkadot.getAssetDecimals(asset); const zeroAmount = AssetAmount.fromAsset(asset, { amount: 0n, decimals, From 345680e6c6318a2bbb46ff3c83d2b70458624ab7 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 2 Nov 2023 15:24:27 +0100 Subject: [PATCH 3/3] Version Packages (#158) Co-authored-by: github-actions[bot] --- .changeset/quiet-hotels-exist.md | 6 ------ examples/sdk-simple/package.json | 4 ++-- package-lock.json | 10 +++++----- packages/config/CHANGELOG.md | 6 ++++++ packages/config/package.json | 2 +- packages/sdk/CHANGELOG.md | 9 +++++++++ packages/sdk/package.json | 4 ++-- 7 files changed, 25 insertions(+), 16 deletions(-) delete mode 100644 .changeset/quiet-hotels-exist.md diff --git a/.changeset/quiet-hotels-exist.md b/.changeset/quiet-hotels-exist.md deleted file mode 100644 index c7bde967..00000000 --- a/.changeset/quiet-hotels-exist.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -'@moonbeam-network/xcm-config': patch -'@moonbeam-network/xcm-sdk': patch ---- - -Revert decimals change in destination fee diff --git a/examples/sdk-simple/package.json b/examples/sdk-simple/package.json index c2038f47..030ada05 100644 --- a/examples/sdk-simple/package.json +++ b/examples/sdk-simple/package.json @@ -12,8 +12,8 @@ "author": "", "license": "MIT", "dependencies": { - "@moonbeam-network/xcm-config": "1.3.9", - "@moonbeam-network/xcm-sdk": "1.4.4", + "@moonbeam-network/xcm-config": "1.3.10", + "@moonbeam-network/xcm-sdk": "1.4.5", "@moonbeam-network/xcm-utils": "1.0.3" }, "devDependencies": { diff --git a/package-lock.json b/package-lock.json index 1c66ca1a..cb617bbf 100644 --- a/package-lock.json +++ b/package-lock.json @@ -49,8 +49,8 @@ "version": "1.0.0", "license": "MIT", "dependencies": { - "@moonbeam-network/xcm-config": "1.3.9", - "@moonbeam-network/xcm-sdk": "1.4.4", + "@moonbeam-network/xcm-config": "1.3.10", + "@moonbeam-network/xcm-sdk": "1.4.5", "@moonbeam-network/xcm-utils": "1.0.3" }, "devDependencies": { @@ -16951,7 +16951,7 @@ }, "packages/config": { "name": "@moonbeam-network/xcm-config", - "version": "1.3.9", + "version": "1.3.10", "license": "MIT", "dependencies": { "@moonbeam-network/xcm-builder": "1.0.8", @@ -16965,11 +16965,11 @@ }, "packages/sdk": { "name": "@moonbeam-network/xcm-sdk", - "version": "1.4.4", + "version": "1.4.5", "license": "MIT", "dependencies": { "@moonbeam-network/xcm-builder": "1.0.8", - "@moonbeam-network/xcm-config": "1.3.9", + "@moonbeam-network/xcm-config": "1.3.10", "@moonbeam-network/xcm-types": "1.0.1", "@moonbeam-network/xcm-utils": "1.0.3", "big.js": "^6.2.1" diff --git a/packages/config/CHANGELOG.md b/packages/config/CHANGELOG.md index 8d165e67..11aa1e6b 100644 --- a/packages/config/CHANGELOG.md +++ b/packages/config/CHANGELOG.md @@ -1,5 +1,11 @@ # @moonbeam-network/xcm-config +## 1.3.10 + +### Patch Changes + +- [#157](https://github.com/PureStake/xcm-sdk/pull/157) [`7103bb0`](https://github.com/PureStake/xcm-sdk/commit/7103bb0cacf9e448968cd9aafd0e512b82fa348b) Thanks [@mmaurello](https://github.com/mmaurello)! - Revert decimals change in destination fee + ## 1.3.9 ### Patch Changes diff --git a/packages/config/package.json b/packages/config/package.json index 715fb1c3..06463345 100644 --- a/packages/config/package.json +++ b/packages/config/package.json @@ -1,6 +1,6 @@ { "name": "@moonbeam-network/xcm-config", - "version": "1.3.9", + "version": "1.3.10", "description": "All necessary configuration to transfer assets from Moonbeam, Moonriver, Moonbase to other parachains and back", "scripts": { "build": "tsup", diff --git a/packages/sdk/CHANGELOG.md b/packages/sdk/CHANGELOG.md index e3a35f58..fc45c2bb 100644 --- a/packages/sdk/CHANGELOG.md +++ b/packages/sdk/CHANGELOG.md @@ -1,5 +1,14 @@ # @moonbeam-network/xcm-sdk +## 1.4.5 + +### Patch Changes + +- [#157](https://github.com/PureStake/xcm-sdk/pull/157) [`7103bb0`](https://github.com/PureStake/xcm-sdk/commit/7103bb0cacf9e448968cd9aafd0e512b82fa348b) Thanks [@mmaurello](https://github.com/mmaurello)! - Revert decimals change in destination fee + +- Updated dependencies [[`7103bb0`](https://github.com/PureStake/xcm-sdk/commit/7103bb0cacf9e448968cd9aafd0e512b82fa348b)]: + - @moonbeam-network/xcm-config@1.3.10 + ## 1.4.4 ### Patch Changes diff --git a/packages/sdk/package.json b/packages/sdk/package.json index b935cecb..801899f4 100644 --- a/packages/sdk/package.json +++ b/packages/sdk/package.json @@ -1,6 +1,6 @@ { "name": "@moonbeam-network/xcm-sdk", - "version": "1.4.4", + "version": "1.4.5", "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", @@ -48,7 +48,7 @@ "main": "./build/index.cjs", "dependencies": { "@moonbeam-network/xcm-builder": "1.0.8", - "@moonbeam-network/xcm-config": "1.3.9", + "@moonbeam-network/xcm-config": "1.3.10", "@moonbeam-network/xcm-types": "1.0.1", "@moonbeam-network/xcm-utils": "1.0.3", "big.js": "^6.2.1"