Skip to content

Commit 3192aa0

Browse files
committed
remove transfer-based seeding function and references
1 parent b51a683 commit 3192aa0

File tree

2 files changed

+1
-50
lines changed

2 files changed

+1
-50
lines changed

src/config/envSchema.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ export const envSchema: EnvVariable[] = [
143143
required: false,
144144
type: 'boolean',
145145
description:
146-
'Enable vault seeding using AssignDeposit (if true, uses AssignDeposit; if false, uses transfer-based seeding)',
146+
'Enable vault seeding using AssignDeposit. When true, new vaults are automatically seeded with initial token balances via AssignDeposit intentions.',
147147
defaultValue: false,
148148
transformer: (value) => value === 'true',
149149
},

src/proposer.ts

Lines changed: 0 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -483,55 +483,6 @@ async function updateBalance(
483483
}
484484
}
485485

486-
/**
487-
* Seeds a new vault with initial token balances by transferring them from the
488-
* proposer's vault.
489-
* This is now a fallback/manual method. The primary path is via createAndSubmitSeedingIntention.
490-
*/
491-
/*
492-
async function initializeBalancesForVault(newVaultId: number): Promise<void> {
493-
logger.info(
494-
`Directly seeding new vault (ID: ${newVaultId}) from proposer vault (ID: ${PROPOSER_VAULT_ID.value})...`
495-
)
496-
497-
for (const token of SEED_CONFIG) {
498-
try {
499-
const tokenDecimals = await getSepoliaTokenDecimals(token.address)
500-
const seedAmount = parseUnits(token.amount, Number(tokenDecimals))
501-
502-
const proposerBalance = await getBalance(
503-
PROPOSER_VAULT_ID.value,
504-
token.address
505-
)
506-
507-
if (proposerBalance < seedAmount) {
508-
logger.warn(
509-
`- Insufficient proposer balance for ${token.address}. Have: ${proposerBalance}, Need: ${seedAmount}. Skipping.`
510-
)
511-
continue
512-
}
513-
514-
// Use the single, updated function for the transfer
515-
await updateBalances(
516-
PROPOSER_VAULT_ID.value,
517-
newVaultId,
518-
token.address,
519-
seedAmount.toString()
520-
)
521-
522-
logger.info(
523-
`- Successfully seeded vault ${newVaultId} with ${token.amount} of token ${token.address}`
524-
)
525-
} catch (error) {
526-
logger.error(
527-
`- Failed to seed vault ${newVaultId} with token ${token.address}:`,
528-
error
529-
)
530-
}
531-
}
532-
}
533-
*/
534-
535486
/**
536487
* Records proposer activity in the database.
537488
* Updates last_seen timestamp for monitoring.

0 commit comments

Comments
 (0)