Hi! I am getting this specific error when I am trying to send ton to an address on testnet
error: 'LITE_SERVER_UNKNOWN: cannot apply external message to current state : Failed to unpack account state'
Kindly, someone help me understand what I am doing wrong
Oct 19, 2022, 12:00 PM
I have added 2 Ton from testnet bot in both the sender and receiver accounts
Oct 19, 2022, 12:03 PM
Have you deployed that contracts?
Oct 19, 2022, 12:36 PM
I created both of my wallets from https://wallet.ton.org/?testnet=true.
So, I assumed that they are already deployed on the testnet automatically. For creating tonweb instance, I am using https://testnet.toncenter.com/api/v2/jsonRPC
So, I assumed that they are already deployed on the testnet automatically. For creating tonweb instance, I am using https://testnet.toncenter.com/api/v2/jsonRPC
Oct 19, 2022, 12:49 PM
Wallets are not automatically deployed - their code is unknown until the wallet receives StateInit - usually that happens with an external message asking to transfer TON to some other address.
Oct 19, 2022, 12:51 PM
I have this in the testnet block explorer. It is not active
Could you guide me to the documentation to deploy it?
Oct 19, 2022, 12:58 PM
I don't remember well, but you could try await wallet.deploy();
Oct 19, 2022, 12:59 PM
You may just send any trancation from it via wallet interface
Oct 19, 2022, 12:59 PM
Alright
Thanks
I wasn't able to get it working but it's alright. I just wanted to check how to get hash for my transaction. From what I understand, this way, I will able to get the last transaction hash. Am I correct?
const transaction = await tonweb.getTransactions(address, 1)[0];
const hash = transaction.transaction_id.hash
const transaction = await tonweb.getTransactions(address, 1)[0];
const hash = transaction.transaction_id.hash
Oct 19, 2022, 1:28 PM
Seems like it. But you should remember that only by using address, hash and lt you can uniquely identify a transaction in TON.
Oct 19, 2022, 4:37 PM