Skip to content

Derive addresses from provided program ID - #193

Merged
kaze-cow merged 3 commits into
mainfrom
client/derive-state-pda-from-program-id
Oct 8, 2026
Merged

kaze-cow merged 3 commits into
mainfrom
client/derive-state-pda-from-program-id

Conversation

@kaze-cow

@kaze-cow kaze-cow commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

updates the client builder so that it can derive the correct state pda/native buffer with different program IDs.

We already take the program ID in the builder for the clients, so we might as well derive the correct static PDAs as well!

Useful for cases where we have ghost/alternative releases crafted for another address, such as staging. Does nothing to make it easier to modify the address/redeploy elsewhere, but at least the backend is taken care of!

Does not work well for cases where the SETTLEMENT_SEED changes (i.e. a major or minor version is different), as the seed will not match up. but this is fine for our immediate need.

originally #180

squadgazzz and others added 3 commits October 9, 2026 02:19
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…gram id

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@kaze-cow
kaze-cow requested a review from a team as a code owner October 8, 2026 17:27

@fedgiac fedgiac left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Makes sense. We should really make the use of program_id more consistent.

@kaze-cow
kaze-cow merged commit abdb52c into main Oct 8, 2026
19 checks passed
@kaze-cow
kaze-cow deleted the client/derive-state-pda-from-program-id branch October 8, 2026 17:57
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