Skip to content

fix(codama): use PDA defaults instead of hardcoded public keys#32

Draft
amilz wants to merge 4 commits intomainfrom
fix/idl-use-pda-defaults
Draft

fix(codama): use PDA defaults instead of hardcoded public keys#32
amilz wants to merge 4 commits intomainfrom
fix/idl-use-pda-defaults

Conversation

@amilz
Copy link
Copy Markdown
Collaborator

@amilz amilz commented Mar 25, 2026

Summary

  • Replace hardcoded public_key("Eq63FW...") default for event_authority with pda("event_authority", []) across all instructions
  • Replace hardcoded public_key("Escrowae7...") default for escrow_program with optional marker across all instructions
  • Regenerated IDL to reflect the updated Codama attributes

Test plan

  • just build passes
  • 179 integration tests pass
  • IDL regenerated and included

Replace hardcoded public key defaults for `event_authority` and
`escrow_program` accounts with proper Codama IDL semantics:
- event_authority: use `pda("event_authority", [])` instead of static key
- escrow_program: mark as `optional` instead of hardcoding program ID
@amilz amilz requested a review from dev-jodee March 25, 2026 18:41
@amilz amilz self-assigned this Mar 25, 2026
dev-jodee
dev-jodee previously approved these changes Mar 25, 2026
@amilz amilz marked this pull request as draft March 25, 2026 19:54
@amilz
Copy link
Copy Markdown
Collaborator Author

amilz commented Mar 25, 2026

Changed to draft the Codama rust renderer is not happy w/ the change

- borsh: enable derive feature for v3 generated code
- solana-address: bump to ~2.2 with curve25519 feature for PDA methods
- Remove solana-pubkey (v3 generates solana-address exclusively)
- Fix generate-clients.ts for v3 renderVisitor API change
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