"I want to ask, how can I retrieve the current block number? Am I using the wrong interface? Or do I have a misunderstanding of the concept? How is it possible for a transaction's block number to be much greater than the current block number of the blockchain?"
Nov 1, 2023, 4:19 AM
https://docs.tonconsole.com/tonapi/api-v2
Nov 1, 2023, 4:38 AM
thank you
Is there any code in the tonutils-go example that only obtains transaction information based on hash?
Nov 1, 2023, 5:30 AM
Tonutils-go can't get transaction based on hash because it just provide access to liteserver and liteserver require account+Lt+hash for getting tx
Nov 1, 2023, 5:51 AM
How do I parse this address? It is inconsistent with the address I sent. It should be a format problem.
Nov 1, 2023, 6:06 AM
https://ton.org/address/
https://docs.ton.org/learn/overviews/addresses
https://docs.ton.org/learn/overviews/addresses
Nov 1, 2023, 6:09 AM
thank you
Does golang sdk have this method to resolve addresses?
Nov 1, 2023, 7:16 AM
it's not resolve. just converting between different forms
Nov 1, 2023, 7:19 AM
{
"workchain_id": -1,
"shard": "8000000000000000",
"seqno": 14141188,
"block": "(0,8000000000000000,14490693)",
the first work chain id is -1 while the second is 0
"workchain_id": -1,
"shard": "8000000000000000",
"seqno": 14141188,
"block": "(0,8000000000000000,14490693)",
the first work chain id is -1 while the second is 0
but why?
https://testnet.tonapi.io/v2/blockchain/masterchain-head
https://testnet.tonapi.io/v2/blockchain/transactions/fc5833bfacfce678905eb29bdeafa1c8d7c75ae2fb286c6691d9d7a663dc75a8
my request is both use the https://testnet.tonapi.io/v2
https://testnet.tonapi.io/v2/blockchain/transactions/fc5833bfacfce678905eb29bdeafa1c8d7c75ae2fb286c6691d9d7a663dc75a8
my request is both use the https://testnet.tonapi.io/v2
the mainnet is:
https://tonapi.io/v2/blockchain/masterchain-head
"workchain_id": -1,
"shard": "8000000000000000",
"seqno": 33818779,
the testnet is:
https://testnet.tonapi.io/v2/blockchain/masterchain-head
"workchain_id": -1,
"shard": "8000000000000000",
"seqno": 14141394,
but why?
"workchain_id": -1,
"shard": "8000000000000000",
"seqno": 33818779,
the testnet is:
https://testnet.tonapi.io/v2/blockchain/masterchain-head
"workchain_id": -1,
"shard": "8000000000000000",
"seqno": 14141394,
but why?
I mean the testnet should be workchai_id = 0.
Nov 1, 2023, 7:40 AM
because you should read about ton architecture
mainnet and testnet are not workchains. both mainnet and testnet has masterchain and basechain inside
masterchain it something like beacon chain in ethereum
Nov 1, 2023, 7:42 AM
Okay, thank you. I admit that I didn't understand the document because it's in English, and I'm not very proficient in reading English. Moreover, translation tools often don't provide accurate translations. Maybe I should dedicate some time to read the document more thoroughly.
Nov 1, 2023, 7:45 AM
https://testnet.tonapi.io/v2/blockchain/transactions
This is the url to query hash records
https://toncenter.com/api/v2/packAddress
This is the url that parses the user address
https://ton-blockchain.github.io/testnet-global.config.json
This is to submit the transaction
Is there a unified url address? ? very messy
This is the url to query hash records
https://toncenter.com/api/v2/packAddress
This is the url that parses the user address
https://ton-blockchain.github.io/testnet-global.config.json
This is to submit the transaction
Is there a unified url address? ? very messy
Nov 1, 2023, 7:45 AM
Testnet.tonapi.io can submit transaction
And parsing URL is better to make locally because it just a base64 <-> hex conversion
Every ton library can do it
Nov 1, 2023, 7:49 AM
Is this how it is handled? The result is incorrect. Please give me some advice.
Nov 1, 2023, 8:03 AM
https://github.com/tonkeeper/tongo/blob/master/ton/account.go#L56
or here - https://github.com/xssnick/tonutils-go/blob/a7f4ad3fdb53556b4d9084216e408c05ffaf0bed/address/addr.go#L90
Nov 1, 2023, 8:06 AM
Thank you so much I wish you all the best and good health
Nov 1, 2023, 8:18 AM
good health in my ages is a good wish so thank you
Nov 1, 2023, 8:19 AM
Ha ha
Nov 1, 2023, 8:20 AM
aha sorry "I just reported an error, but I realized there was no error, so I'm retracting my message."
Nov 1, 2023, 9:24 AM
How do I determine if an address bounces?
Is this field based on ihr_disabled?
Is this field based on ihr_disabled?
Nov 1, 2023, 9:32 AM
Next line after “ihr disabled”: bounce:
Nov 1, 2023, 9:37 AM
https://github.com/awesome-doge/TON_Paper/blob/main/zh_ton.pdf
Try this
Try this
Nov 1, 2023, 9:38 AM
This should be true, but according to what you said, it is false
Nov 1, 2023, 9:38 AM
Its message bounces, not address. Address bounce flag is used to indicate desired value for message
Yes, it’s false. Why you think it must be true?
Nov 1, 2023, 9:39 AM
I need a prefix to resolve the address. How do I get it?
Nov 1, 2023, 9:41 AM
Here is address formatting. Previous screen was transaction detail. I guess you are trying to solve some problem but asking about some other problems, so I don’t understand the problem
Nov 1, 2023, 9:43 AM
The previous problem was that I obtained the transaction information based on the hash, then obtained the from and to users, and parsed them out. However, when parsing, I needed to determine the bounce to determine the prefix.
Nov 1, 2023, 9:44 AM
You want to “restore” original address string?
Nov 1, 2023, 9:45 AM
yes
I need to determine the bounce value based on the field in the transaction record information. Do you know?
Nov 1, 2023, 9:47 AM
It’s “impossible” in general. User provided his address as string in some form (bounceable/not). Some program used that address and made a message. Program may set bounce flag explicitly, so flag in tx is not required to be equal to “original”
Form of address (bounce/not) is just a visual representation. Both resolves to same raw address.
Nov 1, 2023, 9:49 AM
https://testnet.toncenter.com/api/v2/#/accounts/pack_address_packAddress_get
This interface is correct, how does it judge?
This interface is correct, how does it judge?
Nov 1, 2023, 9:49 AM
With recent improvement devs agreed to show user wallet addresses as unbounceable and “non-user” smartcontract addresses as bounceable
(Detailed link is in Tonkeeper / tonviewwer / … top of screen part)
I guess it looks to “type” (smartcontract code / hash), but not sure
Nov 1, 2023, 9:53 AM
can you help me?
Thank you for your reply
I should have judged based on the prefix.
I have sent you a private message with my problem. My friend, I hope you can help me. Thank you very much.
Nov 2, 2023, 3:11 AM