3#include <eosio/eosio.hpp>
5#include "../../consts.hpp"
14 auto st = stat.find(coopname.value);
16 if (st == stat.end()) {
23bool is_trustee(eosio::name coopname, eosio::name username) {
26 auto by_trustee_index = branches.get_index<
"bytrustee"_n>();
27 auto trustee_itr = by_trustee_index.find(username.value);
29 return trustee_itr != by_trustee_index.end();
32bool is_trusted(eosio::name coopname, eosio::name braname, eosio::name username) {
34 auto branch_itr = branches.find(braname.value);
36 if (branch_itr == branches.end()) {
40 return branch_itr->is_account_in_trusted(username);
static constexpr eosio::name _branch
Definition: consts.hpp:160
Definition: branch.hpp:10
bool is_trusted(eosio::name coopname, eosio::name braname, eosio::name username)
Definition: branch.hpp:32
bool is_trustee(eosio::name coopname, eosio::name username)
Definition: branch.hpp:23
uint64_t get_branch_count(eosio::name coopname)
Definition: branch.hpp:12
eosio::multi_index< "branches"_n, coobranch, eosio::indexed_by<"bytrustee"_n, eosio::const_mem_fun< coobranch, uint64_t, &coobranch::by_trustee > > > branch_index
Definition: table_branch_branches.hpp:45
eosio::multi_index<"branchstat"_n, branchstat > branchstat_index
Definition: table_branch_branchstat.hpp:19