Skip to content

Commit

Permalink
Turn permanent delegate off
Browse files Browse the repository at this point in the history
  • Loading branch information
rogaldh committed Apr 17, 2024
1 parent 1982319 commit ec2bcb5
Showing 1 changed file with 10 additions and 13 deletions.
23 changes: 10 additions & 13 deletions scripts/issue-tokens.mts
Original file line number Diff line number Diff line change
Expand Up @@ -86,12 +86,14 @@ async function issueTokens(
lamports,
programId: spl.TOKEN_2022_PROGRAM_ID,
});
const initializePermanentDelegateInstruction =
spl.createInitializePermanentDelegateInstruction(
mint2022,
owner.publicKey,
spl.TOKEN_2022_PROGRAM_ID,
);
/*
*const initializePermanentDelegateInstruction =
* spl.createInitializePermanentDelegateInstruction(
* mint2022,
* owner.publicKey,
* spl.TOKEN_2022_PROGRAM_ID,
* );
*/
const initializeMintInstruction = spl.createInitializeMintInstruction(
mint2022,
Number(decimals),
Expand All @@ -101,23 +103,18 @@ async function issueTokens(
);
const tx = new web3.Transaction().add(
createAccountInstruction,
initializePermanentDelegateInstruction,
// initializePermanentDelegateInstruction,
initializeMintInstruction,
)
//tx.recentBlockhash = (await connection.getLatestBlockhash()).blockhash
//tx.feePayer = owner.publicKey
//tx.partialSign(owner.payer)
//tx.sign(mint2022Keypair)
await withSleep(
sendAndConfirmTransaction(
connection,
tx,
tx,
owner.publicKey,
[owner.payer, mint2022Keypair]
),
"Creating mint",
);

/*
*const mint2022 = await withSleep(
* await spl.createMint(
Expand Down

0 comments on commit ec2bcb5

Please sign in to comment.