Function
checkAccountDeployed
(
connection: Connection,
programId: PublicKey
)
Source from the content-addressed store, hash-verified
| 206 | * Check if the particular programID is deployed to the network |
| 207 | */ |
| 208 | export async function checkAccountDeployed( |
| 209 | connection: Connection, |
| 210 | programId: PublicKey |
| 211 | ): Promise<boolean> { |
| 212 | const accountInfo = await connection.getAccountInfo(programId); |
| 213 | if (accountInfo === null) { |
| 214 | return false; |
| 215 | } else { |
| 216 | return true; |
| 217 | } |
| 218 | } |
| 219 | |
| 220 | /** |
| 221 | * Load and parse the Solana CLI config file to determine which payer to use |
Tested by
no test coverage detected