Skip to content

Commit

Permalink
Merge branch 'main' into mjm/zeitgeist-moonbeam
Browse files Browse the repository at this point in the history
  • Loading branch information
mmaurello authored Nov 6, 2023
2 parents 8c3b434 + 345680e commit 8779701
Show file tree
Hide file tree
Showing 10 changed files with 47 additions and 30 deletions.
6 changes: 0 additions & 6 deletions .changeset/slimy-lies-exercise.md

This file was deleted.

4 changes: 2 additions & 2 deletions examples/sdk-simple/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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.10",
"@moonbeam-network/xcm-sdk": "1.4.5",
"@moonbeam-network/xcm-utils": "1.0.3"
},
"devDependencies": {
Expand Down
10 changes: 5 additions & 5 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions packages/config/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
# @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

- [#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
Expand Down
2 changes: 1 addition & 1 deletion packages/config/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@moonbeam-network/xcm-config",
"version": "1.3.8",
"version": "1.3.10",
"description": "All necessary configuration to transfer assets from Moonbeam, Moonriver, Moonbase to other parachains and back",
"scripts": {
"build": "tsup",
Expand Down
2 changes: 1 addition & 1 deletion packages/config/src/chains.ts
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,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({
Expand Down
8 changes: 4 additions & 4 deletions packages/config/src/configs/bifrostPolkadot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand Down
18 changes: 18 additions & 0 deletions packages/sdk/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,23 @@
# @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

- [#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
Expand Down
4 changes: 2 additions & 2 deletions packages/sdk/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@moonbeam-network/xcm-sdk",
"version": "1.4.3",
"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",
Expand Down Expand Up @@ -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.10",
"@moonbeam-network/xcm-types": "1.0.1",
"@moonbeam-network/xcm-utils": "1.0.3",
"big.js": "^6.2.1"
Expand Down
11 changes: 2 additions & 9 deletions packages/sdk/src/getTransferData/getDestinationData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,19 +71,12 @@ export interface GetFeeParams {
}

export async function getFee({
address,
config,
evmSigner,
polkadot,
}: GetFeeParams): Promise<AssetAmount> {
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,
Expand Down

0 comments on commit 8779701

Please sign in to comment.