diff --git a/common/protob/messages-tezos.proto b/common/protob/messages-tezos.proto index e429ce8b86..1bc37b8a00 100644 --- a/common/protob/messages-tezos.proto +++ b/common/protob/messages-tezos.proto @@ -55,6 +55,8 @@ message TezosSignTx { optional TezosTransactionOp transaction = 4; // Tezos transaction operation optional TezosOriginationOp origination = 5; // Tezos origination operation optional TezosDelegationOp delegation = 6; // Tezos delegation operation + optional TezosProposalOp proposal = 7; // Tezos proposal operation + optional TezosBallotOp ballot = 8; // Tezos ballot operation /* * Tezos contract ID */ @@ -120,6 +122,24 @@ message TezosSignTx { optional uint64 storage_limit = 5; optional bytes delegate = 6; } + /** + * Structure representing information for proposal + */ + message TezosProposalOp { + optional bytes source = 1; + optional uint64 period = 2; + optional uint64 bytes_in_next_field = 3; + optional bytes proposals = 4; + } + /** + * Structure representing information for ballot + */ + message TezosBallotOp { + optional bytes source = 1; + optional uint64 period = 2; + optional bytes proposal = 3; + optional bytes ballot = 4; + } } /** diff --git a/core/src/apps/tezos/writers.py b/core/src/apps/tezos/writers.py deleted file mode 100644 index 0c10054c82..0000000000 --- a/core/src/apps/tezos/writers.py +++ /dev/null @@ -1,24 +0,0 @@ -from apps.common.writers import ( - write_bytes, - write_uint8, - write_uint32_be, - write_uint64_be, -) - -write_uint8 = write_uint8 -write_uint32 = write_uint32_be -write_uint64 = write_uint64_be -write_bytes = write_bytes - - -def write_bool(w: bytearray, boolean: bool): - if boolean: - write_uint8(w, 255) - else: - write_uint8(w, 0) - - -# write uint16 in be -def write_uint16(w: bytearray, n: int): - w.append((n >> 8) & 0xFF) - w.append(n & 0xFF)