-
-
Save emre/77fc693e0be1d377644310c5d5168015 to your computer and use it in GitHub Desktop.
producer rewards
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from beem.account import Account | |
from beem.amount import Amount | |
def main(): | |
witness_account = Account('emrebeyler') | |
total_rewarded_vests = 0 | |
total_blocks = 0 | |
for op in witness_account.history_reverse(only_ops=["producer_reward"]): | |
total_blocks += 1 | |
total_rewarded_vests += Amount(op["vesting_shares"]).amount | |
print("Total block producer reward in VESTS:", total_rewarded_vests) | |
print("Total block producer reward in SP:", | |
witness_account.steem.vests_to_sp(total_rewarded_vests)) | |
print("Total blocks produced:", total_blocks) | |
if __name__ == '__main__': | |
main() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment