29 namespace graphene {
namespace protocol {
40 template<
typename OpType>
44 return op.calculate_fee( param.
get<OpType>() ).value;
45 }
catch (fc::assert_exception& e) {
47 params.set_which(current_op);
51 return op.calculate_fee( params.get<
typename OpType::fee_parameters_type>() ).value;
76 return op.
calculate_fee( old_asset_creation_fee_params, sub_asset_creation_fee ).
value;
84 auto scaled = fc::uint128_t(required_fee) * scale;
87 "Required fee after scaling would exceed maximum possible supply" );
88 required_fee =
static_cast<uint64_t
>(scaled);
90 return asset( required_fee );
share_type calculate_fee(const fee_parameters_type &k, const optional< uint64_t > &sub_asset_creation_fee) const
result_type operator()(const OpType &op) const
contains all of the parameters necessary to calculate the fee for any operation
fc::static_variant< transfer_operation, limit_order_create_operation, limit_order_cancel_operation, call_order_update_operation, fill_order_operation, account_create_operation, account_update_operation, account_whitelist_operation, account_upgrade_operation, account_transfer_operation, asset_create_operation, asset_update_operation, asset_update_bitasset_operation, asset_update_feed_producers_operation, asset_issue_operation, asset_reserve_operation, asset_fund_fee_pool_operation, asset_settle_operation, asset_global_settle_operation, asset_publish_feed_operation, witness_create_operation, witness_update_operation, proposal_create_operation, proposal_update_operation, proposal_delete_operation, withdraw_permission_create_operation, withdraw_permission_update_operation, withdraw_permission_claim_operation, withdraw_permission_delete_operation, committee_member_create_operation, committee_member_update_operation, committee_member_update_global_parameters_operation, vesting_balance_create_operation, vesting_balance_withdraw_operation, worker_create_operation, custom_operation, assert_operation, balance_claim_operation, override_transfer_operation, transfer_to_blind_operation, blind_transfer_operation, transfer_from_blind_operation, asset_settle_cancel_operation, asset_claim_fees_operation, fba_distribute_operation, bid_collateral_operation, execute_bid_operation, asset_claim_pool_operation, asset_update_issuer_operation, htlc_create_operation, htlc_redeem_operation, htlc_redeemed_operation, htlc_extend_operation, htlc_refund_operation, custom_authority_create_operation, custom_authority_update_operation, custom_authority_delete_operation, ticket_create_operation, ticket_update_operation, liquidity_pool_create_operation, liquidity_pool_delete_operation, liquidity_pool_deposit_operation, liquidity_pool_withdraw_operation, liquidity_pool_exchange_operation, samet_fund_create_operation, samet_fund_delete_operation, samet_fund_update_operation, samet_fund_borrow_operation, samet_fund_repay_operation, credit_offer_create_operation, credit_offer_delete_operation, credit_offer_update_operation, credit_offer_accept_operation, credit_deal_repay_operation, credit_deal_expired_operation >
asset calculate_fee(const operation &op) const
transform_to_fee_parameters< operation >::type fee_parameters
visitor::result_type visit(visitor &v)
calc_fee_visitor(const fee_schedule &p, const operation &op)
asset multiply_and_round_up(const price &p) const
Multiply and round up.
provides stack-based nullable value similar to boost::optional
const operation::tag_type current_op
Transfers an amount of one asset from one account to another.
The price struct stores asset prices in the BitShares system.
#define GRAPHENE_100_PERCENT
const fee_schedule & param
#define FC_ASSERT(TEST,...)
Checks a condition and throws an assert_exception if the test is FALSE.
share_type calculate_fee(const fee_parameters_type &fee_params, uint32_t fee_per_kb) const
constexpr int64_t GRAPHENE_MAX_SHARE_SUPPLY(1000000000000000LL)
transfers the account to another account while clearing the white listIn theory an account can be tra...
const Operation::fee_parameters_type & get() const
fee_parameters::flat_set_type parameters