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
### Keybase proof | |
I hereby claim: | |
* I am epicdistraction on github. | |
* I am epicdistraction (https://keybase.io/epicdistraction) on keybase. | |
* I have a public key ASCyvQvaPHMXZc-VrERvgr2dDSbhPy-5_ataao1xsgV46go | |
To claim this, I am signing this object: |
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
Users.hpp | |
#include <eosiolib/eosio.hpp> | |
#include <eosiolib/print.hpp> | |
#include <string> | |
#include <vector> | |
namespace hodlong { | |
using namespace eosio; | |
using std::string; |
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
namespace bpfish { | |
ACTION hodlong::transfer(const name from,const name to, asset quantity, string memo) { | |
// use explicit naming due to code originating from eosio.token::transfer | |
if (from == contract_name || to != contract_name) | |
return; | |
require_auth(from); | |
users transfer_users(contract_name, contract_name.value); | |
auto iterator = transfer_users.find(from.value); | |
eosio_assert(iterator != transfer_users.end(), "User account does not exist"); |
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
transaction deferredTrans{}; | |
deferredTrans.actions.emplace_back( | |
action({_self, N(xfer)}, | |
N(eosio.token), N(transfer), | |
std::make_tuple(_self, to_act, quantity, final_memo) | |
) | |
); | |
deferredTrans.delay_sec = TRANSFER_DELAY; |
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
transaction deferredTrans{}; | |
deferredTrans.actions.emplace_back( | |
action({_self, "removefunds"_n)}, | |
"eosio.token"_n), "transfer"_n, | |
std::make_tuple(_self, to_act, quantity, final_memo) | |
) | |
); | |
deferredTrans.delay_sec = TRANSFER_DELAY; |