Closed CoachChuckFF closed 4 months ago
Thanks for your contribution and your idea.
The concept is for people to use the @solana/spl-memo
package if they want to create memo instructions: https://github.com/solana-labs/solana-program-library/tree/master/memo/js
You can see how that's done in the spl-token JS tests starting at https://github.com/solana-labs/solana-program-library/blob/5feb1170d7d17bb78247a82c2613468b9788a6c5/token/js/test/e2e-2022/memoTransfer.test.ts#L7
While it is only one function, we've deliberately avoided copying it from the spl-memo package, so we would not accept that contribution unfortunately. Maybe we actually need better documentation to make that intention clear. What do you think?
I totally get it! I'm also guessing you would not want to depend on the @solana/spl-memo
library.
I honestly did not know the library existed, and it seems that no other reference material did either.
I would suggest adding a "transfer" section to the Token22 required memo documentation. To show that there is a library that takes care of this!
Thanks for the consideration!
Ah darn, yeah you're right. I put in a couple of PRs to try to make that better -- if you have a moment, could you check that they satisfy your use case? They're https://github.com/solana-foundation/developer-content/pull/194 and https://github.com/solana-labs/solana-program-library/pull/6668
Creating a memo to send to satisfy the required memo extension could be easier with the addition of a
createMemoInstruction
helper function.What is required right now:
Proposed helper function: