BitShares-Core  6.1.0
BitShares blockchain implementation and command-line interface software
ticket.hpp
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2020 Abit More, and contributors.
3  *
4  * The MIT License
5  *
6  * Permission is hereby granted, free of charge, to any person obtaining a copy
7  * of this software and associated documentation files (the "Software"), to deal
8  * in the Software without restriction, including without limitation the rights
9  * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10  * copies of the Software, and to permit persons to whom the Software is
11  * furnished to do so, subject to the following conditions:
12  *
13  * The above copyright notice and this permission notice shall be included in
14  * all copies or substantial portions of the Software.
15  *
16  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19  * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22  * THE SOFTWARE.
23  */
24 #pragma once
27 
28 #include <fc/optional.hpp>
29 
30 namespace graphene { namespace protocol {
31 
34  {
35  liquid = 0,
41  };
42 
48  {
50 
52  account_id_type account;
55 
57 
58  account_id_type fee_payer()const { return account; }
59  void validate()const;
60  };
61 
67  {
69 
71  ticket_id_type ticket;
72  account_id_type account;
75 
77 
78  account_id_type fee_payer()const { return account; }
79  void validate()const;
80  };
81 
82 } } // graphene::protocol
83 
86 
89 
93  (fee)(ticket)(account)(target_type)(amount_for_new_target)(extensions) )
94 
97 
future_extensions::flat_set_type extensions_type
Definition: base.hpp:156
ticket_type
Type of a ticket.
Definition: ticket.hpp:33
#define FC_REFLECT(TYPE, MEMBERS)
Specializes fc::reflector for TYPE.
Definition: reflect.hpp:388
asset amount
The amount of the ticket.
Definition: ticket.hpp:54
extensions_type extensions
Unused. Reserved for future use.
Definition: ticket.hpp:56
Definition: api.cpp:48
ticket_id_type ticket
The ticket to update.
Definition: ticket.hpp:71
unsigned_int target_type
The target ticket type, see ticket_type.
Definition: ticket.hpp:53
account_id_type fee_payer() const
Definition: ticket.hpp:78
Updates an existing ticket.
Definition: ticket.hpp:66
provides stack-based nullable value similar to boost::optional
Definition: optional.hpp:20
FC_REFLECT_ENUM(graphene::net::core_message_type_enum,(trx_message_type)(block_message_type)(core_message_type_first)(item_ids_inventory_message_type)(blockchain_item_ids_inventory_message_type)(fetch_blockchain_item_ids_message_type)(fetch_items_message_type)(item_not_available_message_type)(hello_message_type)(connection_accepted_message_type)(connection_rejected_message_type)(address_request_message_type)(address_message_type)(closing_connection_message_type)(current_time_request_message_type)(current_time_reply_message_type)(check_firewall_message_type)(check_firewall_reply_message_type)(get_current_connections_request_message_type)(get_current_connections_reply_message_type)(core_message_type_last))(different_chain)(already_connected)(connected_to_self)(not_accepting_connections)(blocked)(invalid_hello_message)(client_too_old))(inbound)(outbound))(firewalled)(not_firewalled))(unable_to_connect)(connection_successful)) namespace std
account_id_type fee_payer() const
Definition: ticket.hpp:58
#define GRAPHENE_DECLARE_EXTERNAL_SERIALIZATION(type)
Definition: types.hpp:85
account_id_type account
The account who owns the ticket.
Definition: ticket.hpp:72
#define GRAPHENE_BLOCKCHAIN_PRECISION
Definition: config.hpp:29
optional< asset > amount_for_new_target
The amount to be used for the new target.
Definition: ticket.hpp:74
unsigned_int target_type
New target ticket type, see ticket_type.
Definition: ticket.hpp:73
account_id_type account
The account who creates the ticket.
Definition: ticket.hpp:52
extensions_type extensions
Unused. Reserved for future use.
Definition: ticket.hpp:76