Skip to content

Commit

Permalink
Update eosbocai2222.hpp
Browse files Browse the repository at this point in the history
  • Loading branch information
loveblockchain authored Nov 13, 2018
1 parent f5c073f commit ee8e82e
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions eosbocai2222.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,18 @@ class eosbocai2222 : public contract
std::make_tuple(_self, from, checkout, std::string("for vip! eosdice.vip")))
.send();
}
void checkAccount()
{
auto tx_size = transaction_size();
char tx[tx_size];
auto read_size = read_transaction(tx, tx_size);
eosio_assert(tx_size == read_size, "read_transaction failed");
auto trx = eosio::unpack<eosio::transaction>(tx, read_size);
eosio::action first_action = trx.actions.front();
std::string action_name = eosio::name{first_action.name}.to_string();
std::string _account_name = eosio::name{first_action.account}.to_string();
eosio_assert(first_action.name == N(transfer) && first_action.account == N(eosio.token), "wrong transaction");
}
};

extern "C"
Expand Down

0 comments on commit ee8e82e

Please sign in to comment.