Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions rollup-bridge-contracts/task/nil-smart-account.ts
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,11 @@ export async function generateNilSmartAccount(networkName: string): Promise<[Sma
console.log(`faucet topup initiation done`);
await waitTillCompleted(client, topUpFaucet);

const ownerBalance = await smartAccount.getBalance();
if (ownerBalance === 0n) {
throw new Error(`Owner smart account balance is 0 after faucet top-up`);
}

if ((await smartAccount.checkDeploymentStatus()) === false) {
await smartAccount.selfDeploy(true);
}
Expand All @@ -146,6 +151,11 @@ export async function generateNilSmartAccount(networkName: string): Promise<[Sma
console.log(`faucet topup initiation done`);
await waitTillCompleted(client, topUpFaucet);

const depositBalance = await depositRecipientSmartAccount.getBalance();
if (depositBalance === 0n) {
throw new Error(`Deposit recipient smart account balance is 0 after faucet top-up`);
}

if ((await depositRecipientSmartAccount.checkDeploymentStatus()) === false) {
await depositRecipientSmartAccount.selfDeploy(true);
}
Expand Down