-
Notifications
You must be signed in to change notification settings - Fork 255
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix and improve token-program-advance course #535
base: main
Are you sure you want to change the base?
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.
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why remove the links?
[`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: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Much clearer. 👍
delegated amount to 0. | ||
|
||
Create a new file `revoke-approve-tokens.ts`. | ||
|
||
```typescript filename="revoke-approve-tokens.ts" | ||
```typescript |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why remove the filenames?
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.