3#include <eosio/eosio.hpp>
4#include <eosio/multi_index.hpp>
56 template <
typename Row>
63 template <
typename Table>
64 using row_t = std::decay_t<decltype(*std::declval<const Table &>().cbegin())>;
67 template <
typename Table>
69 return eosio::has_auth(coopname) ? coopname : table.get_code();
77 template <
typename Table>
78 inline eosio::name
of(
const Table &table, eosio::name coopname) {
82 return table.get_code();
86 const eosio::name system_account(
"eosio");
87 return eosio::has_auth(system_account) ? system_account : table.get_code();
98 template <
typename Table>
99 inline eosio::name
of(
const Table &table) {
101 "RamPayer: cooperative table needs coopname, call RamPayer::of(table, coopname)");
102 return of(table, eosio::name{});
113#define RAM_PAYER_CLASS(ROW, CLASS) \
115 struct RamPayer::class_of<ROW> { \
116 static constexpr RamPayer::Class value = RamPayer::Class::CLASS; \
contract
Definition: eosio.msig_tests.cpp:977
Плательщик за оперативную память строки таблицы.
Definition: ram_payer.hpp:40
eosio::name of(const Table &table, eosio::name coopname)
Definition: ram_payer.hpp:78
eosio::name cooperative_or_contract(const Table &table, eosio::name coopname)
Definition: ram_payer.hpp:68
std::decay_t< decltype(*std::declval< const Table & >().cbegin())> row_t
Definition: ram_payer.hpp:64
Class
Definition: ram_payer.hpp:42
Definition: ram_payer.hpp:57
Definition: table_registrator_orgs.hpp:17