I've been trying to reuse a wallet deleted by DESTROY_ACCOUNT_IF_ZERO (32) flag. The way I do the transfer:
Imagine we have 2 wallets: A and B.
We transfer N1 TON from A to B. E.g. by using a web-based wallet, script, doesn't matter.
B is uninitialized - it is not on the blockchain yet. With that in mind, we'd like to send all the money from B back to A. For this we're going to use the attached script.
Now we go ahead and transfer N2 TON from A to Bagain. Doesn't matter how much.
Expected behavior: we get transactions: A->B (N1), B->A (all), A->B (N2); wallet B has N2 TONs in the end.
Actual behavior: we get transactions A->B (N1), B->A (all), A->B (N2), B->A (all); wallet B has 0 TONs in the end.
The script for B->A (all) transfer, which causes this behavior:
The strange thing is: if you send A->B (N) again, it will create a new transfer B->A (all) again and again automatically. Sometimes it stops at 2 repeats, sometimes at 4.
I use the unbounceable address: UQAPqRlewultl8xHCKGsrenb4PZaQ0QDfPYoK1fwVUODdZRd.
I also tried sending TON from wallet C (C->B). And the money DID stay on B. BUT once I made a transfer A->B again, all the money including the TONs sent from C went to A automatically!
An example of this bug's manifestation (is it a bug??) is here:
This is B wallet. Only the first message with "test bug" text was sent by the script. The rest of them were sent automatically on any incoming transfer from A.
In this interaction:
A is UQAPqRlewultl8xHCKGsrenb4PZaQ0QDfPYoK1fwVUODdZRd
B is EQAySjlsHUY2EEedO5GTenzFvAnR5E-4ptwfeox6OZYnNvGF
C is UQBwpXsIVrij8UQ2OpPK2EyeVBrlN6mnOkmThb3k6K-UHZyL
I want to understand, why this happens. Is this intended by TON blockchain developers? Is this not a bug? How to go around this and reuse deleted wallets?
I've been trying to reuse a wallet deleted by
DESTROY_ACCOUNT_IF_ZERO
(32) flag. The way I do the transfer:Imagine we have 2 wallets: A and B.
We transfer
N1
TON fromA
toB
. E.g. by using a web-based wallet, script, doesn't matter.B
is uninitialized - it is not on the blockchain yet. With that in mind, we'd like to send all the money fromB
back toA
. For this we're going to use the attached script.Now we go ahead and transfer
N2
TON fromA
toB
again. Doesn't matter how much.Expected behavior: we get transactions:
A->B (N1)
,B->A (all)
,A->B (N2)
; walletB
hasN2
TONs in the end.Actual behavior: we get transactions
A->B (N1)
,B->A (all)
,A->B (N2)
,B->A (all)
; walletB
has0
TONs in the end.The script for
B->A (all)
transfer, which causes this behavior:The strange thing is: if you send
A->B (N)
again, it will create a new transferB->A (all)
again and again automatically. Sometimes it stops at 2 repeats, sometimes at 4.I use the unbounceable address:
UQAPqRlewultl8xHCKGsrenb4PZaQ0QDfPYoK1fwVUODdZRd
.I also tried sending TON from wallet
C
(C->B
). And the money DID stay onB
. BUT once I made a transferA->B
again, all the money including the TONs sent fromC
went toA
automatically!An example of this bug's manifestation (is it a bug??) is here:
https://tonviewer.com/EQAySjlsHUY2EEedO5GTenzFvAnR5E-4ptwfeox6OZYnNvGF
This is
B
wallet. Only the first message with "test bug" text was sent by the script. The rest of them were sent automatically on any incoming transfer fromA
.In this interaction:
A
isUQAPqRlewultl8xHCKGsrenb4PZaQ0QDfPYoK1fwVUODdZRd
B
isEQAySjlsHUY2EEedO5GTenzFvAnR5E-4ptwfeox6OZYnNvGF
C
isUQBwpXsIVrij8UQ2OpPK2EyeVBrlN6mnOkmThb3k6K-UHZyL
I want to understand, why this happens. Is this intended by TON blockchain developers? Is this not a bug? How to go around this and reuse deleted wallets?
Answer
No answer found
Original