Bitshares-Core  2.0.181105
BitShares blockchain implementation and command-line interface software
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
graphene::chain::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

 fee_schedule ()
 
asset calculate_fee (const operation &op, const price &core_exchange_rate=price::unit_price()) 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_parameters_type & get () const
 
template<typename Operation >
Operation::fee_parameters_type & get ()
 

Static Public Member Functions

static fee_schedule get_default ()
 

Public Attributes

flat_set< fee_parametersparameters
 
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 113 of file fee_schedule.hpp.

Constructor & Destructor Documentation

◆ fee_schedule()

graphene::chain::fee_schedule::fee_schedule ( )

Definition at line 46 of file fee_schedule.cpp.

Member Function Documentation

◆ calculate_fee()

asset graphene::chain::fee_schedule::calculate_fee ( const operation op,
const price core_exchange_rate = price::unit_price() 
) const

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

Definition at line 133 of file fee_schedule.cpp.

◆ get() [1/2]

template<typename Operation >
const Operation::fee_parameters_type& graphene::chain::fee_schedule::get ( ) const
inline

Definition at line 134 of file fee_schedule.hpp.

◆ get() [2/2]

template<typename Operation >
Operation::fee_parameters_type& graphene::chain::fee_schedule::get ( )
inline

Definition at line 139 of file fee_schedule.hpp.

◆ get_default()

fee_schedule graphene::chain::fee_schedule::get_default ( )
static

Definition at line 50 of file fee_schedule.cpp.

◆ set_fee()

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

Definition at line 150 of file fee_schedule.cpp.

◆ validate()

void graphene::chain::fee_schedule::validate ( ) const

Validates all of the parameters are present and accounted for.

Definition at line 72 of file fee_schedule.cpp.

◆ zero_all_fees()

void graphene::chain::fee_schedule::zero_all_fees ( )

Definition at line 125 of file fee_schedule.cpp.

Member Data Documentation

◆ parameters

flat_set<fee_parameters> graphene::chain::fee_schedule::parameters
Note
must be sorted by fee_parameters.which() and have no duplicates

Definition at line 147 of file fee_schedule.hpp.

◆ scale

uint32_t graphene::chain::fee_schedule::scale = GRAPHENE_100_PERCENT

fee * scale / GRAPHENE_100_PERCENT

Definition at line 148 of file fee_schedule.hpp.


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