5#include <eosio/asset.hpp>
6#include <eosio/crypto.hpp>
7#include <eosio/eosio.hpp>
9#include "../consts.hpp"
29 checksum256
by_hash()
const {
return registration_hash; }
33 "candidates2"_n, candidate,
34 indexed_by<
"byhash"_n, const_mem_fun<candidate, checksum256, &candidate::by_hash>>>
39 auto secondary_index = primary_index.get_index<
"byhash"_n>();
41 auto itr = secondary_index.find(hash);
42 if (itr == secondary_index.end()) {
51 auto coop_itr = cooperatives.find(coopname.value);
53 if (coop_itr == cooperatives.end() || !coop_itr->is_cooperative ||
54 !coop_itr->active_participants_count.has_value()) {
55 eosio::check(
false,
"Счетчик пайщиков кооператива не найден");
58 return coop_itr->active_participants_count.value();
static constexpr eosio::name _registrator
Definition: consts.hpp:157
contract
Definition: eosio.msig_tests.cpp:977
Definition: table_registrator_candidates.hpp:13
std::optional< candidate > get_candidate_by_hash(name coopname, const checksum256 &hash)
Definition: table_registrator_candidates.hpp:37
multi_index< "candidates2"_n, candidate, indexed_by<"byhash"_n, const_mem_fun< candidate, checksum256, &candidate::by_hash > > > candidates_index
Definition: table_registrator_candidates.hpp:35
uint64_t get_active_participants_count(name coopname)
Definition: table_registrator_candidates.hpp:49
Definition: eosio.msig.hpp:34
Definition: table_registrator_candidates.hpp:17
uint64_t primary_key() const
Definition: table_registrator_candidates.hpp:28
asset minimum
Definition: table_registrator_candidates.hpp:26
name coopname
Definition: table_registrator_candidates.hpp:19
name username
Definition: table_registrator_candidates.hpp:18
document2 statement
Definition: table_registrator_candidates.hpp:23
checksum256 registration_hash
Definition: table_registrator_candidates.hpp:24
checksum256 by_hash() const
Definition: table_registrator_candidates.hpp:29
asset initial
Definition: table_registrator_candidates.hpp:25
name braname
Definition: table_registrator_candidates.hpp:20
time_point_sec created_at
Definition: table_registrator_candidates.hpp:22
name status
Definition: table_registrator_candidates.hpp:21
Definition: document_core.hpp:27
eosio::multi_index< "coops"_n, cooperative2, eosio::indexed_by<"iscoop"_n, eosio::const_mem_fun< cooperative2, uint64_t, &cooperative2::is_coop_index > >, eosio::indexed_by<"byparent"_n, eosio::const_mem_fun< cooperative2, uint64_t, &cooperative2::by_parent > >, eosio::indexed_by<"bycoopchilds"_n, eosio::const_mem_fun< cooperative2, uint128_t, &cooperative2::by_coop_childs > >, eosio::indexed_by<"bycooptype"_n, eosio::const_mem_fun< cooperative2, uint64_t, &cooperative2::bycooptype > > > cooperatives2_index
Definition: table_registrator_coops.hpp:72