3#include <eosio/asset.hpp>
4#include <eosio/binary_extension.hpp>
5#include <eosio/eosio.hpp>
7#include "../consts.hpp"
8#include "../core/utils.hpp"
22 eosio::binary_extension<eosio::asset>
blocked;
35typedef eosio::multi_index<
37 eosio::indexed_by<
"byusername"_n, eosio::const_mem_fun<progwallet, uint64_t, &progwallet::by_username>>,
38 eosio::indexed_by<
"byprogram"_n, eosio::const_mem_fun<progwallet, uint64_t, &progwallet::by_program>>,
39 eosio::indexed_by<
"byuserprog"_n,
40 eosio::const_mem_fun<progwallet, uint128_t, &progwallet::by_username_and_program>>,
41 eosio::indexed_by<
"byagreement"_n, eosio::const_mem_fun<progwallet, uint64_t, &progwallet::by_agreement>>>
47 auto wallets_by_username_and_program = progwallets.template get_index<
"byuserprog"_n>();
48 auto username_and_program_index =
combine_ids(username.value, program_id);
49 auto wallet = wallets_by_username_and_program.find(username_and_program_index);
51 eosio::check(
wallet != wallets_by_username_and_program.end(),
"Кошелёк не найден");
Контракт Wallet управляет взносами и возвратами взносов по ЦПП "Цифровой Кошелёк".
Definition: wallet.hpp:16
static constexpr eosio::name _soviet
Definition: consts.hpp:156
contract
Definition: eosio.msig_tests.cpp:977
Definition: eosio.msig.hpp:34
Definition: table_soviet_progwallets.hpp:15
uint64_t agreement_id
Definition: table_soviet_progwallets.hpp:19
eosio::asset available
Definition: table_soviet_progwallets.hpp:21
uint64_t id
Definition: table_soviet_progwallets.hpp:16
eosio::binary_extension< eosio::asset > membership_contribution
Definition: table_soviet_progwallets.hpp:23
uint64_t by_username() const
Definition: table_soviet_progwallets.hpp:26
eosio::name username
Definition: table_soviet_progwallets.hpp:20
eosio::binary_extension< eosio::asset > blocked
Definition: table_soviet_progwallets.hpp:22
uint64_t program_id
Definition: table_soviet_progwallets.hpp:18
uint128_t by_username_and_program() const
Definition: table_soviet_progwallets.hpp:30
uint64_t by_agreement() const
Definition: table_soviet_progwallets.hpp:28
eosio::name coopname
Definition: table_soviet_progwallets.hpp:17
uint64_t primary_key() const
Definition: table_soviet_progwallets.hpp:25
uint64_t by_program() const
Definition: table_soviet_progwallets.hpp:27
progwallet get_user_program_wallet_or_fail(eosio::name coopname, eosio::name username, uint64_t program_id)
Definition: table_soviet_progwallets.hpp:44
eosio::multi_index< "progwallets"_n, progwallet, eosio::indexed_by<"byusername"_n, eosio::const_mem_fun< progwallet, uint64_t, &progwallet::by_username > >, eosio::indexed_by<"byprogram"_n, eosio::const_mem_fun< progwallet, uint64_t, &progwallet::by_program > >, eosio::indexed_by<"byuserprog"_n, eosio::const_mem_fun< progwallet, uint128_t, &progwallet::by_username_and_program > >, eosio::indexed_by<"byagreement"_n, eosio::const_mem_fun< progwallet, uint64_t, &progwallet::by_agreement > > > progwallets_index
Definition: table_soviet_progwallets.hpp:42
static uint128_t combine_ids(const uint64_t &x, const uint64_t &y)
Definition: utils.hpp:7