Skip to content

Commit a75b9db

Browse files
authored
Merge pull request #572 from bvotteler/chore-bump-parachain-client-versions
Chore: bump parachain and client versions
2 parents 416222c + 196d092 commit a75b9db

4 files changed

Lines changed: 65 additions & 59 deletions

File tree

scripts/docker-setup.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ if ! [ -d "local-setup" ]
2323
then
2424
mkdir local-setup
2525
git clone https://github.com/interlay/parachain-launch/
26-
cd parachain-launch && git checkout 1.1.0-p1.21.3-c1.19.1 && yarn install
26+
cd parachain-launch && git checkout 1.1.0-p1.21.10-c1.19.7 && yarn install
2727
yarn start generate --config=configs/kintsugi.yml --servicesPath=configs/kintsugi-services.yml --yes --output=local-setup-kint
2828
mv local-setup-kint ../local-setup/kint
2929
yarn start generate --config=configs/interlay.yml --servicesPath=configs/interlay-services.yml --yes --output=local-setup-intr

scripts/xcm-cross-chain-transfer.ts

Lines changed: 38 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,9 @@
11
/* eslint @typescript-eslint/no-var-requires: "off" */
22
import { createSubstrateAPI } from "../src/factory";
33
import { ApiPromise, Keyring } from "@polkadot/api";
4-
import {
5-
DefaultTransactionAPI,
6-
} from "../src/parachain";
4+
import { DefaultTransactionAPI } from "../src/parachain";
75
import { cryptoWaitReady } from "@polkadot/util-crypto";
86
import { XcmVersionedMultiLocation } from "@polkadot/types/lookup";
9-
import { XcmV1MultiLocation } from "@polkadot/types/lookup";
10-
117

128
// const PARACHAIN_ENDPOINT = "wss://api-dev-moonbeam.interlay.io/parachain";
139
const PARACHAIN_ENDPOINT = "ws://127.0.0.1:9988";
@@ -19,28 +15,36 @@ main().catch((err) => {
1915
});
2016

2117
function construct_kint_transfer(api: ApiPromise, dest: XcmVersionedMultiLocation) {
22-
const kint = api.createType("InterbtcPrimitivesCurrencyId", {
18+
const kint = api.createType("InterbtcPrimitivesCurrencyId", {
2319
token: api.createType("InterbtcPrimitivesTokenSymbol", {
2420
kint: true,
25-
})
21+
}),
2622
});
2723

28-
return api.tx.xTokens.transfer(kint, 100000000000, dest, 400000000000)
24+
return api.tx.xTokens.transfer(kint, 100000000000, dest, "Unlimited");
2925
}
3026

3127
function construct_kbtc_transfer(api: ApiPromise, dest: XcmVersionedMultiLocation) {
32-
const kint = api.createType("InterbtcPrimitivesCurrencyId", {
28+
const kint = api.createType("InterbtcPrimitivesCurrencyId", {
3329
token: api.createType("InterbtcPrimitivesTokenSymbol", {
3430
kint: true,
35-
})
31+
}),
3632
});
37-
const kbtc = api.createType("InterbtcPrimitivesCurrencyId", {
33+
const kbtc = api.createType("InterbtcPrimitivesCurrencyId", {
3834
token: api.createType("InterbtcPrimitivesTokenSymbol", {
3935
kbtc: true,
40-
})
36+
}),
4137
});
42-
43-
return api.tx.xTokens.transferMulticurrencies([[kint, 100000000000], [kbtc, 100000]], 1, dest, 400000000000)
38+
39+
return api.tx.xTokens.transferMulticurrencies(
40+
[
41+
[kint, 100000000000],
42+
[kbtc, 100000],
43+
],
44+
1,
45+
dest,
46+
"Unlimited"
47+
);
4448
}
4549

4650
function construct_dest_rococo(api: ApiPromise) {
@@ -49,16 +53,18 @@ function construct_dest_rococo(api: ApiPromise) {
4953
parents: 1,
5054
interior: api.createType("XcmV1MultilocationJunctions", {
5155
x2: [
52-
api.createType("XcmV1Junction", {
53-
parachain: 3000
54-
}), api.createType("XcmV1Junction", {
56+
api.createType("XcmV1Junction", {
57+
parachain: 3000,
58+
}),
59+
api.createType("XcmV1Junction", {
5560
accountId32: {
5661
network: api.createType("XcmV0JunctionNetworkId", { any: true }),
57-
id: "0xd43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d" // alice
58-
}
59-
})]
60-
})
61-
})
62+
id: "0xd43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d", // alice
63+
},
64+
}),
65+
],
66+
}),
67+
}),
6268
});
6369
}
6470

