Skip to content

Commit

Permalink
Add USDC to zeitgeist
Browse files Browse the repository at this point in the history
  • Loading branch information
green-jay committed Jan 31, 2024
1 parent 4c647e4 commit 59c9af2
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 1 deletion.
10 changes: 10 additions & 0 deletions packages/xcm-cfg/src/chains.ts
Original file line number Diff line number Diff line change
Expand Up @@ -399,6 +399,16 @@ export const zeitgeist = new Parachain({
asset: ztg,
id: 'Ztg',
},
{
asset: usdc_mwh,
id: { ForeignAsset: 1 },
decimals: 6,
},
{
asset: glmr,
id: { ForeignAsset: 3 },
decimals: 18,
},
],
ecosystem: Ecosystem.Polkadot,
genesisHash:
Expand Down
15 changes: 15 additions & 0 deletions packages/xcm-cfg/src/configs/hydraDX.ts
Original file line number Diff line number Diff line change
Expand Up @@ -407,6 +407,21 @@ const toZeitgeist: AssetConfig[] = [
balance: BalanceBuilder().substrate().system().account(),
},
}),
new AssetConfig({
asset: usdc_mwh,
balance: BalanceBuilder().substrate().tokens().accounts(),
destination: zeitgeist,
destinationFee: {
amount: 0.1,
asset: glmr,
balance: BalanceBuilder().substrate().tokens().accounts(),
},
extrinsic: ExtrinsicBuilder().xTokens().transferMultiCurrencies(),
fee: {
asset: hdx,
balance: BalanceBuilder().substrate().system().account(),
},
}),
];

const toPhala: AssetConfig[] = [
Expand Down
17 changes: 16 additions & 1 deletion packages/xcm-cfg/src/configs/zeitgeist.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {
} from '@moonbeam-network/xcm-builder';
import { AssetConfig, ChainConfig } from '@moonbeam-network/xcm-config';

import { ztg } from '../assets';
import { usdc_mwh, ztg, glmr } from '../assets';
import { hydraDX, zeitgeist } from '../chains';

const toHydraDX: AssetConfig[] = [
Expand All @@ -19,6 +19,21 @@ const toHydraDX: AssetConfig[] = [
},
extrinsic: ExtrinsicBuilder().xTokens().transfer(),
}),
new AssetConfig({
asset: usdc_mwh,
balance: BalanceBuilder().substrate().tokens().accounts(),
destination: hydraDX,
destinationFee: {
amount: 0.1,
asset: glmr,
balance: BalanceBuilder().substrate().tokens().accounts(),
},
extrinsic: ExtrinsicBuilder().xTokens().transferMultiCurrencies(),
fee: {
asset: ztg,
balance: BalanceBuilder().substrate().system().account(),
},
}),
];

export const zeitgeistConfig = new ChainConfig({
Expand Down

0 comments on commit 59c9af2

Please sign in to comment.