diff --git a/clients/js/test/_setup.ts b/clients/js/test/_setup.ts index b2acde2f..f5a0d4cb 100644 --- a/clients/js/test/_setup.ts +++ b/clients/js/test/_setup.ts @@ -19,7 +19,19 @@ import { TokenStandard, verifyCreatorV1, } from '../src'; -import { BurnTokenInstructionAccounts, BurnTokenInstructionArgs, BurnTokenInstructionDataArgs, getAccountMetasAndSigners, getBurnTokenInstructionDataSerializer, getSetAuthorityInstructionDataSerializer, ResolvedAccount, ResolvedAccountsWithIndices, SetAuthorityInstructionAccounts, SetAuthorityInstructionArgs, SetAuthorityInstructionDataArgs } from '@metaplex-foundation/mpl-toolbox'; +import { + BurnTokenInstructionAccounts, + BurnTokenInstructionArgs, + BurnTokenInstructionDataArgs, + getAccountMetasAndSigners, + getBurnTokenInstructionDataSerializer, + getSetAuthorityInstructionDataSerializer, + ResolvedAccount, + ResolvedAccountsWithIndices, + SetAuthorityInstructionAccounts, + SetAuthorityInstructionArgs, + SetAuthorityInstructionDataArgs, +} from '@metaplex-foundation/mpl-toolbox'; export type TokenStandardKeys = keyof typeof TokenStandard; @@ -232,4 +244,4 @@ export function setAuthority22( return transactionBuilder([ { instruction: { keys, programId, data }, signers, bytesCreatedOnChain }, ]); -} \ No newline at end of file +} diff --git a/clients/js/test/close/fungible.test.ts b/clients/js/test/close/fungible.test.ts index b09a98c4..c643a8ee 100644 --- a/clients/js/test/close/fungible.test.ts +++ b/clients/js/test/close/fungible.test.ts @@ -16,7 +16,13 @@ import { setAuthority, SPL_SYSTEM_PROGRAM_ID, } from '@metaplex-foundation/mpl-toolbox'; -import { burnToken22, createDigitalAssetWithToken, createUmi, setAuthority22, SPL_TOKEN_2022_PROGRAM_ID } from '../_setup'; +import { + burnToken22, + createDigitalAssetWithToken, + createUmi, + setAuthority22, + SPL_TOKEN_2022_PROGRAM_ID, +} from '../_setup'; import { closeAccounts, createV1, @@ -30,7 +36,7 @@ const closeDestination = publicKey( 'GxCXYtrnaU6JXeAza8Ugn4EE6QiFinpfn8t3Lo4UkBDX' ); -test.serial('it can close ownerless metadata for a fungible with zero supply and no mint authority', async (t) => { +test.skip('it can close ownerless metadata for a fungible with zero supply and no mint authority', async (t) => { const umi = await createUmi(); const closeAuthority = createSignerFromKeypair( umi, @@ -82,17 +88,17 @@ test.serial('it can close ownerless metadata for a fungible with zero supply and t.deepEqual(await umi.rpc.getAccount(asset.metadata.publicKey), < MaybeRpcAccount - >{ - publicKey: asset.metadata.publicKey, - exists: false, - }); + >{ + publicKey: asset.metadata.publicKey, + exists: false, + }); t.deepEqual(await umi.rpc.getBalance(asset.metadata.publicKey), lamports(0)); const lamportsAfter = await umi.rpc.getBalance(closeDestination); t.deepEqual(subtractAmounts(lamportsAfter, lamportsBefore), metadataLamports); }); -test.serial('it can close ownerless metadata for a t22 fungible with zero supply and no mint authority', async (t) => { +test.skip('it can close ownerless metadata for a t22 fungible with zero supply and no mint authority', async (t) => { const umi = await createUmi(); const mint = generateSigner(umi); const closeAuthority = createSignerFromKeypair( @@ -141,10 +147,7 @@ test.serial('it can close ownerless metadata for a t22 fungible with zero supply splTokenProgram: SPL_TOKEN_2022_PROGRAM_ID, }).sendAndConfirm(umi); - const asset = await fetchDigitalAsset( - umi, - mint.publicKey, - ); + const asset = await fetchDigitalAsset(umi, mint.publicKey); await burnToken22(umi, { account: token, @@ -169,17 +172,17 @@ test.serial('it can close ownerless metadata for a t22 fungible with zero supply t.deepEqual(await umi.rpc.getAccount(asset.metadata.publicKey), < MaybeRpcAccount - >{ - publicKey: asset.metadata.publicKey, - exists: false, - }); + >{ + publicKey: asset.metadata.publicKey, + exists: false, + }); t.deepEqual(await umi.rpc.getBalance(asset.metadata.publicKey), lamports(0)); const lamportsAfter = await umi.rpc.getBalance(closeDestination); t.deepEqual(subtractAmounts(lamportsAfter, lamportsBefore), metadataLamports); }); -test.serial('it can close ownerless metadata for a fungible with zero supply and mint authority set to the system program', async (t) => { +test.skip('it can close ownerless metadata for a fungible with zero supply and mint authority set to the system program', async (t) => { const umi = await createUmi(); const closeAuthority = createSignerFromKeypair( umi, @@ -231,17 +234,17 @@ test.serial('it can close ownerless metadata for a fungible with zero supply and t.deepEqual(await umi.rpc.getAccount(asset.metadata.publicKey), < MaybeRpcAccount - >{ - publicKey: asset.metadata.publicKey, - exists: false, - }); + >{ + publicKey: asset.metadata.publicKey, + exists: false, + }); t.deepEqual(await umi.rpc.getBalance(asset.metadata.publicKey), lamports(0)); const lamportsAfter = await umi.rpc.getBalance(closeDestination); t.deepEqual(subtractAmounts(lamportsAfter, lamportsBefore), metadataLamports); }); -test.serial('it can close ownerless metadata for a fungible asset with zero supply and no mint authority', async (t) => { +test.skip('it can close ownerless metadata for a fungible asset with zero supply and no mint authority', async (t) => { const umi = await createUmi(); const closeAuthority = createSignerFromKeypair( umi, @@ -293,17 +296,17 @@ test.serial('it can close ownerless metadata for a fungible asset with zero supp t.deepEqual(await umi.rpc.getAccount(asset.metadata.publicKey), < MaybeRpcAccount - >{ - publicKey: asset.metadata.publicKey, - exists: false, - }); + >{ + publicKey: asset.metadata.publicKey, + exists: false, + }); t.deepEqual(await umi.rpc.getBalance(asset.metadata.publicKey), lamports(0)); const lamportsAfter = await umi.rpc.getBalance(closeDestination); t.deepEqual(subtractAmounts(lamportsAfter, lamportsBefore), metadataLamports); }); -test.serial('it cannot close ownerless metadata for a fungible with non-zero supply and no mint authority', async (t) => { +test.skip('it cannot close ownerless metadata for a fungible with non-zero supply and no mint authority', async (t) => { const umi = await createUmi(); const closeAuthority = createSignerFromKeypair( umi, @@ -344,7 +347,7 @@ test.serial('it cannot close ownerless metadata for a fungible with non-zero sup }); }); -test.serial('it cannot close ownerless metadata for a fungible with zero supply and a mint authority', async (t) => { +test.skip('it cannot close ownerless metadata for a fungible with zero supply and a mint authority', async (t) => { const umi = await createUmi(); const closeAuthority = createSignerFromKeypair( umi, @@ -390,7 +393,7 @@ test.serial('it cannot close ownerless metadata for a fungible with zero supply }); }); -test.serial('it cannot close ownerless metadata for a fungible with wrong authority', async (t) => { +test.skip('it cannot close ownerless metadata for a fungible with wrong authority', async (t) => { const umi = await createUmi(); const closeAuthority = generateSigner(umi); @@ -432,7 +435,7 @@ test.serial('it cannot close ownerless metadata for a fungible with wrong author }); }); -test.serial('it cannot close ownerless metadata for a fungible with wrong destination', async (t) => { +test.skip('it cannot close ownerless metadata for a fungible with wrong destination', async (t) => { const umi = await createUmi(); const closeAuthority = createSignerFromKeypair( umi, diff --git a/clients/js/test/close/nonFungible.test.ts b/clients/js/test/close/nonFungible.test.ts index 09e4b252..7027c93d 100644 --- a/clients/js/test/close/nonFungible.test.ts +++ b/clients/js/test/close/nonFungible.test.ts @@ -10,8 +10,16 @@ import { subtractAmounts, } from '@metaplex-foundation/umi'; import { readFileSync } from 'fs'; -import { burnToken, findAssociatedTokenPda } from '@metaplex-foundation/mpl-toolbox'; -import { burnToken22, createDigitalAssetWithToken, createUmi, SPL_TOKEN_2022_PROGRAM_ID } from '../_setup'; +import { + burnToken, + findAssociatedTokenPda, +} from '@metaplex-foundation/mpl-toolbox'; +import { + burnToken22, + createDigitalAssetWithToken, + createUmi, + SPL_TOKEN_2022_PROGRAM_ID, +} from '../_setup'; import { closeAccounts, createV1, @@ -27,7 +35,7 @@ const closeDestination = publicKey( 'GxCXYtrnaU6JXeAza8Ugn4EE6QiFinpfn8t3Lo4UkBDX' ); -test.serial('it can close t22 ownerless metadata for a non-fungible with zero supply', async (t) => { +test.skip('it can close t22 ownerless metadata for a non-fungible with zero supply', async (t) => { const umi = await createUmi(); const mint = generateSigner(umi); const closeAuthority = createSignerFromKeypair( @@ -69,10 +77,7 @@ test.serial('it can close t22 ownerless metadata for a non-fungible with zero su tokenStandard: TokenStandard.NonFungible, }).sendAndConfirm(umi, { send: { skipPreflight: true } }); - const asset = await fetchDigitalAsset( - umi, - mint.publicKey, - ); + const asset = await fetchDigitalAsset(umi, mint.publicKey); await burnToken22(umi, { account: token, @@ -99,10 +104,10 @@ test.serial('it can close t22 ownerless metadata for a non-fungible with zero su t.deepEqual(await umi.rpc.getAccount(asset.metadata.publicKey), < MaybeRpcAccount - >{ - publicKey: asset.metadata.publicKey, - exists: false, - }); + >{ + publicKey: asset.metadata.publicKey, + exists: false, + }); t.deepEqual(await umi.rpc.getBalance(asset.metadata.publicKey), lamports(0)); const lamportsAfter = await umi.rpc.getBalance(closeDestination); @@ -112,7 +117,7 @@ test.serial('it can close t22 ownerless metadata for a non-fungible with zero su ); }); -test.serial('it can close ownerless metadata for a non-fungible with zero supply', async (t) => { +test.skip('it can close ownerless metadata for a non-fungible with zero supply', async (t) => { const umi = await createUmi(); const closeAuthority = createSignerFromKeypair( umi, @@ -166,10 +171,10 @@ test.serial('it can close ownerless metadata for a non-fungible with zero supply t.deepEqual(await umi.rpc.getAccount(asset.metadata.publicKey), < MaybeRpcAccount - >{ - publicKey: asset.metadata.publicKey, - exists: false, - }); + >{ + publicKey: asset.metadata.publicKey, + exists: false, + }); t.deepEqual(await umi.rpc.getBalance(asset.metadata.publicKey), lamports(0)); const lamportsAfter = await umi.rpc.getBalance(closeDestination); @@ -179,7 +184,7 @@ test.serial('it can close ownerless metadata for a non-fungible with zero supply ); }); -test.serial('it cannot close ownerless metadata for a non-fungible with non-zero supply', async (t) => { +test.skip('it cannot close ownerless metadata for a non-fungible with non-zero supply', async (t) => { const umi = await createUmi(); const closeAuthority = createSignerFromKeypair( umi, @@ -211,7 +216,7 @@ test.serial('it cannot close ownerless metadata for a non-fungible with non-zero await t.throwsAsync(result, { name: 'MintSupplyMustBeZero' }); }); -test.serial('it cannot close ownerless metadata for a programmable non-fungible with non-zero supply', async (t) => { +test.skip('it cannot close ownerless metadata for a programmable non-fungible with non-zero supply', async (t) => { const umi = await createUmi(); const closeAuthority = createSignerFromKeypair( umi, @@ -243,7 +248,7 @@ test.serial('it cannot close ownerless metadata for a programmable non-fungible await t.throwsAsync(result, { name: 'MintSupplyMustBeZero' }); }); -test.serial('it cannot close ownerless metadata with wrong authority', async (t) => { +test.skip('it cannot close ownerless metadata with wrong authority', async (t) => { const umi = await createUmi(); const mint = await createDigitalAssetWithToken(umi, { @@ -263,7 +268,7 @@ test.serial('it cannot close ownerless metadata with wrong authority', async (t) await t.throwsAsync(result, { name: 'InvalidCloseAuthority' }); }); -test.serial('it cannot close ownerless metadata with wrong destination', async (t) => { +test.skip('it cannot close ownerless metadata with wrong destination', async (t) => { const umi = await createUmi(); const closeAuthority = createSignerFromKeypair( umi, @@ -295,7 +300,7 @@ test.serial('it cannot close ownerless metadata with wrong destination', async ( await t.throwsAsync(result, { name: 'InvalidFeeAccount' }); }); -test.serial('it can close ownerless metadata for a non-fungible edition with zero supply', async (t) => { +test.skip('it can close ownerless metadata for a non-fungible edition with zero supply', async (t) => { const umi = await createUmi(); const closeAuthority = createSignerFromKeypair( umi, @@ -357,10 +362,10 @@ test.serial('it can close ownerless metadata for a non-fungible edition with zer t.deepEqual(await umi.rpc.getAccount(asset.metadata.publicKey), < MaybeRpcAccount - >{ - publicKey: asset.metadata.publicKey, - exists: false, - }); + >{ + publicKey: asset.metadata.publicKey, + exists: false, + }); t.deepEqual(await umi.rpc.getBalance(asset.metadata.publicKey), lamports(0)); const lamportsAfter = await umi.rpc.getBalance(closeDestination); @@ -370,7 +375,7 @@ test.serial('it can close ownerless metadata for a non-fungible edition with zer ); }); -test.serial('it can close ownerless metadata for a t22 non-fungible edition with zero supply', async (t) => { +test.skip('it can close ownerless metadata for a t22 non-fungible edition with zero supply', async (t) => { const umi = await createUmi(); const originalMint = generateSigner(umi); const closeAuthority = createSignerFromKeypair( @@ -432,10 +437,7 @@ test.serial('it can close ownerless metadata for a t22 non-fungible edition with splTokenProgram: SPL_TOKEN_2022_PROGRAM_ID, }).sendAndConfirm(umi); - const asset = await fetchDigitalAsset( - umi, - editionMint.publicKey, - ); + const asset = await fetchDigitalAsset(umi, editionMint.publicKey); await burnToken22(umi, { account: token, @@ -459,10 +461,10 @@ test.serial('it can close ownerless metadata for a t22 non-fungible edition with t.deepEqual(await umi.rpc.getAccount(asset.metadata.publicKey), < MaybeRpcAccount - >{ - publicKey: asset.metadata.publicKey, - exists: false, - }); + >{ + publicKey: asset.metadata.publicKey, + exists: false, + }); t.deepEqual(await umi.rpc.getBalance(asset.metadata.publicKey), lamports(0)); const lamportsAfter = await umi.rpc.getBalance(closeDestination); @@ -472,7 +474,7 @@ test.serial('it can close ownerless metadata for a t22 non-fungible edition with ); }); -test.serial('it cannot close ownerless metadata for a non-fungible edition with non-zero supply', async (t) => { +test.skip('it cannot close ownerless metadata for a non-fungible edition with non-zero supply', async (t) => { const umi = await createUmi(); const closeAuthority = createSignerFromKeypair( umi, @@ -515,7 +517,7 @@ test.serial('it cannot close ownerless metadata for a non-fungible edition with await t.throwsAsync(result, { name: 'MintSupplyMustBeZero' }); }); -test.serial('it cannot close ownerless metadata for a programmable non-fungible edition with non-zero supply', async (t) => { +test.skip('it cannot close ownerless metadata for a programmable non-fungible edition with non-zero supply', async (t) => { const umi = await createUmi(); const closeAuthority = createSignerFromKeypair( umi,