michaelhly / solana-py

Solana Python SDK
https://michaelhly.github.io/solana-py
MIT License
979 stars 252 forks source link

get_associated_token_address works for mainnet only #415

Closed tomasjur closed 5 months ago

tomasjur commented 5 months ago

Hi, get_associated_token_address in /spl/token/instructions.py works well, but gets an associated address which is in mainnet. It's kind of okay, but I need a devnet wallet address while developing.

Anyway, I could specify the endpoint? I have a workaround for this, but using this function as others with/from the AsyncClient or AsyncToken would help to minimize the code.

Thanks!

michaelhly commented 5 months ago

You set the endpoint when you initialize the client: https://github.com/michaelhly/solana-py#api-client