Skip to content

Commit

Permalink
int fix
Browse files Browse the repository at this point in the history
  • Loading branch information
akos-tk committed Sep 26, 2024
1 parent 61cf1e6 commit 3a23954
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 4 deletions.
17 changes: 13 additions & 4 deletions tlb/integers.go
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
package tlb
// Code autogenerated. DO NOT EDIT.

// Code autogenerated. DO NOT EDIT.

import (
"encoding/hex"
"fmt"
"math/big"
"strings"
"strconv"
"strings"

"github.com/tonkeeper/tongo/boc"
)

type VarUInteger1 big.Int

func (u VarUInteger1) MarshalTLB(c *boc.Cell, encoder *Encoder) error {
Expand Down Expand Up @@ -5943,6 +5944,9 @@ func (u Int128) MarshalTLB(c *boc.Cell, encoder *Encoder) error {

func (u *Int128) UnmarshalTLB(c *boc.Cell, decoder *Decoder) error {
v, err := c.ReadBigInt(128)
if err != nil {
return err
}
*u = Int128(*v)
return err
}
Expand Down Expand Up @@ -6010,6 +6014,9 @@ func (u Int256) MarshalTLB(c *boc.Cell, encoder *Encoder) error {

func (u *Int256) UnmarshalTLB(c *boc.Cell, decoder *Decoder) error {
v, err := c.ReadBigInt(256)
if err != nil {
return err
}
*u = Int256(*v)
return err
}
Expand Down Expand Up @@ -6077,6 +6084,9 @@ func (u Int257) MarshalTLB(c *boc.Cell, encoder *Encoder) error {

func (u *Int257) UnmarshalTLB(c *boc.Cell, decoder *Decoder) error {
v, err := c.ReadBigInt(257)
if err != nil {
return err
}
*u = Int257(*v)
return err
}
Expand Down Expand Up @@ -6309,4 +6319,3 @@ func (u Bits512) Equal(other any) bool {
}
return u == otherBits
}

3 changes: 3 additions & 0 deletions tlb/parser/builtin_generator.go
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,9 @@ func (u Int{{.NameIndex}}) MarshalTLB(c *boc.Cell, encoder *Encoder) error {
func (u *Int{{.NameIndex}}) UnmarshalTLB(c *boc.Cell, decoder *Decoder) error {
v, err := c.ReadBigInt({{.NameIndex}})
if err != nil {
return err
}
*u = Int{{.NameIndex}}(*v)
return err
}
Expand Down

0 comments on commit 3a23954

Please sign in to comment.