Fix/rewrite steel learning example#365
Merged
jacobcreech merged 6 commits intosolana-developers:mainfrom Apr 3, 2025
Merged
Conversation
Contributor
Author
|
@Perelyn-sama check this out |
Collaborator
|
I'll review later tonight, thanks for putting this together ❤️ |
Collaborator
There was a problem hiding this comment.
You don't need the state mod in this example, especially the Token type
Add the token fields in api::instruction::CreateToken like so:
pub struct CreateToken {
pub name: [u8; 32],
pub symbol: [u8; 8],
pub uri: [u8; 128],
pub decimals: u8,
}
since you're removing the state mod, you'd need get the metadata pda pubkey in api::sdk:: create_token function. This would work:
let metadata_pda = Pubkey::find_program_address(
&[METADATA, mpl_token_metadata::ID.as_ref(), mint.as_ref()],
&mpl_token_metadata::ID,
);
Collaborator
|
The rust code isn't formatted, you can fix that with You also need to add bankrun tests to get this merged here and there might be other things particular to this codebase you need to add so check the contributing guide |
Contributor
Author
|
@Perelyn-sama I've made the changes, please review. |
add checks for mint and metadata
Collaborator
|
LGTM |
jacobcreech
approved these changes
Apr 3, 2025
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Rewrote the entire learning example to align with the current Steel implementation.