Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add encointer xcm config for KSM teleport #40

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions packages/xcm-cfg/src/chains.ts
Original file line number Diff line number Diff line change
Expand Up @@ -677,6 +677,23 @@ export const basilisk = new Parachain({
ws: 'wss://rpc.basilisk.cloud',
});

export const encointer = new Parachain({
assetsData: [
{
asset: ksm,
decimals: 12,
},
],
ecosystem: Ecosystem.Kusama,
genesisHash:
'0x7dd99936c1e9e6d1ce7d90eb6f33bea8393b4bf87677d675aa63c9cb3e8c5b5b',
key: 'encointer',
name: 'Encointer',
parachainId: 1001,
ss58Format: 2,
ws: 'wss://kusama.api.encointer.org',
});

export const karura = new Parachain({
assetsData: [
{
Expand Down Expand Up @@ -798,6 +815,7 @@ export const tinkernet = new Parachain({

const kusamaChains: AnyChain[] = [
basilisk,
encointer,
integritee,
karura,
kusama,
Expand Down
37 changes: 37 additions & 0 deletions packages/xcm-cfg/src/configs/kusama/encointer.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
import {
BalanceBuilder,
} from '@moonbeam-network/xcm-builder';
import { AssetConfig, ChainConfig } from '@moonbeam-network/xcm-config';

import { ksm } from '../../assets';
import { encointer, kusama} from '../../chains';
import { ExtrinsicBuilderV2 } from '../../builders';

const xcmDeliveryFeeAmount = 0.0015;

const toKusama: AssetConfig[] = [
new AssetConfig({
asset: ksm,
balance: BalanceBuilder().substrate().system().account(),
destination: kusama,
destinationFee: {
amount: 0.000090049287,
asset: ksm,
balance: BalanceBuilder().substrate().system().account(),
},
extrinsic: ExtrinsicBuilderV2()
.polkadotXcm()
.limitedTeleportAssets(1)
.here(),
fee: {
asset: ksm,
balance: BalanceBuilder().substrate().system().account(),
xcmDeliveryFeeAmount,
},
}),
];

export const encointerConfig = new ChainConfig({
assets: [...toKusama],
chain: encointer,
});
2 changes: 2 additions & 0 deletions packages/xcm-cfg/src/configs/kusama/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { ChainConfig } from '@moonbeam-network/xcm-config';

import { assetHubConfig } from './assethub';
import { basiliskConfig } from './basilisk';
import { encointerConfig } from './encointer';
import { integriteeConfig } from './integritee';
import { karuraConfig } from './karura';
import { kusamaConfig } from './kusama';
Expand All @@ -11,6 +12,7 @@ import { robonomicsConfig } from './robonomics';
export const kusamaChainsConfig: ChainConfig[] = [
assetHubConfig,
basiliskConfig,
encointerConfig,
integriteeConfig,
karuraConfig,
kusamaConfig,
Expand Down