https://github.com/semasping/Accusta - Accusta - this is a service with Statistic of Steem Accounts.
- add block listener to search for various events in the blockchain
- add function for sending tokens
- update export to
csvfor Curation and Benefactor rewards
Accusta for Steem link: https://steemit.accusta.tk/
More detailed list:
5e6ca9a([update] csv export for curator rewards)
23523c7([add] csv export for benefactor rewards [add] csv export for curator rewards)
9e0e570([add] new queue settings for process author rewards)
b07e3e7([update] mongodb settings [add] test for tokenSend)
b650f74([add] block listener [add] command for get block [add] job for process blocks [add] model BchBlock for saving information about processed blocks)
668a84f([add] to blockchain api add new function getPost() for receiving posts from Blockchain [add] new wss servers to GOLOS node list)
b79ee14([add] to blockchain api add new function sendTokenToMany() for sending STEEM/SBD/GOLOS/GBG to any accounts)
7ddc30d([add] to blockchain api add new function getOpsInBlock for receiving all operations from blocks)
4816cf1([add] to blockchain api add new function getOpsInBlock for receiving all operations from blocks)
f2e86fc([update] new articles)
More about block listner
Some time ago I had a telegram notifier bot, which was able to notify about various events that occurred in the blockchain.
But he was abandoned for various reasons. And now I decided to restore it as part of the Accusta system.
The listener of the blocks is necessary for catching events occurring in the blockchain.
There is command
which starts by cron every 10 minutes. It takes
last_irreversible_block_num and processed the difference from last with the previous start. Then for each block, a separate job is run in a special queue
And then in ProcessBchBlock is run more jobs for each event which need to be processed.
More about sending tokens
example of package sending tokens STEEM:
$accounts = [ 0 => [ 'to'=>'semasping', 'amount'=>'0.001 STEEM', 'memo'=>'test', ], 1 => [ 'to'=>'semasping', 'amount'=>'0.001 STEEM', 'memo'=>'test2', ], 2 => [ 'to'=>'semasping', 'amount'=>'0.001 STEEM', 'memo'=>'test3', ], 3 => [ 'to'=>'semasping', 'amount'=>'0.001 STEEM', 'memo'=>'test4', ] ]; $from = 'semasping'; $key = getenv('STEEM_SEMASPING_ACTIVE_WIF'); //$key = getenv('GOLOS_SEMASPING_ACTIVE_WIF'); $result = \App\semas\SteemitApi::sendTokenToMany($accounts,$from,$key); echo $result // return block_num or false
Code for sending tokens are in https://github.com/semasping/Accusta/blob/1.2.1/app/semas/SteemitApi.php#L1097
Transactions sing are in https://github.com/t3ran13/php-graphene-node-client.
For ON broadcast in
php-graphene-node-client I need to install some additional components and extensions on the server.
- secp256k1 (how to install secp256k1-php)
More about export to csv
Now data for export getting from mongodb:
$rewards = $this->getRewardsAll($acc); return $this->exportToExcel($rewards->toArray(), 'CuratorRewards', $acc);
Where getRewardsAll() is different for each reward.
https://github.com/semasping/Accusta/blob/1.2.1/app/Http/Controllers/CuratorRewardsController.php#L285 - for curation rewards
https://github.com/semasping/Accusta/blob/1.2.1/app/Http/Controllers/BenefactorRewardsController.php#L397 - for benefactor rewards
Commits in this release:
Link to Comparing changes for this release: https://github.com/semasping/Accusta/compare/1.1.1...1.2.1
Plans for next releases:
- Show separated lists of Posts and Comments
- Add rewards for Post and Comments.
- Add separated Charts for rewards by months for Post and Comment