From 2026833a836007e45f16395a9ca3b31d02e98f87 Mon Sep 17 00:00:00 2001
From: Holger Nahrstaedt <holgernahrstaedt@gmx.de>
Date: Wed, 30 Jun 2021 21:29:50 +0200
Subject: [PATCH] Adapt changes of HF25 to operationids

---
 CHANGELOG.rst               |   6 +-
 beem/version.py             |   2 +-
 beemapi/version.py          |   2 +-
 beembase/operationids.py    | 242 +++++++++++++-----------------------
 beembase/version.py         |   2 +-
 beemgraphenebase/version.py |   2 +-
 setup.py                    |   2 +-
 7 files changed, 99 insertions(+), 159 deletions(-)

diff --git a/CHANGELOG.rst b/CHANGELOG.rst
index 31d4f62..13fac61 100644
--- a/CHANGELOG.rst
+++ b/CHANGELOG.rst
@@ -1,8 +1,12 @@
 Changelog
 ========
+0.24.27
+-------
+* Adapt changes of HF25 to operationids
+
 0.24.26
 -------
-* reverting change to operationsid for HF24, please uncoment line 158 in file beembase\operationids.py for using in HF25
+* reverting change to operationsid 
 
 0.24.25
 -------
diff --git a/beem/version.py b/beem/version.py
index 4c03093..373ee2c 100644
--- a/beem/version.py
+++ b/beem/version.py
@@ -1,2 +1,2 @@
 """THIS FILE IS GENERATED FROM beem SETUP.PY."""
-version = '0.24.26'
+version = '0.24.27'
diff --git a/beemapi/version.py b/beemapi/version.py
index 4c03093..373ee2c 100644
--- a/beemapi/version.py
+++ b/beemapi/version.py
@@ -1,2 +1,2 @@
 """THIS FILE IS GENERATED FROM beem SETUP.PY."""
-version = '0.24.26'
+version = '0.24.27'
diff --git a/beembase/operationids.py b/beembase/operationids.py
index e69d6d3..6ac8106 100644
--- a/beembase/operationids.py
+++ b/beembase/operationids.py
@@ -1,161 +1,97 @@
 # -*- coding: utf-8 -*-
 #: Operation ids
