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#include "../../../../../lib/core/ram_watch.hpp"
44
45
46#define CHANNEL_RAM_AND_NAMEBID_FEES_TO_REX 0
47
48namespace eosiosystem {
49
50 using eosio::asset;
51 using eosio::binary_extension;
52 using eosio::block_timestamp;
53 using eosio::check;
54 using eosio::const_mem_fun;
55 using eosio::datastream;
56 using eosio::indexed_by;
57 using eosio::name;
58 using eosio::same_payer;
59 using eosio::symbol;
60 using eosio::symbol_code;
62 using eosio::time_point_sec;
63 using eosio::unsigned_int;
64
66 inline constexpr int64_t powerup_frac = 1'000'000'000'000'000ll; // 1.0 = 10^15
67
68 template<typename E, typename F>
69 static inline auto has_field( F flags, E field )
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>
72 {
73 return ( (flags & static_cast<F>(field)) != 0 );
74 }
75
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 >
80 {
81 if( value )
82 return ( flags | static_cast<F>(field) );
83 else
84 return ( flags & ~static_cast<F>(field) );
85 }
86
88 static constexpr uint32_t seconds_per_year = 52 * 7 * 24 * 3600;
90 static constexpr uint32_t seconds_per_day = 24 * 3600;
92 static constexpr uint32_t seconds_per_hour = 3600;
94 static constexpr int64_t useconds_per_year = int64_t(seconds_per_year) * 1000'000ll;
96 static constexpr int64_t useconds_per_day = int64_t(seconds_per_day) * 1000'000ll;
98 static constexpr int64_t useconds_per_hour = int64_t(seconds_per_hour) * 1000'000ll;
100 static constexpr uint32_t blocks_per_day = 2 * seconds_per_day;
101
103 static constexpr int64_t min_activated_stake = 150'000'000'0000;
105 static constexpr int64_t ram_gift_bytes = 0;
107 static constexpr int64_t min_pervote_daily_pay = 1'0000;
109 static constexpr uint32_t refund_delay_sec = 3 * seconds_per_day;
110
111
112#ifdef SYSTEM_BLOCKCHAIN_PARAMETERS
113 struct blockchain_parameters_v1 : eosio::blockchain_parameters
114 {
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) )
118 };
119 using blockchain_parameters_t = blockchain_parameters_v1;
120#else
121 using blockchain_parameters_t = eosio::blockchain_parameters;
122#endif
123
124
125
134 struct [[eosio::table, eosio::contract("eosio.system")]] name_bid {
135 name newname;
137 int64_t high_bid = 0;
139
140 uint64_t primary_key()const { return newname.value; }
141 uint64_t by_high_bid()const { return static_cast<uint64_t>(-high_bid); }
142 };
143
152 struct [[eosio::table, eosio::contract("eosio.system")]] bid_refund {
153 name bidder;
154 asset amount;
155
156 uint64_t primary_key()const { return bidder.value; }
157 };
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> >
161
162 typedef eosio::multi_index< "bidrefunds"_n, bid_refund > bid_refund_table;
163
172 struct [[eosio::table("global"), eosio::contract("eosio.system")]] eosio_global_state : eosio::blockchain_parameters {
173 uint64_t free_ram()const { return max_ram_size - total_ram_bytes_reserved; }
174
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;
178
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;
189 block_timestamp last_ram_increase;
190 uint8_t revision = 0;
191
192 block_timestamp last_name_close;
193
194 // explicit serialization macro is not necessary, used here only to improve compilation time
195 EOSLIB_SERIALIZE_DERIVED( eosio_global_state, eosio::blockchain_parameters,
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)
201 (last_name_close) )
202 };
203
204
205 inline eosio::block_signing_authority convert_to_block_signing_authority( const eosio::public_key& producer_key ) {
206 return eosio::block_signing_authority_v0{ .threshold = 1, .keys = {{producer_key, 1}} };
207 }
208
217 struct [[eosio::table, eosio::contract("eosio.system")]] producer_info {
218 name owner;
219 double total_votes = 0;
220 eosio::public_key producer_key;
221 bool is_active = true;
222 std::string url;
223 uint32_t unpaid_blocks = 0;
225 uint16_t location = 0;
226 eosio::binary_extension<eosio::block_signing_authority> producer_authority;
227
228 uint64_t primary_key()const { return owner.value; }
229 double by_votes()const { return is_active ? -total_votes : total_votes; }
230 bool active()const { return is_active; }
231 void deactivate() { producer_key = public_key(); producer_authority.reset(); is_active = false; }
232
233 eosio::block_signing_authority get_producer_authority()const {
234 if( producer_authority.has_value() ) {
235 bool zero_threshold = std::visit( [](auto&& auth ) -> bool {
236 return (auth.threshold == 0);
237 }, *producer_authority );
238 // zero_threshold could be true despite the validation done in regproducer2 because the v1.9.0 eosio.system
239 // contract has a bug which may have modified the producer table such that the producer_authority field
240 // contains a default constructed eosio::block_signing_authority (which has a 0 threshold and so is invalid).
241 if( !zero_threshold ) return *producer_authority;
242 }
243 return convert_to_block_signing_authority( producer_key );
244 }
245
246 // The unregprod and claimrewards actions modify unrelated fields of the producers table and under the default
247 // serialization behavior they would increase the size of the serialized table if the producer_authority field
248 // was not already present. This is acceptable (though not necessarily desired) because those two actions require
249 // the authority of the producer who pays for the table rows.
250 // However, the rmvproducer action and the onblock transaction would also modify the producer table in a similar
251 // way and increasing its serialized size is not acceptable in that context.
252 // So, a custom serialization is defined to handle the binary_extension producer_authority
253 // field in the desired way. (Note: v1.9.0 did not have this custom serialization behavior.)
254
255 template<typename DataStream>
256 friend DataStream& operator << ( DataStream& ds, const producer_info& t ) {
257 ds << t.owner
258 << t.total_votes
259 << t.producer_key
260 << t.is_active
261 << t.url
262 << t.unpaid_blocks
264 << t.location;
265
266 if( !t.producer_authority.has_value() ) return ds;
267
268 return ds << t.producer_authority;
269 }
270
271 template<typename DataStream>
272 friend DataStream& operator >> ( DataStream& ds, producer_info& t ) {
273 return ds >> t.owner
274 >> t.total_votes
275 >> t.producer_key
276 >> t.is_active
277 >> t.url
278 >> t.unpaid_blocks
280 >> t.location
282 }
283 };
284
293 struct [[eosio::table, eosio::contract("eosio.system")]] voter_info {
294 name owner;
295 name proxy;
296 std::vector<name> producers;
297 int64_t staked = 0;
298
299 // Every time a vote is cast we must first "undo" the last vote weight, before casting the
300 // new vote weight. Vote weight is calculated as:
301 // stated.amount * 2 ^ ( weeks_since_launch/weeks_per_year)
302 double last_vote_weight = 0;
303
304 // Total vote weight delegated to this voter.
305 double proxied_vote_weight= 0;
306 bool is_proxy = 0;
307
308 uint32_t flags1 = 0;
309 uint32_t reserved2 = 0;
310 eosio::asset reserved3;
311
312 uint64_t primary_key()const { return owner.value; }
313
314 enum class flags1_fields : uint32_t {
315 ram_managed = 1,
316 net_managed = 2,
317 cpu_managed = 4
318 };
319
320 // explicit serialization macro is not necessary, used here only to improve compilation time
321 EOSLIB_SERIALIZE( voter_info, (owner)(proxy)(producers)(staked)(last_vote_weight)(proxied_vote_weight)(is_proxy)(flags1)(reserved2)(reserved3) )
322 };
323
324
325 typedef eosio::multi_index< "voters"_n, voter_info > voters_table;
326
327 typedef eosio::multi_index< "producers"_n, producer_info,
328 indexed_by<"prototalvote"_n, const_mem_fun<producer_info, double, &producer_info::by_votes> >
330
331 typedef eosio::singleton< "global"_n, eosio_global_state > global_state_singleton;
332
341 struct [[eosio::table, eosio::contract("eosio.system")]] user_resources {
342 name owner;
345 int64_t ram_bytes = 0;
346
347 bool is_empty()const { return net_weight.amount == 0 && cpu_weight.amount == 0 && ram_bytes == 0; }
348 uint64_t primary_key()const { return owner.value; }
349
350 // explicit serialization macro is not necessary, used here only to improve compilation time
351 EOSLIB_SERIALIZE( user_resources, (owner)(net_weight)(cpu_weight)(ram_bytes) )
352 };
353
354
363 struct [[eosio::table, eosio::contract("eosio.system")]] delegated_bandwidth {
364 name from;
365 name to;
368
369 bool is_empty()const { return net_weight.amount == 0 && cpu_weight.amount == 0; }
370 uint64_t primary_key()const { return to.value; }
371
372 // explicit serialization macro is not necessary, used here only to improve compilation time
373 EOSLIB_SERIALIZE( delegated_bandwidth, (from)(to)(net_weight)(cpu_weight) )
374
375 };
376
385 struct [[eosio::table, eosio::contract("eosio.system")]] refund_request {
386 name owner;
387 time_point_sec request_time;
388 eosio::asset net_amount;
389 eosio::asset cpu_amount;
390
391 bool is_empty()const { return net_amount.amount == 0 && cpu_amount.amount == 0; }
392 uint64_t primary_key()const { return owner.value; }
393
394 // explicit serialization macro is not necessary, used here only to improve compilation time
395 EOSLIB_SERIALIZE( refund_request, (owner)(request_time)(net_amount)(cpu_amount) )
396 };
397
406 struct [[eosio::table, eosio::contract("eosio.system")]] ram_debt_record {
407 name account;
408 int64_t ram_debt;
409
410 uint64_t primary_key() const { return account.value; }
411 };
412
413 typedef eosio::multi_index<"ramdebts"_n, ram_debt_record> ram_debts_table;
414
415
416 typedef eosio::multi_index< "userres"_n, user_resources > user_resources_table;
417 typedef eosio::multi_index< "delband"_n, delegated_bandwidth > del_bandwidth_table;
418 typedef eosio::multi_index< "refunds"_n, refund_request > refunds_table;
419
421 std::optional<uint32_t> powerup_days; // `powerup` `days` argument must match this. Do not specify to preserve the
422 // existing setting or use the default.
423 std::optional<asset> min_powerup_fee; // Fees below this amount are rejected. Do not specify to preserve the
424 // existing setting (no default exists).
425
426 EOSLIB_SERIALIZE( powerup_config, (powerup_days)(min_powerup_fee) )
427 };
428
430 int64_t weight = 0; // resource market weight. calculated; varies over time.
431 // 1 represents the same amount of resources as 1
432 // satoshi of SYS staked.
433 int64_t utilization = 0; // Instantaneous resource utilization. This is the current
434 // amount sold. utilization <= weight.
435 };
436
445 struct [[eosio::table("powerstate"),eosio::contract("eosio.system")]] powerup_state {
446 static constexpr uint32_t default_powerup_days = 30;
450
451 uint32_t powerup_days = default_powerup_days;
452 asset min_powerup_fee = {};
453
454 uint64_t primary_key()const { return 0; }
455 };
456
457 typedef eosio::singleton<"powerstate"_n, powerup_state> powerup_state_singleton;
458
459
460
469 struct [[eosio::table("emission"),eosio::contract("eosio.system")]] emission_state {
470 uint64_t tact_number = 1;
471 uint64_t tact_duration = 86400;
472 double emission_factor = double(0.618);
474 eosio::time_point_sec tact_open_at;
475 eosio::time_point_sec tact_close_at;
476 asset tact_fees;
480 uint64_t primary_key()const { return 0; }
481 };
482
483 typedef eosio::singleton<"emission"_n, emission_state> emission_state_singleton;
484
485
486
487
496 struct [[eosio::table("powup.order"),eosio::contract("eosio.system")]] powerup_order {
497 uint8_t version = 0;
498 uint64_t id;
499 name owner;
500 int64_t net_weight;
501 int64_t cpu_weight;
502 int64_t ram_bytes;
503 time_point_sec expires;
504
505 uint64_t primary_key()const { return id; }
506 uint64_t by_owner()const { return owner.value; }
507 uint64_t by_expires()const { return expires.utc_seconds; }
508 };
509
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>>
514
529 struct [[eosio::table("ramgrantcfg"), eosio::contract("eosio.system")]] ram_grant_config {
530 uint8_t threshold_percent = 70;
531 int64_t grant_bytes = 512 * 1024;
532 uint32_t check_interval_sec = 3600;
533 std::vector<name> contracts;
534
535 EOSLIB_SERIALIZE( ram_grant_config, (threshold_percent)(grant_bytes)(check_interval_sec)(contracts) )
536 };
537
538 typedef eosio::singleton<"ramgrantcfg"_n, ram_grant_config> ram_grant_config_singleton;
539
551 class [[eosio::contract("eosio.system")]] system_contract : public native {
552
553 private:
559
560 public:
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);
572
573 system_contract( name s, name code, datastream<const char*> ds );
575
576 // Returns the core symbol by system account name
577 // @param system_account - the system account to get the core symbol for.
578 static symbol get_core_symbol( name system_account = "eosio"_n ) {
579 rammarket rm(system_account, system_account.value);
580 const static auto sym = get_core_symbol( rm );
581 return sym;
582 }
583
584 // Actions:
585
586
587
588
589
590 // * - and system contract wasn’t already been initialized.
591
592 [[eosio::action]]
593 void init( uint64_t version, const symbol& core );
594
599 [[eosio::action]]
600 void migrate( );
601
612 [[eosio::action]]
613 void injection(const name& coopname, const asset& quantity);
614
623 [[eosio::action]]
624 void changekey(name account,
625 name permission,
626 name parent,
627 authority auth);
628
629
630
631 [[eosio::action]]
632 void setcode( const name& account, uint8_t vmtype, uint8_t vmversion, const std::vector<char>& code, const binary_extension<std::string>& memo );
633
634
640 [[eosio::action]]
641 void initemission(eosio::asset init_supply, uint64_t tact_duration, double emission_factor);
642
643
644
645 [[eosio::action]]
646 void onblock( ignore<block_header> header );
647
648
649 [[eosio::action]]
650 void setalimits( const name& account, int64_t ram_bytes, int64_t net_weight, int64_t cpu_weight );
651
652
653 [[eosio::action]]
654 void setacctram( const name& account, const std::optional<int64_t>& ram_bytes );
655
656
657 [[eosio::action]]
658 void setacctnet( const name& account, const std::optional<int64_t>& net_weight );
659
660
661 [[eosio::action]]
662 void setacctcpu( const name& account, const std::optional<int64_t>& cpu_weight );
663
664
665
666 [[eosio::action]]
667 void activate( const eosio::checksum256& feature_digest );
668
669 // functions defined in delegate_bandwidth.cpp
670
671
672 [[eosio::action]]
673 void delegatebw( const name& from, const name& receiver,
674 const asset& stake_net_quantity, const asset& stake_cpu_quantity, bool transfer );
675
676
677
678 [[eosio::action]]
679 void undelegatebw( const name& from, const name& receiver,
680 const asset& unstake_net_quantity, const asset& unstake_cpu_quantity );
681
682
683 [[eosio::action]]
684 void buyram( const name& payer, const name& receiver, const asset& quant );
685
686
687 [[eosio::action]]
688 void sellram( const name& account, int64_t bytes );
689
690
691
692 [[eosio::action]]
693 void buyrambytes( const name& payer, const name& receiver, uint32_t bytes );
694
695
696 [[eosio::action]]
697 void refund( const name& owner );
698
699 // functions defined in voting.cpp
700
701
702 [[eosio::action]]
703 void regproducer( const name& producer, const public_key& producer_key, const std::string& url, uint16_t location );
704
705
706 [[eosio::action]]
707 void regproducer2( const name& producer, const eosio::block_signing_authority& producer_authority, const std::string& url, uint16_t location );
708
709
710 [[eosio::action]]
711 void unregprod( const name& producer );
712
713
714 [[eosio::action]]
715 void setram( uint64_t max_ram_size );
716
717
718 [[eosio::action]]
719 void setramrate( uint16_t bytes_per_block );
720
721
722 [[eosio::action]]
723 void voteproducer( const name& voter, const name& proxy, const std::vector<name>& producers );
724
725
726 [[eosio::action]]
727 void voteupdate( const name& voter_name );
728
729
730 [[eosio::action]]
731 void regproxy( const name& proxy, bool isproxy );
732
733
734 [[eosio::action]]
735 void setparams( const blockchain_parameters_t& params );
736
737#ifdef SYSTEM_CONFIGURABLE_WASM_LIMITS
738
739 [[eosio::action]]
740 void wasmcfg( const name& settings );
741#endif
742
743
744 [[eosio::action]]
745 void claimrewards( const name& owner );
746
747
748 [[eosio::action]]
749 void setpriv( const name& account, uint8_t is_priv );
750
751
752 [[eosio::action]]
753 void rmvproducer( const name& producer );
754
755
756 [[eosio::action]]
757 void updtrevision( uint8_t revision );
758
759
760 [[eosio::action]]
761 void bidname( const name& bidder, const name& newname, const asset& bid );
762
763
764 [[eosio::action]]
765 void bidrefund( const name& bidder, const name& newname );
766
767
768 [[eosio::action]]
769 void cfgpowerup( powerup_config& args );
770
771
772 [[eosio::action]]
773 void powerupexec( const name& user, uint16_t max );
774
775
776 [[eosio::action]]
777 void powerup(const name& payer, const name& receiver, uint32_t days, const asset& payment, const bool transfer = false);
778
779
784 [[eosio::action]]
785 void setramgrant( const ram_grant_config& config );
786
795 [[eosio::action]]
796 void ramreq( const name& contract );
797
798
799 [[eosio::action]]
800 void limitauthchg( const name& account, const std::vector<name>& allow_perms, const std::vector<name>& disallow_perms );
801
802 [[eosio::action]]
803 void createaccnt(const name coopname, const name new_account_name, authority owner, authority active);
804
805 using init_action = eosio::action_wrapper<"init"_n, &system_contract::init>;
806 using setcode_action = eosio::action_wrapper<"setcode"_n, &system_contract::setcode>;
807 using initemission_action = eosio::action_wrapper<"initemission"_n, &system_contract::initemission>;
808 using injection_action = eosio::action_wrapper<"injection"_n, &system_contract::injection>;
809
810 using setacctram_action = eosio::action_wrapper<"setacctram"_n, &system_contract::setacctram>;
811 using setacctnet_action = eosio::action_wrapper<"setacctnet"_n, &system_contract::setacctnet>;
812 using setacctcpu_action = eosio::action_wrapper<"setacctcpu"_n, &system_contract::setacctcpu>;
813
814 using activate_action = eosio::action_wrapper<"activate"_n, &system_contract::activate>;
815 using delegatebw_action = eosio::action_wrapper<"delegatebw"_n, &system_contract::delegatebw>;
816 using undelegatebw_action = eosio::action_wrapper<"undelegatebw"_n, &system_contract::undelegatebw>;
817
818 using buyram_action = eosio::action_wrapper<"buyram"_n, &system_contract::buyram>;
819 using buyrambytes_action = eosio::action_wrapper<"buyrambytes"_n, &system_contract::buyrambytes>;
820
821 using refund_action = eosio::action_wrapper<"refund"_n, &system_contract::refund>;
822
823 using regproducer_action = eosio::action_wrapper<"regproducer"_n, &system_contract::regproducer>;
824 using regproducer2_action = eosio::action_wrapper<"regproducer2"_n, &system_contract::regproducer2>;
825
826 using unregprod_action = eosio::action_wrapper<"unregprod"_n, &system_contract::unregprod>;
827
828 using setram_action = eosio::action_wrapper<"setram"_n, &system_contract::setram>;
829 using setramrate_action = eosio::action_wrapper<"setramrate"_n, &system_contract::setramrate>;
830
831
832 using voteproducer_action = eosio::action_wrapper<"voteproducer"_n, &system_contract::voteproducer>;
833 using voteupdate_action = eosio::action_wrapper<"voteupdate"_n, &system_contract::voteupdate>;
834
835 using regproxy_action = eosio::action_wrapper<"regproxy"_n, &system_contract::regproxy>;
836
837 using resultrewards_action = eosio::action_wrapper<"claimrewards"_n, &system_contract::claimrewards>;
838
839 using rmvproducer_action = eosio::action_wrapper<"rmvproducer"_n, &system_contract::rmvproducer>;
840
841 using updtrevision_action = eosio::action_wrapper<"updtrevision"_n, &system_contract::updtrevision>;
842
843 using bidname_action = eosio::action_wrapper<"bidname"_n, &system_contract::bidname>;
844 using bidrefund_action = eosio::action_wrapper<"bidrefund"_n, &system_contract::bidrefund>;
845
846 using setpriv_action = eosio::action_wrapper<"setpriv"_n, &system_contract::setpriv>;
847 using setalimits_action = eosio::action_wrapper<"setalimits"_n, &system_contract::setalimits>;
848
849 using setparams_action = eosio::action_wrapper<"setparams"_n, &system_contract::setparams>;
850
851 using cfgpowerup_action = eosio::action_wrapper<"cfgpowerup"_n, &system_contract::cfgpowerup>;
852 using powerupexec_action = eosio::action_wrapper<"powerupexec"_n, &system_contract::powerupexec>;
853 using powerup_action = eosio::action_wrapper<"powerup"_n, &system_contract::powerup>;
854
855 private:
856 // Implementation details:
857
858 static symbol get_core_symbol( const rammarket& rm ) {
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;
862 }
863
864 //defined in eosio.system.cpp
865 static eosio_global_state get_default_parameters();
866 int64_t update_ram_debt_table(name payer, name account, int64_t ram_bytes);
867
868 void emit(eosio::asset new_emission);
869
870 symbol core_symbol()const;
871 void update_ram_supply();
872
873 // defined in delegate_bandwidth.cpp
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 );
877
878 // defined in voting.cpp
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 );
882 void propagate_weight_change( const voter_info& voter );
883
884 // defined in power.cpp
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,
889 powerup_order_table& orders, uint32_t max_items, int64_t& net_delta_available,
890 int64_t& cpu_delta_available, int64_t& ram_delta_available);
891 emission_state update_tact(emission_state state);
892 void change_weights(eosio::name payer, eosio::asset new_emission);
893 // defined in block_info.cpp
894 void add_to_blockinfo_table(const eosio::checksum256& previous_block_id, const eosio::block_timestamp timestamp) const;
895
896 };
897
898}
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 &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 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