3

For testing purpose, is there a way to obtain/airdrop some amount of an arbitrary token on devnet? The only thing I know about the token I would like to request an airdrop for, is the token mint address (the pubkey).

For example, I can airdrop myself devnet SOL with solana airdrop xxx, but what I need is some other tokens, e.g. USDC or some random XYZ token.

I do have tests running on a local validator, but my goal here is to run a test suit on devnet as well.

1 Answer 1

4

You can use SPL token faucet to airdrop "dummy" SPL tokens on devnet

5
  • 1
    Thanks, this definitely help, but doesn't seem to solve the whole problem. I later noticed that there are several USDC tokens on devnet, with different mint addresses. so I'll probably rephrase my question a bit: How to get airdrop from an arbitrary SPL token mint address on devnet. Commented Jul 29, 2022 at 9:03
  • 1
    @YifanJiang Are you asking for a way to airdrop for any given SPL token that already exists, or do you just want to be able to create a bunch of different SPL tokens yourself that you can airdrop?
    – Callum M
    Commented Jul 29, 2022 at 13:15
  • I think it's the former. Unless that functionality is built in .. you cant
    – C.OG
    Commented Jul 29, 2022 at 13:17
  • @CallumM, I'm asking about the possibility of the former Commented Aug 2, 2022 at 9:20
  • 1
    Yep for the former you can't. The SPL token faucet in this answer works because the creator of it owns an SPL token and their app can mint it to anyone. Your best bet is probably just to create your own tokens and use their address as your USDC (or w/e) on devnet, and a different address on mainnet.
    – Callum M
    Commented Aug 2, 2022 at 9:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.