COOPENOMICS  v1
Кооперативная Экономика
Пространство имен Capital

Пространства имен

namespace  Appendix
 
namespace  Commits
 
namespace  Contributors
 
namespace  Core
 
namespace  Debts
 
namespace  Expenses
 
namespace  Invests
 
namespace  Memo
 
namespace  ProgramInvests
 
namespace  ProgramProperties
 
namespace  ProgramWithdraw
 
namespace  ProjectProperties
 
namespace  Projects
 
namespace  ProjectWithdraw
 
namespace  Results
 
namespace  Segments
 
namespace  Votes
 
namespace  Wallets
 

Классы

struct  appendix
 Таблица приложений хранит данные о приложениях к договору УХД для конкретных проектов. Подробнее...
 
struct  capital_wallet
 Кошелек программы капитализации для учёта CRPS и доступных средств от членских взносов Подробнее...
 
struct  config
 Конфигурация контракта, управляемая пользователем. Подробнее...
 
struct  contributor
 Таблица участников хранит данные индивидуального участника кооператива. Подробнее...
 
struct  crps_data
 Структура для данных CRPS (Cumulative Reward Per Share) распределения наград Подробнее...
 
struct  expense
 Таблица расходов хранит информацию о расходах проектов кооператива. Подробнее...
 
struct  fact_pool
 Структура фактических показателей проекта Подробнее...
 
struct  generation_amounts
 Структура для результатов расчета генерации коммита Содержит только те поля, которые рассчитываются при создании коммита Подробнее...
 
struct  global_state
 Таблица глобального состояния хранит общие данные контракта капитализации. Подробнее...
 
struct  invest
 Таблица инвестиций хранит данные о вложениях в проекты. Подробнее...
 
struct  plan_pool
 Структура плановых показателей проекта Подробнее...
 
struct  program_invest
 Таблица программных инвестиций хранит данные об инвестициях в программу капитализации. Подробнее...
 
struct  program_withdraw
 Таблица возвратов из программы хранит данные о запросах на возврат средств из программы капитализации. Подробнее...
 
struct  project
 Таблица проектов хранит информацию о проектах кооператива, которые станут результатами. Подробнее...
 
struct  project_wallet
 Таблица кошельков проектов хранит данные о долях участников в проектах для получения членских взносов. Подробнее...
 
struct  project_withdraw
 Таблица возвратов из проекта хранит данные о запросах на возврат средств из проектов. Подробнее...
 
struct  result
 Таблица результатов хранит данные о результатах участников проектов. Подробнее...
 
struct  vote
 Таблица голосов хранит информацию о голосах участников по методу Водянова. Подробнее...
 
struct  vote_input
 Структура для передачи одного голоса в submitvote. Подробнее...
 
struct  voting_amounts
 Рассчитывает суммы для распределения по пулам Подробнее...
 
struct  voting_data
 Структура данных для голосования по методу Водянова Подробнее...
 

Определения типов

typedef eosio::multi_index< "appendixes"_n, appendix, indexed_by<"byusername"_n, const_mem_fun< appendix, uint64_t, &appendix::by_username > >, indexed_by<"byproject"_n, const_mem_fun< appendix, checksum256, &appendix::by_project > >, indexed_by<"byhash"_n, const_mem_fun< appendix, checksum256, &appendix::by_hash > >, indexed_by<"byprojuser"_n, const_mem_fun< appendix, uint128_t, &appendix::by_project_user > > > appendix_index
 
typedef eosio::multi_index< "contributors"_n, contributor, indexed_by<"byusername"_n, const_mem_fun< contributor, uint64_t, &contributor::by_username > >, indexed_by<"byhash"_n, const_mem_fun< contributor, checksum256, &contributor::by_hash > >, indexed_by<"byinvrate"_n, const_mem_fun< contributor, uint64_t, &contributor::by_investor_rating > >, indexed_by<"bycreatorate"_n, const_mem_fun< contributor, uint64_t, &contributor::by_creator_rating > >, indexed_by<"byauthorate"_n, const_mem_fun< contributor, uint64_t, &contributor::by_author_rating > >, indexed_by<"bycoordrate"_n, const_mem_fun< contributor, uint64_t, &contributor::by_coordinator_rating > >, indexed_by<"bycontrate"_n, const_mem_fun< contributor, uint64_t, &contributor::by_contributor_rating > >, indexed_by<"byprprate"_n, const_mem_fun< contributor, uint64_t, &contributor::by_propertor_rating > >, indexed_by<"byrating"_n, const_mem_fun< contributor, uint64_t, &contributor::by_rating > > > contributor_index
 
