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

Function checkProgram

utils/utils.ts:172–184  ·  view source on GitHub ↗
(
  connection: Connection,
  accountID: PublicKey
)

Source from the content-addressed store, hash-verified

170 * Checks if provided account is executable
171 */
172export async function checkProgram(
173 connection: Connection,
174 accountID: PublicKey
175) {
176 const accountInfo = await connection.getAccountInfo(accountID);
177
178 if (accountInfo) {
179 if (accountInfo.executable) {
180 return true;
181 }
182 }
183 return false;
184}
185
186export async function loadKeypairsBatch(
187 location: string = ""

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected