( connection: Connection, account: Keypair, min: number )
| 72 | } |
| 73 | |
| 74 | export async function atLeastSol( |
| 75 | connection: Connection, |
| 76 | account: Keypair, |
| 77 | min: number |
| 78 | ) { |
| 79 | const minLampBalance = min * LAMPORTS_PER_SOL; |
| 80 | |
| 81 | let [_, lamports] = await getBalance(connection, account); |
| 82 | if (lamports < minLampBalance) { |
| 83 | await topUp(connection, account, minLampBalance - lamports); |
| 84 | } |
| 85 | } |
| 86 | |
| 87 | export async function topUpAccounts( |
| 88 | connection: Connection, |
no test coverage detected