added imports
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
import { Keypair, PublicKey, Connection, Commitment } from "@solana/web3.js";
|
||||
import { getOrCreateAssociatedTokenAccount, mintTo } from '@solana/spl-token';
|
||||
import wallet from "../wba-wallet.json"
|
||||
|
||||
// Import our keypair from the wallet file
|
||||
const keypair = Keypair.fromSecretKey(new Uint8Array(wallet));
|
||||
|
||||
//Create a Solana devnet connection
|
||||
const commitment: Commitment = "confirmed";
|
||||
const connection = new Connection("https://api.devnet.solana.com", commitment);
|
||||
|
||||
const token_decimals = 1_000_000n;
|
||||
|
||||
|
||||
// Mint address
|
||||
const mint = new PublicKey("<mint address>");
|
||||
|
||||
(async () => {
|
||||
try {
|
||||
// Start here
|
||||
} catch(error) {
|
||||
console.log(`Oops, something went wrong: ${error}`)
|
||||
}
|
||||
})()
|
||||
Reference in New Issue
Block a user