typedef eosio::multi_index< "expenses"_n, expense, indexed_by<"byusername"_n, const_mem_fun< expense, uint64_t, &expense::by_username > >, indexed_by<"byhash"_n, const_mem_fun< expense, checksum256, &expense::by_expense_hash > >, indexed_by<"byprojhash"_n, const_mem_fun< expense, checksum256, &expense::by_project_hash > > > expense_index
 
typedef eosio::multi_index<"state"_n, global_stateglobal_state_table
 Таблица для хранения глобального состояния. Подробнее...
 
typedef eosio::multi_index< "invests"_n, invest, indexed_by<"byhash"_n, const_mem_fun< invest, checksum256, &invest::by_hash > >, indexed_by<"byusername"_n, const_mem_fun< invest, uint64_t, &invest::by_username > >, indexed_by<"byproject"_n, const_mem_fun< invest, checksum256, &invest::by_project > >, indexed_by<"byprojuser"_n, const_mem_fun< invest, uint128_t, &invest::by_project_user > > > invest_index
 Таблица для хранения инвестиций. Подробнее...
 
typedef eosio::multi_index< "progrinvests"_n, program_invest, indexed_by<"byusername"_n, const_mem_fun< program_invest, uint64_t, &program_invest::by_username > >, indexed_by<"byhash"_n, const_mem_fun< program_invest, checksum256, &program_invest::by_hash > > > program_invest_index
 
typedef eosio::multi_index<"prgwithdraws"_n, program_withdraw, indexed_by<"byhash"_n, const_mem_fun< program_withdraw, checksum256, &program_withdraw::by_hash > >, indexed_by<"byusername"_n, const_mem_fun< program_withdraw, uint64_t, &program_withdraw::by_username > > > program_withdraws_index
 Таблица для хранения запросов на возврат из проекта. Подробнее...
 
typedef eosio::multi_index<"prjwithdraws"_n, project_withdraw, indexed_by<"byhash"_n, const_mem_fun< project_withdraw, checksum256, &project_withdraw::by_hash > >, indexed_by<"byusername"_n, const_mem_fun< project_withdraw, uint64_t, &project_withdraw::by_username > > > project_withdraws_index
 Таблица для хранения запросов на возврат из проекта. Подробнее...
 
typedef eosio::multi_index<"projects"_n, project, indexed_by<"bycreatedat"_n, const_mem_fun< project, uint64_t, &project::by_created_at > >, indexed_by<"byhash"_n, const_mem_fun< project, checksum256, &project::by_hash > >, indexed_by<"byparenthash"_n, const_mem_fun< project, checksum256, &project::by_parent_hash > > > project_index
 
typedef eosio::multi_index<"results"_n, result, indexed_by<"byusername"_n, const_mem_fun< result, uint64_t, &result::by_username > >, indexed_by<"byhash"_n, const_mem_fun< result, checksum256, &result::by_hash > >, indexed_by<"byprojecthash"_n, const_mem_fun< result, checksum256, &result::by_project_hash > >, indexed_by<"byprojuser"_n, const_mem_fun< result, uint128_t, &result::by_project_user > > > result_index
 
typedef eosio::multi_index<"votes"_n, vote, indexed_by<"byproject"_n, const_mem_fun< vote, checksum256, &vote::by_project > >, indexed_by<"byprojvoter"_n, const_mem_fun< vote, uint128_t, &vote::by_project_voter > >, indexed_by<"byprojrecip"_n, const_mem_fun< vote, uint128_t, &vote::by_project_recipient > > > votes_index
 
typedef eosio::multi_index< "capwallets"_n, capital_wallet, indexed_by<"byusername"_n, const_mem_fun< capital_wallet, uint64_t, &capital_wallet::by_username > > > capital_wallets_index
 