-ops_HF25 = [
-    'vote',
-    'comment',
-    'transfer',
-    'recurring_transfer',
-    'transfer_to_vesting',
-    'withdraw_vesting',
-    'limit_order_create',
-    'limit_order_cancel',
-    'feed_publish',
-    'convert',
-    'collateralized_convert'
-    'account_create',
-    'account_update',
-    'witness_update',
-    'account_witness_vote',
-    'account_witness_proxy',
-    'pow',
-    'custom',
-    'report_over_production',
-    'delete_comment',
-    'custom_json',
-    'comment_options',
-    'set_withdraw_vesting_route',
-    'limit_order_create2',
-    'claim_account',
-    'create_claimed_account',
-    'request_account_recovery',
-    'recover_account',
-    'change_recovery_account',
-    'escrow_transfer',
-    'escrow_dispute',
-    'escrow_release',
-    'pow2',
-    'escrow_approve',
-    'transfer_to_savings',
-    'transfer_from_savings',
-    'cancel_transfer_from_savings',
-    'custom_binary',
-    'decline_voting_rights',
-    'reset_account',
-    'set_reset_account',
-    'claim_reward_balance',
-    'delegate_vesting_shares',
-    'account_create_with_delegation',
-    'witness_set_properties',
-    'account_update2',
-    'create_proposal',
-    'update_proposal_votes',
-    'remove_proposal',
-    'update_proposal',
-    'fill_convert_request',
-    'author_reward',
-    'curation_reward',
-    'comment_reward',
-    'liquidity_reward',
-    'producer_reward',
-    'interest',
-    'fill_vesting_withdraw',
-    'fill_order',
-    'shutdown_witness',
-    'fill_transfer_from_savings',
-    'hardfork',
-    'comment_payout_update',
-    'return_vesting_delegation',
-    'comment_benefactor_reward',
-    'clear_null_account_balance',
-    'proposal_pay',
-    'sps_fund',
-    'hardfork_hive',
-    'hardfork_hive_restore',
-    'delayed_voting',
-    'consolidate_treasury_balance',
-    'effective_comment_vote',
-    'ineffective_delete_comment',
-    'sps_convert'
-]
+
+# https://gitlab.syncad.com/hive/hive/-/blob/master/libraries/protocol/include/hive/protocol/operations.hpp
 ops = [
-    'vote',
-    'comment',
-    'transfer',
-    'transfer_to_vesting',
-    'withdraw_vesting',
-    'limit_order_create',
-    'limit_order_cancel',
-    'feed_publish',
-    'convert',
-    'account_create',
-    'account_update',
-    'witness_update',
-    'account_witness_vote',
-    'account_witness_proxy',
-    'pow',
-    'custom',
-    'report_over_production',
-    'delete_comment',
-    'custom_json',
-    'comment_options',
-    'set_withdraw_vesting_route',
-    'limit_order_create2',
-    'claim_account',
-    'create_claimed_account',
-    'request_account_recovery',
-    'recover_account',
-    'change_recovery_account',
-    'escrow_transfer',
-    'escrow_dispute',
-    'escrow_release',
-    'pow2',
-    'escrow_approve',
-    'transfer_to_savings',
-    'transfer_from_savings',
-    'cancel_transfer_from_savings',
-    'custom_binary',
-    'decline_voting_rights',
-    'reset_account',
-    'set_reset_account',
-    'claim_reward_balance',
-    'delegate_vesting_shares',
-    'account_create_with_delegation',
-    'witness_set_properties',
-    'account_update2',
-    'create_proposal',
-    'update_proposal_votes',
-    'remove_proposal',
-    'update_proposal',
-    'fill_convert_request',
-    'author_reward',
-    'curation_reward',
-    'comment_reward',
-    'liquidity_reward',
-    'producer_reward',
-    'interest',
-    'fill_vesting_withdraw',
-    'fill_order',
-    'shutdown_witness',
-    'fill_transfer_from_savings',
-    'hardfork',
-    'comment_payout_update',
-    'return_vesting_delegation',
-    'comment_benefactor_reward',
-    'producer_reward',
-    'clear_null_account_balance',
-    'proposal_pay',
-    'sps_fund',
-    'hardfork_hive',
-    'hardfork_hive_restore',
-    'delayed_voting',
-    'consolidate_treasury_balance',
-    'effective_comment_vote',
-    'ineffective_delete_comment',
-    'sps_convert'
+    'vote', #0
+    'comment', #1
+    'transfer', #2
+    'transfer_to_vesting', #3
+    'withdraw_vesting', #4
+    'limit_order_create', #5
+    'limit_order_cancel', #6
+    'feed_publish', #7
+    'convert', #8
+    'account_create', #9
+    'account_update', #10
+    'witness_update', #11
+    'account_witness_vote', #12
+    'account_witness_proxy', #13
+    'pow', #14
+    'custom', #15
+    'report_over_production', #16
+    'delete_comment', #17
+    'custom_json', #18
+    'comment_options', #19
+    'set_withdraw_vesting_route', #20
+    'limit_order_create2', #21
+    'claim_account', #22
+    'create_claimed_account', #23
+    'request_account_recovery', #24
+    'recover_account', #25
+    'change_recovery_account', #26
+    'escrow_transfer', #27
+    'escrow_dispute', #28
+    'escrow_release', #29
+    'pow2', #30
+    'escrow_approve', #31
+    'transfer_to_savings', #32
+    'transfer_from_savings', #33
+    'cancel_transfer_from_savings', #34
+    'custom_binary', #35
+    'decline_voting_rights', #36
+    'reset_account', #37
+    'set_reset_account', #38
+    'claim_reward_balance', #39
+    'delegate_vesting_shares', #40
+    'account_create_with_delegation', #41
+    'witness_set_properties', #42
+    'account_update2', #43
+    'create_proposal', #44
+    'update_proposal_votes', #45
+    'remove_proposal', #46
+    'update_proposal', #47
+    'collateralized_convert', #48
+    'recurrent_transfer', #49
+    # virtual operations below this point
+    'fill_convert_request', #last_regular + 1
+    'author_reward', #last_regular + 2
+    'curation_reward', #last_regular + 3
+    'comment_reward', #last_regular + 4
+    'liquidity_reward', #last_regular + 5
+    'interest', #last_regular + 6
+    'fill_vesting_withdraw', #last_regular + 7
+    'fill_order', #last_regular + 8
+    'shutdown_witness', #last_regular + 9
+    'fill_transfer_from_savings', #last_regular + 10
+    'hardfork', #last_regular + 11
+    'comment_payout_update', #last_regular + 12
+    'return_vesting_delegation', #last_regular + 13
+    'comment_benefactor_reward', #last_regular + 14
+    'producer_reward', #last_regular + 15
+    'clear_null_account_balance', #last_regular + 16
+    'proposal_pay', #last_regular + 17
+    'sps_fund', #last_regular + 18
+    'hardfork_hive', #last_regular + 19
+    'hardfork_hive_restore', #last_regular + 20
+    'delayed_voting', #last_regular + 21
+    'consolidate_treasury_balance', #last_regular + 22
+    'effective_comment_vote', #last_regular + 23
+    'ineffective_delete_comment', #last_regular + 24
+    'sps_convert', #last_regular + 25
+    'expired_account_notification', #last_regular + 26
+    'changed_recovery_account', #last_regular + 27
+    'transfer_to_vesting_completed', #last_regular + 28
+    'pow_reward', #last_regular + 29
+    'vesting_shares_split', #last_regular + 30
+    'account_created', #last_regular + 31
+    'fill_collateralized_convert_request', #last_regular + 32
+    'system_warning', #last_regular + 33,
+    'fill_recurrent_transfer', #last_regular + 34
+    'failed_recurrent_transfer' # last_regular + 35
 ]
+
 operations = {o: ops.index(o) for o in ops}
-# uncoment when using with HF25
-# operations = {o: ops_HF25.index(o) for o in ops_HF25}
 
 
 def getOperationNameForId(i):
diff --git a/beembase/version.py b/beembase/version.py
index 4c03093..373ee2c 100644
--- a/beembase/version.py
+++ b/beembase/version.py
@@ -1,2 +1,2 @@
 """THIS FILE IS GENERATED FROM beem SETUP.PY."""
-version = '0.24.26'
+version = '0.24.27'
diff --git a/beemgraphenebase/version.py b/beemgraphenebase/version.py
index 4c03093..373ee2c 100644
--- a/beemgraphenebase/version.py
+++ b/beemgraphenebase/version.py
@@ -1,2 +1,2 @@
 """THIS FILE IS GENERATED FROM beem SETUP.PY."""
-version = '0.24.26'
+version = '0.24.27'
diff --git a/setup.py b/setup.py
index 0c17b9a..46dac8f 100755
--- a/setup.py
+++ b/setup.py
@@ -16,7 +16,7 @@ except LookupError:
     ascii = codecs.lookup('ascii')
     codecs.register(lambda name, enc=ascii: {True: enc}.get(name == 'mbcs'))
 
-VERSION = '0.24.26'
+VERSION = '0.24.27'
 
 tests_require = ['mock >= 2.0.0', 'pytest', 'pytest-mock', 'parameterized']
 
-- 
GitLab