-
-
Save barry-the-sender/d877a87f23d8d52d32fdd71c01f71481 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Connection, PublicKey } from '@solana/web3.js' | |
const connection = new Connection('https://solana-api.projectserum.com') | |
const publicKey = new PublicKey('HTr2pYDBQZP13YTzLdsPzmh6e4hsNeqoGy3B777ejqTT') | |
async function sleep() { | |
return new Promise((resolve) => { | |
setTimeout(resolve, 1000) | |
}) | |
} | |
;(async () => { | |
let i = 0 | |
while (i < 10) { | |
i++ | |
const result = await connection.getAccountInfo(publicKey, { | |
commitment: 'confirmed' | |
}) | |
console.log(result.error) | |
await sleep() | |
} | |
process.exit() | |
})() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment