Wire Sysio Wire Sysion 1.0.0
Loading...
Searching...
No Matches
sysio.bios.cpp
Go to the documentation of this file.
2
3namespace sysiobios {
4
5void bios::setabi( name account, const std::vector<char>& abi ) {
6 abi_hash_table table(get_self(), get_self().value);
7 auto itr = table.find( account.value );
8 if( itr == table.end() ) {
9 table.emplace( account, [&]( auto& row ) {
10 row.owner = account;
11 row.hash = sysio::sha256(const_cast<char*>(abi.data()), abi.size());
12 });
13 } else {
14 table.modify( itr, sysio::same_payer, [&]( auto& row ) {
15 row.hash = sysio::sha256(const_cast<char*>(abi.data()), abi.size());
16 });
17 }
18}
19
20void bios::onerror( ignore<uint128_t>, ignore<std::vector<char>> ) {
21 check( false, "the onerror action cannot be called directly" );
22}
23
24void bios::setpriv( name account, uint8_t is_priv ) {
25 require_auth( get_self() );
26 set_privileged( account, is_priv );
27}
28
29void bios::setalimits( name account, int64_t ram_bytes, int64_t net_weight, int64_t cpu_weight ) {
30 require_auth( get_self() );
31 set_resource_limits( account, ram_bytes, net_weight, cpu_weight );
32}
33
34void bios::setprods( const std::vector<sysio::producer_authority>& schedule ) {
35 require_auth( get_self() );
36 set_proposed_producers( schedule );
37}
38
39void bios::setparams( const sysio::blockchain_parameters& params ) {
40 require_auth( get_self() );
41 set_blockchain_parameters( params );
42}
43
44void bios::reqauth( name from ) {
45 require_auth( from );
46}
47
48void bios::activate( const sysio::checksum256& feature_digest ) {
49 require_auth( get_self() );
50 preactivate_feature( feature_digest );
51}
52
53void bios::reqactivated( const sysio::checksum256& feature_digest ) {
54 check( is_feature_activated( feature_digest ), "protocol feature is not activated" );
55}
56
57}
void setparams(const sysio::blockchain_parameters &params)
void reqauth(name from)
void setalimits(name account, int64_t ram_bytes, int64_t net_weight, int64_t cpu_weight)
void reqactivated(const sysio::checksum256 &feature_digest)
void setpriv(name account, uint8_t is_priv)
void setprods(const std::vector< sysio::producer_authority > &schedule)
void onerror(ignore< uint128_t > sender_id, ignore< std::vector< char > > sent_trx)
void activate(const sysio::checksum256 &feature_digest)
void setabi(name account, const std::vector< char > &abi)
Definition sysio.bios.cpp:5
sysio::multi_index< "abihash"_n, abi_hash > abi_hash_table
#define value
Definition pkcs11.h:157
signed __int64 int64_t
Definition stdint.h:135
unsigned char uint8_t
Definition stdint.h:124
Immutable except for fc::from_variant.
Definition name.hpp:43
account_query_db::get_accounts_by_authorizers_params params