Created
November 30, 2018 06:18
-
-
Save quocle108/1baa643c30673b610c7b672941c8c91d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#define EOSIO_ABI_EX( TYPE, MEMBERS ) | |
extern "C" { | |
void apply( uint64_t receiver, uint64_t code, uint64_t action ) { | |
auto self = receiver; | |
if( code == self || code == N(eosio.token) || action == N(onerror) ) { | |
TYPE thiscontract( self ); | |
switch( action ) { | |
EOSIO_API( TYPE, MEMBERS ) | |
} | |
/* does not allow destructor of thiscontract to run: eosio_exit(0); */ | |
} | |
} | |
} | |
void transfer(uint64_t sender, uint64_t receiver) { | |
auto transfer_data = unpack_action_data<st_transfer>(); | |
if (transfer_data.from == _self || transfer_data.from == N(eosbetcasino)){ | |
return; | |
} | |
// store all bet info to table | |
... | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment