diff --git a/README.md b/README.md index 3aa8f977..f119428c 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ [![Based on TON][ton-svg]][ton] -![Coverage](https://img.shields.io/badge/Coverage-72.2%25-brightgreen) +![Coverage](https://img.shields.io/badge/Coverage-72.4%25-brightgreen) Golang library for interacting with TON blockchain. diff --git a/tlb/state-init.go b/tlb/state-init.go index 20e7056e..292e696e 100644 --- a/tlb/state-init.go +++ b/tlb/state-init.go @@ -13,7 +13,7 @@ type TickTock struct { type StateInit struct { Depth uint64 `tlb:"maybe ## 5"` - TickTock *TickTock `tlb:"maybe ^"` + TickTock *TickTock `tlb:"maybe ."` Code *cell.Cell `tlb:"maybe ^"` Data *cell.Cell `tlb:"maybe ^"` Lib *cell.Dictionary `tlb:"dict 256"` diff --git a/tlb/transaction.go b/tlb/transaction.go index 2884ec99..31807edc 100644 --- a/tlb/transaction.go +++ b/tlb/transaction.go @@ -53,18 +53,20 @@ func (t *Transaction) String() string { } } - if t.IO.In.MsgType == MsgTypeInternal { - in = t.IO.In.AsInternal().Amount.NanoTON() - } - var build string - if in.Cmp(big.NewInt(0)) != 0 { - intTx := t.IO.In.AsInternal() - build += fmt.Sprintf("LT: %d, In: %s TON, From %s", t.LT, FromNanoTON(in).TON(), intTx.SrcAddr) - comment := intTx.Comment() - if comment != "" { - build += ", Comment: " + comment + if t.IO.In != nil { + if t.IO.In.MsgType == MsgTypeInternal { + in = t.IO.In.AsInternal().Amount.NanoTON() + } + + if in.Cmp(big.NewInt(0)) != 0 { + intTx := t.IO.In.AsInternal() + build += fmt.Sprintf("LT: %d, In: %s TON, From %s", t.LT, FromNanoTON(in).TON(), intTx.SrcAddr) + comment := intTx.Comment() + if comment != "" { + build += ", Comment: " + comment + } } }