eosio.system.cpp 967 字节
Newer Older
1 2
#include "eosio.system.hpp"
#include <eosiolib/dispatcher.hpp>
3

4 5 6
#include "delegate_bandwidth.cpp"
#include "producer_pay.cpp"
#include "voting.cpp"
7

D
Daniel Larimer 已提交
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
system_contract::system_contract( account_name s )
:native(s),
 _voters(_self,_self),
 _producers(_self,_self),
 _global(_self,_self)
{
   _gstate = _global.exists() ? _global.get() : get_default_parameters();
}

system_contract::~system_contract() {
   _global.set( _gstate, _self );
   eosio_exit(0);
}


23
EOSIO_ABI( eosiosystem::system_contract,
D
Daniel Larimer 已提交
24 25 26 27 28 29 30 31 32 33 34 35 36 37 38
     (setparams)
     // delegate_bandwith.cpp
     (delegatebw)(undelegatebw)(refund)
     (buyram)(sellram)
     (regproxy)
     // voting.cpp
     (unregproxy)(regproducer)(unregprod)(voteproducer)
     // producer_pay.cpp
     (claimrewards)
     // native.hpp
     //XXX
     (onblock)
     (newaccount)(updateauth)(deleteauth)(linkauth)(unlinkauth)(postrecovery)(passrecovery)(vetorecovery)(onerror)(canceldelay)
     // defined in eosio.system.hpp
     (nonce)
39
)