typedef eosio::multi_index< "projwallets"_n, project_wallet, indexed_by<"byproject"_n, const_mem_fun< project_wallet, checksum256, &project_wallet::by_project_hash > >, indexed_by<"byusername"_n, const_mem_fun< project_wallet, uint64_t, &project_wallet::by_username > >, indexed_by<"byprojuser"_n, const_mem_fun< project_wallet, uint128_t, &project_wallet::by_project_user > > > project_wallets_index
 

Функции

std::optional< expenseget_expense (eosio::name coopname, const checksum256 &hash)
 Получает расход по хэшу. Подробнее...
 
void update_global_state (const global_state &gs)
 Обновляет глобальное состояние новыми значениями. Подробнее...
 
global_state get_global_state (name coopname)
 Получает текущее глобальное состояние. Подробнее...
 
std::optional< program_withdrawget_program_withdraw (eosio::name coopname, const checksum256 &hash)
 
std::optional< project_withdrawget_project_withdraw (eosio::name coopname, const checksum256 &hash)
 Получает запрос на возврат из проекта по хэшу. Подробнее...
 

Типы

◆ appendix_index

typedef eosio::multi_index< "appendixes"_n, appendix, indexed_by<"byusername"_n, const_mem_fun<appendix, uint64_t, &appendix::by_username> >, indexed_by<"byproject"_n, const_mem_fun<appendix, checksum256, &appendix::by_project> >, indexed_by<"byhash"_n, const_mem_fun<appendix, checksum256, &appendix::by_hash> >, indexed_by<"byprojuser"_n, const_mem_fun<appendix, uint128_t, &appendix::by_project_user> >> Capital::appendix_index

◆ capital_wallets_index

typedef eosio::multi_index< "capwallets"_n, capital_wallet, indexed_by<"byusername"_n, const_mem_fun<capital_wallet, uint64_t, &capital_wallet::by_username> > > Capital::capital_wallets_index

◆ contributor_index

typedef eosio::multi_index< "contributors"_n, contributor, indexed_by<"byusername"_n, const_mem_fun<contributor, uint64_t, &contributor::by_username> >, indexed_by<"byhash"_n, const_mem_fun<contributor, checksum256, &contributor::by_hash> >, indexed_by<"byinvrate"_n, const_mem_fun<contributor, uint64_t, &contributor::by_investor_rating> >, indexed_by<"bycreatorate"_n, const_mem_fun<contributor, uint64_t, &contributor::by_creator_rating> >, indexed_by<"byauthorate"_n, const_mem_fun<contributor, uint64_t, &contributor::by_author_rating> >, indexed_by<"bycoordrate"_n, const_mem_fun<contributor, uint64_t, &contributor::by_coordinator_rating> >, indexed_by<"bycontrate"_n, const_mem_fun<contributor, uint64_t, &contributor::by_contributor_rating> >, indexed_by<"byprprate"_n, const_mem_fun<contributor, uint64_t, &contributor::by_propertor_rating> >, indexed_by<"byrating"_n, const_mem_fun<contributor, uint64_t, &contributor::by_rating> >> Capital::contributor_index

◆ expense_index

typedef eosio::multi_index< "expenses"_n, expense, indexed_by<"byusername"_n, const_mem_fun<expense, uint64_t, &expense::by_username> >, indexed_by<"byhash"_n, const_mem_fun<expense, checksum256, &expense::by_expense_hash> >, indexed_by<"byprojhash"_n, const_mem_fun<expense, checksum256, &expense::by_project_hash> > > Capital::expense_index

◆ global_state_table

typedef eosio::multi_index<"state"_n, global_state> Capital::global_state_table

Таблица для хранения глобального состояния.

◆ invest_index

typedef eosio::multi_index< "invests"_n, invest, indexed_by<"byhash"_n, const_mem_fun<invest, checksum256, &invest::by_hash> >, indexed_by<"byusername"_n, const_mem_fun<invest, uint64_t, &invest::by_username> >, indexed_by<"byproject"_n, const_mem_fun<invest, checksum256, &invest::by_project> >, indexed_by<"byprojuser"_n, const_mem_fun<invest, uint128_t, &invest::by_project_user> >> Capital::invest_index

Таблица для хранения инвестиций.

◆ program_invest_index

typedef eosio::multi_index< "progrinvests"_n, program_invest, indexed_by<"byusername"_n, const_mem_fun<program_invest, uint64_t, &program_invest::by_username> >, indexed_by<"byhash"_n, const_mem_fun<program_invest, checksum256, &program_invest::by_hash> >> Capital::program_invest_index

◆ program_withdraws_index

typedef eosio::multi_index<"prgwithdraws"_n, program_withdraw, indexed_by<"byhash"_n, const_mem_fun<program_withdraw, checksum256, &program_withdraw::by_hash> >, indexed_by<"byusername"_n, const_mem_fun<program_withdraw, uint64_t, &program_withdraw::by_username> >> Capital::program_withdraws_index

Таблица для хранения запросов на возврат из проекта.

◆ project_index

typedef eosio::multi_index<"projects"_n, project, indexed_by<"bycreatedat"_n, const_mem_fun<project, uint64_t, &project::by_created_at> >, indexed_by<"byhash"_n, const_mem_fun<project, checksum256, &project::by_hash> >, indexed_by<"byparenthash"_n, const_mem_fun<project, checksum256, &project::by_parent_hash> >> Capital::project_index

◆ project_wallets_index

typedef eosio::multi_index< "projwallets"_n, project_wallet, indexed_by<"byproject"_n, const_mem_fun<project_wallet, checksum256, &project_wallet::by_project_hash> >, indexed_by<"byusername"_n, const_mem_fun<project_wallet, uint64_t, &project_wallet::by_username> >, indexed_by<"byprojuser"_n, const_mem_fun<project_wallet, uint128_t, &project_wallet::by_project_user> > > Capital::project_wallets_index

◆ project_withdraws_index

typedef eosio::multi_index<"prjwithdraws"_n, project_withdraw, indexed_by<"byhash"_n, const_mem_fun<project_withdraw, checksum256, &project_withdraw::by_hash> >, indexed_by<"byusername"_n, const_mem_fun<project_withdraw, uint64_t, &project_withdraw::by_username> >> Capital::project_withdraws_index

Таблица для хранения запросов на возврат из проекта.

◆ result_index

typedef eosio::multi_index<"results"_n, result, indexed_by<"byusername"_n, const_mem_fun<result, uint64_t, &result::by_username> >, indexed_by<"byhash"_n, const_mem_fun<result, checksum256, &result::by_hash> >, indexed_by<"byprojecthash"_n, const_mem_fun<result, checksum256, &result::by_project_hash> >, indexed_by<"byprojuser"_n, const_mem_fun<result, uint128_t, &result::by_project_user> >> Capital::result_index

◆ votes_index

typedef eosio::multi_index<"votes"_n, vote, indexed_by<"byproject"_n, const_mem_fun<vote, checksum256, &vote::by_project> >, indexed_by<"byprojvoter"_n, const_mem_fun<vote, uint128_t, &vote::by_project_voter> >, indexed_by<"byprojrecip"_n, const_mem_fun<vote, uint128_t, &vote::by_project_recipient> >> Capital::votes_index

Функции

◆ get_expense()

std::optional< expense > Capital::get_expense ( eosio::name  coopname,
const checksum256 &  hash 
)
inline

Получает расход по хэшу.

Аргументы
coopnameИмя кооператива (scope таблицы).
hashХэш расхода.
Возвращает
std::optional<expense> - найденное действие или std::nullopt, если его нет.

◆ get_global_state()

global_state Capital::get_global_state ( name  coopname)
inline

Получает текущее глобальное состояние.

Возвращает
Текущее глобальное состояние.

◆ get_program_withdraw()

std::optional< program_withdraw > Capital::get_program_withdraw ( eosio::name  coopname,
const checksum256 &  hash 
)
inline

◆ get_project_withdraw()

std::optional< project_withdraw > Capital::get_project_withdraw ( eosio::name  coopname,
const checksum256 &  hash 
)
inline

Получает запрос на возврат из проекта по хэшу.

Аргументы
coopnameИмя кооператива (scope таблицы).
hashХэш запроса на возврат.
Возвращает
Найденный запрос на возврат или nullopt, если запрос не найден.

◆ update_global_state()

void Capital::update_global_state ( const global_state gs)
inline

Обновляет глобальное состояние новыми значениями.

Аргументы
gsНовое глобальное состояние.