3#include <eosio/asset.hpp>
4#include <eosio/eosio.hpp>
6#include "../../../lib/index.hpp"
29 auto idx = userwallets.get_index<
"byuserwallet"_n>();
30 auto it = idx.find(
combine_ids(wallet_name.value, username.value));
31 if (it == idx.end()) {
60 std::string{
"Нет операции консолидации паевого кошелька "} + wallet_name.to_string() +
61 " на главный при выходе — добавьте маппинг в consolidate_share_to_main");
70 std::string memo =
"Консолидация паевого взноса при выходе, кошелёк=" +
71 wallet_name.to_string() +
", username=" + username.to_string();
73 amount, username, exit_hash, memo);
90 std::make_tuple(coopname, username)
95 auto account = accounts.find(username.value);
96 eosio::check(
account != accounts.end(),
"Аккаунт не найден");
98 a.status =
"blocked"_n;
static void apply(eosio::name actor, eosio::name coopname, eosio::name operation_code, eosio::name process_type, eosio::asset amount, eosio::name username, eosio::checksum256 process_hash, std::string memo)
Отправить inline action ledger2::apply.
Definition: ledger2.hpp:42
static constexpr eosio::symbol _root_govern_symbol
Definition: consts.hpp:231
static constexpr eosio::name _registrator
Definition: consts.hpp:173
static constexpr eosio::name _soviet
Definition: consts.hpp:172
static constexpr eosio::name _ledger2
Definition: consts.hpp:180
permission_level
Definition: eosio.msig_tests.cpp:896
share_type amount
Definition: eosio.token_tests.cpp:174
void send(name contract, name action_name, name actor, Args &&... args)
Definition: actions.hpp:10
Вспомогательные функции процедуры выхода пайщика из кооператива.
Definition: table_registrator_candidates.hpp:13
void finalize_member_exit(name coopname, name username)
Финализация выхода: удаление пайщика из реестра совета и блокировка аккаунта в registrator.
Definition: exit_helpers.hpp:84
asset get_user_wallet_available(name coopname, name wallet_name, name username)
Доступный L3-баланс пайщика на USER_SHARED-кошельке ledger2.
Definition: exit_helpers.hpp:27
void consolidate_share_to_main(name coopname, name username, name wallet_name, asset amount, checksum256 exit_hash)
Консолидация доступного паевого кошелька пайщика на главный (w.wal.share) перед резервом возврата при...
Definition: exit_helpers.hpp:50
Definition: eosio.msig.hpp:34
constexpr eosio::name WITHDRAW_FROM_CAPITAL
Возврат паевого из ЦПП «Благорост» в кошелёк пайщика (TRANSFER BLAGOROST_FUND → SHARE_FUND_PAY,...
Definition: operations.hpp:87
constexpr eosio::name MOVE_MINSHARE
Перенос минимального паевого на главный паевой при выходе из кооператива (TRANSFER MIN_SHARE_FUND → S...
Definition: operations.hpp:64
constexpr eosio::name WITHDRAW
Возврат паевого взноса пайщику.
Definition: processes.hpp:57
action(permission_level{ _gateway, "active"_n}, _gateway, "adduser"_n, std::make_tuple(coopname, deposit->username, to_spread, to_circulation, eosio::current_time_point(), true)).send()
Definition: table_registrator_accounts.hpp:14
static constexpr eosio::name MIN_SHARE_FUND
Минимальный паевой взнос пайщика (USER_SHARED, без сверки соглашений)
Definition: wallets.hpp:54
static constexpr eosio::name BLAGOROST_FUND
Благорост — единый агрегированный кошелёк программы (USER_SHARED; ADR-009)
Definition: wallets.hpp:67
static constexpr eosio::name SHARE_FUND_PAY
Паевой взнос пайщика (USER_SHARED)
Definition: wallets.hpp:48
eosio::multi_index< "userwallets"_n, userwallet, eosio::indexed_by<"byuserwallet"_n, eosio::const_mem_fun< userwallet, uint128_t, &userwallet::by_userwallet > >, eosio::indexed_by<"byuser"_n, eosio::const_mem_fun< userwallet, uint64_t, &userwallet::by_user > >, eosio::indexed_by<"bywallet"_n, eosio::const_mem_fun< userwallet, uint64_t, &userwallet::by_wallet > > > userwallets_index
Definition: table_ledger2_userwallets.hpp:46
eosio::multi_index< "accounts"_n, account, eosio::indexed_by<"byreferer"_n, eosio::const_mem_fun< account, uint64_t, &account::by_referer > >, eosio::indexed_by<"bytype"_n, eosio::const_mem_fun< account, uint64_t, &account::by_type > >, eosio::indexed_by<"bystatus"_n, eosio::const_mem_fun< account, uint64_t, &account::by_status > >, eosio::indexed_by<"byregistr"_n, eosio::const_mem_fun< account, uint64_t, &account::by_registr > >, eosio::indexed_by<"byregistred"_n, eosio::const_mem_fun< account, uint64_t, &account::by_registered_at > >, eosio::indexed_by<"byverif"_n, eosio::const_mem_fun< account, uint64_t, &account::is_verified_index > > > accounts_index
Definition: table_registrator_accounts.hpp:68
static uint128_t combine_ids(const uint64_t &x, const uint64_t &y)
Definition: utils.hpp:7