Settings don't have to be updated nor permissions.
These actions don't affect the existing tables and they don't modify their information.
Example of usage
Each of these actions receives a map defined as following:
typedef std::map<name, std::variant<asset, uint64_t, double, int64_t, string>> logmap
After running any of these actions a new entry in the log_group_table is created. It generates a new log group. The tables logs_table and log_rewards_table are scoped by log_group.
To delete a log group the action resetlogs can be called normally
To delete all the log groups, there is the action resetlgroups
lgrunhrvst
This action emulates the behavior of runharvest.
It will call ldsthvstusrs, ldsthvstorgs and ldsthvstrgns to emulate the harvest distribution to users, orgs and regions respectively. It will fill the log table with detailed information, to see only the distribution each account received the rewards table is more appropriate.
Optional parameters:
Parameter
Type
Description
mintrate
int64
The mintrate to use in the harvest distribution
poolbsize
uint64
Pool size. The amount of dSeeds on the pool contract
usrsperc
float64
Percentage for users' bucket
rgnsperc
float64
Percentage for regions' bucket
orgsperc
float64
Percentage for organizations' bucket
globperc
float64
Percentage for global dho's bucket
batchsize
uint64
Batch size to use in the distribution of the buckets. If not provided the value 20 is used
If any of the optional parameters above is not provided, its respective value on chain is used. For example if mintrate is not given, then the mint rate in the mint_rate_table is used.
Timestamp of the start day. If no provided the today's timestamp is used
mooncycle
uint64
Duration in seconds of a moon cycle. The real Monthly QEV calculation takes 1 moon cycle of information, we kept the name moon cycle to point out which piece of code it emulates but this variable is meant to provide a variable window for the cut off day in the monthly qev log action
If any of these parameters aren't provided the real value on chain is used.
Added the following actions:
Added the following tables:
Added tests.
Contracts that need to be deployed:
Settings don't have to be updated nor permissions.
These actions don't affect the existing tables and they don't modify their information.
Example of usage
Each of these actions receives a map defined as following:
typedef std::map<name, std::variant<asset, uint64_t, double, int64_t, string>> logmap
After running any of these actions a new entry in the
log_group_table
is created. It generates a new log group. The tableslogs_table
andlog_rewards_table
are scoped by log_group.To delete a log group the action
resetlogs
can be called normallyTo delete all the log groups, there is the action
resetlgroups
lgrunhrvst
This action emulates the behavior of
runharvest
.It will call
ldsthvstusrs
,ldsthvstorgs
andldsthvstrgns
to emulate the harvest distribution to users, orgs and regions respectively. It will fill the log table with detailed information, to see only the distribution each account received the rewards table is more appropriate.If any of the optional parameters above is not provided, its respective value on chain is used. For example if
mintrate
is not given, then the mint rate in the mint_rate_table is used.Example
Call action with parameters:
Call action without parameters:
lgcalcmqevs
This action emulates the behavior of
calcmqevs
.If any of these parameters aren't provided the real value on chain is used.
Example
Call action with parameters:
Call action without parameters:
lgcalmntrte
This action emulates the behavior of
calcmintrate
.If a parameter is not provided its value on chain is used.
Example
Call action with parameters:
Call action without parameters: