Hive Engine Airdrops Contract

image

Recently I've developed a smart contract for hive-engine which can be used to airdrop tokens without using a third party tool or script.

The contract is now officially live and ticking since hive block 48664773. Like almost every other transaction on hive-engine you have to broadcast a custom-json signed with active key to use it.

Parameters:

to initiate a successful airdrop you need to pass the following parameters in newAirdrop action:

  • symbol
    Symbol of the token to airdrop, i.e. LEO

  • type
    Distribution type, how'd you like to airdrop tokens? transfer or stake

  • list
    An array of users you'd like to airdrop on, to and quantity in each element, i.e. [["ali-h", "50.56"], ["rishi", "45.5"]]

Example:

{
    "contractName": "airdrops",
    "contractAction": "newAirdrop",
    "contractPayload": {
        "symbol": "LEO",
        "type": "stake",
        "list": [
          ["ali-h", "100"],
          ["mrs.wootanu", "71.5"],
          ["satoshi.real", "0.555223"]
        ]
    }
}

Fee

Doing an airdrop will cost you 0.1 BEE token per account in the list (i.e. 100 BEE/1000 accounts)

How it works?

You must have total quantity to airdrop as liquid balance in your account, you must have enough BEE tokens to cover the fee. After you initiate an airdrop, the distribution begins from the next block which processes up to 50 transactions each block. considering a block every 3 seconds if you airdrop on 1000 accounts it would take a minute to process them all.

Usage:

If you are not a developer and don't know how to broadcast a custom-json, I've created a very simple UI tool to use this contract.

image.png

Simple go to https://ali-h.github.io/airdrop-frontend/ and Enter Symbol, Select Distribution Type and you can upload your list in CSV format or write it down in the box like ali-h,150. Now click Next and you will be shown a summary of the airdrop with fee.

image.png

You can also see the raw json for the transaction you are going to broadcast by clicking 'Show JSON' button. Now enter your username in the given box and click confirm to Sign the transaction via keychain.

After you sign the transaction It will attempt to receive the response from hive-engine, this can take a few seconds. There it will let you know if you're airdrop is initiated and on its way or you had some error.

image.png

For example, in the above picture where I tried to airdrop VAULT tokens to 6 accounts with stake method but I got an error that Staking is not enabled on the token.

For further help understanding how it works, please checkout the official documentation here

Links:

Airdrop FrontEnd
Contract Code
Documentation
Hive Profile
GitHub Profile
Discord: Ali H#7057

H2
H3
H4
3 columns
2 columns
1 column
1 Comment
Ecency