Coder Social home page Coder Social logo

tron-transaction-downloader's Introduction

tron-transaction-downloader

Node.js script to download all transactions for an account using TronGrid and write them to a CSV file.

This script now correctly looks up the number of decimal places for TRC10 tokens and writes the values in their decimals instead of raw integers.

For a script that downloads all token transfers (including internal transactions and TRC20) please see tron-transfers-downloader.

Usage

Software requirements

You may need the following software installed in order to use this tool:

  • Git
  • Node.js (version 12 or above)
  • Yarn Classic (i.e. version 1.x.x, NOT version 2 or above)

Installing the script

Please ensure Git is installed on your machine, go to an appropriate directory and use the git clone command with the clone URL provided by GitHub to get a copy of the code.

Obtaining an API key from TronGrid

You may need a TronGrid API key to use TronGrid according to the documentation. This key should be kept secret and not shared with others! If you share it by accident, you should delete it and create a new one.

  1. If you don't have one already, create an account at TronGrid and activate it using the link sent to your email.
  2. Log in to your TronGrid account.
  3. Click the Create API Key button.
  4. Enter any name you want for the API key.
  5. On the API keys page click the Check button under View API Key. You should see your API Key and several security settings for the key (please don't change these).
  6. Create a file called .env in the directory you have this code cloned to.
  7. Copy the API key from the TronGrid website into your .env file preceded by the text TRONGRID_API_KEY=. Your .env file contents should look like the following:
TRONGRID_API_KEY=12345678-1234-1234-1234-12345678abcd

Running the app

In a terminal:

  1. Change to the directory of the script.
  2. Run yarn on its own to install the dependencies.
  3. Run the following command substituting in your TRON wallet address (square brackets indicate optional parameters - don't enter the brackets!):
yarn start TRON-ADDRESS [output.csv]

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.