@@ -68,16 +74,18 @@ function construct_dest_moonbase_alpha(api: ApiPromise) {
6874
parents: 1,
6975
interior: api.createType("XcmV1MultilocationJunctions", {
7076
x2: [
71-
api.createType("XcmV1Junction", {
72-
parachain: 1000
73-
}), api.createType("XcmV1Junction", {
77+
api.createType("XcmV1Junction", {
78+
parachain: 1000,
79+
}),
80+
api.createType("XcmV1Junction", {
7481
accountKey20: {
7582
network: api.createType("XcmV0JunctionNetworkId", { any: true }),
76-
key: "0x09Af4E864b84706fbCFE8679BF696e8c0B472201"
77-
}
78-
})]
79-
})
80-
})
83+
key: "0x09Af4E864b84706fbCFE8679BF696e8c0B472201",
84+
},
85+
}),
86+
],
87+
}),
88+
}),
8189
});
8290
}
8391

@@ -96,7 +104,6 @@ async function main(): Promise<void> {
96104
// send kbtc but use kint to pay for xcm fee on target chain
97105
const xcmKbtcTransferTx = construct_kbtc_transfer(api, dest_rococo);
98106

99-
100107
const transactionAPI = new DefaultTransactionAPI(api, userKeyring);
101108
console.log("broadcasting...");
102109
await transactionAPI.sendLogged(xcmKintTransferTx, undefined);

scripts/xcm-return-unknown-tokens.ts

Lines changed: 25 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,11 @@
11
/* eslint @typescript-eslint/no-var-requires: "off" */
22
import { createSubstrateAPI } from "../src/factory";
33
import { Keyring } from "@polkadot/api";
4-
import {
5-
DefaultTransactionAPI,
6-
} from "../src/parachain";
4+
import { DefaultTransactionAPI } from "../src/parachain";
75
import { cryptoWaitReady } from "@polkadot/util-crypto";
86
import { XcmVersionedMultiLocation } from "@polkadot/types/lookup";
97
import { XcmV1MultiLocation } from "@polkadot/types/lookup";
108

11-
129
const PARACHAIN_ENDPOINT = "ws://127.0.0.1:9999";
1310
const ACCOUNT_URI = "//Alice";
1411

@@ -34,47 +31,49 @@ async function main(): Promise<void> {
3431
interior: api.createType("XcmV1MultilocationJunctions", {
3532
x2: [
3633
api.createType("XcmV1Junction", {
37-
parachain: 2000
38-
}), api.createType("XcmV1Junction", {
39-
generalKey: [0, 12] // kint
40-
})]
41-
})
42-
})
34+
parachain: 2000,
35+
}),
36+
api.createType("XcmV1Junction", {
37+
generalKey: [0, 12], // kint
38+
}),
39+
],
40+
}),
41+
}),
4342
}),
4443
fun: api.createType("XcmV1MultiassetFungibility", {
45-
fungible: 10000000000
46-
})
47-
})
48-
}
49-
);
44+
fungible: 10000000000,
45+
}),
46+
}),
47+
});
5048

5149
const dest = api.createType<XcmVersionedMultiLocation>("XcmVersionedMultiLocation", {
5250
v1: api.createType("XcmV1MultiLocation", {
5351
parents: 1,
5452
interior: api.createType("XcmV1MultilocationJunctions", {
5553
x2: [
5654
api.createType("XcmV1Junction", {
57-
parachain: 2000
58-
}), api.createType("XcmV1Junction", {
55+
parachain: 2000,
56+
}),
57+
api.createType("XcmV1Junction", {
5958
accountId32: {
6059
network: api.createType("XcmV0JunctionNetworkId", { any: true }),
61-
id: "0x8eaf04151687736326c9fea17e25fc5287613693c912909cb226aa4794f26a48" // bob
62-
}
63-
})]
64-
})
65-
})
60+
id: "0x8eaf04151687736326c9fea17e25fc5287613693c912909cb226aa4794f26a48", // bob
61+
},
62+
}),
63+
],
64+
}),
65+
}),
6666
});
6767

68-
6968
const sibling = api.createType<XcmV1MultiLocation>("XcmV1MultiLocation", {
7069
parents: 1,
7170
interior: api.createType("XcmV1MultilocationJunctions", {
72-
x1: api.createType("XcmV1Junction", { parachain: 2000 })
73-
})
71+
x1: api.createType("XcmV1Junction", { parachain: 2000 }),
72+
}),
7473
});
7574

7675
const setupTx = api.tx.sudo.sudo(api.tx.polkadotXcm.forceXcmVersion(sibling, 2));
77-
const xcmTx = api.tx.xTokens.transferMultiasset(asset, dest, 1000000001);
76+
const xcmTx = api.tx.xTokens.transferMultiasset(asset, dest, "Unlimited");
7877

7978
console.log("Constructed the tx, broadcasting first...");
8079
await transactionAPI.sendLogged(setupTx, undefined);

src/json/parachain.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)