def encoded_message(self) -> bytes: return b"".join([ int_to_bytes(self.tx_type(), 1), serialize_account_id(self.initiator_account_id), serialize_address(self.target), serialize_token_id(self.token.id), packed_fee_checked(self.fee), serialize_nonce(self.nonce), serialize_timestamp(self.valid_from), serialize_timestamp(self.valid_until) ])
def encoded_message(self) -> bytes: return b"".join([ int_to_bytes(0xff - self.tx_type(), 1), int_to_bytes(TRANSACTION_VERSION, 1), serialize_account_id(self.creator_id), serialize_address(self.creator_address), serialize_content_hash(self.content_hash), serialize_address(self.recipient), serialize_token_id(self.fee_token.id), packed_fee_checked(self.fee), serialize_nonce(self.nonce), ])
def encoded_message(self) -> bytes: return b"".join([ int_to_bytes(self.tx_type(), 1), serialize_account_id(self.account_id), serialize_address(self.from_address), serialize_address(self.to_address), serialize_token_id(self.token.id), int_to_bytes(self.amount, length=16), packed_fee_checked(self.fee), serialize_nonce(self.nonce), serialize_timestamp(self.valid_from), serialize_timestamp(self.valid_until) ])
def encoded_message(self) -> bytes: return b"".join([ int_to_bytes(0xff - self.tx_type(), 1), int_to_bytes(TRANSACTION_VERSION, 1), serialize_account_id(self.account_id), serialize_address(self.account), serialize_address(self.new_pk_hash), serialize_token_id(self.token.id), packed_fee_checked(self.fee), serialize_nonce(self.nonce), serialize_timestamp(self.valid_from), serialize_timestamp(self.valid_until) ])
def encoded_message(self) -> bytes: order_bytes = b''.join([ self.orders[0].encoded_message(), self.orders[1].encoded_message(), ]) return b"".join([ int_to_bytes(0xff - self.tx_type(), 1), int_to_bytes(TRANSACTION_VERSION, 1), serialize_account_id(self.submitter_id), serialize_address(self.submitter_address), serialize_nonce(self.nonce), ZkSyncLibrary().hash_orders(order_bytes), serialize_token_id(self.fee_token.id), packed_fee_checked(self.fee), packed_amount_checked(self.amounts[0]), packed_amount_checked(self.amounts[1]), ])