Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

get_associated_token_address() parameters reversed compared to solana/web3.js #470

Open
clmentcoutet opened this issue Nov 25, 2024 · 0 comments

Comments

@clmentcoutet
Copy link

In this function get_associated_token_address(owner: Pubkey, mint: Pubkey, token_program_id: Pubkey = TOKEN_PROGRAM_ID), the parameters are inversed (mint and owner) compared to the exact same function from solana/web.js
export function getAssociatedTokenAddressSync( mint: PublicKey, owner: PublicKey, allowOwnerOffCurve = false, programId = TOKEN_PROGRAM_ID, associatedTokenProgramId = ASSOCIATED_TOKEN_PROGRAM_ID )
This is very confusing and lead to mistake when trying to replicate JS example in Python

@clmentcoutet clmentcoutet changed the title get_associated_token_address() parameters reversed from solana/web3.js get_associated_token_address() parameters reversed compared to solana/web3.js Nov 25, 2024
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

No branches or pull requests

1 participant