diff --git a/libraries/chain/include/graphene/chain/asset_object.hpp b/libraries/chain/include/graphene/chain/asset_object.hpp index cb2a61a9..c3cd7481 100644 --- a/libraries/chain/include/graphene/chain/asset_object.hpp +++ b/libraries/chain/include/graphene/chain/asset_object.hpp @@ -156,6 +156,11 @@ namespace graphene { namespace chain { /** defines the assets that this asset may not be traded against in the market, must not overlap whitelist */ flat_set blacklist_markets; + /** data that describes the meaning/purpose of this asset, fee will be charged proportional to + * size of description. + */ + string description; + /// Perform internal consistency checks. /// @throws fc::exception if any check fails void validate()const; @@ -323,6 +328,7 @@ FC_REFLECT( graphene::chain::asset_object::asset_options, (blacklist_authorities) (whitelist_markets) (blacklist_markets) + (description) ) FC_REFLECT( graphene::chain::asset_object::bitasset_options, (feed_lifetime_sec) diff --git a/libraries/chain/operations.cpp b/libraries/chain/operations.cpp index 8fc1a608..157df651 100644 --- a/libraries/chain/operations.cpp +++ b/libraries/chain/operations.cpp @@ -162,6 +162,7 @@ share_type asset_create_operation::calculate_fee( const fee_schedule_type& sched uint32_t s = symbol.size(); while( s <= 6 ) { core_fee_required *= 30; ++s; } + core_fee_required += ((fc::raw::pack_size(*this)*schedule.data_fee)/1024); return core_fee_required; } @@ -288,7 +289,7 @@ void asset_update_operation::validate()const share_type asset_update_operation::calculate_fee( const fee_schedule_type& k )const { - return k.asset_update_fee; + return k.asset_update_fee + ((fc::raw::pack_size(*this)*k.data_fee)/1024); } void asset_burn_operation::get_required_auth(flat_set& active_auth_set, flat_set&) const