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

Function topUp

utils/utils.ts:64–72  ·  view source on GitHub ↗
(
  connection: Connection,
  payer: Keypair,
  lamports: number
)

Source from the content-addressed store, hash-verified

62}
63
64export async function topUp(
65 connection: Connection,
66 payer: Keypair,
67 lamports: number
68) {
69 const sig = await connection.requestAirdrop(payer.publicKey, lamports);
70 await connection.confirmTransaction(sig);
71 lamports = await connection.getBalance(payer.publicKey);
72}
73
74export async function atLeastSol(
75 connection: Connection,

Callers 2

atLeastSolFunction · 0.85
establishEnoughSolFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected