This repository was archived by the owner on Jan 24, 2025. It is now read-only.
fix and improve token-program-advance course#535
Closed
wuuer wants to merge 4 commits into
Closed
Conversation
Using the system program as the delegate in the typescript of Delegating tokens. Add some instructions for Delegating tokens, Revoke Delegate, and Burn Tokens. Fix [creating NFTs with Metaplex] link. Fix [previous chapter] link. Fix [Transferring Tokens] link. Fix the import @solana/web3.js statements in the section Brun Tokens. Fix a wrong argument passed to calling the revoke function in the typescript for Revoke Delegate.
Contributor
|
Hey @wuuer ! You already have a PR open that fixes https://token-program-advanced.md/ - #342 - please don't make multiple PRs for the same lesson, it splits the conversation into too many places. |
mikemaccana
suggested changes
Oct 17, 2024
mikemaccana
left a comment
Contributor
There was a problem hiding this comment.
Good but needs a few small fixes!
| [`createBurnInstruction()`](https://solana-labs.github.io/solana-program-library/token/js/functions/createBurnInstruction.html#createBurnInstruction) | ||
| function. | ||
| Under the hood, the `burn` function creates a transaction with instructions | ||
| obtained from the `createBurnInstruction` function: |
| [`createApproveInstruction()`](https://solana-labs.github.io/solana-program-library/token/js/functions/createApproveInstruction.html#createApproveInstruction) | ||
| function. | ||
| Under the hood, the `approve` function creates a transaction with instructions | ||
| obtained from the `createApproveInstruction` function: |
Contributor
There was a problem hiding this comment.
Same as above re: links.
| ```typescript | ||
| import { PublicKey, Transaction } from "@solana/web3.js"; | ||
| import { createRevokeInstruction } from "@solana/spl-token"; | ||
| import { revoke } from "@solana/spl-token"; |
Contributor
There was a problem hiding this comment.
Much nicer! Especially since we're using burn later.
| This lab extends the concepts covered in the previous lesson on the | ||
| [Token Program](/content/courses/tokens-and-nfts/token-program.md). | ||
| This lab extends the lab from the | ||
| [previous chapter](/content/courses/tokens-and-nfts/token-program.md). |
| Create a new file `revoke-approve-tokens.ts`. | ||
|
|
||
| ```typescript filename="revoke-approve-tokens.ts" | ||
| ```typescript |
Contributor
There was a problem hiding this comment.
Why remove the filenames?
|
This pull request has been automatically marked as stale because it has not had recent activity. Remove stale label or comment or this will be closed in 7 days. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
[creating NFTs with Metaplex] link is wrong.
[previous chapter] link is wrong.
[Transfering Tokens] link is wrong.
The import @solana/web3.js statements in the section Brun Tokens are wrong.
The return value type "web3.Transaction" is wrong in the section Brun Tokens.
Missing delegate account for demonstration for the section Delegating tokens.
A wrong argument passes to calling the revoke function in the typescript for Revoke Delegate.
Missing some instructions for Delegating tokens, Revoke Delegate, and Burn Tokens.
Summary of Changes
Delete "web3." for "web3.Transaction" in the section Brun Tokens.
Using the system program as the delegate in the typescript of Delegating tokens.
Add some instructions for Delegating tokens, Revoke Delegate, and Burn Tokens.
Fix [creating NFTs with Metaplex] link.
Fix [previous chapter] link.
Fix [Transferring Tokens] link.
Fix the import @solana/web3.js statements in the section Brun Tokens.
Fix a wrong argument passed to calling the revoke function in the typescript for Revoke Delegate.