-
Notifications
You must be signed in to change notification settings - Fork 6
/
createMint3.ts
32 lines (22 loc) · 1.02 KB
/
createMint3.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
import { Connection, Keypair, PublicKey } from "@solana/web3.js"
import { Program, Wallet, AnchorProvider, Address } from "@project-serum/anchor"
import { Week1, IDL } from "./programs/week1";
import { createMint } from "@solana/spl-token"
import wallet from "./wallet/wba-wallet.json"
//Connect our WBA Wallet
const keypair = Keypair.fromSecretKey(new Uint8Array(wallet));
//Create a Solana devnet connection to devnet SOL tokens
const connection = new Connection("https://api.devnet.solana.com", {commitment: "confirmed"});
// Create our anchor provider
const provider = new AnchorProvider(connection, new Wallet(keypair), { commitment: "confirmed"});
// Create our program
const program = new Program<Week1>(IDL, "ctf1VWeMtgxa24zZevsXqDg6xvcMVy4FbP3cxLCpGha" as Address, provider);
// Create the PDA for our CTF-Week1 profile
// const authPda = ???
(async () => {
// Create new token mint
// const mint = await createMint(
// ???
// );
// console.log(`The unique identifier of the token is: ${mint.toBase58()}`);
})();