Skip to content

Commit b591ef3

Browse files
fix(e2e,tools): use PAS instead of DOT in testnet token-amount strings (closes #96) (#101)
1 parent 4c33348 commit b591ef3

3 files changed

Lines changed: 19 additions & 14 deletions

File tree

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"playground-cli": patch
3+
---
4+
5+
E2E test setup and bootstrap-tool log strings now correctly use PAS (Paseo's native token symbol) instead of DOT. The numeric values are unchanged (1 PAS = 10^10 plancks); only the displayed unit symbol changes. Closes #96.

e2e/cli/setup/fund.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,26 +15,26 @@ import { checkBalance, ensureFunded } from "../../../src/utils/account/funding.j
1515
import { getTestClient } from "../helpers/chain.js";
1616
import { SIGNER } from "../fixtures/accounts.js";
1717

18-
const DOT = 10_000_000_000n;
18+
const PAS = 10_000_000_000n;
1919

2020
/** Top up the deployer if it falls below this. */
21-
export const MIN_BALANCE = 500n * DOT;
21+
export const MIN_BALANCE = 500n * PAS;
2222

2323
/** Amount to send when topping up. */
24-
export const TOP_UP_AMOUNT = 1000n * DOT;
24+
export const TOP_UP_AMOUNT = 1000n * PAS;
2525

2626
export async function fundDeployerIfLow(): Promise<void> {
2727
const client = await getTestClient();
2828
const before = await checkBalance(client, SIGNER.address, MIN_BALANCE);
2929
console.log(
30-
`[e2e setup] SIGNER (${SIGNER.name}) balance: ${before.free / DOT} DOT (${SIGNER.address})`,
30+
`[e2e setup] SIGNER (${SIGNER.name}) balance: ${before.free / PAS} PAS (${SIGNER.address})`,
3131
);
3232
if (before.sufficient) return;
3333

3434
console.log(
35-
`[e2e setup] balance below ${MIN_BALANCE / DOT} DOT — topping up by ${TOP_UP_AMOUNT / DOT} DOT…`,
35+
`[e2e setup] balance below ${MIN_BALANCE / PAS} PAS — topping up by ${TOP_UP_AMOUNT / PAS} PAS…`,
3636
);
3737
await ensureFunded(client, SIGNER.address, MIN_BALANCE, TOP_UP_AMOUNT);
3838
const after = await checkBalance(client, SIGNER.address, MIN_BALANCE);
39-
console.log(`[e2e setup] SIGNER topped up: ${after.free / DOT} DOT`);
39+
console.log(`[e2e setup] SIGNER topped up: ${after.free / PAS} PAS`);
4040
}

tools/register-e2e-fixtures.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,9 @@ const FIXTURES: readonly Fixture[] = [
7070
];
7171

7272
const DEFAULT_SURI = `${DEDICATED_E2E_DEPLOYER_MNEMONIC}//e2e-deployer`;
73-
const DOT = 10_000_000_000n;
74-
const TOPUP_TARGET = 500n * DOT;
75-
const TOPUP_AMOUNT = 1000n * DOT;
73+
const PAS = 10_000_000_000n;
74+
const TOPUP_TARGET = 500n * PAS;
75+
const TOPUP_AMOUNT = 1000n * PAS;
7676

7777
interface Args {
7878
onlyDomain: string | null;
@@ -107,12 +107,12 @@ function parseArgs(argv: string[]): Args {
107107

108108
async function topUpIfLow(client: Awaited<ReturnType<typeof getConnection>>, address: string): Promise<void> {
109109
const balance = await checkBalance(client, address, TOPUP_TARGET);
110-
console.log(`signer balance: ${balance.free / DOT} DOT`);
110+
console.log(`signer balance: ${balance.free / PAS} PAS`);
111111
if (!balance.sufficient) {
112-
console.log(`balance below ${TOPUP_TARGET / DOT} DOT — topping up by ${TOPUP_AMOUNT / DOT} DOT…`);
112+
console.log(`balance below ${TOPUP_TARGET / PAS} PAS — topping up by ${TOPUP_AMOUNT / PAS} PAS…`);
113113
await ensureFunded(client, address, TOPUP_TARGET, TOPUP_AMOUNT);
114114
const after = await checkBalance(client, address, MIN_BALANCE);
115-
console.log(`topped up: ${after.free / DOT} DOT`);
115+
console.log(`topped up: ${after.free / PAS} PAS`);
116116
}
117117
console.log();
118118
}
@@ -158,8 +158,8 @@ async function main(): Promise<number> {
158158

159159
try {
160160
const client = await getConnection();
161-
// Balance checked once; TOPUP_TARGET (500 DOT) gives ~1000× headroom
162-
// for the ~0.1 DOT/publish cost across all 5 fixtures.
161+
// Balance checked once; TOPUP_TARGET (500 PAS) gives ~1000× headroom
162+
// for the ~0.1 PAS/publish cost across all 5 fixtures.
163163
await topUpIfLow(client, signer.address);
164164
for (const fixture of targets) {
165165
await registerOne(fixture, signer);

0 commit comments

Comments
 (0)