27#include <eosio/asset.hpp>
28#include <eosio/binary_extension.hpp>
29#include <eosio/privileged.hpp>
30#include <eosio/producer_schedule.hpp>
31#include <eosio/singleton.hpp>
32#include <eosio/system.hpp>
33#include <eosio/time.hpp>
42#include "../../../../../lib/consts.hpp"
43#include "../../../../../lib/core/ram_watch.hpp"
46#define CHANNEL_RAM_AND_NAMEBID_FEES_TO_REX 0
51 using eosio::binary_extension;
52 using eosio::block_timestamp;
54 using eosio::const_mem_fun;
55 using eosio::datastream;
56 using eosio::indexed_by;
58 using eosio::same_payer;
60 using eosio::symbol_code;
62 using eosio::time_point_sec;
63 using eosio::unsigned_int;
68 template<
typename E,
typename F>
70 -> std::enable_if_t< std::is_integral_v<F> && std::is_unsigned_v<F> &&
71 std::is_enum_v<E> && std::is_same_v< F, std::underlying_type_t<E> >,
bool>
73 return ( (flags &
static_cast<F
>(field)) != 0 );
76 template<
typename E,
typename F>
77 static inline auto set_field( F flags, E field,
bool value =
true )
78 -> std::enable_if_t< std::is_integral_v<F> && std::is_unsigned_v<F> &&
79 std::is_enum_v<E> && std::is_same_v< F, std::underlying_type_t<E> >, F >
82 return ( flags |
static_cast<F
>(field) );
84 return ( flags & ~
static_cast<F
>(field) );
112#ifdef SYSTEM_BLOCKCHAIN_PARAMETERS
113 struct blockchain_parameters_v1 : eosio::blockchain_parameters
115 eosio::binary_extension<uint32_t> max_action_return_value_size;
116 EOSLIB_SERIALIZE_DERIVED( blockchain_parameters_v1, eosio::blockchain_parameters,
117 (max_action_return_value_size) )
137 int64_t high_bid = 0;
141 uint64_t
by_high_bid()
const {
return static_cast<uint64_t
>(-high_bid); }
158 typedef eosio::multi_index<
"namebids"_n, name_bid,
159 indexed_by<
"highbid"_n, const_mem_fun<name_bid, uint64_t, &name_bid::by_high_bid> >
173 uint64_t
free_ram()
const {
return max_ram_size - total_ram_bytes_reserved; }
175 uint64_t max_ram_size = 8ll*1024 * 1024 * 1024;
176 uint64_t total_ram_bytes_reserved = 0;
177 int64_t total_ram_stake = 0;
181 int64_t pervote_bucket = 0;
182 int64_t perblock_bucket = 0;
183 uint32_t total_unpaid_blocks = 0;
184 int64_t total_activated_stake = 0;
186 uint16_t last_producer_schedule_size = 0;
187 double total_producer_vote_weight = 0;
188 uint16_t new_ram_per_block = 0;
190 uint8_t revision = 0;
196 (max_ram_size)(total_ram_bytes_reserved)(total_ram_stake)
197 (last_producer_schedule_update)(last_pervote_bucket_fill)
198 (pervote_bucket)(perblock_bucket)(total_unpaid_blocks)(total_activated_stake)(thresh_activated_stake_time)
199 (last_producer_schedule_size)(total_producer_vote_weight)
200 (new_ram_per_block)(last_ram_increase)(revision)
206 return eosio::block_signing_authority_v0{ .threshold = 1, .keys = {{producer_key, 1}} };
219 double total_votes = 0;
221 bool is_active =
true;
223 uint32_t unpaid_blocks = 0;
225 uint16_t location = 0;
229 double by_votes()
const {
return is_active ? -total_votes : total_votes; }
231 void deactivate() { producer_key = public_key(); producer_authority.reset(); is_active =
false; }
234 if( producer_authority.has_value() ) {
235 bool zero_threshold = std::visit( [](
auto&& auth ) ->
bool {
236 return (auth.threshold == 0);
237 }, *producer_authority );
241 if( !zero_threshold )
return *producer_authority;
255 template<
typename DataStream>
271 template<
typename DataStream>
302 double last_vote_weight = 0;
305 double proxied_vote_weight= 0;
309 uint32_t reserved2 = 0;
321 EOSLIB_SERIALIZE(
voter_info, (
owner)(
proxy)(producers)(staked)(last_vote_weight)(proxied_vote_weight)(is_proxy)(flags1)(reserved2)(reserved3) )
328 indexed_by<
"prototalvote"_n, const_mem_fun<producer_info, double, &producer_info::by_votes> >
345 int64_t ram_bytes = 0;
347 bool is_empty()
const {
return net_weight.amount == 0 && cpu_weight.amount == 0 && ram_bytes == 0; }
369 bool is_empty()
const {
return net_weight.amount == 0 && cpu_weight.amount == 0; }
391 bool is_empty()
const {
return net_amount.amount == 0 && cpu_amount.amount == 0; }
446 static constexpr uint32_t default_powerup_days = 30;
451 uint32_t powerup_days = default_powerup_days;
452 asset min_powerup_fee = {};
470 uint64_t tact_number = 1;
471 uint64_t tact_duration = 86400;
472 double emission_factor = double(0.618);
510 typedef eosio::multi_index<
"powup.order"_n, powerup_order,
511 indexed_by<
"byowner"_n, const_mem_fun<powerup_order, uint64_t, &powerup_order::by_owner>>,
512 indexed_by<
"byexpires"_n, const_mem_fun<powerup_order, uint64_t, &powerup_order::by_expires>>
530 uint8_t threshold_percent = 70;
531 int64_t grant_bytes = 512 * 1024;
532 uint32_t check_interval_sec = 3600;
535 EOSLIB_SERIALIZE(
ram_grant_config, (threshold_percent)(grant_bytes)(check_interval_sec)(contracts) )
561 static constexpr eosio::name active_permission{
"active"_n};
562 static constexpr eosio::name token_account{
"eosio.token"_n};
563 static constexpr eosio::name ram_account{
"eosio.ram"_n};
564 static constexpr eosio::name ramfee_account{
"eosio.ramfee"_n};
565 static constexpr eosio::name stake_account{
"eosio.stake"_n};
566 static constexpr eosio::name bpay_account{
"eosio.bpay"_n};
567 static constexpr eosio::name vpay_account{
"eosio.vpay"_n};
568 static constexpr eosio::name names_account{
"eosio.names"_n};
569 static constexpr eosio::name null_account{
"eosio.null"_n};
570 static constexpr symbol ramcore_symbol = symbol(symbol_code(
"RAMCORE"), 4);
571 static constexpr symbol ram_symbol = symbol(symbol_code(
"RAM"), 0);
579 rammarket rm(system_account, system_account.value);
580 const static auto sym = get_core_symbol( rm );
593 void init( uint64_t version,
const symbol& core );
613 void injection(
const name& coopname,
const asset& quantity);
632 void setcode(
const name&
account, uint8_t vmtype, uint8_t vmversion,
const std::vector<char>& code,
const binary_extension<std::string>& memo );
641 void initemission(eosio::asset init_supply, uint64_t tact_duration,
double emission_factor);
646 void onblock( ignore<block_header> header );
650 void setalimits(
const name&
account, int64_t ram_bytes, int64_t net_weight, int64_t cpu_weight );
654 void setacctram(
const name&
account,
const std::optional<int64_t>& ram_bytes );
658 void setacctnet(
const name&
account,
const std::optional<int64_t>& net_weight );
662 void setacctcpu(
const name&
account,
const std::optional<int64_t>& cpu_weight );
667 void activate(
const eosio::checksum256& feature_digest );
673 void delegatebw(
const name& from,
const name& receiver,
674 const asset& stake_net_quantity,
const asset& stake_cpu_quantity,
bool transfer );
679 void undelegatebw(
const name& from,
const name& receiver,
680 const asset& unstake_net_quantity,
const asset& unstake_cpu_quantity );
684 void buyram(
const name& payer,
const name& receiver,
const asset& quant );
688 void sellram(
const name&
account, int64_t bytes );
693 void buyrambytes(
const name& payer,
const name& receiver, uint32_t bytes );
697 void refund(
const name&
owner );
703 void regproducer(
const name& producer,
const public_key& producer_key,
const std::string& url, uint16_t location );
707 void regproducer2(
const name& producer,
const eosio::block_signing_authority& producer_authority,
const std::string& url, uint16_t location );
711 void unregprod(
const name& producer );
715 void setram( uint64_t max_ram_size );
719 void setramrate( uint16_t bytes_per_block );
723 void voteproducer(
const name&
voter,
const name&
proxy,
const std::vector<name>& producers );
727 void voteupdate(
const name& voter_name );
731 void regproxy(
const name&
proxy,
bool isproxy );
737#ifdef SYSTEM_CONFIGURABLE_WASM_LIMITS
740 void wasmcfg(
const name& settings );
745 void claimrewards(
const name&
owner );
749 void setpriv(
const name&
account, uint8_t is_priv );
753 void rmvproducer(
const name& producer );
757 void updtrevision( uint8_t revision );
761 void bidname(
const name& bidder,
const name& newname,
const asset& bid );
765 void bidrefund(
const name& bidder,
const name& newname );
773 void powerupexec(
const name& user, uint16_t
max );
777 void powerup(
const name& payer,
const name& receiver, uint32_t days,
const asset& payment,
const bool transfer =
false);
796 void ramreq(
const name& contract );
800 void limitauthchg(
const name&
account,
const std::vector<name>& allow_perms,
const std::vector<name>& disallow_perms );
859 auto itr = rm.find(ramcore_symbol.raw());
860 check(itr != rm.end(),
"system contract must first be initialized");
861 return itr->quote.balance.symbol;
866 int64_t update_ram_debt_table(name payer, name
account, int64_t ram_bytes);
868 void emit(eosio::asset new_emission);
870 symbol core_symbol()
const;
871 void update_ram_supply();
874 void changebw( name from,
const name& receiver,
875 const asset& stake_net_quantity,
const asset& stake_cpu_quantity,
bool transfer );
876 void update_voting_power(
const name&
voter,
const asset& total_update );
879 void register_producer(
const name& producer,
const eosio::block_signing_authority& producer_authority,
const std::string& url, uint16_t location );
880 void update_elected_producers(
const block_timestamp& timestamp );
881 void update_votes(
const name&
voter,
const name&
proxy,
const std::vector<name>& producers,
bool voting );
885 void fill_tact(eosio::name payer, eosio::asset payment);
886 void adjust_resources(name payer, name
account, symbol core_symbol, int64_t net_delta, int64_t cpu_delta, int64_t ram_delta,
bool must_not_be_managed =
false);
887 void process_powerup_queue(
888 time_point_sec now, symbol core_symbol,
powerup_state& state,
890 int64_t& cpu_delta_available, int64_t& ram_delta_available);
892 void change_weights(eosio::name payer, eosio::asset new_emission);
894 void add_to_blockinfo_table(
const eosio::checksum256& previous_block_id,
const eosio::block_timestamp timestamp)
const;
Definition: native.hpp:128
Definition: eosio.system.hpp:551
eosio::action_wrapper<"activate"_n, &system_contract::activate > activate_action
Definition: eosio.system.hpp:814
eosio::action_wrapper<"delegatebw"_n, &system_contract::delegatebw > delegatebw_action
Definition: eosio.system.hpp:815
rammarket _rammarket
Definition: eosio.system.hpp:558
eosio::action_wrapper<"unregprod"_n, &system_contract::unregprod > unregprod_action
Definition: eosio.system.hpp:826
eosio::action_wrapper<"buyram"_n, &system_contract::buyram > buyram_action
Definition: eosio.system.hpp:818
eosio::action_wrapper<"claimrewards"_n, &system_contract::claimrewards > resultrewards_action
Definition: eosio.system.hpp:837
eosio::action_wrapper<"setacctram"_n, &system_contract::setacctram > setacctram_action
Definition: eosio.system.hpp:810
eosio::action_wrapper<"bidname"_n, &system_contract::bidname > bidname_action
Definition: eosio.system.hpp:843
eosio_global_state _gstate
Definition: eosio.system.hpp:557
voters_table _voters
Definition: eosio.system.hpp:554
eosio::action_wrapper<"setram"_n, &system_contract::setram > setram_action
Definition: eosio.system.hpp:828
static symbol get_core_symbol(name system_account="eosio"_n)
Definition: eosio.system.hpp:578
eosio::action_wrapper<"setalimits"_n, &system_contract::setalimits > setalimits_action
Definition: eosio.system.hpp:847
eosio::action_wrapper<"updtrevision"_n, &system_contract::updtrevision > updtrevision_action
Definition: eosio.system.hpp:841
void setcode(const name &account, uint8_t vmtype, uint8_t vmversion, const std::vector< char > &code, const binary_extension< std::string > &memo)
Definition: eosio.system.cpp:743
eosio::action_wrapper<"undelegatebw"_n, &system_contract::undelegatebw > undelegatebw_action
Definition: eosio.system.hpp:816
eosio::action_wrapper<"refund"_n, &system_contract::refund > refund_action
Definition: eosio.system.hpp:821
producers_table _producers
Definition: eosio.system.hpp:555
eosio::action_wrapper<"bidrefund"_n, &system_contract::bidrefund > bidrefund_action
Definition: eosio.system.hpp:844
void regproxy(const name &proxy, bool isproxy)
Definition: voting.cpp:325
eosio::action_wrapper<"injection"_n, &system_contract::injection > injection_action
Definition: eosio.system.hpp:808
eosio::action_wrapper<"cfgpowerup"_n, &system_contract::cfgpowerup > cfgpowerup_action
Definition: eosio.system.hpp:851
eosio::action_wrapper<"setacctcpu"_n, &system_contract::setacctcpu > setacctcpu_action
Definition: eosio.system.hpp:812
eosio::action_wrapper<"setpriv"_n, &system_contract::setpriv > setpriv_action
Definition: eosio.system.hpp:846
eosio::action_wrapper<"regproxy"_n, &system_contract::regproxy > regproxy_action
Definition: eosio.system.hpp:835
static symbol get_core_symbol(const rammarket &rm)
Definition: eosio.system.hpp:858
eosio::action_wrapper<"rmvproducer"_n, &system_contract::rmvproducer > rmvproducer_action
Definition: eosio.system.hpp:839
eosio::action_wrapper<"setcode"_n, &system_contract::setcode > setcode_action
Definition: eosio.system.hpp:806
eosio::action_wrapper<"voteproducer"_n, &system_contract::voteproducer > voteproducer_action
Definition: eosio.system.hpp:832
eosio::action_wrapper<"voteupdate"_n, &system_contract::voteupdate > voteupdate_action
Definition: eosio.system.hpp:833
eosio::action_wrapper<"setramrate"_n, &system_contract::setramrate > setramrate_action
Definition: eosio.system.hpp:829
eosio::action_wrapper<"regproducer"_n, &system_contract::regproducer > regproducer_action
Definition: eosio.system.hpp:823
eosio::action_wrapper<"init"_n, &system_contract::init > init_action
Definition: eosio.system.hpp:805
eosio::action_wrapper<"initemission"_n, &system_contract::initemission > initemission_action
Definition: eosio.system.hpp:807
eosio::action_wrapper<"powerup"_n, &system_contract::powerup > powerup_action
Definition: eosio.system.hpp:853
eosio::action_wrapper<"powerupexec"_n, &system_contract::powerupexec > powerupexec_action
Definition: eosio.system.hpp:852
eosio::action_wrapper<"setacctnet"_n, &system_contract::setacctnet > setacctnet_action
Definition: eosio.system.hpp:811
eosio::action_wrapper<"setparams"_n, &system_contract::setparams > setparams_action
Definition: eosio.system.hpp:849
global_state_singleton _global
Definition: eosio.system.hpp:556
eosio::action_wrapper<"regproducer2"_n, &system_contract::regproducer2 > regproducer2_action
Definition: eosio.system.hpp:824
void initemission(eosio::asset init_supply, uint64_t tact_duration, double emission_factor)
Definition: powerup.cpp:323
eosio::action_wrapper<"buyrambytes"_n, &system_contract::buyrambytes > buyrambytes_action
Definition: eosio.system.hpp:819
const auto active
Definition: eosio.limitauth_tests.cpp:17
const auto owner
Definition: eosio.limitauth_tests.cpp:16
contract
Definition: eosio.msig_tests.cpp:977
transfer("alice"_n, "bob"_n, asset::from_string("300 CERO"), "hola")
asset max(10, symbol(SY(0, NKT)))
void buyram(const name &payer, const name &receiver, const asset &quant)
Покупает RAM для указанного аккаунта. При покупке RAM плательщик безвозвратно передает токены системн...
Definition: delegate_bandwidth.cpp:58
void updtrevision(uint8_t revision)
Обновляет текущую ревизию. Обновляет текущую ревизию. Ревизия должна быть увеличена на 1 по сравнению...
Definition: eosio.system.cpp:499
void unregprod(const name &producer)
Отменяет регистрацию блок-продюсера. Деактивирует продюсера, делая его неактивным в системе.
Definition: voting.cpp:117
void refund(const name &owner)
Возвращает застейканные токены после истечения периода задержки. Позволяет аккаунту получить обратно ...
Definition: delegate_bandwidth.cpp:447
void activate(const eosio::checksum256 &feature_digest)
Активирует протокольную функцию. Активирует протокольную функцию по хешу перед деплоем системного кон...
Definition: eosio.system.cpp:466
void voteproducer(const name &voter, const name &proxy, const std::vector< name > &producers)
Голосует за продюсеров или делегирует голос прокси. Позволяет пользователю голосовать за до 30 продюс...
Definition: voting.cpp:180
void bidrefund(const name &bidder, const name &newname)
Возвращает ставку на имя. Позволяет аккаунту получить обратно сумму своей ставки на имя,...
Definition: name_bidding.cpp:97
void regproducer(const name &producer, const public_key &producer_key, const std::string &url, uint16_t location)
Регистрирует блок-продюсера в системе. Создает или обновляет запись продюсера с публичным ключом,...
Definition: voting.cpp:78
void rmvproducer(const name &producer)
Удаляет продюсера по имени. Деактивирует продюсера по имени, если не найден - вызывает ошибку.
Definition: eosio.system.cpp:480
void init(uint64_t version, const symbol &core)
Инициализирует системный контракт для версии и символа. Действие выполняется успешно только когда:
Definition: eosio.system.cpp:705
void claimrewards(const name &owner)
Получает награды за производство блоков и голосование. Позволяет продюсеру получить награды за произв...
Definition: producer_pay.cpp:121
void undelegatebw(const name &from, const name &receiver, const asset &unstake_net_quantity, const asset &unstake_cpu_quantity)
Отменяет делегирование пропускной способности сети и CPU. Позволяет аккаунту отменить стейкинг токено...
Definition: delegate_bandwidth.cpp:418
void setpriv(const name &account, uint8_t is_priv)
Устанавливает привилегированный статус для аккаунта. Позволяет включить или выключить привилегированн...
Definition: eosio.system.cpp:258
void regproducer2(const name &producer, const eosio::block_signing_authority &producer_authority, const std::string &url, uint16_t location)
Регистрирует блок-продюсера с расширенной авторизацией подписи блоков. Создает или обновляет запись п...
Definition: voting.cpp:97
void setramrate(uint16_t bytes_per_block)
Устанавливает скорость увеличения RAM в байтах за блок.
Definition: eosio.system.cpp:102
void buyrambytes(const name &payer, const name &receiver, uint32_t bytes)
Покупает точное количество RAM в байтах. Покупает точное количество байт RAM и выставляет счет плател...
Definition: delegate_bandwidth.cpp:33
void setacctcpu(const name &account, const std::optional< int64_t > &cpu_weight)
Устанавливает лимиты CPU для аккаунта. Устанавливает пропорциональный лимит CPU для указанного аккаун...
Definition: eosio.system.cpp:413
void setacctnet(const name &account, const std::optional< int64_t > &net_weight)
Устанавливает лимиты NET для аккаунта. Устанавливает пропорциональный лимит NET для указанного аккаун...
Definition: eosio.system.cpp:359
void setparams(const blockchain_parameters_t ¶ms)
Устанавливает параметры блокчейна. Обновляет глобальные параметры блокчейна, включая лимиты блоков,...
Definition: eosio.system.cpp:122
void delegatebw(const name &from, const name &receiver, const asset &stake_net_quantity, const asset &stake_cpu_quantity, bool transfer)
Делегирует пропускную способность сети и CPU другому аккаунту. Позволяет аккаунту застейкать токены д...
Definition: delegate_bandwidth.cpp:387
void powerupexec(const name &user, uint16_t max)
Обрабатывает очередь powerup и обновляет состояние. Действие не выполняет ничего связанного с конкрет...
Definition: powerup.cpp:172
void powerup(const name &payer, const name &receiver, uint32_t days, const asset &payment, const bool transfer=false)
Аренда ресурсов NET и CPU через систему powerup. Позволяет аккаунту арендовать ресурсы сети и CPU на ...
Definition: powerup.cpp:204
void setacctram(const name &account, const std::optional< int64_t > &ram_bytes)
Устанавливает лимиты RAM для аккаунта. Устанавливает лимит RAM в абсолютных байтах для указанного акк...
Definition: eosio.system.cpp:304
void setalimits(const name &account, int64_t ram_bytes, int64_t net_weight, int64_t cpu_weight)
Устанавливает лимиты ресурсов для аккаунта. Устанавливает абсолютные лимиты RAM, NET и CPU для указан...
Definition: eosio.system.cpp:276
void setram(uint64_t max_ram_size)
Устанавливает максимальный размер RAM в системе. Увеличивает количество RAM доступного для продажи на...
Definition: eosio.system.cpp:49
void cfgpowerup(powerup_config &args)
Конфигурирует систему аренды ресурсов. Настраивает параметры рынка ресурсов powerup,...
Definition: powerup.cpp:108
void injection(const name &coopname, const asset &quantity)
Инжектирует токены из фонда eosio.saving на кооператив. Требует подписи _soviet для выполнения операц...
Definition: eosio.system.cpp:680
void bidname(const name &bidder, const name &newname, const asset &bid)
Размещает ставку на премиум имя. Позволяет аккаунту разместить ставку на премиум имя....
Definition: name_bidding.cpp:24
void voteupdate(const name &voter_name)
Обновляет голоса пользователя на основе текущих застейканных токенов. Пересчитывает вес голоса пользо...
Definition: voting.cpp:196
static constexpr int64_t ram_gift_bytes
Подарочные байты RAM (1400)
Definition: eosio.system.hpp:105
static constexpr uint32_t blocks_per_day
Количество блоков в дне (половина секунды на блок)
Definition: eosio.system.hpp:100
static constexpr uint32_t seconds_per_day
Количество секунд в дне
Definition: eosio.system.hpp:90
static constexpr uint32_t seconds_per_hour
Количество секунд в часе
Definition: eosio.system.hpp:92
static constexpr int64_t useconds_per_hour
Количество микросекунд в часе
Definition: eosio.system.hpp:98
static constexpr int64_t useconds_per_year
Количество микросекунд в году
Definition: eosio.system.hpp:94
static constexpr int64_t min_activated_stake
Минимальная активированная ставка
Definition: eosio.system.hpp:103
static constexpr int64_t useconds_per_day
Количество микросекунд в дне
Definition: eosio.system.hpp:96
static constexpr int64_t min_pervote_daily_pay
Минимальная ежедневная оплата за голос
Definition: eosio.system.hpp:107
static constexpr uint32_t refund_delay_sec
Задержка возврата в секундах
Definition: eosio.system.hpp:109
constexpr int64_t powerup_frac
Definition: eosio.system.hpp:66
static constexpr uint32_t seconds_per_year
Количество секунд в году
Definition: eosio.system.hpp:88
fc::mutable_variant_object voter(account_name acct)
Definition: eosio.system_tester.hpp:1183
fc::mutable_variant_object proxy(account_name acct)
Definition: eosio.system_tester.hpp:1212
Definition: eosio.msig.hpp:34
Definition: rammarket.hpp:9
eosio::multi_index<"rammarket"_n, exchange_state > rammarket
Definition: rammarket.hpp:113
eosio::multi_index< "voters"_n, voter_info > voters_table
Definition: eosio.system.hpp:325
eosio::singleton< "global"_n, eosio_global_state > global_state_singleton
Definition: eosio.system.hpp:331
eosio::multi_index< "userres"_n, user_resources > user_resources_table
Definition: eosio.system.hpp:416
eosio::singleton<"powerstate"_n, powerup_state > powerup_state_singleton
Definition: eosio.system.hpp:457
eosio::multi_index< "delband"_n, delegated_bandwidth > del_bandwidth_table
Definition: eosio.system.hpp:417
eosio::multi_index<"ramdebts"_n, ram_debt_record > ram_debts_table
Definition: eosio.system.hpp:413
static auto set_field(F flags, E field, bool value=true) -> std::enable_if_t< std::is_integral_v< F > &&std::is_unsigned_v< F > &&std::is_enum_v< E > &&std::is_same_v< F, std::underlying_type_t< E > >, F >
Definition: eosio.system.hpp:77
eosio::blockchain_parameters blockchain_parameters_t
Definition: eosio.system.hpp:121
static auto has_field(F flags, E field) -> std::enable_if_t< std::is_integral_v< F > &&std::is_unsigned_v< F > &&std::is_enum_v< E > &&std::is_same_v< F, std::underlying_type_t< E > >, bool >
Definition: eosio.system.hpp:69
eosio::multi_index< "namebids"_n, name_bid, indexed_by<"highbid"_n, const_mem_fun< name_bid, uint64_t, &name_bid::by_high_bid > > > name_bid_table
Definition: eosio.system.hpp:160
eosio::multi_index< "bidrefunds"_n, bid_refund > bid_refund_table
Definition: eosio.system.hpp:162
eosio::multi_index< "refunds"_n, refund_request > refunds_table
Definition: eosio.system.hpp:418
eosio::multi_index< "powup.order"_n, powerup_order, indexed_by<"byowner"_n, const_mem_fun< powerup_order, uint64_t, &powerup_order::by_owner > >, indexed_by<"byexpires"_n, const_mem_fun< powerup_order, uint64_t, &powerup_order::by_expires > > > powerup_order_table
Definition: eosio.system.hpp:513
eosio::block_signing_authority convert_to_block_signing_authority(const eosio::public_key &producer_key)
Definition: eosio.system.hpp:205
eosio::singleton<"emission"_n, emission_state > emission_state_singleton
Definition: eosio.system.hpp:483
eosio::singleton<"ramgrantcfg"_n, ram_grant_config > ram_grant_config_singleton
Definition: eosio.system.hpp:538
eosio::multi_index< "producers"_n, producer_info, indexed_by<"prototalvote"_n, const_mem_fun< producer_info, double, &producer_info::by_votes > > > producers_table
Definition: eosio.system.hpp:329
eosio::time_point time_point
Definition: blockinfo_tester.hpp:30
action(permission_level{ _gateway, "active"_n}, _gateway, "adduser"_n, std::make_tuple(coopname, deposit->username, to_spread, to_circulation, eosio::current_time_point(), true)).send()
Definition: table_registrator_accounts.hpp:16
Definition: native.hpp:71
Таблица возвратов ставок хранит информацию о возвратах средств от неудачных ставок на имена.
Definition: eosio.system.hpp:152
uint64_t primary_key() const
Первичный ключ (1)
Definition: eosio.system.hpp:156
name bidder
Аккаунт, которому принадлежит возврат
Definition: eosio.system.hpp:153
asset amount
Сумма к возврату
Definition: eosio.system.hpp:154
Таблица делегированной пропускной способности хранит информацию о делегированных ресурсах между польз...
Definition: eosio.system.hpp:363
name from
Отправитель делегирования
Definition: eosio.system.hpp:364
bool is_empty() const
Проверяет, пусто ли делегирование
Definition: eosio.system.hpp:369
name to
Получатель делегирования
Definition: eosio.system.hpp:365
asset cpu_weight
Вес CPU.
Definition: eosio.system.hpp:367
uint64_t primary_key() const
Первичный ключ (1)
Definition: eosio.system.hpp:370
asset net_weight
Вес сети
Definition: eosio.system.hpp:366
Таблица состояния эмиссии хранит информацию о текущем такте эмиссии токенов.
Definition: eosio.system.hpp:469
asset back_from_producers
Вернулось в фонд от делегатских комиссий
Definition: eosio.system.hpp:477
eosio::time_point_sec tact_open_at
Дата открытия такта
Definition: eosio.system.hpp:474
uint64_t primary_key() const
Первичный ключ (1)
Definition: eosio.system.hpp:480
eosio::time_point_sec tact_close_at
Дата закрытия такта
Definition: eosio.system.hpp:475
asset tact_fees
Накопленные комиссии такта
Definition: eosio.system.hpp:476
asset current_supply
Объем токенов в системе
Definition: eosio.system.hpp:473
asset emission_start
Подвижная граница начала эмиссии в такте
Definition: eosio.system.hpp:479
asset tact_emission
Накопленная эмиссия такта
Definition: eosio.system.hpp:478
Глобальное состояние системы хранит основные параметры блокчейна и статистику.
Definition: eosio.system.hpp:172
block_timestamp last_producer_schedule_update
Время последнего обновления расписания продюсеров
Definition: eosio.system.hpp:179
time_point thresh_activated_stake_time
Время достижения порога активированной ставки
Definition: eosio.system.hpp:185
block_timestamp last_name_close
Время последнего закрытия имени
Definition: eosio.system.hpp:192
uint64_t free_ram() const
Возвращает количество свободной RAM.
Definition: eosio.system.hpp:173
time_point last_pervote_bucket_fill
Время последнего заполнения корзины за голос
Definition: eosio.system.hpp:180
block_timestamp last_ram_increase
Время последнего увеличения RAM.
Definition: eosio.system.hpp:189
Таблица ставок на имена хранит информацию о аукционах на премиум имена.
Definition: eosio.system.hpp:134
name newname
Имя, на которое делается ставка
Definition: eosio.system.hpp:135
uint64_t by_high_bid() const
Индекс по наивысшей ставке (2)
Definition: eosio.system.hpp:141
name high_bidder
Аккаунт с наивысшей ставкой
Definition: eosio.system.hpp:136
time_point last_bid_time
Время последней ставки
Definition: eosio.system.hpp:138
uint64_t primary_key() const
Первичный ключ (1)
Definition: eosio.system.hpp:140
Definition: eosio.system.hpp:420
std::optional< uint32_t > powerup_days
Definition: eosio.system.hpp:421
std::optional< asset > min_powerup_fee
Definition: eosio.system.hpp:423
Таблица заказов powerup хранит информацию о заказах на покупку ресурсов через powerup.
Definition: eosio.system.hpp:496
uint64_t id
ID заказа
Definition: eosio.system.hpp:498
time_point_sec expires
Время истечения заказа
Definition: eosio.system.hpp:503
int64_t net_weight
Вес сети
Definition: eosio.system.hpp:500
name owner
Владелец заказа
Definition: eosio.system.hpp:499
uint64_t primary_key() const
Первичный ключ (1)
Definition: eosio.system.hpp:505
uint64_t by_expires() const
Индекс по времени истечения (3)
Definition: eosio.system.hpp:507
int64_t ram_bytes
Количество байт RAM.
Definition: eosio.system.hpp:502
uint64_t by_owner() const
Индекс по владельцу (2)
Definition: eosio.system.hpp:506
int64_t cpu_weight
Вес CPU.
Definition: eosio.system.hpp:501
Definition: eosio.system.hpp:429
int64_t utilization
Definition: eosio.system.hpp:433
int64_t weight
Definition: eosio.system.hpp:430
Таблица состояния powerup хранит состояние рынка ресурсов для powerup.
Definition: eosio.system.hpp:445
uint64_t primary_key() const
Первичный ключ (1)
Definition: eosio.system.hpp:454
Таблица информации о продюсерах хранит данные о зарегистрированных блок-продюсерах.
Definition: eosio.system.hpp:217
bool is_active
Активен ли продюсер
Definition: eosio.system.hpp:221
eosio::block_signing_authority get_producer_authority() const
Definition: eosio.system.hpp:233
uint32_t unpaid_blocks
Количество неоплаченных блоков
Definition: eosio.system.hpp:223
double by_votes() const
Definition: eosio.system.hpp:229
uint16_t location
Локация продюсера
Definition: eosio.system.hpp:225
name owner
Владелец аккаунта продюсера
Definition: eosio.system.hpp:218
uint64_t primary_key() const
Definition: eosio.system.hpp:228
time_point last_result_time
Время последнего результата
Definition: eosio.system.hpp:224
void deactivate()
Definition: eosio.system.hpp:231
double total_votes
Общее количество голосов
Definition: eosio.system.hpp:219
bool active() const
Definition: eosio.system.hpp:230
eosio::binary_extension< eosio::block_signing_authority > producer_authority
Авторизация подписи блоков (добавлено в версии 1.9.0)
Definition: eosio.system.hpp:226
eosio::public_key producer_key
Публичный ключ продюсера
Definition: eosio.system.hpp:220
std::string url
URL продюсера
Definition: eosio.system.hpp:222
Таблица записей о долгах по RAM хранит информацию о долгах аккаунтов по RAM.
Definition: eosio.system.hpp:406
name account
Аккаунт
Definition: eosio.system.hpp:407
uint64_t primary_key() const
Первичный ключ (1)
Definition: eosio.system.hpp:410
int64_t ram_debt
Долг по RAM.
Definition: eosio.system.hpp:408
Настройка выдачи памяти контрактам платформы по заявке ramreq.
Definition: eosio.system.hpp:529
std::vector< name > contracts
Контракты платформы, которым выдаётся память
Definition: eosio.system.hpp:533
Таблица запросов на возврат хранит информацию о запросах на возврат делегированных ресурсов.
Definition: eosio.system.hpp:385
name owner
Владелец запроса на возврат
Definition: eosio.system.hpp:386
bool is_empty() const
Проверяет, пуст ли запрос на возврат
Definition: eosio.system.hpp:391
uint64_t primary_key() const
Первичный ключ (1)
Definition: eosio.system.hpp:392
eosio::asset net_amount
Сумма сети для возврата
Definition: eosio.system.hpp:388
eosio::asset cpu_amount
Сумма CPU для возврата
Definition: eosio.system.hpp:389
time_point_sec request_time
Время запроса
Definition: eosio.system.hpp:387
Таблица ресурсов пользователя хранит информацию о ресурсах, принадлежащих пользователю.
Definition: eosio.system.hpp:341
bool is_empty() const
Проверяет, пусты ли ресурсы
Definition: eosio.system.hpp:347
name owner
Владелец ресурсов
Definition: eosio.system.hpp:342
uint64_t primary_key() const
Первичный ключ (1)
Definition: eosio.system.hpp:348
asset cpu_weight
Вес CPU.
Definition: eosio.system.hpp:344
asset net_weight
Вес сети
Definition: eosio.system.hpp:343
Таблица информации о голосующих хранит данные о голосующих и их голосах.
Definition: eosio.system.hpp:293
name owner
Голосующий
Definition: eosio.system.hpp:294
uint64_t primary_key() const
Definition: eosio.system.hpp:312
name proxy
Прокси, установленный голосующим
Definition: eosio.system.hpp:295
flags1_fields
Definition: eosio.system.hpp:314
std::vector< name > producers
Продюсеры, одобренные этим голосующим, если прокси не установлен
Definition: eosio.system.hpp:296
eosio::asset reserved3
Зарезервированное поле 3.
Definition: eosio.system.hpp:310