Skip to content

Instantly share code, notes, and snippets.

use anchor_lang::prelude::*;
use anchor_spl::token::{self, Token, Mint, TokenAccount, Transfer};
use anchor_spl::associated_token::AssociatedToken;
declare_id!("insert your program id here");
pub mod constants{
pub const VAULT_SEED : &[u8] = b"token_vault";
}
import {
Connection,
Keypair,
PublicKey,
SystemProgram,
Transaction,
clusterApiUrl,
sendAndConfirmTransaction,
} from "@solana/web3.js";
import {