Skip to content

fix(svm): make accs in create ata ix fn def not optional#397

Merged
MicaiahReid merged 1 commit intosolana-foundation:mainfrom
aspnxdd:fix/create-ata-ix-fn-def-optional-accs
Mar 19, 2026
Merged

fix(svm): make accs in create ata ix fn def not optional#397
MicaiahReid merged 1 commit intosolana-foundation:mainfrom
aspnxdd:fix/create-ata-ix-fn-def-optional-accs

Conversation

@aspnxdd
Copy link
Contributor

@aspnxdd aspnxdd commented Mar 11, 2026

In the FunctionImplementation for GetAssociatedTokenAccount, the 2nd arg (args.get(2)) is required, but in the function definition it says it's optional. It is indeed not optional. Also the 3rd arg.

        let token_mint_address = SvmValue::to_pubkey(args.get(2).unwrap()).map_err(|e| {
            to_diag(fn_spec, format!("invalid token mint address for creating token account: {e}"))
        })?;

        let token_program_id = SvmValue::to_pubkey(args.get(3).unwrap()).map_err(|e| {
            to_diag(fn_spec, format!("invalid token program id for creating token account: {e}"))
        })?;

This PR changes the optional value in the function definition.

@aspnxdd aspnxdd changed the title Make accs in create ata ix fn def not optional fix(svm): make accs in create ata ix fn def not optional Mar 12, 2026
Copy link
Collaborator

@MicaiahReid MicaiahReid left a comment

Choose a reason for hiding this comment

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

Good fine, thanks!

@MicaiahReid MicaiahReid merged commit 6961f0d into solana-foundation:main Mar 19, 2026
1 of 4 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