regolith-labs / steel

Solana smart contract framework.
146 stars 32 forks source link

get_associated_token_address returns accuntinfo with system program as the owner #29

Closed Perelyn-sama closed 2 weeks ago

Perelyn-sama commented 2 weeks ago

I'm trying to get an ata with

    let to_ata =
    spl_associated_token_account::get_associated_token_address(&payer.pubkey(), &mint_pda.0);

but for some reason it has the system_program as the owner instead of the token_program

output:

[2024-10-30T13:20:08.783247000Z DEBUG solana_runtime::message_processor::stable_log] Program log: Token Address: AccountInfo { key: HUoBADsVGqbiUnYB9KSWB78VZrRwRoyEYu5firxjNgub, owner: 11111111111111111111111111111111, is_signer: false, is_writable: true, executable: false, rent_epoch: 18446744073709551615, lamports: 0, data.len: 0, .. }
[2024-10-30T13:20:08.783578000Z DEBUG solana_runtime::message_processor::stable_log] Program log: Token Account owner is 11111111111111111111111111111111
Perelyn-sama commented 2 weeks ago

figured it out, i didn't create the ata lmao, I need to sleep more