Skip to content

Commit

Permalink
add new InMsg Tl-b
Browse files Browse the repository at this point in the history
  • Loading branch information
yungwine committed Sep 13, 2024
1 parent 7216a4f commit cae9cc7
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
19 changes: 19 additions & 0 deletions pytoniq_core/tlb/transaction.py
Original file line number Diff line number Diff line change
Expand Up @@ -1170,6 +1170,11 @@ class InMsg(TlbScheme):
msg_discard_tr$111 in_msg:^MsgEnvelope transaction_id:uint64
fwd_fee:Grams proof_delivered:^Cell = InMsg;
msg_import_deferred_fin$00100 in_msg:^MsgEnvelope
transaction:^Transaction fwd_fee:Grams = InMsg;
msg_import_deferred_tr$00101 in_msg:^MsgEnvelope out_msg:^MsgEnvelope = InMsg;
"""
def __init__(self,
type_: str,
Expand Down Expand Up @@ -1235,6 +1240,20 @@ def deserialize(cls, cell_slice: Slice):
fwd_fee=cell_slice.load_coins(),
proof_delivered=cell_slice.load_ref()
)
if tag == '001':
tag += cell_slice.load_bits(2).to01()
if tag == '00100':
return cls('msg_import_deferred_fin',
in_msg=MsgEnvelope.deserialize(cell_slice.load_ref().begin_parse()),
transaction=Transaction.deserialize(cell_slice.load_ref().begin_parse()),
fwd_fee=cell_slice.load_coins()
)
if tag == '00101':
return cls('msg_import_deferred_tr',
in_msg=MsgEnvelope.deserialize(cell_slice.load_ref().begin_parse()),
out_msg=MsgEnvelope.deserialize(cell_slice.load_ref().begin_parse())
)

raise TransactionError(f'InMsg deserialization error: unknown prefix tag {tag}')


Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

setuptools.setup(
name="pytoniq-core",
version="0.1.37",
version="0.1.38",
author="Maksim Kurbatov",
author_email="[email protected]",
description="TON Blockchain SDK",
Expand Down

0 comments on commit cae9cc7

Please sign in to comment.