You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The requirement is to produce a file containing all the visible public keys, account numbers and balances for a given coin up to a given block. It should be a command line tool written in go.
Parameters it should accept include:
block number. optional. If not supplied, use all available data. If supplied means up to and including this block.
contract address for given token. Required.
filename. If not supplied, output to stdout.
All errors and warnings should be written to stderr or appended to a log file. Errors should halt execution with detailed log output including block number, and full transaction details.
Output format will be further clarified, but for ease of manipulation (e.g. to sort and remove to p X) suggest simple CSV:
account number, public key, balance, number of transactions.
Presumably, for any account which has not done a transaction, the public key will be blank.
Number of transactions is nice to have to help reconciliation & testing., not mandatory.
This is the contract for TRX on the main net:
Contract TokenName Symbol Decimals Official Site #1: 0xf230b790e05390fc8295f4d3f60332c93bed42e2 Tronix TRX 6 -
Optimisations:
rather than start at block zero and work up, to save time it would be better to start form the block where the contract was created. This should either be a parameter passed in. The user who is running the script could get the block using etherscan.io, looking for the first transaction, and looking up its block (or is a better way?)
initial balance (totalSupply). Because the tool will look for transactions into and out of accounts, it can keep track of balances. The only account(s) it cant do this for are the contracts initial accounts, which are given a balance in the code itself, not via a transaction. Usually, the entire "totalSupply" is allocated to the account of the contract. In this case, we can either extract the "totalSupply" from the contracts "totalSupply()" function, or simply have it as an optional parameter. Given this total supply, and assuming that it is all allocated to the contract account, we can then calculate the balance of the contract account at the required end block. However, it is perfectly acceptable for now to simply show a negative balance for this one (or possibly more) accounts with initial balances allocated via the code (not transaction).
The tools main file should be in the root of the project so that it works with "go install"
The work should be committed to a dir below services, e.g. "eth-balance-extractor"
This task is in progress by Sigma.
The text was updated successfully, but these errors were encountered:
The requirement is to produce a file containing all the visible public keys, account numbers and balances for a given coin up to a given block. It should be a command line tool written in go.
Parameters it should accept include:
All errors and warnings should be written to stderr or appended to a log file. Errors should halt execution with detailed log output including block number, and full transaction details.
Output format will be further clarified, but for ease of manipulation (e.g. to sort and remove to p X) suggest simple CSV:
account number, public key, balance, number of transactions.
Presumably, for any account which has not done a transaction, the public key will be blank.
Number of transactions is nice to have to help reconciliation & testing., not mandatory.
This is the contract for TRX on the main net:
Contract TokenName Symbol Decimals Official Site
#1: 0xf230b790e05390fc8295f4d3f60332c93bed42e2 Tronix TRX 6 -
Optimisations:
The tools main file should be in the root of the project so that it works with "go install"
The work should be committed to a dir below services, e.g. "eth-balance-extractor"
This task is in progress by Sigma.
The text was updated successfully, but these errors were encountered: