BitShares-Core  7.0.2
BitShares blockchain node software and command-line wallet software
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
graphene::protocol::fee_schedule Struct Reference

contains all of the parameters necessary to calculate the fee for any operation More...

#include <fee_schedule.hpp>

Public Member Functions

asset calculate_fee (const operation &op) const
 
asset calculate_fee (const operation &op, const price &core_exchange_rate) const
 
asset set_fee (operation &op, const price &core_exchange_rate=price::unit_price()) const
 
void zero_all_fees ()
 
void validate () const
 
template<typename Operation >
const Operation::fee_params_t & get () const
 
template<typename Operation >
Operation::fee_params_t & get ()
 
template<typename Operation >
bool exists () const
 

Static Public Member Functions

static const fee_scheduleget_default ()
 

Public Attributes

fee_parameters::flat_set_type parameters
 
uint32_t scale = GRAPHENE_100_PERCENT
 fee * scale / GRAPHENE_100_PERCENT More...
 

Detailed Description

contains all of the parameters necessary to calculate the fee for any operation

Definition at line 173 of file fee_schedule.hpp.

Member Function Documentation

◆ calculate_fee() [1/2]

asset graphene::protocol::fee_schedule::calculate_fee ( const operation op) const

Finds the appropriate fee parameter struct for the operation and then calculates the appropriate fee in CORE asset.

Definition at line 79 of file fee_schedule_calc.cpp.

◆ calculate_fee() [2/2]

asset graphene::protocol::fee_schedule::calculate_fee ( const operation op,
const price core_exchange_rate 
) const

Finds the appropriate fee parameter struct for the operation and then calculates the appropriate fee in an asset specified implicitly by core_exchange_rate.

Definition at line 93 of file fee_schedule_calc.cpp.

◆ exists()

template<typename Operation >
bool graphene::protocol::fee_schedule::exists ( ) const
inline

Definition at line 211 of file fee_schedule.hpp.

◆ get() [1/2]

template<typename Operation >
Operation::fee_params_t& graphene::protocol::fee_schedule::get ( )
inline

Definition at line 206 of file fee_schedule.hpp.

◆ get() [2/2]

template<typename Operation >
const Operation::fee_params_t& graphene::protocol::fee_schedule::get ( ) const
inline

Definition at line 201 of file fee_schedule.hpp.

◆ get_default()

const fee_schedule & graphene::protocol::fee_schedule::get_default ( )
static

Definition at line 42 of file fee_schedule.cpp.

◆ set_fee()

asset graphene::protocol::fee_schedule::set_fee ( operation op,
const price core_exchange_rate = price::unit_price() 
) const

Updates the operation with appropriate fee and returns the fee.

Definition at line 43 of file fee_schedule_set_fee.cpp.

◆ validate()

void graphene::protocol::fee_schedule::validate ( ) const
inline

Validates all of the parameters are present and accounted for.

Definition at line 198 of file fee_schedule.hpp.

◆ zero_all_fees()

void graphene::protocol::fee_schedule::zero_all_fees ( )

Definition at line 59 of file fee_schedule.cpp.

Member Data Documentation

◆ parameters

fee_parameters::flat_set_type graphene::protocol::fee_schedule::parameters
Note
must be sorted by fee_parameters.which() and have no duplicates

Definition at line 220 of file fee_schedule.hpp.

◆ scale

uint32_t graphene::protocol::fee_schedule::scale = GRAPHENE_100_PERCENT

fee * scale / GRAPHENE_100_PERCENT

Definition at line 221 of file fee_schedule.hpp.


The documentation for this struct was generated from the following files: