MCPcopy Create free account
hub / github.com/ExtropyIO/SolanaBootcamp / topUpAccounts

Function topUpAccounts

utils/utils.ts:87–97  ·  view source on GitHub ↗
(
  connection: Connection,
  accounts: Keypair[],
  minAmount: number = 1
)

Source from the content-addressed store, hash-verified

85}
86
87export 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

Callers

nothing calls this directly

Calls 1

atLeastSolFunction · 0.85

Tested by

no test coverage detected