Wire Sysio Wire Sysion 1.0.0
|
#include <sysio.system.hpp>
Public Types | |
using | init_action = sysio::action_wrapper<"init"_n, &system_contract::init> |
using | setacctram_action = sysio::action_wrapper<"setacctram"_n, &system_contract::setacctram> |
using | setacctnet_action = sysio::action_wrapper<"setacctnet"_n, &system_contract::setacctnet> |
using | setacctcpu_action = sysio::action_wrapper<"setacctcpu"_n, &system_contract::setacctcpu> |
using | activate_action = sysio::action_wrapper<"activate"_n, &system_contract::activate> |
using | delegatebw_action = sysio::action_wrapper<"delegatebw"_n, &system_contract::delegatebw> |
using | deposit_action = sysio::action_wrapper<"deposit"_n, &system_contract::deposit> |
using | withdraw_action = sysio::action_wrapper<"withdraw"_n, &system_contract::withdraw> |
using | buyrex_action = sysio::action_wrapper<"buyrex"_n, &system_contract::buyrex> |
using | unstaketorex_action = sysio::action_wrapper<"unstaketorex"_n, &system_contract::unstaketorex> |
using | sellrex_action = sysio::action_wrapper<"sellrex"_n, &system_contract::sellrex> |
using | cnclrexorder_action = sysio::action_wrapper<"cnclrexorder"_n, &system_contract::cnclrexorder> |
using | rentcpu_action = sysio::action_wrapper<"rentcpu"_n, &system_contract::rentcpu> |
using | rentnet_action = sysio::action_wrapper<"rentnet"_n, &system_contract::rentnet> |
using | fundcpuloan_action = sysio::action_wrapper<"fundcpuloan"_n, &system_contract::fundcpuloan> |
using | fundnetloan_action = sysio::action_wrapper<"fundnetloan"_n, &system_contract::fundnetloan> |
using | defcpuloan_action = sysio::action_wrapper<"defcpuloan"_n, &system_contract::defcpuloan> |
using | defnetloan_action = sysio::action_wrapper<"defnetloan"_n, &system_contract::defnetloan> |
using | updaterex_action = sysio::action_wrapper<"updaterex"_n, &system_contract::updaterex> |
using | rexexec_action = sysio::action_wrapper<"rexexec"_n, &system_contract::rexexec> |
using | setrex_action = sysio::action_wrapper<"setrex"_n, &system_contract::setrex> |
using | mvtosavings_action = sysio::action_wrapper<"mvtosavings"_n, &system_contract::mvtosavings> |
using | mvfrsavings_action = sysio::action_wrapper<"mvfrsavings"_n, &system_contract::mvfrsavings> |
using | consolidate_action = sysio::action_wrapper<"consolidate"_n, &system_contract::consolidate> |
using | closerex_action = sysio::action_wrapper<"closerex"_n, &system_contract::closerex> |
using | undelegatebw_action = sysio::action_wrapper<"undelegatebw"_n, &system_contract::undelegatebw> |
using | buyram_action = sysio::action_wrapper<"buyram"_n, &system_contract::buyram> |
using | buyrambytes_action = sysio::action_wrapper<"buyrambytes"_n, &system_contract::buyrambytes> |
using | sellram_action = sysio::action_wrapper<"sellram"_n, &system_contract::sellram> |
using | refund_action = sysio::action_wrapper<"refund"_n, &system_contract::refund> |
using | regproducer_action = sysio::action_wrapper<"regproducer"_n, &system_contract::regproducer> |
using | regproducer2_action = sysio::action_wrapper<"regproducer2"_n, &system_contract::regproducer2> |
using | unregprod_action = sysio::action_wrapper<"unregprod"_n, &system_contract::unregprod> |
using | setram_action = sysio::action_wrapper<"setram"_n, &system_contract::setram> |
using | setramrate_action = sysio::action_wrapper<"setramrate"_n, &system_contract::setramrate> |
using | voteproducer_action = sysio::action_wrapper<"voteproducer"_n, &system_contract::voteproducer> |
using | voteupdate_action = sysio::action_wrapper<"voteupdate"_n, &system_contract::voteupdate> |
using | regproxy_action = sysio::action_wrapper<"regproxy"_n, &system_contract::regproxy> |
using | claimrewards_action = sysio::action_wrapper<"claimrewards"_n, &system_contract::claimrewards> |
using | rmvproducer_action = sysio::action_wrapper<"rmvproducer"_n, &system_contract::rmvproducer> |
using | updtrevision_action = sysio::action_wrapper<"updtrevision"_n, &system_contract::updtrevision> |
using | bidname_action = sysio::action_wrapper<"bidname"_n, &system_contract::bidname> |
using | bidrefund_action = sysio::action_wrapper<"bidrefund"_n, &system_contract::bidrefund> |
using | setpriv_action = sysio::action_wrapper<"setpriv"_n, &system_contract::setpriv> |
using | setalimits_action = sysio::action_wrapper<"setalimits"_n, &system_contract::setalimits> |
using | setparams_action = sysio::action_wrapper<"setparams"_n, &system_contract::setparams> |
using | setinflation_action = sysio::action_wrapper<"setinflation"_n, &system_contract::setinflation> |
using | cfgpowerup_action = sysio::action_wrapper<"cfgpowerup"_n, &system_contract::cfgpowerup> |
using | powerupexec_action = sysio::action_wrapper<"powerupexec"_n, &system_contract::powerupexec> |
using | powerup_action = sysio::action_wrapper<"powerup"_n, &system_contract::powerup> |
Public Types inherited from sysiosystem::native | |
using | newaccount_action = sysio::action_wrapper<"newaccount"_n, &native::newaccount> |
using | updateauth_action = sysio::action_wrapper<"updateauth"_n, &native::updateauth> |
using | deleteauth_action = sysio::action_wrapper<"deleteauth"_n, &native::deleteauth> |
using | linkauth_action = sysio::action_wrapper<"linkauth"_n, &native::linkauth> |
using | unlinkauth_action = sysio::action_wrapper<"unlinkauth"_n, &native::unlinkauth> |
using | canceldelay_action = sysio::action_wrapper<"canceldelay"_n, &native::canceldelay> |
using | setcode_action = sysio::action_wrapper<"setcode"_n, &native::setcode> |
using | setabi_action = sysio::action_wrapper<"setabi"_n, &native::setabi> |
Public Member Functions | |
system_contract (name s, name code, datastream< const char * > ds) | |
~system_contract () | |
void | init (unsigned_int version, const symbol &core) |
void | onblock (ignore< block_header > header) |
void | setalimits (const name &account, int64_t ram_bytes, int64_t net_weight, int64_t cpu_weight) |
void | setacctram (const name &account, const std::optional< int64_t > &ram_bytes) |
void | setacctnet (const name &account, const std::optional< int64_t > &net_weight) |
void | setacctcpu (const name &account, const std::optional< int64_t > &cpu_weight) |
void | activate (const sysio::checksum256 &feature_digest) |
void | delegatebw (const name &from, const name &receiver, const asset &stake_net_quantity, const asset &stake_cpu_quantity, bool transfer) |
void | setrex (const asset &balance) |
void | deposit (const name &owner, const asset &amount) |
void | withdraw (const name &owner, const asset &amount) |
void | buyrex (const name &from, const asset &amount) |
void | unstaketorex (const name &owner, const name &receiver, const asset &from_net, const asset &from_cpu) |
void | sellrex (const name &from, const asset &rex) |
void | cnclrexorder (const name &owner) |
void | rentcpu (const name &from, const name &receiver, const asset &loan_payment, const asset &loan_fund) |
void | rentnet (const name &from, const name &receiver, const asset &loan_payment, const asset &loan_fund) |
void | fundcpuloan (const name &from, uint64_t loan_num, const asset &payment) |
void | fundnetloan (const name &from, uint64_t loan_num, const asset &payment) |
void | defcpuloan (const name &from, uint64_t loan_num, const asset &amount) |
void | defnetloan (const name &from, uint64_t loan_num, const asset &amount) |
void | updaterex (const name &owner) |
void | rexexec (const name &user, uint16_t max) |
void | consolidate (const name &owner) |
void | mvtosavings (const name &owner, const asset &rex) |
void | mvfrsavings (const name &owner, const asset &rex) |
void | closerex (const name &owner) |
void | undelegatebw (const name &from, const name &receiver, const asset &unstake_net_quantity, const asset &unstake_cpu_quantity) |
void | buyram (const name &payer, const name &receiver, const asset &quant) |
void | buyrambytes (const name &payer, const name &receiver, uint32_t bytes) |
void | sellram (const name &account, int64_t bytes) |
void | refund (const name &owner) |
void | regproducer (const name &producer, const public_key &producer_key, const std::string &url, uint16_t location) |
void | regproducer2 (const name &producer, const sysio::block_signing_authority &producer_authority, const std::string &url, uint16_t location) |
void | unregprod (const name &producer) |
void | setram (uint64_t max_ram_size) |
void | setramrate (uint16_t bytes_per_block) |
void | voteproducer (const name &voter, const name &proxy, const std::vector< name > &producers) |
void | voteupdate (const name &voter_name) |
void | regproxy (const name &proxy, bool isproxy) |
void | setparams (const blockchain_parameters_t ¶ms) |
void | claimrewards (const name &owner) |
void | setpriv (const name &account, uint8_t is_priv) |
void | rmvproducer (const name &producer) |
void | updtrevision (uint8_t revision) |
void | bidname (const name &bidder, const name &newname, const asset &bid) |
void | bidrefund (const name &bidder, const name &newname) |
void | setinflation (int64_t annual_rate, int64_t inflation_pay_factor, int64_t votepay_factor) |
void | cfgpowerup (powerup_config &args) |
void | powerupexec (const name &user, uint16_t max) |
void | powerup (const name &payer, const name &receiver, uint32_t days, int64_t net_frac, int64_t cpu_frac, const asset &max_payment) |
void | limitauthchg (const name &account, const std::vector< name > &allow_perms, const std::vector< name > &disallow_perms) |
void | onlinkauth (const name &user, const name &permission, const sysio::public_key &pub_key) |
Public Member Functions inherited from sysiosystem::native | |
void | newaccount (const name &creator, const name &name, ignore< authority > owner, ignore< authority > active) |
void | updateauth (name account, name permission, name parent, authority auth, binary_extension< name > authorized_by) |
void | deleteauth (name account, name permission, binary_extension< name > authorized_by) |
void | linkauth (name account, name code, name type, name requirement, binary_extension< name > authorized_by) |
void | unlinkauth (name account, name code, name type, binary_extension< name > authorized_by) |
void | canceldelay (ignore< permission_level > canceling_auth, ignore< checksum256 > trx_id) |
void | onerror (ignore< uint128_t > sender_id, ignore< std::vector< char > > sent_trx) |
void | setabi (const name &account, const std::vector< char > &abi, const binary_extension< std::string > &memo) |
void | setcode (const name &account, uint8_t vmtype, uint8_t vmversion, const std::vector< char > &code, const binary_extension< std::string > &memo) |
Static Public Member Functions | |
static symbol | get_core_symbol (name system_account="sysio"_n) |
Static Public Attributes | |
static constexpr sysio::name | active_permission {"active"_n} |
static constexpr sysio::name | token_account {"sysio.token"_n} |
static constexpr sysio::name | ram_account {"sysio.ram"_n} |
static constexpr sysio::name | ramfee_account {"sysio.ramfee"_n} |
static constexpr sysio::name | stake_account {"sysio.stake"_n} |
static constexpr sysio::name | bpay_account {"sysio.bpay"_n} |
static constexpr sysio::name | vpay_account {"sysio.vpay"_n} |
static constexpr sysio::name | names_account {"sysio.names"_n} |
static constexpr sysio::name | saving_account {"sysio.saving"_n} |
static constexpr sysio::name | rex_account {"sysio.rex"_n} |
static constexpr sysio::name | reserve_account {"sysio.reserv"_n} |
static constexpr sysio::name | null_account {"sysio.null"_n} |
static constexpr symbol | ramcore_symbol = symbol(symbol_code("RAMCORE"), 4) |
static constexpr symbol | ram_symbol = symbol(symbol_code("RAM"), 0) |
static constexpr symbol | rex_symbol = symbol(symbol_code("REX"), 4) |
The sysio.system
smart contract is provided by block.one
as a sample system contract, and it defines the structures and actions needed for blockchain's core functionality.
Just like in the sysio.bios
sample contract implementation, there are a few actions which are not implemented at the contract level (newaccount
, updateauth
, deleteauth
, linkauth
, unlinkauth
, canceldelay
, onerror
, setabi
, setcode
), they are just declared in the contract so they will show in the contract's ABI and users will be able to push those actions to the chain via the account holding the sysio.system
contract, but the implementation is at the EOSIO core level. They are referred to as EOSIO native actions.
power
. Definition at line 679 of file sysio.system.hpp.
using sysiosystem::system_contract::activate_action = sysio::action_wrapper<"activate"_n, &system_contract::activate> |
Definition at line 1402 of file sysio.system.hpp.
using sysiosystem::system_contract::bidname_action = sysio::action_wrapper<"bidname"_n, &system_contract::bidname> |
Definition at line 1439 of file sysio.system.hpp.
using sysiosystem::system_contract::bidrefund_action = sysio::action_wrapper<"bidrefund"_n, &system_contract::bidrefund> |
Definition at line 1440 of file sysio.system.hpp.
using sysiosystem::system_contract::buyram_action = sysio::action_wrapper<"buyram"_n, &system_contract::buyram> |
Definition at line 1424 of file sysio.system.hpp.
using sysiosystem::system_contract::buyrambytes_action = sysio::action_wrapper<"buyrambytes"_n, &system_contract::buyrambytes> |
Definition at line 1425 of file sysio.system.hpp.
using sysiosystem::system_contract::buyrex_action = sysio::action_wrapper<"buyrex"_n, &system_contract::buyrex> |
Definition at line 1406 of file sysio.system.hpp.
using sysiosystem::system_contract::cfgpowerup_action = sysio::action_wrapper<"cfgpowerup"_n, &system_contract::cfgpowerup> |
Definition at line 1445 of file sysio.system.hpp.
using sysiosystem::system_contract::claimrewards_action = sysio::action_wrapper<"claimrewards"_n, &system_contract::claimrewards> |
Definition at line 1436 of file sysio.system.hpp.
using sysiosystem::system_contract::closerex_action = sysio::action_wrapper<"closerex"_n, &system_contract::closerex> |
Definition at line 1422 of file sysio.system.hpp.
using sysiosystem::system_contract::cnclrexorder_action = sysio::action_wrapper<"cnclrexorder"_n, &system_contract::cnclrexorder> |
Definition at line 1409 of file sysio.system.hpp.
using sysiosystem::system_contract::consolidate_action = sysio::action_wrapper<"consolidate"_n, &system_contract::consolidate> |
Definition at line 1421 of file sysio.system.hpp.
using sysiosystem::system_contract::defcpuloan_action = sysio::action_wrapper<"defcpuloan"_n, &system_contract::defcpuloan> |
Definition at line 1414 of file sysio.system.hpp.
using sysiosystem::system_contract::defnetloan_action = sysio::action_wrapper<"defnetloan"_n, &system_contract::defnetloan> |
Definition at line 1415 of file sysio.system.hpp.
using sysiosystem::system_contract::delegatebw_action = sysio::action_wrapper<"delegatebw"_n, &system_contract::delegatebw> |
Definition at line 1403 of file sysio.system.hpp.
using sysiosystem::system_contract::deposit_action = sysio::action_wrapper<"deposit"_n, &system_contract::deposit> |
Definition at line 1404 of file sysio.system.hpp.
using sysiosystem::system_contract::fundcpuloan_action = sysio::action_wrapper<"fundcpuloan"_n, &system_contract::fundcpuloan> |
Definition at line 1412 of file sysio.system.hpp.
using sysiosystem::system_contract::fundnetloan_action = sysio::action_wrapper<"fundnetloan"_n, &system_contract::fundnetloan> |
Definition at line 1413 of file sysio.system.hpp.
using sysiosystem::system_contract::init_action = sysio::action_wrapper<"init"_n, &system_contract::init> |
Definition at line 1398 of file sysio.system.hpp.
using sysiosystem::system_contract::mvfrsavings_action = sysio::action_wrapper<"mvfrsavings"_n, &system_contract::mvfrsavings> |
Definition at line 1420 of file sysio.system.hpp.
using sysiosystem::system_contract::mvtosavings_action = sysio::action_wrapper<"mvtosavings"_n, &system_contract::mvtosavings> |
Definition at line 1419 of file sysio.system.hpp.
using sysiosystem::system_contract::powerup_action = sysio::action_wrapper<"powerup"_n, &system_contract::powerup> |
Definition at line 1447 of file sysio.system.hpp.
using sysiosystem::system_contract::powerupexec_action = sysio::action_wrapper<"powerupexec"_n, &system_contract::powerupexec> |
Definition at line 1446 of file sysio.system.hpp.
using sysiosystem::system_contract::refund_action = sysio::action_wrapper<"refund"_n, &system_contract::refund> |
Definition at line 1427 of file sysio.system.hpp.
using sysiosystem::system_contract::regproducer2_action = sysio::action_wrapper<"regproducer2"_n, &system_contract::regproducer2> |
Definition at line 1429 of file sysio.system.hpp.
using sysiosystem::system_contract::regproducer_action = sysio::action_wrapper<"regproducer"_n, &system_contract::regproducer> |
Definition at line 1428 of file sysio.system.hpp.
using sysiosystem::system_contract::regproxy_action = sysio::action_wrapper<"regproxy"_n, &system_contract::regproxy> |
Definition at line 1435 of file sysio.system.hpp.
using sysiosystem::system_contract::rentcpu_action = sysio::action_wrapper<"rentcpu"_n, &system_contract::rentcpu> |
Definition at line 1410 of file sysio.system.hpp.
using sysiosystem::system_contract::rentnet_action = sysio::action_wrapper<"rentnet"_n, &system_contract::rentnet> |
Definition at line 1411 of file sysio.system.hpp.
using sysiosystem::system_contract::rexexec_action = sysio::action_wrapper<"rexexec"_n, &system_contract::rexexec> |
Definition at line 1417 of file sysio.system.hpp.
using sysiosystem::system_contract::rmvproducer_action = sysio::action_wrapper<"rmvproducer"_n, &system_contract::rmvproducer> |
Definition at line 1437 of file sysio.system.hpp.
using sysiosystem::system_contract::sellram_action = sysio::action_wrapper<"sellram"_n, &system_contract::sellram> |
Definition at line 1426 of file sysio.system.hpp.
using sysiosystem::system_contract::sellrex_action = sysio::action_wrapper<"sellrex"_n, &system_contract::sellrex> |
Definition at line 1408 of file sysio.system.hpp.
using sysiosystem::system_contract::setacctcpu_action = sysio::action_wrapper<"setacctcpu"_n, &system_contract::setacctcpu> |
Definition at line 1401 of file sysio.system.hpp.
using sysiosystem::system_contract::setacctnet_action = sysio::action_wrapper<"setacctnet"_n, &system_contract::setacctnet> |
Definition at line 1400 of file sysio.system.hpp.
using sysiosystem::system_contract::setacctram_action = sysio::action_wrapper<"setacctram"_n, &system_contract::setacctram> |
Definition at line 1399 of file sysio.system.hpp.
using sysiosystem::system_contract::setalimits_action = sysio::action_wrapper<"setalimits"_n, &system_contract::setalimits> |
Definition at line 1442 of file sysio.system.hpp.
using sysiosystem::system_contract::setinflation_action = sysio::action_wrapper<"setinflation"_n, &system_contract::setinflation> |
Definition at line 1444 of file sysio.system.hpp.
using sysiosystem::system_contract::setparams_action = sysio::action_wrapper<"setparams"_n, &system_contract::setparams> |
Definition at line 1443 of file sysio.system.hpp.
using sysiosystem::system_contract::setpriv_action = sysio::action_wrapper<"setpriv"_n, &system_contract::setpriv> |
Definition at line 1441 of file sysio.system.hpp.
using sysiosystem::system_contract::setram_action = sysio::action_wrapper<"setram"_n, &system_contract::setram> |
Definition at line 1431 of file sysio.system.hpp.
using sysiosystem::system_contract::setramrate_action = sysio::action_wrapper<"setramrate"_n, &system_contract::setramrate> |
Definition at line 1432 of file sysio.system.hpp.
using sysiosystem::system_contract::setrex_action = sysio::action_wrapper<"setrex"_n, &system_contract::setrex> |
Definition at line 1418 of file sysio.system.hpp.
using sysiosystem::system_contract::undelegatebw_action = sysio::action_wrapper<"undelegatebw"_n, &system_contract::undelegatebw> |
Definition at line 1423 of file sysio.system.hpp.
using sysiosystem::system_contract::unregprod_action = sysio::action_wrapper<"unregprod"_n, &system_contract::unregprod> |
Definition at line 1430 of file sysio.system.hpp.
using sysiosystem::system_contract::unstaketorex_action = sysio::action_wrapper<"unstaketorex"_n, &system_contract::unstaketorex> |
Definition at line 1407 of file sysio.system.hpp.
using sysiosystem::system_contract::updaterex_action = sysio::action_wrapper<"updaterex"_n, &system_contract::updaterex> |
Definition at line 1416 of file sysio.system.hpp.
using sysiosystem::system_contract::updtrevision_action = sysio::action_wrapper<"updtrevision"_n, &system_contract::updtrevision> |
Definition at line 1438 of file sysio.system.hpp.
using sysiosystem::system_contract::voteproducer_action = sysio::action_wrapper<"voteproducer"_n, &system_contract::voteproducer> |
Definition at line 1433 of file sysio.system.hpp.
using sysiosystem::system_contract::voteupdate_action = sysio::action_wrapper<"voteupdate"_n, &system_contract::voteupdate> |
Definition at line 1434 of file sysio.system.hpp.
using sysiosystem::system_contract::withdraw_action = sysio::action_wrapper<"withdraw"_n, &system_contract::withdraw> |
Definition at line 1405 of file sysio.system.hpp.
sysiosystem::system_contract::system_contract | ( | name | s, |
name | code, | ||
datastream< const char * > | ds ) |
Definition at line 18 of file sysio.system.cpp.
sysiosystem::system_contract::~system_contract | ( | ) |
Definition at line 60 of file sysio.system.cpp.
void sysiosystem::system_contract::activate | ( | const sysio::checksum256 & | feature_digest | ) |
The activate action, activates a protocol feature
feature_digest | - hash of the protocol feature to activate. |
Definition at line 388 of file sysio.system.cpp.
void sysiosystem::system_contract::bidname | ( | const name & | bidder, |
const name & | newname, | ||
const asset & | bid ) |
Bid name action, allows an account bidder
to place a bid for a name newname
.
bidder | - the account placing the bid, |
newname | - the name the bid is placed for, |
bid | - the amount of system tokens payed for the bid. |
Definition at line 11 of file name_bidding.cpp.
Bid refund action, allows the account bidder
to get back the amount it bid so far on a newname
name.
bidder | - the account that gets refunded, |
newname | - the name for which the bid was placed and now it gets refunded for. |
Definition at line 70 of file name_bidding.cpp.
void sysiosystem::system_contract::buyram | ( | const name & | payer, |
const name & | receiver, | ||
const asset & | quant ) |
Buy ram action, increases receiver's ram quota based upon current price and quantity of tokens provided. An inline transfer from receiver to system contract of tokens will be executed.
payer | - the ram buyer, |
receiver | - the ram receiver, |
quant | - the quantity of tokens to buy ram with. |
When buying ram the payer irreversibly transfers quant to system contract and only the receiver may reclaim the tokens via the sellram action. The receiver pays for the storage of all database records associated with this action.
RAM is a scarce resource whose supply is defined by global properties max_ram_size. RAM is priced using the bancor algorithm such that price-per-byte with a constant reserve ratio of 100:1.
.5% fee (round up)
Definition at line 43 of file delegate_bandwidth.cpp.
void sysiosystem::system_contract::buyrambytes | ( | const name & | payer, |
const name & | receiver, | ||
uint32_t | bytes ) |
Buy a specific amount of ram bytes action. Increases receiver's ram in quantity of bytes provided. An inline transfer from receiver to system contract of tokens will be executed.
payer | - the ram buyer, |
receiver | - the ram receiver, |
bytes | - the quantity of ram to buy specified in bytes. |
This action will buy an exact amount of ram and bill the payer the current market price.
Definition at line 25 of file delegate_bandwidth.cpp.
Buyrex action, buys REX in exchange for tokens taken out of user's REX fund by transferring core tokens from user REX fund and converts them to REX stake. By buying REX, user is lending tokens in order to be rented as CPU or NET resources. Storage change is billed to 'from' account.
from | - owner account name, |
amount | - amount of tokens taken out of 'from' REX fund. |
Definition at line 40 of file rex.cpp.
void sysiosystem::system_contract::cfgpowerup | ( | powerup_config & | args | ) |
Configure the power
market. The market becomes available the first time this action is invoked.
Definition at line 119 of file powerup.cpp.
void sysiosystem::system_contract::claimrewards | ( | const name & | owner | ) |
Claim rewards action, claims block producing and vote rewards.
owner | - producer account claiming per-block and per-vote rewards. |
New metric to be used in pervote pay calculation. Instead of vote weight ratio, we combine vote weight and time duration the vote weight has been held into one metric.
Definition at line 76 of file producer_pay.cpp.
void sysiosystem::system_contract::closerex | ( | const name & | owner | ) |
Closerex action, deletes owner records from REX tables and frees used RAM. Owner must not have an outstanding REX balance.
owner | - user account name. |
check for any outstanding loans or rex fund
check for remaining rex balance
Definition at line 319 of file rex.cpp.
void sysiosystem::system_contract::cnclrexorder | ( | const name & | owner | ) |
Cnclrexorder action, cancels unfilled REX sell order by owner if one exists.
owner | - owner account name. |
Definition at line 147 of file rex.cpp.
void sysiosystem::system_contract::consolidate | ( | const name & | owner | ) |
Consolidate action, consolidates REX maturity buckets into one bucket that can be sold after 4 days starting from the end of the day.
owner | - REX owner account name. |
Definition at line 251 of file rex.cpp.
void sysiosystem::system_contract::defcpuloan | ( | const name & | from, |
uint64_t | loan_num, | ||
const asset & | amount ) |
Defcpuloan action, withdraws tokens from the fund of a specific CPU loan and adds them to REX fund.
from | - loan creator account, |
loan_num | - loan id, |
amount | - tokens transferred from CPU loan fund to REX fund. |
Definition at line 190 of file rex.cpp.
void sysiosystem::system_contract::defnetloan | ( | const name & | from, |
uint64_t | loan_num, | ||
const asset & | amount ) |
Defnetloan action, withdraws tokens from the fund of a specific NET loan and adds them to REX fund.
from | - loan creator account, |
loan_num | - loan id, |
amount | - tokens transferred from NET loan fund to REX fund. |
Definition at line 198 of file rex.cpp.
void sysiosystem::system_contract::delegatebw | ( | const name & | from, |
const name & | receiver, | ||
const asset & | stake_net_quantity, | ||
const asset & | stake_cpu_quantity, | ||
bool | transfer ) |
Delegate bandwidth and/or cpu action. Stakes SYS from the balance of from
for the benefit of receiver
.
from | - the account to delegate bandwidth from, that is, the account holding tokens to be staked, |
receiver | - the account to delegate bandwidth to, that is, the account to whose resources staked tokens are added |
stake_net_quantity | - tokens staked for NET bandwidth, |
stake_cpu_quantity | - tokens staked for CPU bandwidth, |
transfer | - if true, ownership of staked tokens is transferred to receiver . |
from
account has voted for will have their votes updated immediately. Definition at line 373 of file delegate_bandwidth.cpp.
Deposit to REX fund action. Deposits core tokens to user REX fund. All proceeds and expenses related to REX are added to or taken out of this fund. An inline transfer from 'owner' liquid balance is executed. All REX-related costs and proceeds are deducted from and added to 'owner' REX fund, with one exception being buying REX using staked tokens. Storage change is billed to 'owner'.
owner | - REX fund owner account, |
amount | - amount of tokens to be deposited. |
Definition at line 11 of file rex.cpp.
void sysiosystem::system_contract::fundcpuloan | ( | const name & | from, |
uint64_t | loan_num, | ||
const asset & | payment ) |
Fundcpuloan action, transfers tokens from REX fund to the fund of a specific CPU loan in order to be used for loan renewal at expiry.
from | - loan creator account, |
loan_num | - loan id, |
payment | - tokens transferred from REX fund to loan fund. |
Definition at line 174 of file rex.cpp.
void sysiosystem::system_contract::fundnetloan | ( | const name & | from, |
uint64_t | loan_num, | ||
const asset & | payment ) |
Fundnetloan action, transfers tokens from REX fund to the fund of a specific NET loan in order to be used for loan renewal at expiry.
from | - loan creator account, |
loan_num | - loan id, |
payment | - tokens transferred from REX fund to loan fund. |
Definition at line 182 of file rex.cpp.
|
inlinestatic |
Definition at line 723 of file sysio.system.hpp.
void sysiosystem::system_contract::init | ( | unsigned_int | version, |
const symbol & | core ) |
The Init action initializes the system contract for a version and a symbol. Only succeeds when:
version | - the version, has to be 0, |
core | - the system symbol. |
Definition at line 490 of file sysio.system.cpp.
void sysiosystem::system_contract::limitauthchg | ( | const name & | account, |
const std::vector< name > & | allow_perms, | ||
const std::vector< name > & | disallow_perms ) |
limitauthchg opts into or out of restrictions on updateauth, deleteauth, linkauth, and unlinkauth.
If either allow_perms or disallow_perms is non-empty, then opts into restrictions. If allow_perms is non-empty, then the authorized_by argument of the restricted actions must be in the vector, or the actions will abort. If disallow_perms is non-empty, then the authorized_by argument of the restricted actions must not be in the vector, or the actions will abort.
If both allow_perms and disallow_perms are empty, then opts out of the restrictions. limitauthchg aborts if both allow_perms and disallow_perms are non-empty.
account | - account to change |
allow_perms | - permissions which may use the restricted actions |
disallow_perms | - permissions which may not use the restricted actions |
Definition at line 6 of file limit_auth_changes.cpp.
Mvfrsavings action, moves a specified amount of REX out of savings bucket. The moved amount will have the regular REX maturity period of 4 days.
owner | - REX owner account name. |
rex | - amount of REX to be moved. |
Definition at line 296 of file rex.cpp.
Mvtosavings action, moves a specified amount of REX into savings bucket. REX savings bucket never matures. In order for it to be sold, it has to be moved explicitly out of that bucket. Then the moved amount will have the regular maturity period of 4 days starting from the end of the day.
owner | - REX owner account name. |
rex | - amount of REX to be moved. |
Definition at line 262 of file rex.cpp.
void sysiosystem::system_contract::onblock | ( | ignore< block_header > | header | ) |
On block action. This special action is triggered when a block is applied by the given producer and cannot be generated from any other source. It is used to pay producers and calculate missed blocks of other producers. Producer pay is deposited into the producer's stake balance and can be withdrawn over time. Once a minute, it may update the active producer config from the producer votes. The action also populates the blockinfo table.
header | - the block header produced. |
until activation, no new rewards are paid
start the presses
At startup the initial producer may not be one that is registered / elected and therefore there may be no producer object for them.
only update block producers once every minute, block_timestamp is in half seconds
Definition at line 10 of file producer_pay.cpp.
void sysiosystem::system_contract::onlinkauth | ( | const name & | user, |
const name & | permission, | ||
const sysio::public_key & | pub_key ) |
On Link Auth notify to catch auth.ext stuff for sig-em
Definition at line 515 of file sysio.system.cpp.
void sysiosystem::system_contract::powerup | ( | const name & | payer, |
const name & | receiver, | ||
uint32_t | days, | ||
int64_t | net_frac, | ||
int64_t | cpu_frac, | ||
const asset & | max_payment ) |
Powerup NET and CPU resources by percentage
payer | - the resource buyer |
receiver | - the resource receiver |
days | - number of days of resource availability. Must match market configuration. |
net_frac | - fraction of net (100% = 10^15) managed by this market |
cpu_frac | - fraction of cpu (100% = 10^15) managed by this market |
max_payment | - the maximum amount payer is willing to pay. Tokens are withdrawn from payer 's token balance. |
Definition at line 334 of file powerup.cpp.
Process power queue and update state. Action does not execute anything related to a specific user.
user | - any account can execute this action |
max | - number of queue items to process |
Definition at line 317 of file powerup.cpp.
void sysiosystem::system_contract::refund | ( | const name & | owner | ) |
Refund action, this action is called after the delegation-period to claim all pending unstaked tokens belonging to owner.
owner | - the owner of the tokens claimed. |
Definition at line 400 of file delegate_bandwidth.cpp.
void sysiosystem::system_contract::regproducer | ( | const name & | producer, |
const public_key & | producer_key, | ||
const std::string & | url, | ||
uint16_t | location ) |
Register producer action, indicates that a particular account wishes to become a producer, this action will create a producer_config
and a producer_info
object for producer
scope in producers tables.
producer | - account registering to be a producer candidate, |
producer_key | - the public key of the block producer, this is the key used by block producer to sign blocks, |
url | - the url of the block producer, normally the url of the block producer presentation website, |
location | - is the country code as defined in the ISO 3166, https://en.wikipedia.org/wiki/List_of_ISO_3166_country_codes |
Definition at line 79 of file voting.cpp.
void sysiosystem::system_contract::regproducer2 | ( | const name & | producer, |
const sysio::block_signing_authority & | producer_authority, | ||
const std::string & | url, | ||
uint16_t | location ) |
Register producer action, indicates that a particular account wishes to become a producer, this action will create a producer_config
and a producer_info
object for producer
scope in producers tables.
producer | - account registering to be a producer candidate, |
producer_authority | - the weighted threshold multisig block signing authority of the block producer used to sign blocks, |
url | - the url of the block producer, normally the url of the block producer presentation website, |
location | - is the country code as defined in the ISO 3166, https://en.wikipedia.org/wiki/List_of_ISO_3166_country_codes |
Definition at line 86 of file voting.cpp.
void sysiosystem::system_contract::regproxy | ( | const name & | proxy, |
bool | isproxy ) |
Register proxy action, sets proxy
account as proxy. An account marked as a proxy can vote with the weight of other accounts which have selected it as a proxy. Other accounts must refresh their voteproducer to update the proxy's weight. Storage change is billed to proxy
.
proxy | - the account registering as voter proxy (or unregistering), |
isproxy | - if true, proxy is registered; if false, proxy is unregistered. |
Definition at line 374 of file voting.cpp.
void sysiosystem::system_contract::rentcpu | ( | const name & | from, |
const name & | receiver, | ||
const asset & | loan_payment, | ||
const asset & | loan_fund ) |
Rentcpu action, uses payment to rent as many SYS tokens as possible as determined by market price and stake them for CPU for the benefit of receiver, after 30 days the rented core delegation of CPU will expire. At expiration, if balance is greater than or equal to loan_payment
, loan_payment
is taken out of loan balance and used to renew the loan. Otherwise, the loan is closed and user is refunded any remaining balance. Owner can fund or refund a loan at any time before its expiration. All loan expenses and refunds come out of or are added to owner's REX fund.
from | - account creating and paying for CPU loan, 'from' account can add tokens to loan balance using action fundcpuloan and withdraw from loan balance using defcpuloan |
receiver | - account receiving rented CPU resources, |
loan_payment | - tokens paid for the loan, it has to be greater than zero, amount of rented resources is calculated from loan_payment , |
loan_fund | - additional tokens can be zero, and is added to loan balance. Loan balance represents a reserve that is used at expiration for automatic loan renewal. |
Definition at line 156 of file rex.cpp.
void sysiosystem::system_contract::rentnet | ( | const name & | from, |
const name & | receiver, | ||
const asset & | loan_payment, | ||
const asset & | loan_fund ) |
Rentnet action, uses payment to rent as many SYS tokens as possible as determined by market price and stake them for NET for the benefit of receiver, after 30 days the rented core delegation of NET will expire. At expiration, if balance is greater than or equal to loan_payment
, loan_payment
is taken out of loan balance and used to renew the loan. Otherwise, the loan is closed and user is refunded any remaining balance. Owner can fund or refund a loan at any time before its expiration. All loan expenses and refunds come out of or are added to owner's REX fund.
from | - account creating and paying for NET loan, 'from' account can add tokens to loan balance using action fundnetloan and withdraw from loan balance using defnetloan , |
receiver | - account receiving rented NET resources, |
loan_payment | - tokens paid for the loan, it has to be greater than zero, amount of rented resources is calculated from loan_payment , |
loan_fund | - additional tokens can be zero, and is added to loan balance. Loan balance represents a reserve that is used at expiration for automatic loan renewal. |
Definition at line 165 of file rex.cpp.
Rexexec action, processes max CPU loans, max NET loans, and max queued sellrex orders. Action does not execute anything related to a specific user.
user | - any account can execute this action, |
max | - number of each of CPU loans, NET loans, and sell orders to be processed. |
Definition at line 244 of file rex.cpp.
void sysiosystem::system_contract::rmvproducer | ( | const name & | producer | ) |
Remove producer action, deactivates a producer by name, if not found asserts.
producer | - the producer account to deactivate. |
Definition at line 393 of file sysio.system.cpp.
Sell ram action, reduces quota by bytes and then performs an inline transfer of tokens to receiver based upon the average purchase price of the original quota.
account | - the ram seller account, |
bytes | - the amount of ram to sell in bytes. |
The system contract now buys and sells RAM allocations at prevailing market prices. This may result in traders buying RAM today in anticipation of potential shortages tomorrow. Overall this will result in the market balancing the supply and demand for RAM over time.
the cast to int64_t of bytes is safe because we certify bytes is <= quota which is limited by prior purchases
.5% fee (round up)
Definition at line 111 of file delegate_bandwidth.cpp.
Sellrex action, sells REX in exchange for core tokens by converting REX stake back into core tokens at current exchange rate. If order cannot be processed, it gets queued until there is enough in REX pool to fill order, and will be processed within 30 days at most. If successful, user votes are updated, that is, proceeds are deducted from user's voting power. In case sell order is queued, storage change is billed to 'from' account.
from | - owner account of REX, |
rex | - amount of REX to be sold. |
REX order couldn't be filled and is added to queue. If account already has an open order, requested rex is added to existing order.
Definition at line 97 of file rex.cpp.
void sysiosystem::system_contract::setacctcpu | ( | const name & | account, |
const std::optional< int64_t > & | cpu_weight ) |
Set account CPU limits action, which sets the CPU limits of an account
account | - name of the account whose resource limit to be set, |
cpu_weight | - fractionally proportionate cpu limit of available resources based on (weight / total_weight_of_all_accounts). |
Definition at line 344 of file sysio.system.cpp.
void sysiosystem::system_contract::setacctnet | ( | const name & | account, |
const std::optional< int64_t > & | net_weight ) |
Set account NET limits action, which sets the NET limits of an account
account | - name of the account whose resource limit to be set, |
net_weight | - fractionally proportionate net limit of available resources based on (weight / total_weight_of_all_accounts). |
Definition at line 300 of file sysio.system.cpp.
void sysiosystem::system_contract::setacctram | ( | const name & | account, |
const std::optional< int64_t > & | ram_bytes ) |
Set account RAM limits action, which sets the RAM limits of an account
account | - name of the account whose resource limit to be set, |
ram_bytes | - ram limit in absolute bytes. |
Definition at line 255 of file sysio.system.cpp.
void sysiosystem::system_contract::setalimits | ( | const name & | account, |
int64_t | ram_bytes, | ||
int64_t | net_weight, | ||
int64_t | cpu_weight ) |
Set account limits action sets the resource limits of an account
account | - name of the account whose resource limit to be set, |
ram_bytes | - ram limit in absolute bytes, |
net_weight | - fractionally proportionate net limit of available resources based on (weight / total_weight_of_all_accounts), |
cpu_weight | - fractionally proportionate cpu limit of available resources based on (weight / total_weight_of_all_accounts). |
Definition at line 237 of file sysio.system.cpp.
void sysiosystem::system_contract::setinflation | ( | int64_t | annual_rate, |
int64_t | inflation_pay_factor, | ||
int64_t | votepay_factor ) |
Change the annual inflation rate of the core token supply and specify how the new issued tokens will be distributed based on the following structure.
annual_rate | - Annual inflation rate of the core token supply. (eg. For 5% Annual inflation => annual_rate=500 For 1.5% Annual inflation => annual_rate=150 |
inflation_pay_factor | - Inverse of the fraction of the inflation used to reward block producers. The remaining inflation will be sent to the sysio.saving account. (eg. For 20% of inflation going to block producer rewards => inflation_pay_factor = 50000 For 100% of inflation going to block producer rewards => inflation_pay_factor = 10000). |
votepay_factor | - Inverse of the fraction of the block producer rewards to be distributed proportional to blocks produced. The remaining rewards will be distributed proportional to votes received. (eg. For 25% of block producer rewards going towards block pay => votepay_factor = 40000 For 75% of block producer rewards going towards block pay => votepay_factor = 13333). |
Definition at line 411 of file sysio.system.cpp.
void sysiosystem::system_contract::setparams | ( | const blockchain_parameters_t & | params | ) |
Set the blockchain parameters. By tunning these parameters a degree of customization can be achieved.
params | - New blockchain parameters to set. |
Definition at line 116 of file sysio.system.cpp.
Set privilege status for an account. Allows to set privilege status for an account (turn it on/off).
account | - the account to set the privileged status for. |
is_priv | - 0 for false, > 0 for true. |
Definition at line 232 of file sysio.system.cpp.
void sysiosystem::system_contract::setram | ( | uint64_t | max_ram_size | ) |
Set ram action sets the ram supply.
max_ram_size | - the amount of ram supply to set. |
decreasing ram might result market maker issues
Increase the amount of ram for sale based upon the change in max ram size.
Definition at line 67 of file sysio.system.cpp.
void sysiosystem::system_contract::setramrate | ( | uint16_t | bytes_per_block | ) |
Set ram rate action, sets the rate of increase of RAM in bytes per block. It is capped by the uint16_t to a maximum rate of 3 TB per year. If update_ram_supply hasn't been called for the most recent block, then new ram will be allocated at the old rate up to the present block before switching the rate.
bytes_per_block | - the amount of bytes per block increase to set. |
Definition at line 105 of file sysio.system.cpp.
void sysiosystem::system_contract::setrex | ( | const asset & | balance | ) |
Setrex action, sets total_rent balance of REX pool to the passed value.
balance | - amount to set the REX pool balance. |
Definition at line 232 of file rex.cpp.
void sysiosystem::system_contract::undelegatebw | ( | const name & | from, |
const name & | receiver, | ||
const asset & | unstake_net_quantity, | ||
const asset & | unstake_cpu_quantity ) |
Undelegate bandwidth action, decreases the total tokens delegated by from
to receiver
and/or frees the memory associated with the delegation if there is nothing left to delegate. This will cause an immediate reduction in net/cpu bandwidth of the receiver. A transaction is scheduled to send the tokens back to from
after the staking period has passed. If existing transaction is scheduled, it will be canceled and a new transaction issued that has the combined undelegated amount. The from
account loses voting power as a result of this call and all producer tallies are updated.
from | - the account to undelegate bandwidth from, that is, the account whose tokens will be unstaked, |
receiver | - the account to undelegate bandwidth to, that is, the account to whose benefit tokens have been staked, |
unstake_net_quantity | - tokens to be unstaked from NET bandwidth, |
unstake_cpu_quantity | - tokens to be unstaked from CPU bandwidth, |
from
liquid balance via a deferred transaction with a delay of 3 days. undelegatebw
action, pending action is canceled and timer is reset. from
account has voted for will have their votes updated immediately. from
. Definition at line 386 of file delegate_bandwidth.cpp.
void sysiosystem::system_contract::unregprod | ( | const name & | producer | ) |
Unregister producer action, deactivates the block producer with account name producer
.
Deactivate the block producer with account name producer
.
producer | - the block producer account to unregister. |
Definition at line 97 of file voting.cpp.
void sysiosystem::system_contract::unstaketorex | ( | const name & | owner, |
const name & | receiver, | ||
const asset & | from_net, | ||
const asset & | from_cpu ) |
Unstaketorex action, uses staked core tokens to buy REX. Storage change is billed to 'owner' account.
owner | - owner of staked tokens, |
receiver | - account name that tokens have previously been staked to, |
from_net | - amount of tokens to be unstaked from NET bandwidth and used for REX purchase, |
from_cpu | - amount of tokens to be unstaked from CPU bandwidth and used for REX purchase. |
Definition at line 57 of file rex.cpp.
void sysiosystem::system_contract::updaterex | ( | const name & | owner | ) |
Updaterex action, updates REX owner vote weight to current value of held REX tokens.
owner | - REX owner account. |
Definition at line 206 of file rex.cpp.
void sysiosystem::system_contract::updtrevision | ( | uint8_t | revision | ) |
Update revision action, updates the current revision.
revision | - it has to be incremented by 1 compared with current revision. |
Definition at line 402 of file sysio.system.cpp.
void sysiosystem::system_contract::voteproducer | ( | const name & | voter, |
const name & | proxy, | ||
const std::vector< name > & | producers ) |
Vote producer action, votes for a set of producers. This action updates the list of producers
voted for, for voter
account. If voting for a proxy
, the producer votes will not change until the proxy updates their own vote. Voter can vote for a proxy or a list of at most 30 producers. Storage change is billed to voter
.
voter | - the account to change the voted producers for, |
proxy | - the proxy to change the voted producers for, |
producers | - the list of producers to vote for, a maximum of 30 producers is allowed. |
Definition at line 202 of file voting.cpp.
void sysiosystem::system_contract::voteupdate | ( | const name & | voter_name | ) |
Update the vote weight for the producers or proxy voter_name
currently votes for. This will also update the staked
value for the voter_name
by checking rexbal
and all delegated NET and CPU.
voter_name | - the account to update the votes for, |
Definition at line 217 of file voting.cpp.
Withdraw from REX fund action, withdraws core tokens from user REX fund. An inline token transfer to user balance is executed.
owner | - REX fund owner account, |
amount | - amount of tokens to be withdrawn. |
Definition at line 25 of file rex.cpp.
|
staticconstexpr |
Definition at line 702 of file sysio.system.hpp.
|
staticconstexpr |
Definition at line 707 of file sysio.system.hpp.
|
staticconstexpr |
Definition at line 709 of file sysio.system.hpp.
|
staticconstexpr |
Definition at line 713 of file sysio.system.hpp.
|
staticconstexpr |
Definition at line 704 of file sysio.system.hpp.
|
staticconstexpr |
Definition at line 715 of file sysio.system.hpp.
|
staticconstexpr |
Definition at line 714 of file sysio.system.hpp.
|
staticconstexpr |
Definition at line 705 of file sysio.system.hpp.
|
staticconstexpr |
Definition at line 712 of file sysio.system.hpp.
|
staticconstexpr |
Definition at line 711 of file sysio.system.hpp.
|
staticconstexpr |
Definition at line 716 of file sysio.system.hpp.
|
staticconstexpr |
Definition at line 710 of file sysio.system.hpp.
|
staticconstexpr |
Definition at line 706 of file sysio.system.hpp.
|
staticconstexpr |
Definition at line 703 of file sysio.system.hpp.
|
staticconstexpr |
Definition at line 708 of file sysio.system.hpp.