npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

tronair-cli

v0.1.9

Published

Command line tool for doing airdrops on the TRON blockchain

Downloads

18

Readme

tronair-cli

The ultimate command-line airdrop tool for the Tron blockchain, by Community Node SR

Installation

mkdir test_tronair

cd test_tronair

npm init //accept default options..

npm install tronair-cli

You need to declare an environment variable (at the level of OS) called PK containing the private key of the wallet from which you will perform the airdrop.

In the case you create a specific wallet only for airdropping porpouses, keep in mind you will need Tron blockchain bandwidth or you will pay all the transactions with TRX: A single transfer is ~200 bytes, so it costs 200 Sun (0.002 TRX). Airdropping to 10k addresses would cost 20 TRX.

Create a file index.js in test_tronair directory with this contents:

var tronair = require("tronair-cli");
var m = tronair.start();

Execution

tronair-cli can run both ways, with or without human interaction

- Human attended

Just run node index.js and this will start a promt that will ask all the details about your airdrop preferences (what token are you going to airdrop, the amount, to whom are you airdropping, etc)

- Human un-attended

If you need, let's say, to cron schedule your airdrops, then you can just pass the airdrop arguments in the command line:

This is a list of the command line options:

-h, --help              Shows this help
-a, --amount  number    Amount to be airdropped (your wallet balance should have at least that amount) (ie: 1000322)
-i, --tokenID number    The id of the token to airdrop (ie: 1000322)
-v, --voters  string    Airdrop goes to wallets voting this SR/candidate address (ie: TDGy2M9qWBepSHDEutWWxWd1JZfmAed3BP)
-o, --holders number    Airdrop goes to wallets holding token with this id (ie: 1002000)
-e, --equal             The rewards will equally divided among all holders/voters
-p, --proportional      The rewards will be proportionally divided based on number of votes/holdings
  • Human un-attended examples

Example: Let's airdrop 750000 TRUC tokens to voters of CommunityNode, proportionally to their votes:

    node index.js  -i 1000322 -v TDGy2M9qWBepSHDEutWWxWd1JZfmAed3BP -a 750000 -p

Example: Let's airdrop 999999 HELP tokens to holders of TRUC, equally splitted amongst all the wallets:

    node index.js  -i 1000562 -h 1000322 -a 999999 -e

Results

Airdropping involves lots of transactions, and sometimes things can go wrong. In bot cases (attended or un-attended), tronair will generate json file for SUCCESS (SUCCESS_9999_TRUC_2019_03_25at19_11_33.json) and FAILED (FAILED_9999_TRUC_2019_03_25at19_11_33.json) transactions, with a descriptive name, where 9999 is the airdropped amount, along with the date and time.

//TODO: Feed tronair-cli with FAILED files. //TODO: Feed tronair with user CSV files

UPDATE: 04/06/2019 ADDED direct dependency on package apilister (https://www.npmjs.com/package/apilister) { apilister: { getVoters: [AsyncFunction: getVoters], getVotersTronairFormat: [AsyncFunction: getVotersTronairFormat], getHolders: [AsyncFunction: getHolders], getHoldersTronairFormat: [AsyncFunction: getHoldersTronairFormat] } }

Credits

Find us on Telegram: https://t.me/CommunityNode