COOPENOMICS  v1
Кооперативная Экономика
consts.hpp
См. документацию.
1#pragma once
2
3using namespace eosio;
4
5// /**
6// \defgroup public_contracts Контракты
7// \brief Контракты Кооперативной Экономики
8// *
9// * Группа содержит контракты, предназначенные для кооперативной экономики. Контракты описывают основные логические
10// * единицы и функциональность для управления и взаимодействия в рамках кооперативной экосистемы. От регистрации
11// * участников до обменных операций - все аспекты кооперативной деятельности регулируются этими контрактами.
12// */
13
14// /**
15// \defgroup public_consts Константы
16// \brief Константы контрактов
17// *
18// * В этой группе представлены основные константы, используемые в контрактах кооперативной экономики.
19// * Константы обеспечивают стабильность и предсказуемость поведения контрактов, а также упрощают
20// * процесс чтения и понимания кода.
21// */
22
23// /**
24// \defgroup public_actions Действия
25// \brief Методы действий контрактов
26// *
27// * Действия представляют собой методы, которые можно вызывать в контрактах. Они отвечают за
28// * выполнение определенных задач, таких как создание аккаунта, обновление информации или
29// * осуществление транзакции. Эта группа описывает все доступные действия, которые предоставляют
30// * контракты кооперативной экономики.
31// */
32
33// /**
34// \defgroup public_tables Таблицы
35// \brief Структуры таблиц контрактов
36// *
37// * Таблицы в контрактах EOSIO используются для хранения состояния контракта на блокчейне. В этой группе
38// * представлены основные структуры данных, которые используются в таблицах контрактов кооперативной экономики.
39// * От сведений о участниках до деталей транзакций - все это сохраняется в таблицах.
40// */
41
42
43// /**
44// \defgroup public_structures Структуры
45// \brief Структуры контрактов
46// *
47// * Структуры - это фундаментальные блоки данных, используемые для описания и хранения информации в контрактах.
48// * Эта группа содержит описание основных структур, используемых в контрактах кооперативной экономики.
49// * Они обеспечивают четкую организацию данных и упрощают взаимодействие с контрактом.
50// */
51
52//registrator
53static constexpr eosio::name _regaccount_action = "joincoop"_n;
54
55//wallet
56static constexpr eosio::name _deposit_action = "deposit"_n;
57static constexpr eosio::name _withdraw_action = "withdraw"_n;
58
59//funds
60static constexpr eosio::name _afund_withdraw_action = "subaccum"_n;
61static constexpr eosio::name _efund_withdraw_action = "subexp"_n;
62
63//freedecision
64static constexpr eosio::name _free_decision_action = "freedecision"_n;
65
66// marketplace linked actions
67static constexpr eosio::name _change_action = "change"_n;
68static constexpr eosio::name _product_contribution_action = "productcntr"_n;
69static constexpr eosio::name _product_return_action = "productrtrn"_n;
70
71// capitalization linked actions
72
73
74//capital::debts
75
76static constexpr eosio::name _result_action = "result"_n;
77
78//program_types
79static constexpr eosio::name _wallet_program = "wallet"_n;
80static constexpr eosio::name _marketplace_program = "marketplace"_n;
81
82static constexpr eosio::name _source_program = "source"_n;
83static constexpr eosio::name _capital_program = "capital"_n;
84
85
86static const std::set<eosio::name> soviet_actions = {
87 "joincoop"_n, //регистрация пайщика
88
89 //MEET
90 "creategm"_n,//предложение повестки планового общего собрание
91 "completegm"_n, //решение общего собрания пайщиков
92 "ballot"_n, //бюллетень участника общего собрания пайщиков
93 "gmnotify"_n, //уведомление участника общего собрания пайщиков
94 //CAPITAL
95 "capitalinvst"_n, //заявление на инвестиции по договору УХД
96 "createresult"_n, //клайм прироста капитализации из задания
97 "createdebt"_n, //взять ссуду под залог будущего задания
98 "capresexpns"_n, //произвести выплату по расходам задания
99 "capwthdrprog"_n, //произвести возврат накопленных членских взносов по программе на капиталиста
100 "capwthdrproj"_n, //произвести возврат накопленных членских взносов по проекту на актора
101 "capwthdrres"_n, //произвести возврат из задания
102
103 //WALLET
104 "createwthd"_n, //создать заявление на возврат паевого взноса
105
106 //LEDGER
107 "ledgerwthd"_n, //заявление на списание со счета через ledger
108
109 //MARKETPLACE
110 "authoffs2c"_n, //заявление на взнос имуществом
111 "authoffc2r"_n, //заявление на возврат паевого взноса имуществом
112};
113
114//program_ids
115static constexpr uint64_t _wallet_program_id = 1;
116static constexpr uint64_t _marketplace_program_id = 2;
117static constexpr uint64_t _source_program_id = 3;
118static constexpr uint64_t _capital_program_id = 4;
119
120
121
122#define HUNDR_PERCENTS 1000000
123#define ONE_PERCENT 10000
124
125
126// Дефайны для основной сети
127#define ANO "ano"
128#define GATEWAY "gateway"
129#define DRAFT "draft"
130#define MARKETPLACE "marketplace"
131#define SOVIET "soviet"
132#define REGISTRATOR "registrator"
133#define SYSTEM "eosio"
134#define FUND "fund"
135#define BRANCH "branch"
136#define CAPITAL "capital"
137#define WALLET "wallet"
138#define LOAN "loan"
139#define LEDGER "ledger"
140#define MEET "meet"
141#define LEDGER "ledger"
142
147 static constexpr eosio::name _provider = "voskhod"_n;
148 static constexpr eosio::name _provider_chairman = "ant"_n;
149
150 static constexpr eosio::name _capital = "capital"_n;
151 static constexpr eosio::name _ano = "ano"_n;
152 static constexpr eosio::name _gateway = "gateway"_n;
153 static constexpr eosio::name _wallet = "wallet"_n;
154 static constexpr eosio::name _draft = "draft"_n;
155 static constexpr eosio::name _marketplace = "marketplace"_n;
156 static constexpr eosio::name _soviet = "soviet"_n;
157 static constexpr eosio::name _registrator = "registrator"_n;
158 static constexpr eosio::name _system = "eosio"_n;
159 static constexpr eosio::name _fund = "fund"_n;
160 static constexpr eosio::name _branch = "branch"_n;
161 static constexpr eosio::name _loan = "loan"_n;
162 static constexpr eosio::name _meet = "meet"_n;
163 static constexpr eosio::name _ledger = "ledger"_n;
164 static constexpr eosio::name _power_account = "eosio.power"_n;
165 static constexpr eosio::name _saving_account = "eosio.saving"_n;
166
167
168
169 static std::vector<name> contracts_whitelist = {
170 "ano"_n,
171 "gateway"_n,
172 "draft"_n,
173 "marketplace"_n,
174 "soviet"_n,
175 "registrator"_n,
176 "eosio"_n,
177 "fund"_n,
178 "branch"_n,
179 "capital"_n,
180 "wallet"_n,
181 "meet"_n,
182 "loan"_n,
183 "test"_n,
184 "contributor"_n,
185 "eosio.token"_n,
186 "eosio.msig"_n,
187 "eosio.wrap"_n,
188 "eosio.power"_n,
189 "eosio.saving"_n,
190 "ledger"_n,
191 "capital"_n
192 // Добавьте остальные стандартные или пользовательские контракты по необходимости
193 };
194
195 static std::vector<name> token_whitelist = {
196 "eosio"_n,
197 "eosio.vpay"_n,
198 "eosio.saving"_n,
199 "eosio.bpay"_n,
200 "eosio.saving"_n,
201 "eosio.power"_n,
202 "eosio.ram"_n,
203 "eosio.stake"_n,
205 // Добавьте другие аккаунты в список по мере необходимости
206 };
207
208
209 static constexpr eosio::symbol _root_symbol = eosio::symbol(eosio::symbol_code("AXON"), 4);
210 static constexpr eosio::symbol _root_govern_symbol = eosio::symbol(eosio::symbol_code("RUB"), 4);
211 static const eosio::asset _provider_initial = eosio::asset(1000000, _root_govern_symbol);
212 static const eosio::asset _provider_minimum = eosio::asset(3000000, _root_govern_symbol);
213
214 static const eosio::asset _provider_org_initial = eosio::asset(10000000, _root_govern_symbol);
215 static const eosio::asset _provider_org_minimum = eosio::asset(30000000, _root_govern_symbol);
216
217 static constexpr eosio::name _root_contract = "eosio.token"_n;
218 static constexpr eosio::symbol RAM_symbol{"RAM", 0};
219 static constexpr eosio::symbol _ramcore_symbol = eosio::symbol(eosio::symbol_code("RAMCORE"),4);
220 static constexpr uint64_t _ram_price_per_byte = 1;
222 static constexpr uint64_t _register_amount = 10000;
224 static constexpr uint64_t _signature_expiration = 86400 * 365 * 2;
225 static constexpr uint64_t _auction_name_length_limit = 12;
226
227 static constexpr uint64_t _deposit_expiration_seconds = 3600;
228
229 static constexpr uint64_t _decision_expiration = 3 * 86400;
230
231 static constexpr uint64_t _producers_percent = 900000; // 90%
232 static constexpr uint64_t _fund_percent = 100000; // 10%
static const eosio::asset _provider_org_minimum
Definition: consts.hpp:215
static const std::set< eosio::name > soviet_actions
Definition: consts.hpp:86
static constexpr eosio::name _provider
Definition: consts.hpp:147
static constexpr eosio::name _ano
Definition: consts.hpp:151
static constexpr uint64_t _wallet_program_id
Definition: consts.hpp:115
static constexpr uint64_t _producers_percent
Definition: consts.hpp:231
static const eosio::asset _provider_initial
Definition: consts.hpp:211
static constexpr uint64_t _signature_expiration
Definition: consts.hpp:224
static constexpr eosio::name _provider_chairman
Definition: consts.hpp:148
static constexpr eosio::name _fund
Definition: consts.hpp:159
static constexpr eosio::name _change_action
Definition: consts.hpp:67
static constexpr uint64_t _decision_expiration
Definition: consts.hpp:229
static constexpr eosio::symbol _ramcore_symbol
Definition: consts.hpp:219
static constexpr eosio::name _wallet_program
Главный Кошелёк
Definition: consts.hpp:79
static constexpr eosio::name _capital
Definition: consts.hpp:150
static constexpr eosio::name _system
Definition: consts.hpp:158
static constexpr eosio::symbol RAM_symbol
Definition: consts.hpp:218
static constexpr eosio::name _gateway
Definition: consts.hpp:152
static constexpr eosio::name _product_return_action
Definition: consts.hpp:69
static std::vector< name > contracts_whitelist
Definition: consts.hpp:169
static constexpr eosio::symbol _root_govern_symbol
Definition: consts.hpp:210
static constexpr eosio::name _result_action
Definition: consts.hpp:76
static constexpr eosio::symbol _root_symbol
Definition: consts.hpp:209
static constexpr eosio::name _wallet
Definition: consts.hpp:153
static constexpr uint64_t _fund_percent
Definition: consts.hpp:232
static constexpr eosio::name _source_program
Кошелёк для генерации по договору УХД
Definition: consts.hpp:82
static constexpr eosio::name _draft
Definition: consts.hpp:154
static constexpr uint64_t _auction_name_length_limit
Definition: consts.hpp:225
static constexpr uint64_t _capital_program_id
Definition: consts.hpp:118
static constexpr eosio::name _capital_program
Кошелёк программы "Капитализация".
Definition: consts.hpp:83
static constexpr eosio::name _root_contract
Definition: consts.hpp:217
static constexpr eosio::name _power_account
Definition: consts.hpp:164
static constexpr uint64_t _marketplace_program_id
Definition: consts.hpp:116
static constexpr eosio::name _deposit_action
Definition: consts.hpp:56
static constexpr eosio::name _withdraw_action
Definition: consts.hpp:57
static constexpr eosio::name _efund_withdraw_action
Definition: consts.hpp:61
static constexpr eosio::name _loan
Definition: consts.hpp:161
static constexpr uint64_t _deposit_expiration_seconds
Definition: consts.hpp:227
static constexpr eosio::name _marketplace_program
Кошелёк программы "Маркетплейс".
Definition: consts.hpp:80
static const eosio::asset _provider_org_initial
Definition: consts.hpp:214
static constexpr eosio::name _free_decision_action
Definition: consts.hpp:64
static constexpr uint64_t _source_program_id
Definition: consts.hpp:117
static constexpr eosio::name _ledger
Definition: consts.hpp:163
static constexpr eosio::name _regaccount_action
Definition: consts.hpp:53
static const eosio::asset _provider_minimum
Definition: consts.hpp:212
static constexpr eosio::name _saving_account
Definition: consts.hpp:165
static constexpr eosio::name _product_contribution_action
Definition: consts.hpp:68
static constexpr eosio::name _afund_withdraw_action
Definition: consts.hpp:60
static constexpr uint64_t _ram_price_per_byte
Definition: consts.hpp:220
static constexpr eosio::name _branch
Definition: consts.hpp:160
static constexpr eosio::name _registrator
Definition: consts.hpp:157
static constexpr eosio::name _meet
Definition: consts.hpp:162
static std::vector< name > token_whitelist
Definition: consts.hpp:195
static constexpr eosio::name _soviet
Definition: consts.hpp:156
static constexpr uint64_t _register_amount
Definition: consts.hpp:222
static constexpr eosio::name _marketplace
Definition: consts.hpp:155
Definition: eosio.msig.hpp:34