Comments (7)
Hi, wallet already has method SendManyGetInMsgHash
, it will return message hash immediately after sending. Wallet also has FindTransactionByInMsgHash
method, with allows you to wait confirmation by msg hash.
If you want to get message hash for manual external message sending you could do like that:
msg := &tlb.ExternalMessage{
DstAddr: addr,
Body: data,
}
hash := msg.Body.Hash()
api.SendExternalMessage(ctx, msg)
from tonutils-go.
Oh, that's interesting, thank you for clarification, will try your approach.
from tonutils-go.
Hey there!
Unfortunately, we found out that this approach doesn't work well in some cases.
It works well for withdrawals confirmation, but we can't use it for "move to hot" actions with contract destruction, because we don't provide any amount and it's calculated on the node side.
I'm wondering if sendMessageReturnHash could help with such issues by providing hash calculated by node for further confirmation checks.
from tonutils-go.
Hey, have you tried to use 128 + 32 send mode with 0 in amount? I think msg hash should match for that
from tonutils-go.
We are doing exactly this, but no hashes are matching, is there any chance that for V3R1 hashes should be calculated differently?
from tonutils-go.
No, hashes for v3r1 should be same, i will check this case later
from tonutils-go.
I researched this case and did some tests. The problem is actually not with message hash, but with account destruction (32 msg mode). When account is destroyed - liteserver drops account's transaction history, so we cannot find transaction. LS is doing it because after next activation, transaction chain cannot be proven using list transactions, each transaction should have reference on previous one, but destroying is breaking this chain.
So the solution is simple, just use 128 without + 32, then account keeps active without balance for some time and will be frozen automatically later.
from tonutils-go.
Related Issues (20)
- always get "Transfer err:failed to get account state: adnl request timeout, node 185.86.79.9:4701",why this happen? HOT 3
- Support wallet V3R1 HOT 8
- Send jetton with comment HOT 4
- Optimize raptorq/discmath package and cover with tests HOT 2
- Add new real world usage examples
- wallet.SendWaitTransaction deploys the contract instead of sending the transaction HOT 1
- Fix policy ProofCheckPolicyFast with multiple existing shards HOT 2
- parse Tact map HOT 2
- GetBalance Error HOT 3
- "Failed to parse payload: recursive reference of cells" on "cell.FromBOC" call HOT 2
- failed to check proof: should have 2 roots HOT 4
- How do we get user wallet from this backend ? HOT 4
- User-friendly to Raw adress conversion/comparison HOT 5
- invalid seed check HOT 5
- how to parse jetton transaction to get jetton token amount and comment? HOT 6
- how can i get one transcation info by hash? HOT 3
- i only want use GetTransaction method get one transcation by address+lt,please give me use this method demo.thank you HOT 5
- Accessing validator-engine-console with ADNL client HOT 3
- ListTransactions() always fail with -400 error HOT 1
- How to transfer jettons from subwallets using highload wallet? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tonutils-go.