Skip to content

Commit 0ca5002

Browse files
committed
Upgrade to stable2412-2
1 parent 0e41263 commit 0ca5002

File tree

99 files changed

+4202
-3108
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

99 files changed

+4202
-3108
lines changed

Cargo.lock

+3,115-1,873
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

+127-124
Large diffs are not rendered by default.

integration-tests/Cargo.toml

+8-5
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ sp-arithmetic.workspace = true
2929
frame-system.workspace = true
3030
frame-support.workspace = true
3131
pallet-balances.workspace = true
32-
sp-std.workspace = true
3332
sp-core.workspace = true
33+
sp-keyring.workspace = true
3434
sp-runtime.workspace = true
3535
sp-io.workspace = true
3636
pallet-dispenser.workspace = true
@@ -78,7 +78,7 @@ pallet-aura.workspace = true
7878
pallet-session.workspace = true
7979
pallet-proxy-bonding.workspace = true
8080
pallet-skip-feeless-payment.workspace = true
81-
xcm-fee-payment-runtime-api.workspace = true
81+
xcm-runtime-apis.workspace = true
8282
hex-literal.workspace = true
8383
hex.workspace = true
8484
assets-common.workspace = true
@@ -145,10 +145,11 @@ std = [
145145
"sp-core/std",
146146
"sp-io/std",
147147
"sp-runtime/std",
148-
"sp-std/std",
148+
"rococo-runtime-constants/std",
149+
"rococo-runtime/std",
149150
"xcm-builder/std",
150151
"xcm-executor/std",
151-
"xcm-fee-payment-runtime-api/std",
152+
"xcm-runtime-apis/std",
152153
"xcm/std",
153154
]
154155
development-settings = [ "polimec-runtime/development-settings" ]
@@ -190,5 +191,7 @@ runtime-benchmarks = [
190191
"sp-runtime/runtime-benchmarks",
191192
"xcm-builder/runtime-benchmarks",
192193
"xcm-executor/runtime-benchmarks",
193-
"xcm-fee-payment-runtime-api/runtime-benchmarks",
194+
"xcm-runtime-apis/runtime-benchmarks",
195+
"assets-common/runtime-benchmarks",
196+
"pallet-transaction-payment/runtime-benchmarks"
194197
]

integration-tests/chopsticks/.papi/descriptors/.gitignore

-3
This file was deleted.

integration-tests/chopsticks/src/managers/PolimecManager.ts

+20-10
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,16 @@
1-
import { type Accounts, Asset, AssetLocation, AssetSourceRelation, Chains } from '@/types';
2-
import { flatObject } from '@/utils.ts';
3-
import { polimec } from '@polkadot-api/descriptors';
4-
import { createClient } from 'polkadot-api';
5-
import { withPolkadotSdkCompat } from 'polkadot-api/polkadot-sdk-compat';
6-
import { getWsProvider } from 'polkadot-api/ws-provider/web';
7-
import { BaseChainManager } from './BaseManager';
1+
import {
2+
type Accounts,
3+
Asset,
4+
AssetLocation,
5+
AssetSourceRelation,
6+
Chains,
7+
} from "@/types";
8+
import { flatObject } from "@/utils.ts";
9+
import { polimec } from "@polkadot-api/descriptors";
10+
import { createClient } from "polkadot-api";
11+
import { withPolkadotSdkCompat } from "polkadot-api/polkadot-sdk-compat";
12+
import { getWsProvider } from "polkadot-api/ws-provider/web";
13+
import { BaseChainManager } from "./BaseManager";
814

