Skip to content

Conversation

@rustopian
Copy link
Contributor

Problem

#73 doesn't allow for custom names of tuple arguments. Using arg0, arg1, etc. aligns with some backwards compatibility needs, but not all.

Solution

Allow name customization, e.g.:

#[derive(CodamaInstructions)]
enum FluxCapacitorInstructions {
    #[codama(account(name = "clock_sysvar"))]
    Charge(
        #[codama(name = "percentage")]
        Percentage,
        #[codama(name = "is_valid")]
        bool
    ),
}

@rustopian rustopian marked this pull request as draft December 4, 2025 17:59
@rustopian rustopian marked this pull request as ready for review December 4, 2025 18:16
Copy link
Member

@lorisleiva lorisleiva left a comment

Choose a reason for hiding this comment

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

Perfection, thank you!

@lorisleiva lorisleiva merged commit 3281d88 into codama-idl:main Dec 5, 2025
2 checks passed
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