ASA airdrops and Open sale for Algos

We have created an ASA, and we have the following requirements, request a suitable approach to achieve the functionality.

  1. Sale of ASA for Algos: User should be able to send x Aglos receive x ASA tokens as per the sale schedule.
  2. Recieve airdrop of xASA tokens as per specific schedule for every unique wallet address.

To acheive the above functionalities, whats the best approach. Any one who can suggest a suitable approach in the above requirement appreciated.

Welcome to Algorand!

For the first part, you can use GitHub - algorandfoundation/buildweb3: Repository for the Algorand class of the "Building with Blockchain for Web 3.0" course ( (you need to read the previous parts which also give an introduction to Algorand and ASA).

For the second part, the receiver must opt-in to the ASA before being able to receive it. They must buy some Algos for that purpose and then send an opt-in transactions. You may also consider sending them 0.201 Algo for that purpose. But they would still need to sign the opt-in transaction.
Once opt-in is dealt with, you can just send the ASA airdrop using a scripts generating and signing those transactions.

Is opt-in via algosigner and to participate is airdrop is possible through algosigner?

For example to participate in open sale, sign via algosigner, and
To participate in airdrop sign via algo signer is possible.

We wanted to airdrop to every unique Algorand address.

Yes, algosigner can sign any transaction including opt-in.

To airdrop to every unique Algorand address, you may consider having an off-chain server signing the airdrop transaction to users that are interested, and exclude addresses that have been created too recently.
Otherwise, a user can create many addresses to get many times the airdrop.

This is exactly what I’m trying to figure out. Do you have anywhere to point me to get some examples and how to’s? I’d really appreciate it. The best I can figure so far, is that I need to have a smart contract do this. Also, it sounds like I have to give the smart contract my mnemonic password? That has me sketched out. Any info would be swell. Thanks!

You do not need smart contracts for the above. Note that smart contracts never include the mnemonic as a smart contract is always completely public.

Assuming the user already opted in the asset, you just need to have a script in Python, Go, Java or JS that uses one of the SDK to transfer the asset to them. You can see Assets - Algorand Developer Portal for how to transfer an asset this way.

The tutorial GitHub - algorandfoundation/buildweb3: Repository for the Algorand class of the "Building with Blockchain for Web 3.0" course ( is step-by-step.

1 Like

This is exactly what I was looking for. It’s like I had tunnel vision on smart contracts and it makes sense why I wasn’t finding what I was looking for <3