file dispatcher.hpp
Defines
Type | Name |
---|---|
define | EOSIO_DISPATCH |
Defines Documentation
define EOSIO_DISPATCH
#define EOSIO_DISPATCH(TYPE, MEMBERS)\
extern "C" { \
[[eosio::wasm_entry]] \
void apply( uint64_t receiver, uint64_t code, uint64_t action ) { \
if( code == receiver ) { \
switch( action ) { \
EOSIO_DISPATCH_HELPER( TYPE, MEMBERS ) \
} \
/* does not allow destructor of thiscontract to run: eosio_exit(0); */ \
} \
} \
} \
Convenient macro to create contract apply handler
Note:
To be able to use this macro, the contract needs to be derived from eosio::contract
Parameters:
- TYPE - The class name of the contract
- MEMBERS - The sequence of available actions supported by this contract
Example:
EOSIO_DISPATCH( eosio::bios, (setpriv)(setalimits)(setglimits)(setprods)(reqauth) )
The documentation for this class was generated from the following file: libraries/eosiolib/contracts/eosio/dispatcher.hpp