Skip to content

Commit

Permalink
LDOT from Acala integration with Moonbeam
Browse files Browse the repository at this point in the history
  • Loading branch information
mmaurello committed Nov 23, 2023
1 parent f192c3b commit be8f13a
Show file tree
Hide file tree
Showing 4 changed files with 50 additions and 1 deletion.
6 changes: 6 additions & 0 deletions packages/config/src/assets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,11 @@ export const ksm = new Asset({
originSymbol: 'KSM',
});

export const ldot = new Asset({
key: 'ldot',
originSymbol: 'LDOT',
});

export const lit = new Asset({
key: 'lit',
originSymbol: 'LIT',
Expand Down Expand Up @@ -322,6 +327,7 @@ export const assetsList: Asset[] = [
kint,
kma,
ksm,
ldot,
lit,
mgx,
movr,
Expand Down
11 changes: 11 additions & 0 deletions packages/config/src/chains.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ import {
kint,
kma,
ksm,
ldot,
lit,
mgx,
movr,
Expand Down Expand Up @@ -84,6 +85,12 @@ export const acala = new Parachain({
metadataId: { ForeignAssetId: 0 },
minId: { ForeignAssetId: 0 },
},
{
asset: ldot,
id: { Token: ldot.originSymbol },
metadataId: { NativeAssetId: { Token: ldot.originSymbol } },
minId: { NativeAssetId: { Token: ldot.originSymbol } },
},
],
ecosystem: Ecosystem.Polkadot,
genesisHash:
Expand Down Expand Up @@ -840,6 +847,10 @@ export const moonbeam = new EvmParachain({
asset: intr,
id: '101170542313601871197860408087030232491',
},
{
asset: ldot,
id: '225719522181998468294117309041779353812',
},
{
asset: nodl,
id: '309163521958167876851250718453738106865',
Expand Down
18 changes: 17 additions & 1 deletion packages/config/src/configs/acala.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {
ExtrinsicBuilder,
FeeBuilder,
} from '@moonbeam-network/xcm-builder';
import { aca, aseed, glmr } from '../assets';
import { aca, aseed, glmr, ldot } from '../assets';
import { acala, moonbeam } from '../chains';
import { AssetConfig } from '../types/AssetConfig';
import { ChainConfig } from '../types/ChainConfig';
Expand Down Expand Up @@ -54,6 +54,22 @@ export const acalaConfig = new ChainConfig({
},
min: AssetMinBuilder().assetRegistry().assetMetadatas(),
}),
new AssetConfig({
asset: ldot,
balance: BalanceBuilder().substrate().tokens().accounts(),
destination: moonbeam,
destinationFee: {
amount: 0.005,
asset: ldot,
balance: BalanceBuilder().substrate().tokens().accounts(),
},
extrinsic: ExtrinsicBuilder().xTokens().transfer(),
fee: {
asset: aca,
balance: BalanceBuilder().substrate().system().account(),
},
min: AssetMinBuilder().assetRegistry().assetMetadatas(),
}),
],
chain: acala,
});
16 changes: 16 additions & 0 deletions packages/config/src/configs/moonbeam.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import {
hdx,
ibtc,
intr,
ldot,
nodl,
otp,
para,
Expand Down Expand Up @@ -291,6 +292,21 @@ export const moonbeamConfig = new ChainConfig({
balance: BalanceBuilder().substrate().system().account(),
},
}),
new AssetConfig({
asset: ldot,
balance: BalanceBuilder().substrate().assets().account(),
contract: ContractBuilder().Xtokens().transfer(),
destination: acala,
destinationFee: {
amount: 0.001,
asset: ldot,
balance: BalanceBuilder().substrate().assets().account(),
},
fee: {
asset: glmr,
balance: BalanceBuilder().substrate().system().account(),
},
}),
new AssetConfig({
asset: nodl,
balance: BalanceBuilder().substrate().assets().account(),
Expand Down

0 comments on commit be8f13a

Please sign in to comment.