1

I am using @taquito/taquito.

To transfer tezos tokens from one address to another is am using below function.

Tezos.contract.transfer({
              to: toAddress,
              amount: amountToSend,
            });

I need to do continuous transaction. I am getting the error "counter is already used. need to increase the counter from my next transaction". I don't want to batch the transaction. I need to make individual transactions with waiting for previous transaction to complete.

I tried increasing the counter manually like

Tezos.contract.transfer({
              to: toAddress,
              amount: amountToSend,
              counter
            });

But it is not working. How can I increase the counter in taquito?

1 Answer 1

0

You can make one transaction per block from an account.

This means you need to wait for your operation to complete before sending your next operation.

If you wait for op.confirmation(1) to resolve, you can then make a new transaction. Taquito will get the latest counter from the chain, so you don't need to set it manually.

2
  • For simple payments (tezos.contract.transfer), a random counter (taken from a large space of numbers) does the job. For contracts, I think you have no other option than continuously switching accounts (new InMemory signer) when you want to send multiple transactions in a block. Aug 17, 2020 at 11:06
  • 2
    Is the one-transaction-per-account-per-block limitation because of the Taquito library, or is it a limitation of the Tezos blockchain itself?
    – damian
    Oct 4, 2021 at 7:58

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.