From fa4e5f1292decbc5462fe9a876b75d559db2802d Mon Sep 17 00:00:00 2001 From: "aleksej.paschenko" Date: Fri, 27 Sep 2024 13:50:31 +0300 Subject: [PATCH] Add state init to jetton transfer --- contract/jetton/jetton.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/contract/jetton/jetton.go b/contract/jetton/jetton.go index f93377a5..6e3b4b23 100644 --- a/contract/jetton/jetton.go +++ b/contract/jetton/jetton.go @@ -36,6 +36,7 @@ type TransferMessage struct { ForwardTonAmount tlb.Grams ForwardPayload *boc.Cell CustomPayload *boc.Cell + StateInit *tlb.StateInit } func (tm TransferMessage) ToInternal() (tlb.Message, uint8, error) { @@ -73,6 +74,14 @@ func (tm TransferMessage) ToInternal() (tlb.Message, uint8, error) { Mode: wallet.DefaultMessageMode, Body: c, } + if tm.StateInit != nil { + if tm.StateInit.Code.Exists { + m.Code = &tm.StateInit.Code.Value.Value + } + if tm.StateInit.Data.Exists { + m.Data = &tm.StateInit.Data.Value.Value + } + } return m.ToInternal() }