This repository has been archived by the owner on Jan 10, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
token-2022: Add MemoTransfer extension #2822
Merged
CriesofCarrots
merged 8 commits into
solana-labs:master
from
CriesofCarrots:memo-extension
Feb 5, 2022
Merged
token-2022: Add MemoTransfer extension #2822
CriesofCarrots
merged 8 commits into
solana-labs:master
from
CriesofCarrots:memo-extension
Feb 5, 2022
Conversation
This file contains 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
CriesofCarrots
force-pushed
the
memo-extension
branch
3 times, most recently
from
February 1, 2022 19:28
a77df16
to
63d507a
Compare
|
CriesofCarrots
force-pushed
the
memo-extension
branch
from
February 2, 2022 00:50
63d507a
to
2e07377
Compare
CriesofCarrots
changed the title
WIP: Memo extension
token-2022: Add MemoTransfer extension
Feb 2, 2022
CriesofCarrots
force-pushed
the
memo-extension
branch
2 times, most recently
from
February 2, 2022 03:54
c552197
to
7f6e2c0
Compare
CriesofCarrots
force-pushed
the
memo-extension
branch
2 times, most recently
from
February 2, 2022 23:11
22025a4
to
7ec723a
Compare
CriesofCarrots
commented
Feb 2, 2022
CriesofCarrots
commented
Feb 2, 2022
Not fully functional, due to syscall, but everything else ready for a look! |
CriesofCarrots
commented
Feb 2, 2022
joncinque
reviewed
Feb 3, 2022
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.
Looks great for the most part! The realloc part is a bit tough, so we might need to refactor StateWithExtensionsMut
CriesofCarrots
force-pushed
the
memo-extension
branch
3 times, most recently
from
February 4, 2022 19:49
a6e0486
to
bc0dbae
Compare
CriesofCarrots
force-pushed
the
memo-extension
branch
2 times, most recently
from
February 4, 2022 22:31
91340df
to
60a97dc
Compare
CriesofCarrots
force-pushed
the
memo-extension
branch
from
February 4, 2022 22:33
60a97dc
to
197ab3e
Compare
joncinque
previously approved these changes
Feb 4, 2022
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.
Looks great! Just two nittiest of comment nits
Co-authored-by: Jon Cinque <[email protected]>
Co-authored-by: Jon Cinque <[email protected]>
mergify
bot
dismissed
joncinque’s stale review
February 4, 2022 23:44
Pull request has been modified.
Woot! Excited to get this one in |
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.
Some users would like to require all transfers into particular accounts be accompanied by a memo.
This PR implements a MemoTransfer extension, which stores a byte indicating whether memo-transfers are or are not required. The extension can be initialized on any existing token Account, assuming the account has space for the extension. Callers should call Reallocate to make space, if the account is too small.
Currently, there is only a placeholder where the memo-requirement would be in
_process_transfer()
, pending the syscall that will expose previous sibling instructions to be checked for the memo. Bumping the solana crates and using the syscall will be done in a subsequent PR.Needs:
Closes #2729