Skip to content

Commit

Permalink
-wip- USDC wormhole transfers in zeitgeist, incomplete due to error i…
Browse files Browse the repository at this point in the history
…n zeitgeist
  • Loading branch information
mmaurello committed Jan 4, 2024
1 parent c6af54c commit 6962bfc
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 1 deletion.
7 changes: 7 additions & 0 deletions packages/config/src/chains.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1432,6 +1432,13 @@ export const uniqueAlpha = new Parachain({
});

export const zeitgeist = new Parachain({
assetsData: [
{
asset: usdcwh,
decimals: 6,
id: { ForeignAsset: 1 },
},
],
ecosystem: Ecosystem.Polkadot,
genesisHash:
'0x1bf2a2ecb4a868de66ea8610f2ce7c8c43706561b6476031315f6640fe38e060',
Expand Down
15 changes: 15 additions & 0 deletions packages/config/src/configs/moonbeam.ts
Original file line number Diff line number Diff line change
Expand Up @@ -487,6 +487,21 @@ export const moonbeamConfig = new ChainConfig({
balance: BalanceBuilder().substrate().system().account(),
},
}),
new AssetConfig({
asset: usdcwh,
balance: BalanceBuilder().evm().erc20(),
contract: ContractBuilder().Xtokens().transfer(),
destination: zeitgeist,
destinationFee: {
amount: 0.001,
asset: usdcwh,
balance: BalanceBuilder().evm().erc20(),
},
fee: {
asset: glmr,
balance: BalanceBuilder().substrate().system().account(),
},
}),
new AssetConfig({
asset: usdtwh,
balance: BalanceBuilder().evm().erc20(),
Expand Down
13 changes: 12 additions & 1 deletion packages/config/src/configs/zeitgeist.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import {
ExtrinsicBuilder,
FeeBuilder,
} from '@moonbeam-network/xcm-builder';
import { ztg } from '../assets';
import { usdcwh, ztg } from '../assets';
import { moonbeam, zeitgeist } from '../chains';
import { AssetConfig } from '../types/AssetConfig';
import { ChainConfig } from '../types/ChainConfig';
Expand All @@ -21,6 +21,17 @@ export const zeitgeistConfig = new ChainConfig({
},
extrinsic: ExtrinsicBuilder().xTokens().transfer(),
}),
new AssetConfig({
asset: usdcwh,
balance: BalanceBuilder().substrate().tokens().accounts(),
destination: moonbeam,
destinationFee: {
amount: 0.04,
asset: ztg,
balance: BalanceBuilder().substrate().tokens().accounts(),
},
extrinsic: ExtrinsicBuilder().xTokens().transfer(),
}),
],
chain: zeitgeist,
});

0 comments on commit 6962bfc

Please sign in to comment.