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

Picasso Integration with Moonriver #168

Merged
merged 2 commits into from
Nov 15, 2023
Merged
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
6 changes: 6 additions & 0 deletions .changeset/slimy-eels-matter.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'@moonbeam-network/xcm-config': patch
'@moonbeam-network/xcm-sdk': patch
---

Picasso integration with Moonriver
29 changes: 28 additions & 1 deletion packages/config/src/chains.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ export const acala = new Parachain({
name: 'Acala',
parachainId: 2000,
ss58Format: 10,
ws: 'wss://acala-rpc-0.aca-api.network',
ws: 'wss://acala-rpc.aca-api.network',
});

export const alphanetAssetHub = new Parachain({
Expand Down Expand Up @@ -980,6 +980,10 @@ export const moonriver = new EvmParachain({
asset: pha,
id: '189307976387032586987344677431204943363',
},
{
asset: pica,
id: '167283995827706324502761431814209211090',
},
{
asset: rmrk,
id: '182365888117048807484804376330534607370',
Expand Down Expand Up @@ -1153,6 +1157,28 @@ export const phala = new Parachain({
ws: 'wss://api.phala.network/ws',
});

export const picasso = new Parachain({
assetsData: [
{
asset: pica,
id: 1,
},
{
asset: movr,
id: 23,
min: 0.0041,
},
],
ecosystem: Ecosystem.Kusama,
genesisHash:
'0x6811a339673c9daa897944dcdac99c6e2939cc88245ed21951a0a3c9a2be75bc',
key: 'picasso',
name: 'Picasso',
parachainId: 2087,
ss58Format: 49,
ws: 'wss://picasso-rpc.dwellir.com',
});

export const picassoAlphanet = new Parachain({
assetsData: [
{
Expand Down Expand Up @@ -1366,6 +1392,7 @@ export const chainsList: AnyChain[] = [
parallel,
parallelHeiko,
phala,
picasso,
picassoAlphanet,
polkadot,
robonomics,
Expand Down
2 changes: 2 additions & 0 deletions packages/config/src/configs/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ import { originTrailAlphanetConfig } from './originTrailAlphanet';
import { parallelConfig } from './parallel';
import { parallelHeikoConfig } from './parallelHeiko';
import { phalaConfig } from './phala';
import { picassoConfig } from './picasso';
import { picassoAlphanetConfig } from './picassoAlphanet';
import { polkadotConfig } from './polkadot';
import { polkadotAssetHubConfig } from './polkadotAssetHub';
Expand Down Expand Up @@ -79,6 +80,7 @@ export const chainsConfigList: ChainConfig[] = [
parallelConfig,
parallelHeikoConfig,
phalaConfig,
picassoConfig,
picassoAlphanetConfig,
polkadotConfig,
robonomicsConfig,
Expand Down
28 changes: 28 additions & 0 deletions packages/config/src/configs/moonriver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import {
mgx,
movr,
pha,
pica,
rmrk,
sdn,
teer,
Expand All @@ -39,6 +40,7 @@ import {
mangataKusama,
moonriver,
parallelHeiko,
picasso,
robonomics,
shiden,
turing,
Expand Down Expand Up @@ -147,6 +149,17 @@ export const moonriverConfig = new ChainConfig({
balance: BalanceBuilder().substrate().system().account(),
},
}),
new AssetConfig({
asset: movr,
balance: BalanceBuilder().substrate().system().account(),
contract: ContractBuilder().Xtokens().transfer(),
destination: picasso,
destinationFee: {
amount: 0.001,
asset: movr,
balance: BalanceBuilder().substrate().system().account(),
},
}),
new AssetConfig({
asset: aseed,
balance: BalanceBuilder().substrate().assets().account(),
Expand Down Expand Up @@ -342,6 +355,21 @@ export const moonriverConfig = new ChainConfig({
balance: BalanceBuilder().substrate().system().account(),
},
}),
new AssetConfig({
asset: pica,
balance: BalanceBuilder().substrate().assets().account(),
contract: ContractBuilder().Xtokens().transfer(),
destination: picasso,
destinationFee: {
amount: 0.001,
asset: pica,
balance: BalanceBuilder().substrate().assets().account(),
},
fee: {
asset: movr,
balance: BalanceBuilder().substrate().system().account(),
},
}),
new AssetConfig({
asset: rmrk,
balance: BalanceBuilder().substrate().assets().account(),
Expand Down
41 changes: 41 additions & 0 deletions packages/config/src/configs/picasso.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
import {
BalanceBuilder,
ExtrinsicBuilder,
FeeBuilder,
} from '@moonbeam-network/xcm-builder';
import { movr, pica } from '../assets';
import { moonriver, picasso } from '../chains';
import { AssetConfig } from '../types/AssetConfig';
import { ChainConfig } from '../types/ChainConfig';

export const picassoConfig = new ChainConfig({
assets: [
new AssetConfig({
asset: pica,
balance: BalanceBuilder().substrate().system().account(),
destination: moonriver,
destinationFee: {
amount: FeeBuilder().assetManager().assetTypeUnitsPerSecond(),
asset: pica,
balance: BalanceBuilder().substrate().system().account(),
},
extrinsic: ExtrinsicBuilder().xTokens().transfer(),
}),
new AssetConfig({
asset: movr,
balance: BalanceBuilder().substrate().tokens().accounts(),
destination: moonriver,
destinationFee: {
amount: 0.0001,
asset: movr,
balance: BalanceBuilder().substrate().tokens().accounts(),
},
extrinsic: ExtrinsicBuilder().xTokens().transfer(),
fee: {
asset: pica,
balance: BalanceBuilder().substrate().system().account(),
},
}),
],
chain: picasso,
});
Loading