xssnick / tonutils-go

TON SDK Library in pure Golang for interacting with The Open Network ecosystem using native protocols, such as ADNL, RLDP and etc.
Apache License 2.0
409 stars 83 forks source link

Send jetton with comment failed #212

Open angelinazf opened 3 weeks ago

angelinazf commented 3 weeks ago

Hi, when i send jetton without comment, it will do success, but when i add comment as payloadForward, the Jetton Notify tx always failed. Follow is my code

    commentCell, err := wallet.CreateCommentCell(comment)
    if err != nil {
        return
    }
    transferPayload, err := tokenWallet.BuildTransferPayloadV2(toAddr, wal.WalletAddress(), amount, minTon, commentCell, nil)
    if err != nil {
        return
    }
    msg := wallet.SimpleMessageAutoBounce(tokenWallet.Address(), jettonTxFee, transferPayload)
    tx, block, err := wal.SendWaitTransaction(c, msg)

The tx is https://tonviewer.com/transaction/1ff4e7ae87f9903114d4b41d1de900a07465742166ce827283aa158495651f6d.

You can see the OpCode of 0x7362d09c(Jetton Notify) failed

But when i call without commentCell, it will success like this one:

https://tonviewer.com/transaction/30775d9c4f9770901dd493e3704859884f54c1757ce98a156a290e7f2b0495f5.

Please help me, thanks.

xssnick commented 3 weeks ago

Hi, https://tonviewer.com/UQBI9Odp3N7iL-C1SJ-zrBLjCPeWQk8BO4nGkNXjUa3z5H-A seems unititialized (not deployed), so transaction fails because compute phase skipped