915
export class PolimecManager extends BaseChainManager {
1016
private chain = Chains.Polimec;
@@ -36,7 +42,7 @@ export class PolimecManager extends BaseChainManager {
3642
}
3743

3844
getTreasuryAccount() {
39-
return '58kXueYKLr5b8yCeY3Gd1nLQX2zSJLXjfMzTAuksNq25CFEL' as Accounts;
45+
return "58kXueYKLr5b8yCeY3Gd1nLQX2zSJLXjfMzTAuksNq25CFEL" as Accounts;
4046
}
4147

4248
getAssetSourceRelation(asset: Asset): AssetSourceRelation {
@@ -59,8 +65,12 @@ export class PolimecManager extends BaseChainManager {
5965
const api = this.getApi(Chains.Polimec);
6066
const asset_source_relation = this.getAssetSourceRelation(asset);
6167
const asset_location = AssetLocation(asset, asset_source_relation).value;
62-
const account_balances_result = await api.apis.FungiblesApi.query_account_balances(account);
63-
if (account_balances_result.success === true && account_balances_result.value.type === 'V4') {
68+
const account_balances_result =
69+
await api.apis.FungiblesApi.query_account_balances(account);
70+
if (
71+
account_balances_result.success === true &&
72+
account_balances_result.value.type === "V4"
73+
) {
6474
const assets = account_balances_result.value.value;
6575
for (const asset of assets) {
6676
if (Bun.deepEquals(flatObject(asset.id), flatObject(asset_location))) {

integration-tests/chopsticks/src/setup.ts

+1
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@ export class ChainSetup {
100100
'wasm-override': POLIMEC_WASM,
101101
'import-storage': polimec_storage,
102102
'build-block-mode': BuildBlockMode.Instant,
103+
'runtime-log-level': 5,
103104
});
104105
}
105106

integration-tests/chopsticks/src/tests/polimec.test.ts

+43-15
Original file line numberDiff line numberDiff line change
@@ -19,34 +19,62 @@ describe('Polimec -> Hub Transfer Tests', () => {
1919
});
2020
afterAll(async () => await chainSetup.cleanup());
2121

22-
test(
23-
'Send USDC to Hub',
24-
() =>
25-
transferTest.testTransfer({
26-
account: Accounts.BOB,
27-
assets: [[Asset.USDC, TRANSFER_AMOUNTS.TOKENS, AssetSourceRelation.Sibling]],
28-
}),
29-
{ timeout: 25000 },
30-
);
22+
// test(
23+
// 'Send USDC to Hub',
24+
// () =>
25+
// transferTest.testTransfer({
26+
// account: Accounts.BOB,
27+
// assets: [[Asset.USDC, TRANSFER_AMOUNTS.TOKENS, AssetSourceRelation.Sibling]],
28+
// }),
29+
// { timeout: 25000 },
30+
// );
31+
//
32+
// test(
33+
// 'Send USDT to Hub',
34+
// () =>
35+
// transferTest.testTransfer({
36+
// account: Accounts.BOB,
37+
// assets: [[Asset.USDT, TRANSFER_AMOUNTS.TOKENS, AssetSourceRelation.Sibling]],
38+
// }),
39+
// { timeout: 25000 },
40+
// );
41+
42+
// test(
43+
// 'Send DOT to Hub',
44+
// () =>
45+
// transferTest.testTransfer({
46+
// account: Accounts.BOB,
47+
// assets: [[Asset.DOT, TRANSFER_AMOUNTS.NATIVE, AssetSourceRelation.Parent]],
48+
// }),
49+
// { timeout: 25000 },
50+
// );
3151

3252
test(
33-
'Send USDT to Hub',
53+
'Send PLMC to Hub',
3454
() =>
3555
transferTest.testTransfer({
3656
account: Accounts.BOB,
37-
assets: [[Asset.USDT, TRANSFER_AMOUNTS.TOKENS, AssetSourceRelation.Sibling]],
57+
assets: [
58+
[Asset.PLMC, TRANSFER_AMOUNTS.NATIVE, AssetSourceRelation.Self],
59+
[Asset.DOT, TRANSFER_AMOUNTS.NATIVE, AssetSourceRelation.Parent],
60+
],
61+
fee_asset_item: 1,
3862
}),
39-
{ timeout: 25000 },
63+
{ timeout: 25000000 },
4064
);
4165

4266
test(
43-
'Send DOT to Hub',
67+
'Send PLMC to Hub',
4468
() =>
4569
transferTest.testTransfer({
4670
account: Accounts.BOB,
47-
assets: [[Asset.DOT, TRANSFER_AMOUNTS.NATIVE, AssetSourceRelation.Parent]],
71+
assets: [
72+
[Asset.PLMC, TRANSFER_AMOUNTS.NATIVE, AssetSourceRelation.Self],
73+
[Asset.DOT, TRANSFER_AMOUNTS.NATIVE, AssetSourceRelation.Parent],
74+
],
75+
fee_asset_item: 1,
4876
}),
49-
{ timeout: 25000 },
77+
{ timeout: 25000000 },
5078
);
5179

5280
test(

integration-tests/chopsticks/src/transfers/BaseTransfer.ts

+1
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ export abstract class BaseTransferTest {
6464
protected async verifyExecution() {
6565
const events = await this.destManager.getMessageQueueEvents();
6666

67+
console.dir(events, { depth: null });
6768
expect(events).not.toBeEmpty();
6869
expect(events).toBeArray();
6970
expect(events).toHaveLength(1);

0 commit comments

Comments
 (0)