NeblioTeam / ntp1_airdrop

Example code used to Airdrop NTP1 tokens to a list of Neblio Addresses

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ntp1_airdrop

This repository has been forked from the excellent work done by the Trifid Team. It has been updated, optimized, and new features have been added to make it easier to airdrop NTP1 tokens to Neblio addresses.

If this script helped you successfully execute an NTP1 airdrop, please consider donating to the Trifid Team at the address below.

Original Message from the Trifid Team

This was the code used to airdrop Trifid to a list of addresses and amounts based on our snapshot of the Neblio blockchain.

If this tool has been helpful please donate NEBL and/or NTP1 tokens to our Dev Team Wallet: NMi41ze2XnxJrMNGtSGheGqLR3h4dabREW

Prerequisites

  1. nodeJS v8.x (for airdrop script)
  2. Python (for address checker script)

Instructions

  1. Clone the repository git clone https://github.com/NeblioTeam/ntp1_airdrop.git

    OR Download a .zip of the repo from https://github.com/NeblioTeam/ntp1_airdrop/archive/master.zip and extract it.


  1. Run the following commands:
  • cd ntp1_airdrop

  • npm install request-promise

  • npm install git://github.com/NeblioTeam/bitcoinjs-lib.git#nebliojs-lib


  1. Rename secrets.json.template to secrets.json. Set up the secrets.json and snapshot.csv files as below:
  • secrets.json
{
    "from_address": "<>",
    "private_key": "<>",
    "token_id": "<>",
    "network": "mainnet",
    "debug": false
}

Note: from_address and private_key refer to the address you are sending the NTP1 tokens from.

  • snapshot.csv
    address,amount
    add1,amt1
    add2,amt2
    etc.,etc.

Note: The example snapshot.csv included in this repo was generated by the Neblio Team at block height 2143965 on testnet. Balances below 5 and above 1 million have been excluded.

If you need help generating a snapshot, contact us.


  1. Run python addressChecker.py. This will use Neblio's insight API to check that all addresses on the list are valid. At the end of running it will print out a list of valid addresses in the snapshot.csv format, as well as a list of invalid addresses. The valid list can be copy & pasted into snapshot.csv to clear out any invalid addresses.
$ python addressChecker.py
Network: testnet
Debug: False
--------
Address: TFJm3hpdsUMyn6feoDXopNes71Q9NZqYBG: 135.9933
Address: TSm7iFVrx55gQR6hxtchwopcUDt531UN7a: 0.0072
Address: TDswpA5DuSrwTnH3C2Ytj2f6ewYMXAEHct: 0.0072
...
Address: TY4HbBuHY22WaUg6BwJxMJbe5t5Q6SBBk9: 0.0018
Address: TE5Jt57Ya624xGSXVqwqoKMde4tJNiTVye: 0.003

----VALID LIST----
address,amount
TFJm3hpdsUMyn6feoDXopNes71Q9NZqYBG,10
TSm7iFVrx55gQR6hxtchwopcUDt531UN7a,11
TDswpA5DuSrwTnH3C2Ytj2f6ewYMXAEHct,12
...
TY4HbBuHY22WaUg6BwJxMJbe5t5Q6SBBk9,1
TE5Jt57Ya624xGSXVqwqoKMde4tJNiTVye,32

  1. Once you are sure all addresses are valid, Run node ntp1_airdrop.js. This will use Neblio's APIs to broadcast 25 send_token requests at a time and pause to wait for 1 block confirmation before proceeding to the next 25.
$ node ntp1_airdrop.js
From:  THYsXfM4kq4Ebjs4PXRt2AqX1q8D4DgW5v
Private Key: ****************************************************
Token ID:  La57kZVgLiELmHqX6CvTY8uaQVSiGRS3KiG3ng
Network:  testnet
Debug:  false
----------------
Iteration:  1  of  10  Starting.
Transaction 3539bfbbbc4c1248c8ee4d6efb74d06fc5c260ac35055edfdd4bc0ae3ca77bea sent. Waiting for confirmation...
Transaction 3539bfbbbc4c1248c8ee4d6efb74d06fc5c260ac35055edfdd4bc0ae3ca77bea confirmed!
Iteration:  2  of  10  Starting.
...
Iteration:  10  of  10  Starting.
Transaction 0047eb3271bf388bf536c214312f75e1e717caf0b86169541681afcd0514c3b6 sent. Waiting for confirmation...
Transaction 0047eb3271bf388bf536c214312f75e1e717caf0b86169541681afcd0514c3b6 confirmed!

About

Example code used to Airdrop NTP1 tokens to a list of Neblio Addresses


Languages

Language:JavaScript 81.1%Language:Python 18.9%