From 07f4d51c281c6ff942aec0eea1ac884a11d4e217 Mon Sep 17 00:00:00 2001 From: aresastro Date: Wed, 10 May 2023 08:36:50 +0800 Subject: [PATCH] added imports --- ts/cluster1/spl_init.ts | 18 ++++++++++++++++++ ts/cluster1/spl_mint.ts | 1 - 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/ts/cluster1/spl_init.ts b/ts/cluster1/spl_init.ts index e69de29..be0154e 100644 --- a/ts/cluster1/spl_init.ts +++ b/ts/cluster1/spl_init.ts @@ -0,0 +1,18 @@ +import { Keypair, Connection, Commitment } from "@solana/web3.js"; +import { createMint } 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); + +(async () => { + try { + // Start here + } catch(error) { + console.log(`Oops, something went wrong: ${error}`) + } +})() \ No newline at end of file diff --git a/ts/cluster1/spl_mint.ts b/ts/cluster1/spl_mint.ts index 0c0df5f..7c9e7ff 100644 --- a/ts/cluster1/spl_mint.ts +++ b/ts/cluster1/spl_mint.ts @@ -11,7 +11,6 @@ const connection = new Connection("https://api.devnet.solana.com", commitment); const token_decimals = 1_000_000n; - // Mint address const mint = new PublicKey("");