Skip to content

Instantly share code, notes, and snippets.

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;
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;
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");
Users.hpp
#include <eosiolib/eosio.hpp>
#include <eosiolib/print.hpp>
#include <string>
#include <vector>
namespace hodlong {
using namespace eosio;
using std::string;
### 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: