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
Why the TonCenter API works with error here?

https://toncenter.com/api/v2/getTransactions?address=UQCzwxqIw1pt41DND9pgGfAOhJKtQQEgjVcpn0rHxv-4b8Ob&limit=1&lt=23481826000001&hash=OBInamdujxrUx%2Fqebnhix%2FAL%2BWEgQaSEssZrGgLhAZo%3D&to_lt=0&archival=true
/getTransactions method above returns me 1 transaction with utime 1638465564

https://toncenter.com/api/v2/lookupBlock?workchain=-1&shard=-9223372036854775808&unixtime=1638465564
/lookupBlock method above points me to the block number 16512830

https://toncenter.com/api/v2/getBlockTransactions?workchain=-1&shard=-9223372036854775808&seqno=16512830
/getBlockTransactions for block number 16512830 returns me several transactions, but no one has the same logical time as initial given to /getTransactions method. Is it expected behavior or I am missing something? What is "count" parameter of /getBlockTransactions? It seems it doesn't have effect at all.

This question was imported from Telegram Chat:https://t.me/tondev_eng/1371

  
  
Posted one year ago
Votes Newest

Answers


It looks like the initial transaction requested through /getTransactions is not in the masterchain (workchain=-1). You can try using /getBlockTransactions to look for the transaction in the basechain (workchain=0).

First, use /lookupBlock to find the block number corresponding to the transaction's Unix time, and then use /getBlockTransactions to search for the transaction in the block with the corresponding sequence number in each shard.

In the specific case mentioned, the transaction was found in the basechain (workchain=0, shard=-9223372036854775808, seqno=21407484). It's worth noting that the masterchain and basechain are separate blockchains within the TON ecosystem, and not all transactions will be in the masterchain.

Additionally, regarding the question of why there is only one shard in the masterchain for any seqno, this is because the masterchain only has one shard, whereas the basechain has multiple shards.

1
1
Posted one year ago
12K Views
1 Answer
one year ago
one year ago
Tags