BitShares-Core
7.0.2
BitShares blockchain node software and command-line wallet software
|
Go to the documentation of this file.
31 #include <boost/preprocessor/seq/for_each.hpp>
32 #include <boost/preprocessor/seq/transform.hpp>
33 #include <boost/preprocessor/seq/elem.hpp>
34 #include <boost/preprocessor/seq/enum.hpp>
35 #include <boost/preprocessor/tuple/elem.hpp>
36 #include <boost/preprocessor/cat.hpp>
38 #include <boost/rational.hpp>
63 #define GRAPHENE_EXTERNAL_SERIALIZATION_VARIANT(ext, type) \
65 ext template void from_variant( const variant& v, type& vo, uint32_t max_depth ); \
66 ext template void to_variant( const type& v, variant& vo, uint32_t max_depth ); \
69 #define GRAPHENE_EXTERNAL_SERIALIZATION_PACK(ext, type) \
70 namespace fc { namespace raw { \
71 ext template void pack< datastream<size_t>, type >( \
72 datastream<size_t>& s, const type& tx, uint32_t _max_depth ); \
73 ext template void pack< sha256::encoder, type >( \
74 sha256::encoder& s, const type& tx, uint32_t _max_depth ); \
75 ext template void pack< datastream<char*>, type >( \
76 datastream<char*>& s, const type& tx, uint32_t _max_depth ); \
77 ext template void unpack< datastream<const char*>, type >( \
78 datastream<const char*>& s, type& tx, uint32_t _max_depth ); \
81 #define GRAPHENE_EXTERNAL_SERIALIZATION(ext, type) \
82 GRAPHENE_EXTERNAL_SERIALIZATION_VARIANT(ext, type) \
83 GRAPHENE_EXTERNAL_SERIALIZATION_PACK(ext, type)
85 #define GRAPHENE_DECLARE_EXTERNAL_SERIALIZATION(type) GRAPHENE_EXTERNAL_SERIALIZATION(extern, type)
86 #define GRAPHENE_IMPLEMENT_EXTERNAL_SERIALIZATION(type) GRAPHENE_EXTERNAL_SERIALIZATION(, type)
88 #define GRAPHENE_IMPLEMENT_EXTERNAL_SERIALIZATION_VARIANT(type) \
89 GRAPHENE_EXTERNAL_SERIALIZATION_VARIANT(, type)
90 #define GRAPHENE_IMPLEMENT_EXTERNAL_SERIALIZATION_PACK(type) \
91 GRAPHENE_EXTERNAL_SERIALIZATION_PACK(, type)
93 #define GRAPHENE_NAME_TO_OBJECT_TYPE(x, prefix, name) BOOST_PP_CAT(prefix, BOOST_PP_CAT(name, _object_type))
94 #define GRAPHENE_NAME_TO_ID_TYPE(x, y, name) BOOST_PP_CAT(name, _id_type)
95 #define GRAPHENE_DECLARE_ID(x, space_prefix_seq, name) \
96 using BOOST_PP_CAT(name, _id_type) = object_id<BOOST_PP_TUPLE_ELEM(2, 0, space_prefix_seq), \
97 GRAPHENE_NAME_TO_OBJECT_TYPE(x, BOOST_PP_TUPLE_ELEM(2, 1, space_prefix_seq), name)>;
98 #define GRAPHENE_REFLECT_ID(x, id_namespace, name) FC_REFLECT_TYPENAME(graphene::id_namespace::name)
100 #define GRAPHENE_DEFINE_IDS(id_namespace, object_space, object_type_prefix, names_seq) \
101 namespace graphene { namespace id_namespace { \
103 enum BOOST_PP_CAT(object_type_prefix, object_type) { \
104 BOOST_PP_SEQ_ENUM(BOOST_PP_SEQ_TRANSFORM(GRAPHENE_NAME_TO_OBJECT_TYPE, object_type_prefix, names_seq)) \
107 BOOST_PP_SEQ_FOR_EACH(GRAPHENE_DECLARE_ID, (object_space, object_type_prefix), names_seq) \
111 FC_REFLECT_ENUM(graphene::id_namespace::BOOST_PP_CAT(object_type_prefix, object_type), \
112 BOOST_PP_SEQ_TRANSFORM(GRAPHENE_NAME_TO_OBJECT_TYPE, object_type_prefix, names_seq)) \
113 BOOST_PP_SEQ_FOR_EACH(GRAPHENE_REFLECT_ID, id_namespace, BOOST_PP_SEQ_TRANSFORM(GRAPHENE_NAME_TO_ID_TYPE, , names_seq))
115 namespace graphene {
namespace protocol {
120 using std::unordered_map;
123 using std::shared_ptr;
125 using std::unique_ptr;
128 using std::enable_shared_from_this;
130 using std::make_pair;
228 const static uint16_t ASSET_ISSUER_PERMISSION_MASK =
246 const static uint16_t ASSET_ISSUER_PERMISSION_ENABLE_BITS_MASK =
257 const static uint16_t ASSET_ISSUER_PERMISSION_DISABLE_BITS_MASK =
266 const static uint16_t UIA_ASSET_ISSUER_PERMISSION_MASK =
275 const static uint16_t DEFAULT_UIA_ASSET_ISSUER_PERMISSION =
282 const static uint16_t NON_UIA_ONLY_ISSUER_PERMISSION_MASK =
283 ASSET_ISSUER_PERMISSION_MASK ^ UIA_ASSET_ISSUER_PERMISSION_MASK;
285 const static uint16_t PERMISSION_ONLY_MASK =
292 const static uint16_t VALID_FLAGS_MASK = ASSET_ISSUER_PERMISSION_MASK & (uint16_t)(~PERMISSION_ONLY_MASK);
294 const static uint16_t UIA_VALID_FLAGS_MASK = UIA_ASSET_ISSUER_PERMISSION_MASK;
325 explicit operator std::string()
const;
348 struct get_typename<
std::shared_ptr<const graphene::protocol::fee_schedule>> {
static const char*
name() {
349 return "shared_ptr<const fee_schedule>";
353 return "shared_ptr<fee_schedule>";
356 uint32_t max_depth = 2 );
375 (withdraw_permission)
413 namespace
fc {
namespace raw {
415 uint32_t _max_depth );
417 uint32_t _max_depth );
419 uint32_t _max_depth );
bool operator<(const price &a, const price &b)
An order-perserving dictionary of variant's.
static const char * name()
@ disable_new_supply
unable to create new supply for the asset
static const char * name()
@ witness_fed_asset
the bitasset is to be fed by witnesses
fc::ecc::public_key_data key_data
FC_REFLECT_TYPENAME(fc::log_message)
void unpack(Stream &s, flat_set< T, A... > &value, uint32_t _max_depth)
contains only the public point of an elliptic curve key.
Defines types and macros used to provide reflection.
@ white_list
accounts must be whitelisted in order to hold or transact this asset
@ disable_mssr_update
the bitasset owner can not update MSSR, permission only
@ lock_max_supply
the max supply of the asset can not be updated
bool is_relative(object_id_type o)
@ charge_market_fee
market trades in this asset may be charged
@ committee_fed_asset
the bitasset is to be fed by the committee
fc::ecc::public_key_data data
an elliptic curve private key.
@ disable_force_settle
disable force settling
zero_initialized_array< unsigned char, 33 > public_key_data
zero_initialized_array< unsigned char, 33 > commitment_type
bool operator==(const price &a, const price &b)
@ disable_icr_update
the bitasset owner can not update ICR, permission only
void to_variant(const graphene::protocol::public_key_type &var, fc::variant &vo, uint32_t max_depth=2)
void from_variant(const fc::variant &var, std::shared_ptr< const graphene::protocol::fee_schedule > &vo, uint32_t max_depth=2)
@ global_settle
allow the bitasset owner to force a global settlement, permission only
@ disable_confidential
disallow the asset to be used with confidential transactions
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
stores null, int64, uint64, double, bool, string, std::vector<variant>, and variant_object's.
#define GRAPHENE_DEFINE_IDS(id_namespace, object_space, object_type_prefix, names_seq)
#define FC_REFLECT(TYPE, MEMBERS)
Specializes fc::reflector for TYPE.
provides stack-based nullable value similar to boost::optional
zero_initialized_array< unsigned char, 65 > compact_signature
@ disable_collateral_bidding
Can not bid collateral after a global settlement.
@ transfer_restricted
require the issuer to be one party to every transfer
std::vector< char > range_proof_type
@ override_authority
issuer may transfer asset back to himself
bool operator()(const public_key_type &a, const public_key_type &b) const
boost::rational< int32_t > ratio_type
@ disable_bsrm_update
the bitasset owner can not update BSRM, permission only
asset_issuer_permission_flags
bool operator!=(const address &a, const address &b)
void pack(Stream &s, const flat_set< T, A... > &value, uint32_t _max_depth)
@ disable_mcr_update
the bitasset owner can not update MCR, permission only