From 2d0e3d6ce81e344d762ae630666e7392f3efca47 Mon Sep 17 00:00:00 2001 From: Marc Zeller Date: Fri, 7 Aug 2020 23:38:24 +0100 Subject: [PATCH] Remove burned Eth from total supply I think it's fair to remove balance of 0x00... of the total supply. Did this PR without really looking into it, might need to add and import BN lib :D have a great weekend! --- src/ethSupply.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/ethSupply.js b/src/ethSupply.js index 6aed51d..01717fc 100644 --- a/src/ethSupply.js +++ b/src/ethSupply.js @@ -9,6 +9,8 @@ export default class ethSupply { console.log('start'); const genesisSupply = 72009990.50; const batchSize = 10000; + const getBurnedETH = web3.eth.getBalance("0x0000000000000000000000000000000000000000") + const BurnedETH = parseInt(getBurnedETH) / 10**18 let blockRewards=0; let uncleRewards=0; const lastBlockNumber = await _this.web3.eth.getBlockNumber(); @@ -61,6 +63,6 @@ export default class ethSupply { console.log('\nGenesis Supply: '+genesisSupply); console.log('Block rewards:'+blockRewards); console.log('Uncle rewards:'+uncleRewards); - console.log('Total Supply: '+(genesisSupply+blockRewards+uncleRewards)+ ' at block:'+lastBlockNumber); + console.log('Total Supply: '+((genesisSupply+blockRewards+uncleRewards) - BurnedETH) + ' at block:'+lastBlockNumber); } }