-
Install OpenEthereum 3.1 and Node.js 8.x LTS (with npm) if they are not installed.
-
Perform the next commands:
$ git clone https://github.com/varasev/test-block-reward
$ cd test-block-reward
$ npm i
$ npm start-
Watch a log in the console. It should be seen that
payoutKeybalances are being increased alternately by 1 eth and the vault's balance is being increased by 1 eth every 5 seconds. We also can see that the gas fee is being accrued alternately to mining keys when a sender transfers some amount to a receiver. An example log is available here: https://github.com/varasev/test-block-reward/blob/master/example.log -
To make charging of one coin to an extra receiver's account, perform the next command:
$ npm run accrue 1You'll see in the log that the balance of an extra receiver increased by one coin on the next block.
- To restart this setup from scratch, perform the next command:
$ npm restart- To completely stop and clear, perform the next command:
$ npm run clearDo the next command for contracts compilation, for saving their bytecodes to config/spec.json and for saving their ABIs to contracts/abis:
$ npm run buildNote that you have to perform npm restart after npm run build if you started it before.