Open Tynik opened 4 years ago
Hi. I have same issue. I suppose an external message have a wrong signature. I think have some kind of message status would be really useful.
+1 I've spend the most time on debugging external initializion message cause there is no way to see what is going on. What I've found at this point:
StateInit
should match the account address, mentioned in the pdfMessage X
body should contain valid data as in_msg
slice
I use such test for vaildating that case, where code
is my scm
dup constant code
-1 0x1111111111111111111111111111111111111111111111111111111111111111 2constant addr
"./tests/test.pk" load-generate-keypair constant wallet_pk constant public_key
<b 0 32 u, public_key B, 0 3 u, b> constant data
<b b{001} s, code ref, b{1} s, data ref, b{0} s, b> constant state_init
<b 0 32 u, b> constant seqno
seqno hash wallet_pk ed25519_sign_uint constant signing_bin
// stack.push_int(balance.grams); 0 // stack.push_int(msg_balance_remaining.grams); 0 // stack.push_cell(in_msg); <b b{1000100} s, addr addr, 0 Gram, b{11} s, state_init ref, // body:(Either X ^X) b{0} s, 0 32 u, signing_bin B, seqno <s s, // THIS IS SECTION OF MESSAGE X BODY b> // stack.push_cellslice(in_msg_body); <b 0 32 u, signing_bin B, seqno <s s, b> <s // COPY OF MESSAGE X BODY // stack.push_bool(in_msg_extern); -1 code <s data runvm drop .s 0 <> { 1 halt } if
What I haven't found in the pdfs
The behavior has naming as Tentative execution and covered in TON.pdf#2.4.6
@JIoJIaJIu hello! Thank you for the possible option to run code in VM from fift, I did not think so)
Hello! Where could I see the list of errors or why a smart contract was not inited if even it has Grams and an external message was successfully sent, but smart contract has
state:account_uninit
(address 0f_bzFaKdHtV8mTEB_4JcR-ZAyufXk4e9zWeibQtHHcksbSg) The following commands which I used:I assume that the external message is not correct, but is there a way to see more detailed errors?