I want to create a deferred transaction that can be executed using cleos, is this possible? If so, how?

  • I tried using cleos push transaction with a modified json file. It got processed by cleos but it never did show up in the blockchain... Aug 21, 2018 at 23:49

1 Answer 1


Update 19th September: v1.3.0 added a --delay-sec flag to cleos push action so you can now set a delay for your action from cleos directly.

I can't see anything in programs/cleos/main.cpp that would allow this directly.

The only way that I can think of to do this via cleos is to push an action to a contract that allows you to send deferred transactions; example:

$ cleos push action account send '["from", "to", "10.0000 EOS", "memo", 50]' -p from

And account::send can be something as follows (copied from an answer I made somewhere else):

void account::send(account_name from, account_name to, asset amount, string memo, uint64_t delay) { 
    eosio::transaction t{};
        eosio::permission_level(from, N(active)), // with `from@active` permission
        N(eosio.token), // You're sending this to `eosio.token`
        N(transfer),   // to their `transfer` action
        std::make_tuple(from, to, amount, memo));  // with the appropriate args
    t.delay_sec = delay; // Set the delay
    t.send(eosio::string_to_name(memo.c_str()), from); // Send the transaction with some ID derived from the memo

Set permissions

 $ cleos set account permission <sender-account> active '{"threshold": 1,"keys": [{"key": "<sender-pubkey>","weight": 1}],"accounts": [{"permission":{"actor":"<contract-account>","permission":"eosio.code"},"weight":1}]}' owner -p <sender-account>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.