COOPENOMICS  v1
Кооперативная Экономика
eosio.system.hpp
См. документацию.
1#pragma once
2
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>
34
37
38#include <deque>
39#include <optional>
40#include <string>
41#include <type_traits>
42#include "../../../../../lib/consts.hpp"
43
44
45#define CHANNEL_RAM_AND_NAMEBID_FEES_TO_REX 0
46
47namespace eosiosystem {
48
49 using eosio::asset;
50 using eosio::binary_extension;
51 using eosio::block_timestamp;
52 using eosio::check;
53 using eosio::const_mem_fun;
54 using eosio::datastream;
55 using eosio::indexed_by;
56 using eosio::name;
57 using eosio::same_payer;
58 using eosio::symbol;
59 using eosio::symbol_code;
61 using eosio::time_point_sec;
62 using eosio::unsigned_int;
63
65 inline constexpr int64_t powerup_frac = 1'000'000'000'000'000ll; // 1.0 = 10^15
66
67 template<typename E, typename F>
68 static inline auto has_field( F flags, E field )
69 -> std::enable_if_t< std::is_integral_v<F> && std::is_unsigned_v<F> &&
70 std::is_enum_v<E> && std::is_same_v< F, std::underlying_type_t<E> >, bool>
71 {
72 return ( (flags & static_cast<F>(field)) != 0 );
73 }
74
75 template<typename E, typename F>
76 static inline auto set_field( F flags, E field, bool value = true )
77 -> std::enable_if_t< std::is_integral_v<F> && std::is_unsigned_v<F> &&
78 std::is_enum_v<E> && std::is_same_v< F, std::underlying_type_t<E> >, F >
79 {
80 if( value )
81 return ( flags | static_cast<F>(field) );
82 else
83 return ( flags & ~static_cast<F>(field) );
84 }
85
87 static constexpr uint32_t seconds_per_year = 52 * 7 * 24 * 3600;
89 static constexpr uint32_t seconds_per_day = 24 * 3600;
91 static constexpr uint32_t seconds_per_hour = 3600;
93 static constexpr int64_t useconds_per_year = int64_t(seconds_per_year) * 1000'000ll;
95 static constexpr int64_t useconds_per_day = int64_t(seconds_per_day) * 1000'000ll;
97 static constexpr int64_t useconds_per_hour = int64_t(seconds_per_hour) * 1000'000ll;
99 static constexpr uint32_t blocks_per_day = 2 * seconds_per_day;
100
102 static constexpr int64_t min_activated_stake = 150'000'000'0000;
104 static constexpr int64_t ram_gift_bytes = 0;
106 static constexpr int64_t min_pervote_daily_pay = 1'0000;
108 static constexpr uint32_t refund_delay_sec = 3 * seconds_per_day;
109
110
111#ifdef SYSTEM_BLOCKCHAIN_PARAMETERS
112 struct blockchain_parameters_v1 : eosio::blockchain_parameters
113 {
114 eosio::binary_extension<uint32_t> max_action_return_value_size;
115 EOSLIB_SERIALIZE_DERIVED( blockchain_parameters_v1, eosio::blockchain_parameters,
116 (max_action_return_value_size) )
117 };
118 using blockchain_parameters_t = blockchain_parameters_v1;
119#else
120 using blockchain_parameters_t = eosio::blockchain_parameters;
121#endif
122
123
124
133 struct [[eosio::table, eosio::contract("eosio.system")]] name_bid {
134 name newname;
136 int64_t high_bid = 0;
138
139 uint64_t primary_key()const { return newname.value; }
140 uint64_t by_high_bid()const { return static_cast<uint64_t>(-high_bid); }
141 };
142
151 struct [[eosio::table, eosio::contract("eosio.system")]] bid_refund {
152 name bidder;
153 asset amount;
154
155 uint64_t primary_key()const { return bidder.value; }
156 };
157 typedef eosio::multi_index< "namebids"_n, name_bid,
158 indexed_by<"highbid"_n, const_mem_fun<name_bid, uint64_t, &name_bid::by_high_bid> >
160
161 typedef eosio::multi_index< "bidrefunds"_n, bid_refund > bid_refund_table;
162
171 struct [[eosio::table("global"), eosio::contract("eosio.system")]] eosio_global_state : eosio::blockchain_parameters {
172 uint64_t free_ram()const { return max_ram_size - total_ram_bytes_reserved; }
173
174 uint64_t max_ram_size = 8ll*1024 * 1024 * 1024;
175 uint64_t total_ram_bytes_reserved = 0;
176 int64_t total_ram_stake = 0;
177
180 int64_t pervote_bucket = 0;
181 int64_t perblock_bucket = 0;
182 uint32_t total_unpaid_blocks = 0;
183 int64_t total_activated_stake = 0;
185 uint16_t last_producer_schedule_size = 0;
186 double total_producer_vote_weight = 0;
187 uint16_t new_ram_per_block = 0;
188 block_timestamp last_ram_increase;
189 uint8_t revision = 0;
190
191 block_timestamp last_name_close;
192
193 // explicit serialization macro is not necessary, used here only to improve compilation time
194 EOSLIB_SERIALIZE_DERIVED( eosio_global_state, eosio::blockchain_parameters,
195 (max_ram_size)(total_ram_bytes_reserved)(total_ram_stake)
196 (last_producer_schedule_update)(last_pervote_bucket_fill)
197 (pervote_bucket)(perblock_bucket)(total_unpaid_blocks)(total_activated_stake)(thresh_activated_stake_time)
198 (last_producer_schedule_size)(total_producer_vote_weight)
199 (new_ram_per_block)(last_ram_increase)(revision)
200 (last_name_close) )
201 };
202
203
204 inline eosio::block_signing_authority convert_to_block_signing_authority( const eosio::public_key& producer_key ) {
205 return eosio::block_signing_authority_v0{ .threshold = 1, .keys = {{producer_key, 1}} };
206 }
207
216 struct [[eosio::table, eosio::contract("eosio.system")]] producer_info {
217 name owner;
218 double total_votes = 0;
219 eosio::public_key producer_key;
220 bool is_active = true;
221 std::string url;
222 uint32_t unpaid_blocks = 0;
224 uint16_t location = 0;
225 eosio::binary_extension<eosio::block_signing_authority> producer_authority;
226
227 uint64_t primary_key()const { return owner.value; }
228 double by_votes()const { return is_active ? -total_votes : total_votes; }
229 bool active()const { return is_active; }
230 void deactivate() { producer_key = public_key(); producer_authority.reset(); is_active = false; }
231
232 eosio::block_signing_authority get_producer_authority()const {
233 if( producer_authority.has_value() ) {
234 bool zero_threshold = std::visit( [](auto&& auth ) -> bool {
235 return (auth.threshold == 0);
236 }, *producer_authority );
237 // zero_threshold could be true despite the validation done in regproducer2 because the v1.9.0 eosio.system
238 // contract has a bug which may have modified the producer table such that the producer_authority field
239 // contains a default constructed eosio::block_signing_authority (which has a 0 threshold and so is invalid).
240 if( !zero_threshold ) return *producer_authority;
241 }
242 return convert_to_block_signing_authority( producer_key );
243 }
244
245 // The unregprod and claimrewards actions modify unrelated fields of the producers table and under the default
246 // serialization behavior they would increase the size of the serialized table if the producer_authority field
247 // was not already present. This is acceptable (though not necessarily desired) because those two actions require
248 // the authority of the producer who pays for the table rows.
249 // However, the rmvproducer action and the onblock transaction would also modify the producer table in a similar
250 // way and increasing its serialized size is not acceptable in that context.
251 // So, a custom serialization is defined to handle the binary_extension producer_authority
252 // field in the desired way. (Note: v1.9.0 did not have this custom serialization behavior.)
253
254 template<typename DataStream>
255 friend DataStream& operator << ( DataStream& ds, const producer_info& t ) {
256 ds << t.owner
257 << t.total_votes
258 << t.producer_key
259 << t.is_active
260 << t.url
261 << t.unpaid_blocks
263 << t.location;
264
265 if( !t.producer_authority.has_value() ) return ds;
266
267 return ds << t.producer_authority;
268 }
269
270 template<typename DataStream>
271 friend DataStream& operator >> ( DataStream& ds, producer_info& t ) {
272 return ds >> t.owner
273 >> t.total_votes
274 >> t.producer_key
275 >> t.is_active
276 >> t.url
277 >> t.unpaid_blocks
279 >> t.location
281 }
282 };
283
292 struct [[eosio::table, eosio::contract("eosio.system")]] voter_info {
293 name owner;
294 name proxy;
295 std::vector<name> producers;
296 int64_t staked = 0;
297
298 // Every time a vote is cast we must first "undo" the last vote weight, before casting the
299 // new vote weight. Vote weight is calculated as:
300 // stated.amount * 2 ^ ( weeks_since_launch/weeks_per_year)
301 double last_vote_weight = 0;
302
303 // Total vote weight delegated to this voter.
304 double proxied_vote_weight= 0;
305 bool is_proxy = 0;
306
307 uint32_t flags1 = 0;
308 uint32_t reserved2 = 0;
309 eosio::asset reserved3;
310
311 uint64_t primary_key()const { return owner.value; }
312
313 enum class flags1_fields : uint32_t {
314 ram_managed = 1,
315 net_managed = 2,
316 cpu_managed = 4
317 };
318
319 // explicit serialization macro is not necessary, used here only to improve compilation time
320 EOSLIB_SERIALIZE( voter_info, (owner)(proxy)(producers)(staked)(last_vote_weight)(proxied_vote_weight)(is_proxy)(flags1)(reserved2)(reserved3) )
321 };
322
323
324 typedef eosio::multi_index< "voters"_n, voter_info > voters_table;
325
326 typedef eosio::multi_index< "producers"_n, producer_info,
327 indexed_by<"prototalvote"_n, const_mem_fun<producer_info, double, &producer_info::by_votes> >
329
330 typedef eosio::singleton< "global"_n, eosio_global_state > global_state_singleton;
331
340 struct [[eosio::table, eosio::contract("eosio.system")]] user_resources {
341 name owner;
344 int64_t ram_bytes = 0;
345
346 bool is_empty()const { return net_weight.amount == 0 && cpu_weight.amount == 0 && ram_bytes == 0; }
347 uint64_t primary_key()const { return owner.value; }
348
349 // explicit serialization macro is not necessary, used here only to improve compilation time
350 EOSLIB_SERIALIZE( user_resources, (owner)(net_weight)(cpu_weight)(ram_bytes) )
351 };
352
353
362 struct [[eosio::table, eosio::contract("eosio.system")]] delegated_bandwidth {
363 name from;
364 name to;
367
368 bool is_empty()const { return net_weight.amount == 0 && cpu_weight.amount == 0; }
369 uint64_t primary_key()const { return to.value; }
370
371 // explicit serialization macro is not necessary, used here only to improve compilation time
372 EOSLIB_SERIALIZE( delegated_bandwidth, (from)(to)(net_weight)(cpu_weight) )
373
374 };
375
384 struct [[eosio::table, eosio::contract("eosio.system")]] refund_request {
385 name owner;
386 time_point_sec request_time;
387 eosio::asset net_amount;
388 eosio::asset cpu_amount;
389
390 bool is_empty()const { return net_amount.amount == 0 && cpu_amount.amount == 0; }
391 uint64_t primary_key()const { return owner.value; }
392
393 // explicit serialization macro is not necessary, used here only to improve compilation time
394 EOSLIB_SERIALIZE( refund_request, (owner)(request_time)(net_amount)(cpu_amount) )
395 };
396
405 struct [[eosio::table, eosio::contract("eosio.system")]] ram_debt_record {
406 name account;
407 int64_t ram_debt;
408
409 uint64_t primary_key() const { return account.value; }
410 };
411
412 typedef eosio::multi_index<"ramdebts"_n, ram_debt_record> ram_debts_table;
413
414
415 typedef eosio::multi_index< "userres"_n, user_resources > user_resources_table;
416 typedef eosio::multi_index< "delband"_n, delegated_bandwidth > del_bandwidth_table;
417 typedef eosio::multi_index< "refunds"_n, refund_request > refunds_table;
418
420 std::optional<uint32_t> powerup_days; // `powerup` `days` argument must match this. Do not specify to preserve the
421 // existing setting or use the default.
422 std::optional<asset> min_powerup_fee; // Fees below this amount are rejected. Do not specify to preserve the
423 // existing setting (no default exists).
424
425 EOSLIB_SERIALIZE( powerup_config, (powerup_days)(min_powerup_fee) )
426 };
427
429 int64_t weight = 0; // resource market weight. calculated; varies over time.
430 // 1 represents the same amount of resources as 1
431 // satoshi of SYS staked.
432 int64_t utilization = 0; // Instantaneous resource utilization. This is the current
433 // amount sold. utilization <= weight.
434 };
435
444 struct [[eosio::table("powerstate"),eosio::contract("eosio.system")]] powerup_state {
445 static constexpr uint32_t default_powerup_days = 30;
449
450 uint32_t powerup_days = default_powerup_days;
451 asset min_powerup_fee = {};
452
453 uint64_t primary_key()const { return 0; }
454 };
455
456 typedef eosio::singleton<"powerstate"_n, powerup_state> powerup_state_singleton;
457
458
459
468 struct [[eosio::table("emission"),eosio::contract("eosio.system")]] emission_state {
469 uint64_t tact_number = 1;
470 uint64_t tact_duration = 86400;
471 double emission_factor = double(0.618);
473 eosio::time_point_sec tact_open_at;
474 eosio::time_point_sec tact_close_at;
475 asset tact_fees;
479 uint64_t primary_key()const { return 0; }
480 };
481
482 typedef eosio::singleton<"emission"_n, emission_state> emission_state_singleton;
483
484
485
486
495 struct [[eosio::table("powup.order"),eosio::contract("eosio.system")]] powerup_order {
496 uint8_t version = 0;
497 uint64_t id;
498 name owner;
499 int64_t net_weight;
500 int64_t cpu_weight;
501 int64_t ram_bytes;
502 time_point_sec expires;
503
504 uint64_t primary_key()const { return id; }
505 uint64_t by_owner()const { return owner.value; }
506 uint64_t by_expires()const { return expires.utc_seconds; }
507 };
508
509 typedef eosio::multi_index< "powup.order"_n, powerup_order,
510 indexed_by<"byowner"_n, const_mem_fun<powerup_order, uint64_t, &powerup_order::by_owner>>,
511 indexed_by<"byexpires"_n, const_mem_fun<powerup_order, uint64_t, &powerup_order::by_expires>>
513
525 class [[eosio::contract("eosio.system")]] system_contract : public native {
526
527 private:
533
534 public:
535 static constexpr eosio::name active_permission{"active"_n};
536 static constexpr eosio::name token_account{"eosio.token"_n};
537 static constexpr eosio::name ram_account{"eosio.ram"_n};
538 static constexpr eosio::name ramfee_account{"eosio.ramfee"_n};
539 static constexpr eosio::name stake_account{"eosio.stake"_n};
540 static constexpr eosio::name bpay_account{"eosio.bpay"_n};
541 static constexpr eosio::name vpay_account{"eosio.vpay"_n};
542 static constexpr eosio::name names_account{"eosio.names"_n};
543 static constexpr eosio::name null_account{"eosio.null"_n};
544 static constexpr symbol ramcore_symbol = symbol(symbol_code("RAMCORE"), 4);
545 static constexpr symbol ram_symbol = symbol(symbol_code("RAM"), 0);
546
547 system_contract( name s, name code, datastream<const char*> ds );
549
550 // Returns the core symbol by system account name
551 // @param system_account - the system account to get the core symbol for.
552 static symbol get_core_symbol( name system_account = "eosio"_n ) {
553 rammarket rm(system_account, system_account.value);
554 const static auto sym = get_core_symbol( rm );
555 return sym;
556 }
557
558 // Actions:
559
560
561
562
563
564 // * - and system contract wasn’t already been initialized.
565
566 [[eosio::action]]
567 void init( uint64_t version, const symbol& core );
568
573 [[eosio::action]]
574 void migrate( );
575
584 [[eosio::action]]
585 void changekey(name account,
586 name permission,
587 name parent,
588 authority auth);
589
590
591
592 [[eosio::action]]
593 void setcode( const name& account, uint8_t vmtype, uint8_t vmversion, const std::vector<char>& code, const binary_extension<std::string>& memo );
594
595
601 [[eosio::action]]
602 void initemission(eosio::asset init_supply, uint64_t tact_duration, double emission_factor);
603
604
605
606 [[eosio::action]]
607 void onblock( ignore<block_header> header );
608
609
610 [[eosio::action]]
611 void setalimits( const name& account, int64_t ram_bytes, int64_t net_weight, int64_t cpu_weight );
612
613
614 [[eosio::action]]
615 void setacctram( const name& account, const std::optional<int64_t>& ram_bytes );
616
617
618 [[eosio::action]]
619 void setacctnet( const name& account, const std::optional<int64_t>& net_weight );
620
621
622 [[eosio::action]]
623 void setacctcpu( const name& account, const std::optional<int64_t>& cpu_weight );
624
625
626
627 [[eosio::action]]
628 void activate( const eosio::checksum256& feature_digest );
629
630 // functions defined in delegate_bandwidth.cpp
631
632
633 [[eosio::action]]
634 void delegatebw( const name& from, const name& receiver,
635 const asset& stake_net_quantity, const asset& stake_cpu_quantity, bool transfer );
636
637
638
639 [[eosio::action]]
640 void undelegatebw( const name& from, const name& receiver,
641 const asset& unstake_net_quantity, const asset& unstake_cpu_quantity );
642
643
644 [[eosio::action]]
645 void buyram( const name& payer, const name& receiver, const asset& quant );
646
647
648 [[eosio::action]]
649 void sellram( const name& account, int64_t bytes );
650
651
652
653 [[eosio::action]]
654 void buyrambytes( const name& payer, const name& receiver, uint32_t bytes );
655
656
657 [[eosio::action]]
658 void refund( const name& owner );
659
660 // functions defined in voting.cpp
661
662
663 [[eosio::action]]
664 void regproducer( const name& producer, const public_key& producer_key, const std::string& url, uint16_t location );
665
666
667 [[eosio::action]]
668 void regproducer2( const name& producer, const eosio::block_signing_authority& producer_authority, const std::string& url, uint16_t location );
669
670
671 [[eosio::action]]
672 void unregprod( const name& producer );
673
674
675 [[eosio::action]]
676 void setram( uint64_t max_ram_size );
677
678
679 [[eosio::action]]
680 void setramrate( uint16_t bytes_per_block );
681
682
683 [[eosio::action]]
684 void voteproducer( const name& voter, const name& proxy, const std::vector<name>& producers );
685
686
687 [[eosio::action]]
688 void voteupdate( const name& voter_name );
689
690
691 [[eosio::action]]
692 void regproxy( const name& proxy, bool isproxy );
693
694
695 [[eosio::action]]
696 void setparams( const blockchain_parameters_t& params );
697
698#ifdef SYSTEM_CONFIGURABLE_WASM_LIMITS
699
700 [[eosio::action]]
701 void wasmcfg( const name& settings );
702#endif
703
704
705 [[eosio::action]]
706 void claimrewards( const name& owner );
707
708
709 [[eosio::action]]
710 void setpriv( const name& account, uint8_t is_priv );
711
712
713 [[eosio::action]]
714 void rmvproducer( const name& producer );
715
716
717 [[eosio::action]]
718 void updtrevision( uint8_t revision );
719
720
721 [[eosio::action]]
722 void bidname( const name& bidder, const name& newname, const asset& bid );
723
724
725 [[eosio::action]]
726 void bidrefund( const name& bidder, const name& newname );
727
728
729 [[eosio::action]]
730 void cfgpowerup( powerup_config& args );
731
732
733 [[eosio::action]]
734 void powerupexec( const name& user, uint16_t max );
735
736
737 [[eosio::action]]
738 void powerup(const name& payer, const name& receiver, uint32_t days, const asset& payment, const bool transfer = false);
739
740
741 [[eosio::action]]
742 void limitauthchg( const name& account, const std::vector<name>& allow_perms, const std::vector<name>& disallow_perms );
743
744 [[eosio::action]]
745 void createaccnt(const name coopname, const name new_account_name, authority owner, authority active);
746
747 using init_action = eosio::action_wrapper<"init"_n, &system_contract::init>;
748 using setcode_action = eosio::action_wrapper<"setcode"_n, &system_contract::setcode>;
749 using initemission_action = eosio::action_wrapper<"initemission"_n, &system_contract::initemission>;
750
751 using setacctram_action = eosio::action_wrapper<"setacctram"_n, &system_contract::setacctram>;
752 using setacctnet_action = eosio::action_wrapper<"setacctnet"_n, &system_contract::setacctnet>;
753 using setacctcpu_action = eosio::action_wrapper<"setacctcpu"_n, &system_contract::setacctcpu>;
754
755 using activate_action = eosio::action_wrapper<"activate"_n, &system_contract::activate>;
756 using delegatebw_action = eosio::action_wrapper<"delegatebw"_n, &system_contract::delegatebw>;
757 using undelegatebw_action = eosio::action_wrapper<"undelegatebw"_n, &system_contract::undelegatebw>;
758
759 using buyram_action = eosio::action_wrapper<"buyram"_n, &system_contract::buyram>;
760 using buyrambytes_action = eosio::action_wrapper<"buyrambytes"_n, &system_contract::buyrambytes>;
761
762 using refund_action = eosio::action_wrapper<"refund"_n, &system_contract::refund>;
763
764 using regproducer_action = eosio::action_wrapper<"regproducer"_n, &system_contract::regproducer>;
765 using regproducer2_action = eosio::action_wrapper<"regproducer2"_n, &system_contract::regproducer2>;
766
767 using unregprod_action = eosio::action_wrapper<"unregprod"_n, &system_contract::unregprod>;
768
769 using setram_action = eosio::action_wrapper<"setram"_n, &system_contract::setram>;
770 using setramrate_action = eosio::action_wrapper<"setramrate"_n, &system_contract::setramrate>;
771
772
773 using voteproducer_action = eosio::action_wrapper<"voteproducer"_n, &system_contract::voteproducer>;
774 using voteupdate_action = eosio::action_wrapper<"voteupdate"_n, &system_contract::voteupdate>;
775
776 using regproxy_action = eosio::action_wrapper<"regproxy"_n, &system_contract::regproxy>;
777
778 using resultrewards_action = eosio::action_wrapper<"claimrewards"_n, &system_contract::claimrewards>;
779
780 using rmvproducer_action = eosio::action_wrapper<"rmvproducer"_n, &system_contract::rmvproducer>;
781
782 using updtrevision_action = eosio::action_wrapper<"updtrevision"_n, &system_contract::updtrevision>;
783
784 using bidname_action = eosio::action_wrapper<"bidname"_n, &system_contract::bidname>;
785 using bidrefund_action = eosio::action_wrapper<"bidrefund"_n, &system_contract::bidrefund>;
786
787 using setpriv_action = eosio::action_wrapper<"setpriv"_n, &system_contract::setpriv>;
788 using setalimits_action = eosio::action_wrapper<"setalimits"_n, &system_contract::setalimits>;
789
790 using setparams_action = eosio::action_wrapper<"setparams"_n, &system_contract::setparams>;
791
792 using cfgpowerup_action = eosio::action_wrapper<"cfgpowerup"_n, &system_contract::cfgpowerup>;
793 using powerupexec_action = eosio::action_wrapper<"powerupexec"_n, &system_contract::powerupexec>;
794 using powerup_action = eosio::action_wrapper<"powerup"_n, &system_contract::powerup>;
795
796 private:
797 // Implementation details:
798
799 static symbol get_core_symbol( const rammarket& rm ) {
800 auto itr = rm.find(ramcore_symbol.raw());
801 check(itr != rm.end(), "system contract must first be initialized");
802 return itr->quote.balance.symbol;
803 }
804
805 //defined in eosio.system.cpp
806 static eosio_global_state get_default_parameters();
807 int64_t update_ram_debt_table(name payer, name account, int64_t ram_bytes);
808
809 void emit(eosio::asset new_emission);
810
811 symbol core_symbol()const;
812 void update_ram_supply();
813
814 // defined in delegate_bandwidth.cpp
815 void changebw( name from, const name& receiver,
816 const asset& stake_net_quantity, const asset& stake_cpu_quantity, bool transfer );
817 void update_voting_power( const name& voter, const asset& total_update );
818
819 // defined in voting.cpp
820 void register_producer( const name& producer, const eosio::block_signing_authority& producer_authority, const std::string& url, uint16_t location );
821 void update_elected_producers( const block_timestamp& timestamp );
822 void update_votes( const name& voter, const name& proxy, const std::vector<name>& producers, bool voting );
823 void propagate_weight_change( const voter_info& voter );
824
825 // defined in power.cpp
826 void fill_tact(eosio::name payer, eosio::asset payment);
827 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);
828 void process_powerup_queue(
829 time_point_sec now, symbol core_symbol, powerup_state& state,
830 powerup_order_table& orders, uint32_t max_items, int64_t& net_delta_available,
831 int64_t& cpu_delta_available, int64_t& ram_delta_available);
832 emission_state update_tact(emission_state state);
833 void change_weights(eosio::name payer, eosio::asset new_emission);
834 // defined in block_info.cpp
835 void add_to_blockinfo_table(const eosio::checksum256& previous_block_id, const eosio::block_timestamp timestamp) const;
836
837 };
838
839}
Definition: native.hpp:128
Definition: eosio.system.hpp:525
eosio::action_wrapper<"activate"_n, &system_contract::activate > activate_action
Definition: eosio.system.hpp:755
eosio::action_wrapper<"delegatebw"_n, &system_contract::delegatebw > delegatebw_action
Definition: eosio.system.hpp:756
rammarket _rammarket
Definition: eosio.system.hpp:532
eosio::action_wrapper<"unregprod"_n, &system_contract::unregprod > unregprod_action
Definition: eosio.system.hpp:767
eosio::action_wrapper<"buyram"_n, &system_contract::buyram > buyram_action
Definition: eosio.system.hpp:759
eosio::action_wrapper<"claimrewards"_n, &system_contract::claimrewards > resultrewards_action
Definition: eosio.system.hpp:778
eosio::action_wrapper<"setacctram"_n, &system_contract::setacctram > setacctram_action
Definition: eosio.system.hpp:751
eosio::action_wrapper<"bidname"_n, &system_contract::bidname > bidname_action
Definition: eosio.system.hpp:784
eosio_global_state _gstate
Definition: eosio.system.hpp:531
voters_table _voters
Definition: eosio.system.hpp:528
eosio::action_wrapper<"setram"_n, &system_contract::setram > setram_action
Definition: eosio.system.hpp:769
static symbol get_core_symbol(name system_account="eosio"_n)
Definition: eosio.system.hpp:552
eosio::action_wrapper<"setalimits"_n, &system_contract::setalimits > setalimits_action
Definition: eosio.system.hpp:788
eosio::action_wrapper<"updtrevision"_n, &system_contract::updtrevision > updtrevision_action
Definition: eosio.system.hpp:782
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:723
eosio::action_wrapper<"undelegatebw"_n, &system_contract::undelegatebw > undelegatebw_action
Definition: eosio.system.hpp:757
eosio::action_wrapper<"refund"_n, &system_contract::refund > refund_action
Definition: eosio.system.hpp:762
producers_table _producers
Definition: eosio.system.hpp:529
eosio::action_wrapper<"bidrefund"_n, &system_contract::bidrefund > bidrefund_action
Definition: eosio.system.hpp:785
void regproxy(const name &proxy, bool isproxy)
Definition: voting.cpp:325
eosio::action_wrapper<"cfgpowerup"_n, &system_contract::cfgpowerup > cfgpowerup_action
Definition: eosio.system.hpp:792
eosio::action_wrapper<"setacctcpu"_n, &system_contract::setacctcpu > setacctcpu_action
Definition: eosio.system.hpp:753
eosio::action_wrapper<"setpriv"_n, &system_contract::setpriv > setpriv_action
Definition: eosio.system.hpp:787
eosio::action_wrapper<"regproxy"_n, &system_contract::regproxy > regproxy_action
Definition: eosio.system.hpp:776
static symbol get_core_symbol(const rammarket &rm)
Definition: eosio.system.hpp:799
eosio::action_wrapper<"rmvproducer"_n, &system_contract::rmvproducer > rmvproducer_action
Definition: eosio.system.hpp:780
eosio::action_wrapper<"setcode"_n, &system_contract::setcode > setcode_action
Definition: eosio.system.hpp:748
eosio::action_wrapper<"voteproducer"_n, &system_contract::voteproducer > voteproducer_action
Definition: eosio.system.hpp:773
eosio::action_wrapper<"voteupdate"_n, &system_contract::voteupdate > voteupdate_action
Definition: eosio.system.hpp:774
eosio::action_wrapper<"setramrate"_n, &system_contract::setramrate > setramrate_action
Definition: eosio.system.hpp:770
eosio::action_wrapper<"regproducer"_n, &system_contract::regproducer > regproducer_action
Definition: eosio.system.hpp:764
eosio::action_wrapper<"init"_n, &system_contract::init > init_action
Definition: eosio.system.hpp:747
eosio::action_wrapper<"initemission"_n, &system_contract::initemission > initemission_action
Definition: eosio.system.hpp:749
eosio::action_wrapper<"powerup"_n, &system_contract::powerup > powerup_action
Definition: eosio.system.hpp:794
eosio::action_wrapper<"powerupexec"_n, &system_contract::powerupexec > powerupexec_action
Definition: eosio.system.hpp:793
eosio::action_wrapper<"setacctnet"_n, &system_contract::setacctnet > setacctnet_action
Definition: eosio.system.hpp:752
eosio::action_wrapper<"setparams"_n, &system_contract::setparams > setparams_action
Definition: eosio.system.hpp:790
global_state_singleton _global
Definition: eosio.system.hpp:530
eosio::action_wrapper<"regproducer2"_n, &system_contract::regproducer2 > regproducer2_action
Definition: eosio.system.hpp:765
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:760
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:685
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 &params)
Устанавливает параметры блокчейна. Обновляет глобальные параметры блокчейна, включая лимиты блоков,...
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 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:104
static constexpr uint32_t blocks_per_day
Количество блоков в дне (половина секунды на блок)
Definition: eosio.system.hpp:99
static constexpr uint32_t seconds_per_day
Количество секунд в дне
Definition: eosio.system.hpp:89
static constexpr uint32_t seconds_per_hour
Количество секунд в часе
Definition: eosio.system.hpp:91
static constexpr int64_t useconds_per_hour
Количество микросекунд в часе
Definition: eosio.system.hpp:97
static constexpr int64_t useconds_per_year
Количество микросекунд в году
Definition: eosio.system.hpp:93
static constexpr int64_t min_activated_stake
Минимальная активированная ставка
Definition: eosio.system.hpp:102
static constexpr int64_t useconds_per_day
Количество микросекунд в дне
Definition: eosio.system.hpp:95
static constexpr int64_t min_pervote_daily_pay
Минимальная ежедневная оплата за голос
Definition: eosio.system.hpp:106
static constexpr uint32_t refund_delay_sec
Задержка возврата в секундах
Definition: eosio.system.hpp:108
constexpr int64_t powerup_frac
Definition: eosio.system.hpp:65
static constexpr uint32_t seconds_per_year
Количество секунд в году
Definition: eosio.system.hpp:87
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:7
eosio::multi_index<"rammarket"_n, exchange_state > rammarket
Definition: rammarket.hpp:111
eosio::multi_index< "voters"_n, voter_info > voters_table
Definition: eosio.system.hpp:324
eosio::singleton< "global"_n, eosio_global_state > global_state_singleton
Definition: eosio.system.hpp:330
eosio::multi_index< "userres"_n, user_resources > user_resources_table
Definition: eosio.system.hpp:415
eosio::singleton<"powerstate"_n, powerup_state > powerup_state_singleton
Definition: eosio.system.hpp:456
eosio::multi_index< "delband"_n, delegated_bandwidth > del_bandwidth_table
Definition: eosio.system.hpp:416
eosio::multi_index<"ramdebts"_n, ram_debt_record > ram_debts_table
Definition: eosio.system.hpp:412
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:76
eosio::blockchain_parameters blockchain_parameters_t
Definition: eosio.system.hpp:120
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:68
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:159
eosio::multi_index< "bidrefunds"_n, bid_refund > bid_refund_table
Definition: eosio.system.hpp:161
eosio::multi_index< "refunds"_n, refund_request > refunds_table
Definition: eosio.system.hpp:417
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:512
eosio::block_signing_authority convert_to_block_signing_authority(const eosio::public_key &producer_key)
Definition: eosio.system.hpp:204
eosio::singleton<"emission"_n, emission_state > emission_state_singleton
Definition: eosio.system.hpp:482
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:328
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: accounts.hpp:60
Definition: native.hpp:71
Таблица возвратов ставок хранит информацию о возвратах средств от неудачных ставок на имена.
Definition: eosio.system.hpp:151
uint64_t primary_key() const
Первичный ключ (1)
Definition: eosio.system.hpp:155
name bidder
Аккаунт, которому принадлежит возврат
Definition: eosio.system.hpp:152
asset amount
Сумма к возврату
Definition: eosio.system.hpp:153
Таблица делегированной пропускной способности хранит информацию о делегированных ресурсах между польз...
Definition: eosio.system.hpp:362
name from
Отправитель делегирования
Definition: eosio.system.hpp:363
bool is_empty() const
Проверяет, пусто ли делегирование
Definition: eosio.system.hpp:368
name to
Получатель делегирования
Definition: eosio.system.hpp:364
asset cpu_weight
Вес CPU.
Definition: eosio.system.hpp:366
uint64_t primary_key() const
Первичный ключ (1)
Definition: eosio.system.hpp:369
asset net_weight
Вес сети
Definition: eosio.system.hpp:365
Таблица состояния эмиссии хранит информацию о текущем такте эмиссии токенов.
Definition: eosio.system.hpp:468
asset back_from_producers
Вернулось в фонд от делегатских комиссий
Definition: eosio.system.hpp:476
eosio::time_point_sec tact_open_at
Дата открытия такта
Definition: eosio.system.hpp:473
uint64_t primary_key() const
Первичный ключ (1)
Definition: eosio.system.hpp:479
eosio::time_point_sec tact_close_at
Дата закрытия такта
Definition: eosio.system.hpp:474
asset tact_fees
Накопленные комиссии такта
Definition: eosio.system.hpp:475
asset current_supply
Объем токенов в системе
Definition: eosio.system.hpp:472
asset emission_start
Подвижная граница начала эмиссии в такте
Definition: eosio.system.hpp:478
asset tact_emission
Накопленная эмиссия такта
Definition: eosio.system.hpp:477
Глобальное состояние системы хранит основные параметры блокчейна и статистику.
Definition: eosio.system.hpp:171
block_timestamp last_producer_schedule_update
Время последнего обновления расписания продюсеров
Definition: eosio.system.hpp:178
time_point thresh_activated_stake_time
Время достижения порога активированной ставки
Definition: eosio.system.hpp:184
block_timestamp last_name_close
Время последнего закрытия имени
Definition: eosio.system.hpp:191
uint64_t free_ram() const
Возвращает количество свободной RAM.
Definition: eosio.system.hpp:172
time_point last_pervote_bucket_fill
Время последнего заполнения корзины за голос
Definition: eosio.system.hpp:179
block_timestamp last_ram_increase
Время последнего увеличения RAM.
Definition: eosio.system.hpp:188
Таблица ставок на имена хранит информацию о аукционах на премиум имена.
Definition: eosio.system.hpp:133
name newname
Имя, на которое делается ставка
Definition: eosio.system.hpp:134
uint64_t by_high_bid() const
Индекс по наивысшей ставке (2)
Definition: eosio.system.hpp:140
name high_bidder
Аккаунт с наивысшей ставкой
Definition: eosio.system.hpp:135
time_point last_bid_time
Время последней ставки
Definition: eosio.system.hpp:137
uint64_t primary_key() const
Первичный ключ (1)
Definition: eosio.system.hpp:139
Definition: eosio.system.hpp:419
std::optional< uint32_t > powerup_days
Definition: eosio.system.hpp:420
std::optional< asset > min_powerup_fee
Definition: eosio.system.hpp:422
Таблица заказов powerup хранит информацию о заказах на покупку ресурсов через powerup.
Definition: eosio.system.hpp:495
uint64_t id
ID заказа
Definition: eosio.system.hpp:497
time_point_sec expires
Время истечения заказа
Definition: eosio.system.hpp:502
int64_t net_weight
Вес сети
Definition: eosio.system.hpp:499
name owner
Владелец заказа
Definition: eosio.system.hpp:498
uint64_t primary_key() const
Первичный ключ (1)
Definition: eosio.system.hpp:504
uint64_t by_expires() const
Индекс по времени истечения (3)
Definition: eosio.system.hpp:506
int64_t ram_bytes
Количество байт RAM.
Definition: eosio.system.hpp:501
uint64_t by_owner() const
Индекс по владельцу (2)
Definition: eosio.system.hpp:505
int64_t cpu_weight
Вес CPU.
Definition: eosio.system.hpp:500
Definition: eosio.system.hpp:428
int64_t utilization
Definition: eosio.system.hpp:432
int64_t weight
Definition: eosio.system.hpp:429
Таблица состояния powerup хранит состояние рынка ресурсов для powerup.
Definition: eosio.system.hpp:444
uint64_t primary_key() const
Первичный ключ (1)
Definition: eosio.system.hpp:453
Таблица информации о продюсерах хранит данные о зарегистрированных блок-продюсерах.
Definition: eosio.system.hpp:216
bool is_active
Активен ли продюсер
Definition: eosio.system.hpp:220
eosio::block_signing_authority get_producer_authority() const
Definition: eosio.system.hpp:232
uint32_t unpaid_blocks
Количество неоплаченных блоков
Definition: eosio.system.hpp:222
double by_votes() const
Definition: eosio.system.hpp:228
uint16_t location
Локация продюсера
Definition: eosio.system.hpp:224
name owner
Владелец аккаунта продюсера
Definition: eosio.system.hpp:217
uint64_t primary_key() const
Definition: eosio.system.hpp:227
time_point last_result_time
Время последнего результата
Definition: eosio.system.hpp:223
void deactivate()
Definition: eosio.system.hpp:230
double total_votes
Общее количество голосов
Definition: eosio.system.hpp:218
bool active() const
Definition: eosio.system.hpp:229
eosio::binary_extension< eosio::block_signing_authority > producer_authority
Авторизация подписи блоков (добавлено в версии 1.9.0)
Definition: eosio.system.hpp:225
eosio::public_key producer_key
Публичный ключ продюсера
Definition: eosio.system.hpp:219
std::string url
URL продюсера
Definition: eosio.system.hpp:221
Таблица записей о долгах по RAM хранит информацию о долгах аккаунтов по RAM.
Definition: eosio.system.hpp:405
name account
Аккаунт
Definition: eosio.system.hpp:406
uint64_t primary_key() const
Первичный ключ (1)
Definition: eosio.system.hpp:409
int64_t ram_debt
Долг по RAM.
Definition: eosio.system.hpp:407
Таблица запросов на возврат хранит информацию о запросах на возврат делегированных ресурсов.
Definition: eosio.system.hpp:384
name owner
Владелец запроса на возврат
Definition: eosio.system.hpp:385
bool is_empty() const
Проверяет, пуст ли запрос на возврат
Definition: eosio.system.hpp:390
uint64_t primary_key() const
Первичный ключ (1)
Definition: eosio.system.hpp:391
eosio::asset net_amount
Сумма сети для возврата
Definition: eosio.system.hpp:387
eosio::asset cpu_amount
Сумма CPU для возврата
Definition: eosio.system.hpp:388
time_point_sec request_time
Время запроса
Definition: eosio.system.hpp:386
Таблица ресурсов пользователя хранит информацию о ресурсах, принадлежащих пользователю.
Definition: eosio.system.hpp:340
bool is_empty() const
Проверяет, пусты ли ресурсы
Definition: eosio.system.hpp:346
name owner
Владелец ресурсов
Definition: eosio.system.hpp:341
uint64_t primary_key() const
Первичный ключ (1)
Definition: eosio.system.hpp:347
asset cpu_weight
Вес CPU.
Definition: eosio.system.hpp:343
asset net_weight
Вес сети
Definition: eosio.system.hpp:342
Таблица информации о голосующих хранит данные о голосующих и их голосах.
Definition: eosio.system.hpp:292
name owner
Голосующий
Definition: eosio.system.hpp:293
uint64_t primary_key() const
Definition: eosio.system.hpp:311
name proxy
Прокси, установленный голосующим
Definition: eosio.system.hpp:294
flags1_fields
Definition: eosio.system.hpp:313
std::vector< name > producers
Продюсеры, одобренные этим голосующим, если прокси не установлен
Definition: eosio.system.hpp:295
eosio::asset reserved3
Зарезервированное поле 3.
Definition: eosio.system.hpp:309