COOPENOMICS  v1
Кооперативная Экономика
table_apps_coops.hpp
См. документацию.
1#pragma once
2
3
4#include "../core/ram_payer.hpp"
5#include <eosio/eosio.hpp>
6#include <eosio/crypto.hpp>
7
8#include "../consts.hpp"
9
10namespace Apps {
11
12using namespace eosio;
13
46struct [[eosio::table, eosio::contract(APPS)]] coop {
47 name coopname; // PK = Antelope name
48 checksum256 chain_id; // подсеть (каноническая идентификация)
49 name subnet_label; // human-label "ru"/"by" для UI/scope
50 public_key signing_key; // subnet-signing-key (НЕ active)
51 bool active;
52 time_point_sec registered_at;
53 time_point_sec key_rotated_at; // последняя ротация signing_key
54
55 uint64_t primary_key() const { return coopname.value; }
56 uint64_t by_subnet() const { return subnet_label.value; }
57};
58
59typedef eosio::multi_index<
60 "coops"_n, coop,
61 eosio::indexed_by<"bysubnet"_n, eosio::const_mem_fun<coop, uint64_t, &coop::by_subnet>>>
63
64} // namespace Apps
65
66// Плательщик за оперативную память строк таблицы — правило в lib/core/ram_payer.hpp.
contract
Definition: eosio.msig_tests.cpp:977
Definition: apps.hpp:75
eosio::multi_index< "coops"_n, coop, eosio::indexed_by<"bysubnet"_n, eosio::const_mem_fun< coop, uint64_t, &coop::by_subnet > > > coops_index
Definition: table_apps_coops.hpp:62
Definition: eosio.msig.hpp:34
Запись каталога: кооператив, зарегистрированный в каталоге.
Definition: table_apps_coops.hpp:46
time_point_sec registered_at
Definition: table_apps_coops.hpp:52
name coopname
Definition: table_apps_coops.hpp:47
name subnet_label
Definition: table_apps_coops.hpp:49
checksum256 chain_id
Definition: table_apps_coops.hpp:48
uint64_t primary_key() const
Definition: table_apps_coops.hpp:55
uint64_t by_subnet() const
Definition: table_apps_coops.hpp:56
public_key signing_key
Definition: table_apps_coops.hpp:50
time_point_sec key_rotated_at
Definition: table_apps_coops.hpp:53
bool active
Definition: table_apps_coops.hpp:51
RAM_PAYER_CLASS(Apps::coop, contract)