Skip to content

Commit faa9b6b

Browse files
committed
Typescript Fmt
1 parent 21a5618 commit faa9b6b

File tree

73 files changed

+184
-70
lines changed

Some content is hidden

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

73 files changed

+184
-70
lines changed

test/helpers/block.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ import type { AccountId20, Block } from "@polkadot/types/interfaces/runtime/type
1717
import chalk from "chalk";
1818
import { Debugger } from "debug";
1919
import Debug from "debug";
20+
2021
const debug = Debug("test:blocks");
2122

2223
// Given a deposit amount, returns the amount burned (80%) and deposited to treasury (20%).

test/helpers/common.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ export function rateLimiter(options?: Bottleneck.ConstructorOptions) {
1313

1414
return new Bottleneck(settings);
1515
}
16+
1617
export async function checkTimeSliceForUpgrades(
1718
api: ApiPromise,
1819
blockNumbers: number[],

test/helpers/contracts.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ export interface HeavyContract {
66
account: string;
77
key: string;
88
}
9+
910
/**
1011
* @description Deploy multiple contracts to test the EVM storage limit.
1112
* @param context Context of the test

test/helpers/crowdloan.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ export async function calculate_vested_amount(
1515
const shouldHaveVested = initialPayment + amountForBlocks;
1616
return shouldHaveVested;
1717
}
18+
1819
// Return the unwrapped accountsPayable or null otherwise
1920
export const getAccountPayable = async (
2021
context: DevModeContext,

test/helpers/eth-transactions.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import {
99
EvmCoreErrorExitSucceed,
1010
} from "@polkadot/types/lookup";
1111
import { fromHex } from "viem";
12+
1213
export type Errors = {
1314
Succeed: EvmCoreErrorExitSucceed["type"];
1415
Error: EvmCoreErrorExitError["type"];

test/helpers/referenda.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import { DevModeContext } from "@moonwall/cli";
33
import { FrameSupportPreimagesBounded } from "@polkadot/types/lookup";
44
import chalk from "chalk";
55
import Debugger from "debug";
6+
67
const log = Debugger("test:referenda");
78

89
export interface ForceReducedReferendaExecutionOptions {

test/helpers/storageQueries.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { ApiPromise } from "@polkadot/api";
22
import Debugger from "debug";
33
import { rateLimiter } from "./common.js";
4+
45
const log = Debugger("test:storageQuery");
56

67
const startReport = (total: () => number) => {

test/scripts/modify-plain-specs.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import { hideBin } from "yargs/helpers";
44
import { ALITH_ADDRESS } from "@moonwall/util";
55
import { convertExponentials } from "@zombienet/utils";
66
import jsonBg from "json-bigint";
7+
78
const JSONbig = jsonBg({ useNativeBigInt: true });
89

910
yargs(hideBin(process.argv))

test/suites/chopsticks/sample/test-basic-actions.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,9 @@ describeSuite({
108108
// api.events.authorFilter.EligibleUpdated
109109
];
110110

111-
await api.tx.balances.transferAllowDeath(CHARLETH_ADDRESS, parseEther("3")).signAndSend(alith);
111+
await api.tx.balances
112+
.transferAllowDeath(CHARLETH_ADDRESS, parseEther("3"))
113+
.signAndSend(alith);
112114
await context.createBlock({ expectEvents, logger: log });
113115
},
114116
});

test/suites/dev/test-assets/test-assets-drain-both.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,9 @@ describeSuite({
7070
).to.eq(0n);
7171

7272
// We transfer a good amount to be able to pay for fees
73-
await context.createBlock(api.tx.balances.transferAllowDeath(freshAccount.address, 1n * GLMR));
73+
await context.createBlock(
74+
api.tx.balances.transferAllowDeath(freshAccount.address, 1n * GLMR)
75+
);
7476

7577
expect(
7678
(await api.query.system.account(freshAccount.address as string)).sufficients.toBigInt()

test/suites/dev/test-assets/test-destroy-foreign-asset.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import {
88
relayAssetMetadata,
99
verifyLatestBlockFees,
1010
} from "../../../helpers";
11+
1112
const palletId = "0x6D6f646c617373746d6E67720000000000000000";
1213

1314
describeSuite({

test/suites/dev/test-balance/test-balance-transferable.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -84,15 +84,15 @@ describeSuite({
8484
// TODO Change this check once the transferable balance is fixed
8585
// Check Ticket MOON-2598: https://opslayer.atlassian.net/browse/MOON-2598
8686
expect(
87-
async () =>
88-
await context.createBlock(
89-
context
90-
.polkadotJs()
91-
.tx.balances.transferAllowDeath(baltathar.address, 2n * GLMR)
92-
.signAsync(randomAccount)
93-
)
87+
async () =>
88+
await context.createBlock(
89+
context
90+
.polkadotJs()
91+
.tx.balances.transferAllowDeath(baltathar.address, 2n * GLMR)
92+
.signAsync(randomAccount)
93+
)
9494
).rejects.toThrowError(
95-
"1010: Invalid Transaction: Inability to pay some fees , e.g. account balance too low"
95+
"1010: Invalid Transaction: Inability to pay some fees , e.g. account balance too low"
9696
);
9797
}
9898
},

test/suites/dev/test-eth-pool/test-eth-pool-discard.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@ describeSuite({
1515

1616
const txString =
1717
"0xf9011b80843b9aca008252088080b8c960806040526000805534801561001457600080fd5b5060005b6064\
18-
81101561003557806000819055508080600101915050610018565b506085806100446000396000f3fe6080604\
19-
052348015600f57600080fd5b506004361060285760003560e01c80631572821714602d575b600080fd5b6033\
20-
6049565b6040518082815260200191505060405180910390f35b6000548156fea264697066735822122015105\
21-
f2e5f98d0c6e61fe09f704e2a86dd1cbf55424720229297a0fff65fe04064736f6c63430007000033820a26a0\
22-
8ac98ea04dec8017ebddd1e87cc108d1df1ef1bf69ba35606efad4df2dfdbae2a07ac9edffaa0fd7c91fa5688\
23-
b5e36a1944944bca22b8ff367e4094be21f7d85a3";
18+
81101561003557806000819055508080600101915050610018565b506085806100446000396000f3fe6080604\
19+
052348015600f57600080fd5b506004361060285760003560e01c80631572821714602d575b600080fd5b6033\
20+
6049565b6040518082815260200191505060405180910390f35b6000548156fea264697066735822122015105\
21+
f2e5f98d0c6e61fe09f704e2a86dd1cbf55424720229297a0fff65fe04064736f6c63430007000033820a26a0\
22+
8ac98ea04dec8017ebddd1e87cc108d1df1ef1bf69ba35606efad4df2dfdbae2a07ac9edffaa0fd7c91fa5688\
23+
b5e36a1944944bca22b8ff367e4094be21f7d85a3";
2424

2525
expect(
2626
async () => await customDevRpcRequest("eth_sendRawTransaction", [txString])

test/suites/dev/test-fees/test-fee-multiplier-xcm.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,9 @@ describeSuite({
4141

4242
await expectOk(
4343
context.createBlock(
44-
context.polkadotJs().tx.balances.transferAllowDeath(descendOriginAddress, transferredBalance * 100n)
44+
context
45+
.polkadotJs()
46+
.tx.balances.transferAllowDeath(descendOriginAddress, transferredBalance * 100n)
4547
)
4648
);
4749

test/suites/dev/test-polkadot-js/test-polkadot-api.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,9 @@ describeSuite({
7575
expect(message.toLocaleLowerCase()).to.eq(`randomness.setbaberandomnessresults()`);
7676
break;
7777
case 4:
78-
expect(message).to.eq(`balances.transferAllowDeath(${randomAddress}, 2000000000000000000)`);
78+
expect(message).to.eq(
79+
`balances.transferAllowDeath(${randomAddress}, 2000000000000000000)`
80+
);
7981
expect(ex.signer.toString()).to.eq(ALITH_ADDRESS);
8082
break;
8183
default:

test/suites/dev/test-pov/test-xcm-to-evm-pov.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,9 @@ describeSuite({
4646
// We first fund parachain 2000 sovreign account
4747
await expectOk(
4848
context.createBlock(
49-
context.polkadotJs().tx.balances.transferAllowDeath(descendOriginAddress, transferredBalance)
49+
context
50+
.polkadotJs()
51+
.tx.balances.transferAllowDeath(descendOriginAddress, transferredBalance)
5052
)
5153
);
5254
const balance = (

test/suites/dev/test-precompile/test-precompile-smart-contract-call4.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ describeSuite({
5858
id: "T01",
5959
title:
6060
"should revert when caller is a smart contract and real address is \
61-
smart contract",
61+
smart contract",
6262
test: async function () {
6363
const rawTxn = await context.writeContract!({
6464
contractAddress: testContractAddress,

test/suites/dev/test-precompile/test-precompile-wormhole.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -583,11 +583,13 @@ class VersionedUserAction extends Enum {
583583
super(registry, { V1: XcmRoutingUserAction, V2: XcmRoutingUserActionWithFee }, value);
584584
}
585585
}
586+
586587
class XcmRoutingUserAction extends Struct {
587588
constructor(value?: any) {
588589
super(registry, { destination: "VersionedMultiLocation" }, value);
589590
}
590591
}
592+
591593
class XcmRoutingUserActionWithFee extends Struct {
592594
constructor(value?: any) {
593595
super(registry, { destination: "VersionedMultiLocation", fee: "U256" }, value);

test/suites/dev/test-precompile/test-precompile-xcm-utils.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,9 @@ describeSuite({
162162
test: async function () {
163163
const random = generateKeyringPair();
164164

165-
const transferCall = context.polkadotJs().tx.balances.transferAllowDeath(random.address, 1n * GLMR);
165+
const transferCall = context
166+
.polkadotJs()
167+
.tx.balances.transferAllowDeath(random.address, 1n * GLMR);
166168
const transferCallEncoded = transferCall?.method.toHex();
167169

168170
const xcmMessage = {

test/suites/dev/test-proxy/test-proxy-identity.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,8 @@ describeSuite({
1313
beforeEach(async () => {
1414
signer = generateKeyringPair("ethereum");
1515

16-
await context.createBlock(
17-
);
18-
context.polkadotJs().tx.balances.transferAllowDeath(signer.address, 5n * GLMR)
16+
await context.createBlock();
17+
context.polkadotJs().tx.balances.transferAllowDeath(signer.address, 5n * GLMR);
1918

2019
const identityData = {
2120
display: { Raw: "foobar" },

test/suites/dev/test-staking/test-delegation-scheduled-requests10-bondless-collator.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ describeSuite({
77
id: "D2999",
88
title:
99
"Staking - Delegation Scheduled Requests with bondless collator \
10-
- execute bond less exact round",
10+
- execute bond less exact round",
1111
foundationMethods: "dev",
1212
testCases: ({ context, it, log }) => {
1313
const LESS_AMOUNT = 10n;

test/suites/dev/test-staking/test-delegation-scheduled-requests11-bondless-collator.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ describeSuite({
77
id: "D3000",
88
title:
99
"Staking - Delegation Scheduled Requests with bondless collator \
10-
- execute bond less after round delay",
10+
- execute bond less after round delay",
1111
foundationMethods: "dev",
1212
testCases: ({ context, it, log }) => {
1313
const LESS_AMOUNT = 10n;

test/suites/dev/test-staking/test-delegation-scheduled-requests4-bondless-collator.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ describeSuite({
77
id: "D2993",
88
title:
99
"Staking - Delegation Scheduled Requests with bondless collator \
10-
- execute revoke exact round delay",
10+
- execute revoke exact round delay",
1111
foundationMethods: "dev",
1212
testCases: ({ context, it, log }) => {
1313
let psTx: any;

test/suites/dev/test-staking/test-delegation-scheduled-requests5-bondless-collator.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ describeSuite({
77
id: "D2994",
88
title:
99
"Staking - Delegation Scheduled Requests with bondless collator \
10-
- execute revoke after round delay",
10+
- execute revoke after round delay",
1111
foundationMethods: "dev",
1212
testCases: ({ context, it, log }) => {
1313
let psTx: any;

test/suites/dev/test-staking/test-delegation-scheduled-requests6-bondless-collator.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ describeSuite({
77
id: "D2995",
88
title:
99
"Staking - Delegation Scheduled Requests with bondless collator \
10-
- execute revoke on last delegation",
10+
- execute revoke on last delegation",
1111
foundationMethods: "dev",
1212
testCases: ({ context, it, log }) => {
1313
let psTx: any;

test/suites/dev/test-staking/test-staking-locks.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,9 @@ describeSuite({
1212

1313
beforeAll(async function () {
1414
await context.createBlock(
15-
context.polkadotJs().tx.balances.transferAllowDeath(randomAccount.address, MIN_GLMR_DELEGATOR + GLMR),
15+
context
16+
.polkadotJs()
17+
.tx.balances.transferAllowDeath(randomAccount.address, MIN_GLMR_DELEGATOR + GLMR),
1618
{ allowFailures: false }
1719
);
1820
});

test/suites/dev/test-staking/test-staking-locks10.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,10 @@ describeSuite({
2222
[
2323
context
2424
.polkadotJs()
25-
.tx.balances.transferAllowDeath(randomAccount.address, MIN_GLMR_STAKING * 2n + 1n * GLMR),
25+
.tx.balances.transferAllowDeath(
26+
randomAccount.address,
27+
MIN_GLMR_STAKING * 2n + 1n * GLMR
28+
),
2629
context
2730
.polkadotJs()
2831
.tx.parachainStaking.joinCandidates(MIN_GLMR_STAKING, 1)

test/suites/dev/test-staking/test-staking-locks3.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,9 @@ describeSuite({
1111

1212
beforeAll(async function () {
1313
await context.createBlock(
14-
context.polkadotJs().tx.balances.transferAllowDeath(randomAccount.address, MIN_GLMR_DELEGATOR + GLMR),
14+
context
15+
.polkadotJs()
16+
.tx.balances.transferAllowDeath(randomAccount.address, MIN_GLMR_DELEGATOR + GLMR),
1517
{ allowFailures: false }
1618
);
1719

test/suites/dev/test-staking/test-staking-locks4.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,9 @@ describeSuite({
1111

1212
beforeAll(async function () {
1313
await context.createBlock(
14-
context.polkadotJs().tx.balances.transferAllowDeath(randomAccount.address, MIN_GLMR_STAKING + GLMR),
14+
context
15+
.polkadotJs()
16+
.tx.balances.transferAllowDeath(randomAccount.address, MIN_GLMR_STAKING + GLMR),
1517
{ allowFailures: false }
1618
);
1719

test/suites/dev/test-staking/test-staking-locks5.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,9 @@ describeSuite({
1818

1919
beforeAll(async function () {
2020
await context.createBlock(
21-
context.polkadotJs().tx.balances.transferAllowDeath(randomAccount.address, MIN_GLMR_DELEGATOR + GLMR),
21+
context
22+
.polkadotJs()
23+
.tx.balances.transferAllowDeath(randomAccount.address, MIN_GLMR_DELEGATOR + GLMR),
2224
{ allowFailures: false }
2325
);
2426

test/suites/dev/test-staking/test-staking-locks6.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,9 @@ describeSuite({
1212

1313
beforeAll(async function () {
1414
await context.createBlock(
15-
context.polkadotJs().tx.balances.transferAllowDeath(randomAccount.address, MIN_GLMR_DELEGATOR + GLMR),
15+
context
16+
.polkadotJs()
17+
.tx.balances.transferAllowDeath(randomAccount.address, MIN_GLMR_DELEGATOR + GLMR),
1618
{ allowFailures: false }
1719
);
1820

test/suites/dev/test-staking/test-staking-locks8.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,9 @@ describeSuite({
2020
beforeAll(async function () {
2121
await context.createBlock(
2222
[
23-
context.polkadotJs().tx.balances.transferAllowDeath(randomAccount.address, 2n * MIN_GLMR_STAKING),
23+
context
24+
.polkadotJs()
25+
.tx.balances.transferAllowDeath(randomAccount.address, 2n * MIN_GLMR_STAKING),
2426
context
2527
.polkadotJs()
2628
.tx.parachainStaking.joinCandidates(MIN_GLMR_STAKING, 1)

test/suites/dev/test-txpool/test-txpool-fairness.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,9 @@ describeSuite({
8888
const TIP_PER_GAS_3 = 40000n;
8989

9090
// here we query the weight of a substrate balance transfer
91-
const dummyTransfer = context.polkadotJs().tx.balances.transferAllowDeath(alith.address, GLMR);
91+
const dummyTransfer = context
92+
.polkadotJs()
93+
.tx.balances.transferAllowDeath(alith.address, GLMR);
9294
const info = await context
9395
.polkadotJs()
9496
.call.transactionPaymentApi.queryInfo(dummyTransfer.toHex(), dummyTransfer.encodedLength);

test/suites/dev/test-xcm-v2/test-mock-hrmp-transact-1.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,9 @@ describeSuite({
2727
transferredBalance = 10_000_000_000_000_000_000n;
2828

2929
await context.createBlock(
30-
context.polkadotJs().tx.balances.transferAllowDeath(descendOriginAddress, transferredBalance),
30+
context
31+
.polkadotJs()
32+
.tx.balances.transferAllowDeath(descendOriginAddress, transferredBalance),
3133
{ allowFailures: false }
3234
);
3335

test/suites/dev/test-xcm-v2/test-mock-hrmp-transact-2.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,9 @@ describeSuite({
2727
transferredBalance = 10_000_000_000_000_000_000n;
2828

2929
await context.createBlock(
30-
context.polkadotJs().tx.balances.transferAllowDeath(descendOriginAddress, transferredBalance),
30+
context
31+
.polkadotJs()
32+
.tx.balances.transferAllowDeath(descendOriginAddress, transferredBalance),
3133
{ allowFailures: false }
3234
);
3335

test/suites/dev/test-xcm-v2/test-mock-hrmp-transact-3.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,9 @@ describeSuite({
2727
transferredBalance = 10_000_000_000_000_000_000n;
2828

2929
await context.createBlock(
30-
context.polkadotJs().tx.balances.transferAllowDeath(descendOriginAddress, transferredBalance),
30+
context
31+
.polkadotJs()
32+
.tx.balances.transferAllowDeath(descendOriginAddress, transferredBalance),
3133
{ allowFailures: false }
3234
);
3335

test/suites/dev/test-xcm-v2/test-mock-hrmp-transact-4.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,9 @@ describeSuite({
2727
transferredBalance = 10_000_000_000_000_000_000n;
2828

2929
await context.createBlock(
30-
context.polkadotJs().tx.balances.transferAllowDeath(descendOriginAddress, transferredBalance),
30+
context
31+
.polkadotJs()
32+
.tx.balances.transferAllowDeath(descendOriginAddress, transferredBalance),
3133
{ allowFailures: false }
3234
);
3335

0 commit comments

Comments
 (0)