Skip to content

Commit a2b6595

Browse files
lklimekclaude
andcommitted
fix(test): increase asset lock to 25M duffs, wallet funding to 30M
Token contract registration requires ~20B credits (base 10B + token 10B). At ~1000 credits/duff, need 25M duffs in asset lock. Wallet needs 30M to cover asset lock + transaction fees. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 66cf89c commit a2b6595

8 files changed

Lines changed: 15 additions & 13 deletions

File tree

tests/backend-e2e/dashpay_tasks.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -548,7 +548,7 @@ async fn tc_043_reject_contact_request() {
548548

549549
// Create a third DashPay identity (C) from a fresh funded wallet
550550
tracing::info!("TC-043: creating third DashPay identity (C)...");
551-
let (seed_hash_c, wallet_c) = ctx.create_funded_test_wallet(10_000_000).await;
551+
let (seed_hash_c, wallet_c) = ctx.create_funded_test_wallet(30_000_000).await;
552552
let (qi_c, _key_bytes_c) =
553553
dashpay_helpers::create_dashpay_identity(&ctx.app_context, &wallet_c, seed_hash_c).await;
554554

tests/backend-e2e/framework/fixtures.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ pub async fn shared_identity() -> &'static SharedIdentity {
5050
let ctx = harness::ctx().await;
5151

5252
tracing::info!("SharedIdentity: creating funded test wallet (10M duffs)...");
53-
let (seed_hash, wallet_arc) = ctx.create_funded_test_wallet(10_000_000).await;
53+
let (seed_hash, wallet_arc) = ctx.create_funded_test_wallet(30_000_000).await;
5454

5555
let (reg_info, master_key_bytes) =
5656
build_identity_registration(&ctx.app_context, &wallet_arc, seed_hash);
@@ -200,8 +200,8 @@ pub async fn shared_dashpay_pair() -> &'static SharedDashPayPair {
200200
tracing::info!(
201201
"SharedDashPayPair: creating two funded test wallets (10M duffs each)..."
202202
);
203-
let (seed_hash_a, wallet_a) = ctx.create_funded_test_wallet(10_000_000).await;
204-
let (seed_hash_b, wallet_b) = ctx.create_funded_test_wallet(10_000_000).await;
203+
let (seed_hash_a, wallet_a) = ctx.create_funded_test_wallet(30_000_000).await;
204+
let (seed_hash_b, wallet_b) = ctx.create_funded_test_wallet(30_000_000).await;
205205

206206
// Register identities with DashPay keys
207207
tracing::info!("SharedDashPayPair: registering identity A...");

tests/backend-e2e/framework/identity_helpers.rs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -74,10 +74,12 @@ pub fn build_identity_registration(
7474
wallet: wallet_arc.clone(),
7575
wallet_identity_index: identity_index,
7676
identity_funding_method: RegisterIdentityFundingMethod::FundWithWallet(
77-
// Asset lock amount in duffs. Converted to Platform credits at ~1000:1 ratio
78-
// (1 duff ≈ 1000 credits). 5M duffs ≈ 50B credits — enough for identity
79-
// registration (~241M credits) + token contract registration (~40B credits).
80-
5_000_000,
77+
// Asset lock amount in duffs. Platform credits ≈ duffs × 1000 minus fees.
78+
// 25M duffs → ~25B credits after fees.
79+
// Token contract registration: ~20B credits (base 10B + token 10B).
80+
// Identity registration: ~241M credits.
81+
// Remaining: ~5B for subsequent operations (top-up, transfer, etc.).
82+
25_000_000,
8183
identity_index,
8284
),
8385
};

tests/backend-e2e/identity_create.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ async fn test_create_identity() {
1414
let ctx = ctx().await;
1515

1616
// Asset lock (5M duffs) + tx fees. 10M duffs provides margin.
17-
let (seed_hash, wallet_arc) = ctx.create_funded_test_wallet(10_000_000).await;
17+
let (seed_hash, wallet_arc) = ctx.create_funded_test_wallet(30_000_000).await;
1818

1919
// Register identity on Platform
2020
let (reg_info, _master_key_bytes) =

tests/backend-e2e/identity_tasks.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ async fn tc_023_transfer_credits() {
228228
let si = shared_identity().await;
229229

230230
// Register a minimal second identity in-test.
231-
let (seed_hash_b, wallet_b) = ctx.create_funded_test_wallet(10_000_000).await;
231+
let (seed_hash_b, wallet_b) = ctx.create_funded_test_wallet(30_000_000).await;
232232
let (reg_info, _key_bytes_b) =
233233
build_identity_registration(&ctx.app_context, &wallet_b, seed_hash_b);
234234
let reg_result = run_task(

tests/backend-e2e/identity_withdraw.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ async fn test_withdraw_from_identity() {
1616
let ctx = ctx().await;
1717

1818
// Asset lock (5M) + withdrawal state transition fees. 10M provides margin.
19-
let (seed_hash, wallet_arc) = ctx.create_funded_test_wallet(10_000_000).await;
19+
let (seed_hash, wallet_arc) = ctx.create_funded_test_wallet(30_000_000).await;
2020

2121
// Register identity on Platform
2222
let (reg_info, _master_key_bytes) =

tests/backend-e2e/register_dpns.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ async fn test_register_dpns_name() {
1616
let app_context = &ctx.app_context;
1717

1818
// Create funded test wallet (needs enough for identity + DPNS registration)
19-
let (seed_hash, wallet_arc) = ctx.create_funded_test_wallet(10_000_000).await;
19+
let (seed_hash, wallet_arc) = ctx.create_funded_test_wallet(30_000_000).await;
2020

2121
// Register identity on Platform
2222
let (reg_info, _master_key_bytes) =

tests/backend-e2e/token_tasks.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ async fn ensure_second_identity() -> &'static SecondIdentity {
4141
.get_or_init(|| async {
4242
let ctx = harness::ctx().await;
4343
tracing::info!("SecondIdentity: creating funded test wallet (10M duffs)...");
44-
let (seed_hash, wallet_arc) = ctx.create_funded_test_wallet(10_000_000).await;
44+
let (seed_hash, wallet_arc) = ctx.create_funded_test_wallet(30_000_000).await;
4545

4646
let (reg_info, master_key_bytes) =
4747
build_identity_registration(&ctx.app_context, &wallet_arc, seed_hash);

0 commit comments

Comments
 (0)