Skip to content

Conversation

@joncinque
Copy link
Contributor

@joncinque joncinque commented Aug 1, 2025

Problem

In order to publish the v3 SDK crates and have them usable in Agave, we also need to have SPL crates using the v3 SDK crates. However, we have a circular dependency between Agave and SPL which currently makes this impossible.

The overall plan is to have Agave only use "interface" crates from SPL, which have no dependencies on Agave crates.

You can see more info about the project at https://github.com/orgs/anza-xyz/projects/27

Memo is very simple, since it just exposes an instruction creator and id to Agave.

Summary of changes

Create the new interface crate with the instruction and id.

The Rust scripts needed to be adapted to having more than one crate, so I copied all the scripts from token-2022 and updated the commands in package.json accordingly.

NOTE: There is a difference in the build_memo instruction creator. In the interface crate, it accepts any program id, whereas the program crate hardcodes the v3 id. Since we're planning on deploying p-memo soon under a new program id, this new function will be easier to use.

Also, there were some additional changes needed. The new scripts only build one program at a time, so I had to change things to explicitly build and test p-memo.

#### Problem

In order to publish the v3 SDK crates and have them usable in Agave, we
also need to have SPL crates using the v3 SDK crates. However, we have a
circular dependency between Agave and SPL which currently makes this
impossible.

The overall plan is to have Agave only use "interface" crates from SPL,
which have no dependencies on Agave crates.

You can see more info about the project at https://github.com/orgs/anza-xyz/projects/27

Memo is very simple, since it just exposes an instruction creator and id
to Agave.

#### Summary of changes

Create the new interface crate with the instruction and id.

The Rust scripts needed to be adapted to having more than one crate, so
I copied all the scripts from token-2022 and updated the commands in
package.json accordingly.

NOTE: There is a difference in the `build_memo` instruction creator. In
the interface crate, it accepts any program id, whereas the program
crate hardcodes the v3 id. Since we're planning on deploying p-memo
soon under a new program id, this new function will be easier to use.
@joncinque joncinque requested a review from buffalojoec August 1, 2025 16:21
Copy link
Contributor

@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.

Lgtm!

@joncinque joncinque merged commit 4c0703f into solana-program:main Aug 2, 2025
14 checks passed
@joncinque joncinque deleted the interface branch August 2, 2025 12:19
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.

2 participants