Generate a balance report for the RHOC REV conversion. Outputs a list of all keys along with RHOC balance (in wei) and a 0|1 flag to indicate whether or not there is a contract at that address.
This tool is provided on an "as is" basis, without warranties or conditions of any kind. We strongly recommend users to validate results. We take no responsibilty for any loss incurred through the use of this code.
You need Node.js 11.x. Clone the repo and run npm install from the project root:
$ git clone https://github.com/rchain/rhoc-balance-reporter.git
$ cd rhoc-balance-reporter
$ npm install
Specify options by setting shell variables:
BLOCK=<block height>
ETH_API_URL=<http provider>
Eth provider defaults to local node (http://localhost:8545
).
$ BLOCK=7588056 node balances >wallets_7588056.txt
- Timestamp balances.csv output so that it can be included in version control.
This tool was originally written by @desaperados
(https://github.com/desaperados/rrc). It used to call balanceOf()
contract method to get address balances. This however doesn't work
with older blocks (as right bound) when querying a state pruning node
like Parity. This rewrite calculates balances by netting transfers.