diff --git a/ts/cluster1/vault_close.ts b/ts/cluster1/vault_close.ts index 2ef7f46..0b8b42e 100644 --- a/ts/cluster1/vault_close.ts +++ b/ts/cluster1/vault_close.ts @@ -1,7 +1,19 @@ -import { Connection, Keypair, SystemProgram, PublicKey, Commitment } from "@solana/web3.js" -import { Program, Wallet, AnchorProvider, Address, BN } from "@project-serum/anchor" +import { + Connection, + Keypair, + SystemProgram, + PublicKey, + Commitment, +} from "@solana/web3.js"; +import { + Program, + Wallet, + AnchorProvider, + Address, + BN, +} from "@coral-xyz/anchor"; import { WbaVault, IDL } from "../programs/wba_vault"; -import wallet from "../wba-wallet.json" +import wallet from "../wba-wallet.json"; // Import our keypair from the wallet file const keypair = Keypair.fromSecretKey(new Uint8Array(wallet)); @@ -13,7 +25,9 @@ const commitment: Commitment = "confirmed"; const connection = new Connection("https://api.devnet.solana.com"); // Create our anchor provider -const provider = new AnchorProvider(connection, new Wallet(keypair), { commitment }); +const provider = new AnchorProvider(connection, new Wallet(keypair), { + commitment, +}); // Create our program const program = new Program(IDL, "
" as Address, provider); @@ -25,19 +39,17 @@ const vaultState = new PublicKey("
"); // const closeVaultState = ??? (async () => { - try { - - // const signature = await program.methods - // .closeAccount() - // .accounts({ - // ??? - // }) - // .signers([ - // keypair - // ]).rpc(); - // console.log(`Close success! Check out your TX here:\n\nhttps://explorer.solana.com/tx/${signature}?cluster=devnet`); - - } catch(e) { - console.error(`Oops, something went wrong: ${e}`) - } -})(); \ No newline at end of file + try { + // const signature = await program.methods + // .closeAccount() + // .accounts({ + // ??? + // }) + // .signers([ + // keypair + // ]).rpc(); + // console.log(`Close success! Check out your TX here:\n\nhttps://explorer.solana.com/tx/${signature}?cluster=devnet`); + } catch (e) { + console.error(`Oops, something went wrong: ${e}`); + } +})(); diff --git a/ts/cluster1/vault_deposit.ts b/ts/cluster1/vault_deposit.ts index 75fcfa5..1b8e407 100644 --- a/ts/cluster1/vault_deposit.ts +++ b/ts/cluster1/vault_deposit.ts @@ -11,7 +11,7 @@ import { AnchorProvider, Address, BN, -} from "@project-serum/anchor"; +} from "@coral-xyz/anchor"; import { WbaVault, IDL } from "../programs/wba_vault"; import wallet from "../wba-wallet.json"; diff --git a/ts/cluster1/vault_deposit_nft.ts b/ts/cluster1/vault_deposit_nft.ts index 3faa05a..7513b78 100644 --- a/ts/cluster1/vault_deposit_nft.ts +++ b/ts/cluster1/vault_deposit_nft.ts @@ -11,7 +11,7 @@ import { AnchorProvider, Address, BN, -} from "@project-serum/anchor"; +} from "@coral-xyz/anchor"; import { WbaVault, IDL } from "../programs/wba_vault"; import wallet from "../wba-wallet.json"; import { diff --git a/ts/cluster1/vault_deposit_spl.ts b/ts/cluster1/vault_deposit_spl.ts index 7e1013f..e5d1cae 100644 --- a/ts/cluster1/vault_deposit_spl.ts +++ b/ts/cluster1/vault_deposit_spl.ts @@ -11,7 +11,7 @@ import { AnchorProvider, Address, BN, -} from "@project-serum/anchor"; +} from "@coral-xyz/anchor"; import { WbaVault, IDL } from "../programs/wba_vault"; import wallet from "../wba-wallet.json"; import { diff --git a/ts/cluster1/vault_init.ts b/ts/cluster1/vault_init.ts index 7796d0d..b283c41 100644 --- a/ts/cluster1/vault_init.ts +++ b/ts/cluster1/vault_init.ts @@ -5,14 +5,10 @@ import { PublicKey, Commitment, } from "@solana/web3.js"; -import { - Program, - Wallet, - AnchorProvider, - Address, -} from "@project-serum/anchor"; +import { Program, Wallet, AnchorProvider, Address } from "@coral-xyz/anchor"; import { WbaVault, IDL } from "./programs/wba_vault"; import wallet from "./wallet/wba-wallet.json"; +/// J8qKEmQpadFeBuXAVseH8GNrvsyBhMT8MHSVD3enRgJz // Import our keypair from the wallet file const keypair = Keypair.fromSecretKey(new Uint8Array(wallet)); diff --git a/ts/cluster1/vault_withdraw.ts b/ts/cluster1/vault_withdraw.ts index cba300b..c327cf5 100644 --- a/ts/cluster1/vault_withdraw.ts +++ b/ts/cluster1/vault_withdraw.ts @@ -11,7 +11,7 @@ import { AnchorProvider, Address, BN, -} from "@project-serum/anchor"; +} from "@coral-xyz/anchor"; import { WbaVault, IDL } from "../programs/wba_vault"; import wallet from "../wba-wallet.json"; diff --git a/ts/cluster1/vault_withdraw_nft.ts b/ts/cluster1/vault_withdraw_nft.ts index 091d199..8e17922 100644 --- a/ts/cluster1/vault_withdraw_nft.ts +++ b/ts/cluster1/vault_withdraw_nft.ts @@ -11,7 +11,7 @@ import { AnchorProvider, Address, BN, -} from "@project-serum/anchor"; +} from "@coral-xyz/anchor"; import { WbaVault, IDL } from "../programs/wba_vault"; import wallet from "../wba-wallet.json"; import { diff --git a/ts/cluster1/vault_withdraw_spl.ts b/ts/cluster1/vault_withdraw_spl.ts index 98187d3..b98c251 100644 --- a/ts/cluster1/vault_withdraw_spl.ts +++ b/ts/cluster1/vault_withdraw_spl.ts @@ -11,7 +11,7 @@ import { AnchorProvider, Address, BN, -} from "@project-serum/anchor"; +} from "@coral-xyz/anchor"; import { WbaVault, IDL } from "../programs/wba_vault"; import wallet from "../wba-wallet.json";