Skip to content

Instantly share code, notes, and snippets.

View mindrunner's full-sized avatar
🌴
crossing borders

lukas mindrunner

🌴
crossing borders
View GitHub Profile
@mindrunner
mindrunner / harvest.ts
Last active July 12, 2023 22:06
harvest
const harvestAll = async () => {
const wallet = new Wallet(keyPair)
logger.info(keyPair.publicKey.toBase58())
const provider = new AnchorProvider(connection, wallet, {})
const stakeProgram = new PublicKey('STAKEr4Bh8sbBMoAVmTDBRqouPzgdocVrvtjmhJhd65')
const idl = await Program.fetchIdl(stakeProgram, provider)
if (!idl) {