Skip to content

Commit

Permalink
Update and reformat some comments
Browse files Browse the repository at this point in the history
  • Loading branch information
abitmore committed Oct 21, 2022
1 parent 8f31fb0 commit abff625
Showing 1 changed file with 56 additions and 33 deletions.
89 changes: 56 additions & 33 deletions libraries/protocol/include/graphene/protocol/types.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -149,37 +149,48 @@ using private_key_type = fc::ecc::private_key;
using chain_id_type = fc::sha256;
using ratio_type = boost::rational<int32_t>;

/// @note If one of the following bits is set in asset issuer permissions,
/// it means the asset issuer (or owner for bitassets) has the permission to update
/// the corresponding flag, parameters or perform certain actions.
/// * @ref charge_market_fee
/// * @ref white_list
/// * @ref override_authority
/// * @ref transfer_restricted
/// * @ref disable_force_settle
/// * @ref global_settle
/// * @ref disable_confidential
/// * @ref witness_fed_asset
/// * @ref committee_fed_asset
///
/// @note If one of the following bits is set in asset issuer permissions,
/// it means the asset issuer (or owner for bitassets) does NOT have the permission to update
/// the corresponding flag, parameters or perform certain actions.
/// This is to be compatible with old client software.
/// * @ref lock_max_supply
/// * @ref disable_new_supply
/// * @ref disable_mcr_update
/// * @ref disable_icr_update
/// * @ref disable_mssr_update
/// * @ref disable_bsrm_update
/// * @ref disable_collateral_bidding
///
/// @note For @ref disable_mcr_update, @ref disable_icr_update and @ref disable_mssr_update,
/// if one of them is set in issuer permission, and
/// * if the value of the parameter was set by the bitasset owner, it can not be updated,
/// * if no value was set by the owner, the value can still be updated by the feed producers.
/**
* @note
* If one of the following bits is set in asset issuer permissions,
* it means the asset issuer (or owner for bitassets) has the permission to update
* the corresponding flag, parameters or perform certain actions.
* - @ref charge_market_fee
* - @ref white_list
* - @ref override_authority
* - @ref transfer_restricted
* - @ref disable_force_settle
* - @ref global_settle
* - @ref disable_confidential
* - @ref witness_fed_asset
* - @ref committee_fed_asset
*
* @note
* If one of the following bits is set in asset issuer permissions,
* it means the asset issuer (or owner for bitassets) does NOT have the permission to update
* the corresponding flag, parameters or perform certain actions.
* This is to be compatible with old client software.
* - @ref lock_max_supply
* - @ref disable_new_supply
* - @ref disable_mcr_update
* - @ref disable_icr_update
* - @ref disable_mssr_update
* - @ref disable_bsrm_update
* - @ref disable_collateral_bidding
*
* @note
* For @ref disable_mcr_update, @ref disable_icr_update and @ref disable_mssr_update,
* if one of these is set in asset issuer permissions, and
* - if the bitasset owner has set a value for the corresponding parameter, the value can not be updated,
* - if the bitasset owner has not set a value for the corresponding parameter, the parameter can still be
* updated by the price feed producers.
*
*/
enum asset_issuer_permission_flags {
// permission-enabling bits begin
// Permission-enabling bits begin
// If one of the following bits is set in asset issuer permissions,
// it means the asset issuer (or owner for bitassets) has the permission to update
// the corresponding flag, parameters or perform certain actions.
// Note: This comment is copied and reformatted above for better Doxygen documentation formatting.
charge_market_fee = 0x01, ///< market trades in this asset may be charged
white_list = 0x02, ///< accounts must be whitelisted in order to hold or transact this asset
override_authority = 0x04, ///< issuer may transfer asset back to himself
Expand All @@ -189,16 +200,28 @@ enum asset_issuer_permission_flags {
disable_confidential = 0x40, ///< disallow the asset to be used with confidential transactions
witness_fed_asset = 0x80, ///< the bitasset is to be fed by witnesses
committee_fed_asset = 0x100, ///< the bitasset is to be fed by the committee
// permission-enabling bits end
// permission-disabling bits begin
// Permission-enabling bits end

// Permission-disabling bits begin
// If one of the following bits is set in asset issuer permissions,
// it means the asset issuer (or owner for bitassets) does NOT have the permission to update
// the corresponding flag, parameters or perform certain actions.
// This is to be compatible with old client software.
// Note: This comment is copied and reformatted above for better Doxygen documentation formatting.
lock_max_supply = 0x200, ///< the max supply of the asset can not be updated
disable_new_supply = 0x400, ///< unable to create new supply for the asset
// For disable_mcr_update, disable_icr_update and disable_mssr_update,
// if one of these is set in asset issuer permissions, and
// - if the bitasset owner has set a value for the corresponding parameter, the value can not be updated,
// - if the bitasset owner has not set a value for the corresponding parameter, the parameter can still be
// updated by the price feed producers.
// Note: This comment is copied and reformatted above for better Doxygen documentation formatting.
disable_mcr_update = 0x800, ///< the bitasset owner can not update MCR, permission only
disable_icr_update = 0x1000, ///< the bitasset owner can not update ICR, permission only
disable_mssr_update = 0x2000, ///< the bitasset owner can not update MSSR, permission only
disable_bsrm_update = 0x4000, ///< the bitasset owner can not update BSRM, permission only
disable_collateral_bidding = 0x8000 ///< Can not bid collateral after a global settlement
// permission-disabling bits end
// Permission-disabling bits end
};

/// The bits that can be used in asset issuer permissions for non-UIA assets
Expand Down

0 comments on commit abff625

Please sign in to comment.