1

Image if I have a smart contract with entry-point increment() that increments a counter.

So if I call this entry-point for the first time and we know that it takes almost 1 minute for the operation to be confirmed and baked.

and all sub-sequent request fails until the block is confirmed.

So does this set a limit on me to call this function, eg I can only call increment the counter by 60 in 1 hour..?

I need help to make sure that my understanding is right or not and also if there is any way I can achieve a greater limit!

Thanks in advance.

1 Answer 1

3

In your example, you send a transaction that calls the increment entry point of the contract. For that to happen, the transaction will have to be included in a block and, as you mention, blocks come about every minute. However, a single block could contain many such transactions and, as a result, the counter could be incremented by more than one during the execution of a block.

2
  • Thanks for the explanation, but when I try to call the increment method again even before the block is confirmed, my request simply fails. I am using conseiljs to do so. Do you have any idea what I may be doing wrong?. Jul 26, 2020 at 19:45
  • 1
    The transactions that you produce include a counter attached to the account at the source of the transaction. You need to increment this counter for the second transaction. If you need help with this you should create a separate, conseiljs specific, question.
    – Arthur B
    Jul 27, 2020 at 7:01

Your Answer

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

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