Examples: query, "exact match", wildcard*, wild?ard, wild*rd
Fuzzy search: cake~ (finds cakes, bake)
Term boost: "red velvet"^4, chocolate^2
Field grouping: tags:(+work -"fun-stuff")
Escape special characters +-&|!(){}[]^"~*?:\ - e.g. \+ \* \!
Range search: properties.timestamp:[1587729413488 TO *] (inclusive), properties.title:{A TO Z}(excluding A and Z)
Combinations: chocolate AND vanilla, chocolate OR vanilla, (chocolate OR vanilla) NOT "vanilla pudding"
Field search: properties.title:"The Title" AND text
Answered
What delay to set for the transaction to finish?

I have a wallet that has a jetton in it but no TON coins, so I can't send the jetton from it. I want to send a bit of TON to the wallet and after that send the jetton from it. If I make both these transactions programmatically, what delay should I set between them to be sure that the first transaction has passed and the wallet has received the money before the second transaction will try to use it?


This question was imported from Telegram Chat: https://t.me/tondev/113034

  
  
Posted 12 months ago
Votes Newest

Answers


In order to ensure that the first transaction has been processed and the wallet has received the TON coins before attempting to send the jetton, you should wait for a confirmation of the first transaction.

The amount of time it takes for a transaction to be confirmed can vary depending on factors such as network congestion and transaction fees. Generally, you should wait for at least one confirmation, which typically takes around 1-2 minutes on the TON network.

When sending the TON coins programmatically, you can include a callback or use a library that waits for the transaction to be confirmed before proceeding with the second transaction. This will ensure that the second transaction is only sent once the wallet has received the TON coins.

It's also important to note that API rate limits may apply when sending transactions programmatically. You should check the documentation for the API you're using to determine the appropriate rate limit and adjust your code accordingly to avoid being banned. For example, using the "https://testnet.toncenter.com/api/v2/jsonRPC", you could send a transaction about once every 10 seconds without exceeding the API rate limit.

1
1
wiki
Posted 12 months ago