Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [deferred-transactions]

The tag has no usage guidance.

1
vote
1answer
26 views

error: no type named 'transaction' in namespace 'eosio'

During the tutorial on https://developers.eos.io/eosio-home/docs at the last step (step 2.9, the section about deferred transactions) when trying to compile the code, I get this error: [*** ...
0
votes
0answers
22 views

How to retry every single action().send()?

I have a simple contract that at some point pays its users: void dice::pay( name to, asset quantity, string memo ) { action( permission_level{ _self, "active"_n }, "acornaccount"_n, "...
1
vote
1answer
33 views

How to add nonce to generated (deferred) transcation

Using cleos -f adds a context_fee_action to the TX like so: "context_free_actions": [{ "account": "eosio.null", "name": "nonce", "authorization": [], "data": "...
0
votes
0answers
16 views

Only id of deferred transaction is stored in block

It seems block only contains the id of deferred transaction. If I start a node from a snapshot, how can the node know the content of a deferred tx which is created before the snapshot?
2
votes
0answers
45 views

Where are deferred transaction errors logged to?

I'm trying to learn about deferred transactions. I'm creating a bogus deferred transaction that invokes a non-existent action "fakeaction": transaction out{}; out.actions.emplace_back(...
0
votes
1answer
122 views

Authorisation failure with deferred transaction

I have a contract action that does some cleanup: void token::cleanup() { ... } that I want to run asynchronously from another action like this: schedule("cleanup", 10). my scheduling method looks ...
0
votes
1answer
54 views

delay_sec is not accurate for deferred transaction

I have set some seconds but sometimes it is delayed more than 10 minutes. I know that delay_sec is not the accurate time because of the block production mechanism. The real time is much later than it ...
1
vote
1answer
45 views

Can a deferred transaction make the initial transaction fail

Imagine a user sending me some eosio.token to my contract and when I receive the notification, I start a new deferred transaction that fails later. Can the deferred transaction make the initial ...
2
votes
2answers
253 views

How to find out if deferred transaction was executed

In the developer portal it says: Deferred actions get scheduled to run, at best, at a later time, at the producer's discretion. There is no guarantee that a deferred action will be executed. How ...
1
vote
0answers
54 views

How can I provide multiple currency support in my EOS smart contract

Can we transfer other crypto currencies which are based on different blockchains lets say bitcoin, litecoin, neo or ether, using the EOS smart contract. I heard that there is gonna be feature to ...
1
vote
1answer
274 views

How do permissions on deferred transactions work?

I'm playing around with deferred transactions and encountered an oddity. Say, we have a contract deployed on contract, and an account account. contract has contract@eosio.code as part of its active ...
0
votes
0answers
99 views

How to know whether a deferred transaction has been executed or not?

I am curious about the execution of a deferred transaction. Let's say if I wanna see the current status of a deferred transaction whether it has been executed or not, how will I know that from ...
5
votes
1answer
130 views

How to tell if a transaction was initiated by account or contract code

My goal is to get a list of account names of human users of a dApp, from the output of cleos get actions <dApp account name> -j Is there any way to determine, from a transaction's initial ...
3
votes
1answer
67 views

Is is possible to defer a non abi action using a abi action?

I know we can defer a action in EOS, I invoke a non-abi action from an abi action like this: eosio::transaction txn{}; txn.actions.emplace_back( eosio::permission_level(owner, N(active)), N(...
4
votes
2answers
163 views

Is it advisable to use global variable in smart contract?

I know we can use global variable in our smart contract. So, How can I make sure that nobody can access my global variable.
1
vote
1answer
194 views

Is it possible to see a list of deferred transactions

How can I access a list of deferred transactions on the chain? Is there a command in cleos for this and can it be used to filter for results from individual accounts?
3
votes
1answer
304 views

How to use the onerror event?

If a deferred transaction fails for whatever reason, it triggers an onerror event, which can be captured as follows: void apply_onerror(const onerror& error ) { print("What can I do with this?\...
2
votes
1answer
115 views

Addition overflow when doing delegatebw in contract

So I wanted to do delegatebw in my contract as a deferred transaction: eosio::transaction out; out.actions.emplace_back(eosio::permission_level{_self, N(active) }, N(eosio), N(delegatebw), std::...
6
votes
1answer
244 views

Can you create a deferred transaction with cleos?

I want to create a deferred transaction that can be executed using cleos, is this possible? If so, how?
4
votes
2answers
337 views

Can we set the deferred transaction for the delay more than the maximum delay?

According to the genesis block file. The maximum delay for a deferred transaction is 3888000. "max_transaction_delay": 3888000, Can we have a way around to deferred a transaction more than this ...
3
votes
1answer
651 views

How to transfer EOS after a particular delay?

I know that there is a concept called deferred transaction but how can I use this concept in transferring the EOS to another account. The scenario is: I need to transfer certain amount of coins ...
2
votes
1answer
249 views

What's the maximum delay for a deferred transaction

I know that deferred transactions can just be dropped by the nodes if they are too far in the future, but I wonder what the maximum delay for a deferred transaction is in practice on the mainnet. I ...
5
votes
1answer
579 views

How can I cancel the deferred transaction in EOS after we push the deferred transaction in the blockchain

I have a action which execute the deferred transaction . Let I send the delay of 20 days . If I want to cancel the deferred transaction before 20 days . Is there any way I can do this ? This is my ...
2
votes
1answer
161 views

whose permission is required while sending transaction and how can we give that permission

I have two accounts viz. account1 and account2. I set my contract using account2. Now, I am sending 0.1100 EOS from account2 to account1 as a deferred transaction. I am using the following function ...
2
votes
1answer
210 views

Set a contract containing deferred transaction from front-end

I am trying to figure out the way to set contract which has deferred transactions at run time from front-end. Is it even doable? Any suggestions would be appreciated.
1
vote
1answer
298 views

How can create a deferred action which is executing at specific interval

#include <eosiolib/eosio.hpp> #include <eosiolib/transaction.hpp> #include <lib/user.h> using namespace eosio; using namespace user; class hello : public eosio::contract { public: ...
4
votes
1answer
274 views

What is sender_id param in send_deferred function?

I tried to implement repeated execution of particular action and set this param as _self of calling contract, but the transaction gets executed only once in this case. Then i tried to set it as time() ...
12
votes
1answer
2k views

How can I create a deferred transaction?

Are there any examples online for where I can see some examples of deferred transactions being created?