( connection: Connection, accounts: Keypair[], minAmount: number = 1 )
| 85 | } |
| 86 | |
| 87 | export async function topUpAccounts( |
| 88 | connection: Connection, |
| 89 | accounts: Keypair[], |
| 90 | minAmount: number = 1 |
| 91 | ) { |
| 92 | let minSol = minAmount; |
| 93 | |
| 94 | for (let k = 0; k < accounts.length; k++) { |
| 95 | await atLeastSol(connection, accounts[k], minSol); |
| 96 | } |
| 97 | } |
| 98 | /** |
| 99 | * Function that's making sure that payer has enough funds to pay for the tx fees (estimated). Top up if not. |
| 100 | * @param connection Connection to the cluster |
nothing calls this directly
no test coverage detected