Skip to content
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

CreateMint instruction #6

Merged
merged 14 commits into from
Feb 7, 2025
Merged

CreateMint instruction #6

merged 14 commits into from
Feb 7, 2025

Conversation

grod220
Copy link
Contributor

@grod220 grod220 commented Jan 30, 2025

This PR builds out the CreateMint instruction enabling the creation of "wrapped" token-2022 tokens from existing spl-token tokens (and vice versa). The intention is to facilitate interoperability between different token standards.

Mainly creates two accounts:

  • Wrapped Mint Provisions a new mint account for the wrapped token. The address of this wrapped mint is deterministically derived as a PDA from the unwrapped mint address.
  • Backpointer Provisions a backpointer account (PDA), derived from the wrapped mint address. This account stores a reference to the original unwrapped mint, facilitating reverse lookups.

Future work to build out remaining wrap & unwrap instructions.

@grod220 grod220 marked this pull request as ready for review January 31, 2025 17:36
@buffalojoec
Copy link

@grod220 as per discussion on Zoom, there were a few small changes you wanted to make, then I can review. Just let me know when you're ready with a comment + tag!

@grod220
Copy link
Contributor Author

grod220 commented Feb 3, 2025

@buffalojoec Ready for your review 🙏

Copy link

@buffalojoec buffalojoec left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking great so far! Nice work.

I left a bunch of comments, a lot of them small/nits, and I only skimmed the tests for now. I'll look at those closer once we've chatted about the other items!

Copy link
Contributor

@joncinque joncinque left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lots of great stuff here! Mostly small things, and I agree with all of Joe's points

Copy link
Contributor

@joncinque joncinque left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking close! Mostly small things, then I'm happy to get this in

@grod220 grod220 requested a review from joncinque February 6, 2025 11:37
Copy link
Contributor

@joncinque joncinque left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me! But do get an approval from @buffalojoec too

Copy link

@buffalojoec buffalojoec left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome! This is super close, just a few tiny nits.

Copy link

@buffalojoec buffalojoec left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! Thanks for all of the back and forth!

@grod220 grod220 merged commit 1ae1cd2 into main Feb 7, 2025
7 checks passed
@grod220 grod220 deleted the create-mint branch February 7, 2025 10:14
@grod220 grod220 mentioned this pull request Feb 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants