diff --git a/beembase/operationids.py b/beembase/operationids.py index 6a1fbf7d5dbc84c6b761d63140f6e8c2ad63701c..4e72b5462ee6509886cd79198f76641896cfc4fb 100644 --- a/beembase/operationids.py +++ b/beembase/operationids.py @@ -50,7 +50,8 @@ ops = [ 'account_update2', 'create_proposal', 'update_proposal_votes', - 'remove_proposal', + 'remove_proposal', + 'update_proposal', 'fill_convert_request', 'author_reward', 'curation_reward', diff --git a/beembase/operations.py b/beembase/operations.py index ae505ef70a0893f03434c046fdadbebd20fb831d..a14b7b23a12fd40bdee22ca53ace15c13aea1de1 100644 --- a/beembase/operations.py +++ b/beembase/operations.py @@ -391,11 +391,30 @@ class Remove_proposal(GrapheneObject): super(Remove_proposal, self).__init__( OrderedDict([ - ('proposal_owner', String(kwargs["voter"])), + ('proposal_owner', String(kwargs["proposal_owner"])), ('proposal_ids', Array(proposal_ids)), ('extensions', extensions) ])) +class Update_proposal(GrapheneObject): + def __init__(self, *args, **kwargs): + if check_for_class(self, args): + return + if len(args) == 1 and len(kwargs) == 0: + kwargs = args[0] + + prefix = kwargs.get("prefix", default_prefix) + extensions = Array([]) + + super(Update_proposal, self).__init__( + OrderedDict([ + ('proposal_id', Uint64(kwargs["proposal_id"])), + ('creator', String(kwargs["creator"])), + ('daily_pay', Amount(kwargs["daily_pay"], prefix = prefix)), + ('subject', String(kwargs["subject"])), + ('permlink', String(kwargs["permlink"])), + ('extensions', extensions) + ])) class Witness_set_properties(GrapheneObject): def __init__(self, *args, **kwargs):