chore: let the tier-1 harness send a configurable amount

`QUANTUS_AMOUNT`, in plancks. The hardcoded 0.001 HEI was right for proving a
transfer lands and useless for funding an account to sign *from*: one ML-DSA
extrinsic costs about 0.01 HEI in fees, so an account funded with the default
could not pay for its own first transaction.

Needed for the manual verification pass, which has to fund a fresh account
created in the extension — the only funded dev account (crystal_alice) is
ML-DSA-87, and the import-seed screen always imports as ML-DSA-65, so the
funded account cannot be brought in through the UI at all.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012uDUodEcRbBwNRi3UCmw8f
This commit is contained in:
2026-09-16 11:47:24 +03:00
parent bfd3aa80ba
commit f61cfd4ed5

View File

@@ -42,7 +42,11 @@ console.log(`genesis ${genesisHash}`);
console.log(`extrinsic v${runtime.extrinsicVersion}`);
const dest = process.env.QUANTUS_DEST || 'qzkYEQv8tQsmniZYdame3Cku18RL5g9bGK9Pdydq5TMPdpE3y'; // crystal_bob
const amount = 1_000_000_000n; // 0.001
// In plancks: 12 decimal places, so 1_000_000_000_000 is 1 HEI. The default is
// deliberately tiny for the happy-path proof; funding an account you intend to
// sign from needs far more, since one ML-DSA extrinsic costs about 0.01 HEI in
// fees alone.
const amount = BigInt(process.env.QUANTUS_AMOUNT || '1000000000'); // default 0.001
const nonce = await nextNonce(chain, pair.address);
const before = await freeBalance(chain, dest);