Skip to content

Commit

Permalink
merge with main and solve conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
mmaurello committed Apr 15, 2024
2 parents 3dd7af2 + ff22ecc commit 5499219
Show file tree
Hide file tree
Showing 18 changed files with 196 additions and 45 deletions.
9 changes: 0 additions & 9 deletions .changeset/weak-rings-pump.md

This file was deleted.

6 changes: 3 additions & 3 deletions examples/sdk-simple/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
"author": "",
"license": "MIT",
"dependencies": {
"@moonbeam-network/xcm-config": "2.0.7",
"@moonbeam-network/xcm-sdk": "2.0.9",
"@moonbeam-network/xcm-utils": "2.0.3"
"@moonbeam-network/xcm-config": "2.0.8",
"@moonbeam-network/xcm-sdk": "2.0.10",
"@moonbeam-network/xcm-utils": "2.0.4"
},
"devDependencies": {
"bun": "^1.0.21"
Expand Down
34 changes: 17 additions & 17 deletions package-lock.json

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

10 changes: 10 additions & 0 deletions packages/builder/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# @moonbeam-network/xcm-builder

## 2.0.4

### Patch Changes

- [#230](https://github.com/moonbeam-foundation/xcm-sdk/pull/230) [`ee5cd03dff5fef8f580800b91f9cd2aa66b793ed`](https://github.com/moonbeam-foundation/xcm-sdk/commit/ee5cd03dff5fef8f580800b91f9cd2aa66b793ed) Thanks [@dependabot](https://github.com/apps/dependabot)! - Update follow-redirects

- Updated dependencies [[`ee5cd03dff5fef8f580800b91f9cd2aa66b793ed`](https://github.com/moonbeam-foundation/xcm-sdk/commit/ee5cd03dff5fef8f580800b91f9cd2aa66b793ed)]:
- @moonbeam-network/xcm-types@2.0.4
- @moonbeam-network/xcm-utils@2.0.4

## 2.0.3

### Patch Changes
Expand Down
6 changes: 3 additions & 3 deletions packages/builder/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@moonbeam-network/xcm-builder",
"version": "2.0.3",
"version": "2.0.4",
"description": "Moonbeam XCM builder",
"scripts": {
"build": "tsup",
Expand Down Expand Up @@ -50,8 +50,8 @@
"types": "./build/index.d.ts",
"main": "./build/index.cjs",
"dependencies": {
"@moonbeam-network/xcm-types": "2.0.3",
"@moonbeam-network/xcm-utils": "2.0.3",
"@moonbeam-network/xcm-types": "2.0.4",
"@moonbeam-network/xcm-utils": "2.0.4",
"big.js": "^6.2.1"
},
"peerDependencies": {
Expand Down
14 changes: 14 additions & 0 deletions packages/config/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
# @moonbeam-network/xcm-config

## 2.0.8

### Patch Changes

- [#229](https://github.com/moonbeam-foundation/xcm-sdk/pull/229) [`9df6359a17b077a1ce18deb751ca7e83738f461c`](https://github.com/moonbeam-foundation/xcm-sdk/commit/9df6359a17b077a1ce18deb751ca7e83738f461c) Thanks [@awesomepan](https://github.com/awesomepan)! - BNCS integration with Moonbeam

- [#232](https://github.com/moonbeam-foundation/xcm-sdk/pull/232) [`ddd6079357896aeecc0fda6bc5ed7db41443077b`](https://github.com/moonbeam-foundation/xcm-sdk/commit/ddd6079357896aeecc0fda6bc5ed7db41443077b) Thanks [@mmaurello](https://github.com/mmaurello)! - DED integration between Polkadot AssetHub and Moonbeam

- [#230](https://github.com/moonbeam-foundation/xcm-sdk/pull/230) [`ee5cd03dff5fef8f580800b91f9cd2aa66b793ed`](https://github.com/moonbeam-foundation/xcm-sdk/commit/ee5cd03dff5fef8f580800b91f9cd2aa66b793ed) Thanks [@dependabot](https://github.com/apps/dependabot)! - Update follow-redirects

- Updated dependencies [[`ee5cd03dff5fef8f580800b91f9cd2aa66b793ed`](https://github.com/moonbeam-foundation/xcm-sdk/commit/ee5cd03dff5fef8f580800b91f9cd2aa66b793ed)]:
- @moonbeam-network/xcm-builder@2.0.4
- @moonbeam-network/xcm-types@2.0.4

## 2.0.7

### Patch Changes
Expand Down
6 changes: 3 additions & 3 deletions packages/config/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@moonbeam-network/xcm-config",
"version": "2.0.7",
"version": "2.0.8",
"description": "All necessary configuration to transfer assets from Moonbeam, Moonriver, Moonbase to other parachains and back",
"scripts": {
"build": "tsup",
Expand Down Expand Up @@ -50,8 +50,8 @@
"types": "./build/index.d.ts",
"main": "./build/index.cjs",
"dependencies": {
"@moonbeam-network/xcm-builder": "2.0.3",
"@moonbeam-network/xcm-types": "2.0.3"
"@moonbeam-network/xcm-builder": "2.0.4",
"@moonbeam-network/xcm-types": "2.0.4"
},
"peerDependencies": {
"@polkadot/types": "^10.10.1",
Expand Down
12 changes: 12 additions & 0 deletions packages/config/src/assets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,11 @@ export const bnc = new Asset({
originSymbol: 'BNC',
});

export const bncs = new Asset({
key: 'bncs',
originSymbol: 'BNCS',
});

export const cfg = new Asset({
key: 'cfg',
originSymbol: 'CFG',
Expand Down Expand Up @@ -85,6 +90,11 @@ export const dai = new Asset({
originSymbol: 'DAI',
});

export const ded = new Asset({
key: 'ded',
originSymbol: 'DED',
});

export const fil = new Asset({
key: 'fil',
originSymbol: 'FIL',
Expand Down Expand Up @@ -349,10 +359,12 @@ export const assetsList: Asset[] = [
atom,
auq,
bnc,
bncs,
cfg,
crab,
csm,
dai,
ded,
dev,
dot,
eq,
Expand Down
19 changes: 19 additions & 0 deletions packages/config/src/chains.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,12 @@ import {
auq,
betaDEV,
bnc,
bncs,
cfg,
crab,
csm,
dai,
ded,
dev,
dot,
eq,
Expand Down Expand Up @@ -210,6 +212,10 @@ export const bifrostPolkadot = new Parachain({
asset: bnc,
id: { Native: bnc.originSymbol },
},
{
asset: bncs,
id: { Token2: 9 },
},
{
asset: fil,
id: { Token2: 4 },
Expand Down Expand Up @@ -840,6 +846,10 @@ export const moonbeam = new EvmParachain({
asset: bnc,
id: '165823357460190568952172802245839421906',
},
{
asset: bncs,
id: '142155548796783636521833385094843759961',
},
{
asset: cfg,
id: '91372035960551235635465443179559840483',
Expand All @@ -849,6 +859,10 @@ export const moonbeam = new EvmParachain({
id: '0x06e605775296e851FF43b4dAa541Bb0984E9D6fD',
metadataId: 0, // no metadata for ERC20 tokens
},
{
asset: ded,
id: '124463719055550872076363892993240202694',
},
{
asset: dot,
id: '42259045809535163221576417993425387648',
Expand Down Expand Up @@ -1353,6 +1367,11 @@ export const polkadotAssetHub = new Parachain({
id: 1984,
palletInstance: 50,
},
{
asset: ded,
id: 30,
palletInstance: 50,
},
{
asset: dot,
// NOTE: no meta for native token
Expand Down
28 changes: 27 additions & 1 deletion packages/config/src/configs/bifrostPolkadot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,17 @@ import {
ExtrinsicBuilder,
FeeBuilder,
} from '@moonbeam-network/xcm-builder';
import { bnc, fil, glmr, vastr, vdot, vfil, vglmr, vmanta } from '../assets';
import {
bnc,
bncs,
fil,
glmr,
vastr,
vdot,
vfil,
vglmr,
vmanta,
} from '../assets';
import { bifrostPolkadot, moonbeam } from '../chains';
import { AssetConfig } from '../types/AssetConfig';
import { ChainConfig } from '../types/ChainConfig';
Expand Down Expand Up @@ -134,6 +144,22 @@ export const bifrostPolkadotConfig = new ChainConfig({
},
min: AssetMinBuilder().assetRegistry().currencyMetadatas(),
}),
new AssetConfig({
asset: bncs,
balance: BalanceBuilder().substrate().tokens().accounts(),
destination: moonbeam,
destinationFee: {
amount: 0.05,
asset: bnc,
balance: BalanceBuilder().substrate().system().account(),
},
extrinsic: ExtrinsicBuilder().xTokens().transferMultiCurrencies(),
fee: {
asset: bnc,
balance: BalanceBuilder().substrate().system().account(),
},
min: AssetMinBuilder().assetRegistry().currencyMetadatas(),
}),
],
chain: bifrostPolkadot,
});
32 changes: 32 additions & 0 deletions packages/config/src/configs/moonbeam.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@ import {
aseed,
astr,
bnc,
bncs,
cfg,
dai,
ded,
dot,
eq,
eqd,
Expand Down Expand Up @@ -499,6 +501,21 @@ export const moonbeamConfig = new ChainConfig({
balance: BalanceBuilder().substrate().system().account(),
},
}),
new AssetConfig({
asset: ded,
balance: BalanceBuilder().substrate().assets().account(),
contract: ContractBuilder().Xtokens().transferMultiCurrencies(),
destination: polkadotAssetHub,
destinationFee: {
amount: 0.2,
asset: usdt,
balance: BalanceBuilder().substrate().assets().account(),
},
fee: {
asset: glmr,
balance: BalanceBuilder().substrate().system().account(),
},
}),
new AssetConfig({
asset: hdx,
balance: BalanceBuilder().substrate().assets().account(),
Expand Down Expand Up @@ -724,6 +741,21 @@ export const moonbeamConfig = new ChainConfig({
balance: BalanceBuilder().substrate().system().account(),
},
}),
new AssetConfig({
asset: bncs,
balance: BalanceBuilder().substrate().assets().account(),
contract: ContractBuilder().Xtokens().transfer(),
destination: bifrostPolkadot,
destinationFee: {
amount: 0.0001,
asset: bncs,
balance: BalanceBuilder().substrate().assets().account(),
},
fee: {
asset: glmr,
balance: BalanceBuilder().substrate().system().account(),
},
}),
],
chain: moonbeam,
});
Loading

0 comments on commit 5499219

Please sign in to comment.