tonutils 0.6.0a1__py3-none-any.whl → 1.0.0a2__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- tonutils/contracts/__init__.py +22 -0
- tonutils/contracts/base.py +20 -7
- tonutils/contracts/codes.py +9 -1
- tonutils/contracts/jetton/__init__.py +25 -0
- tonutils/contracts/jetton/get_methods.py +74 -0
- tonutils/contracts/jetton/master.py +259 -0
- tonutils/contracts/jetton/wallet.py +75 -0
- tonutils/contracts/nft/__init__.py +6 -0
- tonutils/contracts/nft/collection.py +2 -3
- tonutils/contracts/wallet/base.py +6 -6
- tonutils/contracts/wallet/versions/hw.py +4 -4
- tonutils/protocols/contract.py +4 -1
- tonutils/protocols/wallet.py +1 -1
- tonutils/types/__init__.py +59 -23
- tonutils/types/contract.py +12 -0
- tonutils/types/messages.py +78 -33
- tonutils/types/opcodes.py +17 -5
- tonutils/types/params.py +1 -1
- tonutils/types/tlb/__init__.py +54 -19
- tonutils/types/tlb/content.py +3 -0
- tonutils/types/tlb/jetton.py +591 -0
- tonutils/types/tlb/nft.py +45 -36
- tonutils/utils/stack_codec.py +3 -1
- {tonutils-0.6.0a1.dist-info → tonutils-1.0.0a2.dist-info}/METADATA +3 -6
- {tonutils-0.6.0a1.dist-info → tonutils-1.0.0a2.dist-info}/RECORD +28 -23
- {tonutils-0.6.0a1.dist-info → tonutils-1.0.0a2.dist-info}/WHEEL +1 -1
- {tonutils-0.6.0a1.dist-info → tonutils-1.0.0a2.dist-info}/licenses/LICENSE +0 -0
- {tonutils-0.6.0a1.dist-info → tonutils-1.0.0a2.dist-info}/top_level.txt +0 -0
|
@@ -120,18 +120,18 @@ class WalletHighloadV3R1(
|
|
|
120
120
|
rest = self._build_msg_to_send(messages[msgs_per_pack:], params)
|
|
121
121
|
messages = messages[:msgs_per_pack] + [rest]
|
|
122
122
|
|
|
123
|
-
actions_cell,
|
|
123
|
+
actions_cell, amount = Cell.empty(), 0
|
|
124
124
|
for msg in messages:
|
|
125
125
|
action = OutActionSendMsg(msg)
|
|
126
126
|
action_cell = begin_cell()
|
|
127
127
|
action_cell.store_ref(actions_cell)
|
|
128
128
|
action_cell.store_cell(action.serialize())
|
|
129
129
|
actions_cell = action_cell.end_cell()
|
|
130
|
-
|
|
130
|
+
amount += msg.message.info.value.grams
|
|
131
131
|
|
|
132
|
-
|
|
132
|
+
amount = params.value_to_send if params.value_to_send is not None else amount
|
|
133
133
|
body = self._build_internal_transfer(actions_cell, params)
|
|
134
|
-
return build_internal_wallet_msg(self.address, params.send_mode,
|
|
134
|
+
return build_internal_wallet_msg(self.address, params.send_mode, amount, body)
|
|
135
135
|
|
|
136
136
|
async def _build_msg_cell(
|
|
137
137
|
self,
|
tonutils/protocols/contract.py
CHANGED
|
@@ -22,7 +22,10 @@ TContract = t.TypeVar("TContract")
|
|
|
22
22
|
class ContractProtocol(t.Protocol[D]):
|
|
23
23
|
_data_model: t.Type[D]
|
|
24
24
|
|
|
25
|
-
VERSION: t.ClassVar[BaseContractVersion]
|
|
25
|
+
VERSION: t.ClassVar[t.Union[BaseContractVersion, str]]
|
|
26
|
+
|
|
27
|
+
@classmethod
|
|
28
|
+
def get_default_code(cls) -> Cell: ...
|
|
26
29
|
|
|
27
30
|
@property
|
|
28
31
|
def client(self) -> ClientProtocol: ...
|
tonutils/protocols/wallet.py
CHANGED
|
@@ -85,7 +85,7 @@ class WalletProtocol(ContractProtocol, t.Protocol[D, C, P]):
|
|
|
85
85
|
async def transfer(
|
|
86
86
|
self: TWallet,
|
|
87
87
|
destination: AddressLike,
|
|
88
|
-
|
|
88
|
+
amount: int,
|
|
89
89
|
body: t.Optional[t.Union[Cell, str]] = None,
|
|
90
90
|
state_init: t.Optional[StateInit] = None,
|
|
91
91
|
send_mode: t.Optional[t.Union[SendMode, int]] = None,
|
tonutils/types/__init__.py
CHANGED
|
@@ -23,12 +23,14 @@ from .configs import (
|
|
|
23
23
|
WalletV5Config,
|
|
24
24
|
)
|
|
25
25
|
from .contract import (
|
|
26
|
+
BaseContractVersion,
|
|
26
27
|
ContractStateInfo,
|
|
27
28
|
ContractState,
|
|
28
|
-
|
|
29
|
-
|
|
29
|
+
JettonMasterVersion,
|
|
30
|
+
JettonWalletVersion,
|
|
30
31
|
NFTItemVersion,
|
|
31
32
|
NFTCollectionVersion,
|
|
33
|
+
WalletVersion,
|
|
32
34
|
)
|
|
33
35
|
from .keystructs import (
|
|
34
36
|
KeyLike,
|
|
@@ -62,23 +64,40 @@ from .stack import (
|
|
|
62
64
|
from .tlb import (
|
|
63
65
|
BaseContractData,
|
|
64
66
|
BaseWalletData,
|
|
67
|
+
ContentLike,
|
|
68
|
+
JettonBurnBody,
|
|
69
|
+
JettonDropAdminBody,
|
|
70
|
+
JettonChangeAdminBody,
|
|
71
|
+
JettonChangeContentBody,
|
|
72
|
+
JettonMintBody,
|
|
73
|
+
JettonMasterStandardData,
|
|
74
|
+
JettonMasterStablecoinData,
|
|
75
|
+
JettonInternalTransferBody,
|
|
76
|
+
JettonStandardChangeAdminBody,
|
|
77
|
+
JettonStandardChangeContentBody,
|
|
78
|
+
JettonStandardMintBody,
|
|
79
|
+
JettonTopUpBody,
|
|
80
|
+
JettonTransferBody,
|
|
81
|
+
JettonWalletStandardData,
|
|
82
|
+
JettonWalletStablecoinData,
|
|
83
|
+
JettonWalletStablecoinV2Data,
|
|
65
84
|
NFTCollectionContent,
|
|
66
85
|
NFTCollectionData,
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
86
|
+
NFTCollectionChangeContentBody,
|
|
87
|
+
NFTCollectionChangeOwnerBody,
|
|
88
|
+
NFTCollectionMintItemBody,
|
|
89
|
+
NFTCollectionBatchMintItemBody,
|
|
71
90
|
NFTItemEditableData,
|
|
72
|
-
|
|
91
|
+
NFTEditContentBody,
|
|
73
92
|
NFTItemEditableMintRef,
|
|
74
|
-
|
|
93
|
+
NFTTransferEditorshipBody,
|
|
75
94
|
NFTItemStandardData,
|
|
76
95
|
NFTItemStandardMintRef,
|
|
77
96
|
NFTItemSoulboundData,
|
|
78
|
-
|
|
79
|
-
|
|
97
|
+
NFTDestoryBody,
|
|
98
|
+
NFTRevokeBody,
|
|
80
99
|
NFTItemSoulboundMintRef,
|
|
81
|
-
|
|
100
|
+
NFTTransferBody,
|
|
82
101
|
EncryptedTextComment,
|
|
83
102
|
OffchainContent,
|
|
84
103
|
OffchainCommonContent,
|
|
@@ -99,7 +118,6 @@ from .tlb import (
|
|
|
99
118
|
WalletV5SubwalletID,
|
|
100
119
|
)
|
|
101
120
|
|
|
102
|
-
|
|
103
121
|
__all__ = [
|
|
104
122
|
"DEFAULT_SUBWALLET_ID",
|
|
105
123
|
"AddressLike",
|
|
@@ -112,7 +130,25 @@ __all__ = [
|
|
|
112
130
|
"BaseWalletParams",
|
|
113
131
|
"ContractStateInfo",
|
|
114
132
|
"ContractState",
|
|
133
|
+
"ContentLike",
|
|
115
134
|
"EncryptedTextComment",
|
|
135
|
+
"JettonBurnBody",
|
|
136
|
+
"JettonDropAdminBody",
|
|
137
|
+
"JettonChangeAdminBody",
|
|
138
|
+
"JettonChangeContentBody",
|
|
139
|
+
"JettonMintBody",
|
|
140
|
+
"JettonMasterStandardData",
|
|
141
|
+
"JettonMasterStablecoinData",
|
|
142
|
+
"JettonInternalTransferBody",
|
|
143
|
+
"JettonStandardChangeAdminBody",
|
|
144
|
+
"JettonStandardChangeContentBody",
|
|
145
|
+
"JettonStandardMintBody",
|
|
146
|
+
"JettonTopUpBody",
|
|
147
|
+
"JettonTransferBody",
|
|
148
|
+
"JettonWalletStandardData",
|
|
149
|
+
"JettonWalletStablecoinData",
|
|
150
|
+
"JettonWalletStablecoinV2Data",
|
|
151
|
+
"JettonWalletVersion",
|
|
116
152
|
"MetadataPrefix",
|
|
117
153
|
"NetworkGlobalID",
|
|
118
154
|
"NFTCollectionVersion",
|
|
@@ -120,21 +156,21 @@ __all__ = [
|
|
|
120
156
|
"NumberLike",
|
|
121
157
|
"NFTCollectionContent",
|
|
122
158
|
"NFTCollectionData",
|
|
123
|
-
"
|
|
124
|
-
"
|
|
125
|
-
"
|
|
126
|
-
"
|
|
159
|
+
"NFTCollectionChangeContentBody",
|
|
160
|
+
"NFTCollectionChangeOwnerBody",
|
|
161
|
+
"NFTCollectionMintItemBody",
|
|
162
|
+
"NFTCollectionBatchMintItemBody",
|
|
127
163
|
"NFTItemEditableData",
|
|
128
|
-
"
|
|
164
|
+
"NFTEditContentBody",
|
|
129
165
|
"NFTItemEditableMintRef",
|
|
130
|
-
"
|
|
166
|
+
"NFTTransferEditorshipBody",
|
|
131
167
|
"NFTItemStandardData",
|
|
132
168
|
"NFTItemStandardMintRef",
|
|
133
169
|
"NFTItemSoulboundData",
|
|
134
|
-
"
|
|
135
|
-
"
|
|
170
|
+
"NFTDestoryBody",
|
|
171
|
+
"NFTRevokeBody",
|
|
136
172
|
"NFTItemSoulboundMintRef",
|
|
137
|
-
"
|
|
173
|
+
"NFTTransferBody",
|
|
138
174
|
"OffchainContent",
|
|
139
175
|
"OffchainCommonContent",
|
|
140
176
|
"OffchainItemContent",
|
|
@@ -181,7 +217,7 @@ __all__ = [
|
|
|
181
217
|
"WalletV5Config",
|
|
182
218
|
"WalletV5Data",
|
|
183
219
|
"WalletV5Params",
|
|
184
|
-
"WorkchainID",
|
|
185
|
-
"WalletVersion",
|
|
186
220
|
"WalletV5SubwalletID",
|
|
221
|
+
"WalletVersion",
|
|
222
|
+
"WorkchainID",
|
|
187
223
|
]
|
tonutils/types/contract.py
CHANGED
|
@@ -77,3 +77,15 @@ class NFTItemVersion(BaseContractVersion):
|
|
|
77
77
|
class NFTItemSingleVersion(BaseContractVersion):
|
|
78
78
|
NFTItemEditableSingle = "nft_item_editable_single"
|
|
79
79
|
NFTItemSoulboundSingle = "nft_item_soulbound_single"
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
class JettonMasterVersion(BaseContractVersion):
|
|
83
|
+
JettonMasterStandard = "jetton_master_standard"
|
|
84
|
+
JettonMasterStablecoin = "jetton_master_stablecoin"
|
|
85
|
+
JettonMasterStablecoinV2 = "jetton_master_stablecoin_v2"
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
class JettonWalletVersion(BaseContractVersion):
|
|
89
|
+
JettonWalletStandard = "jetton_wallet_standard"
|
|
90
|
+
JettonWalletStablecoin = "jetton_wallet_stablecoin"
|
|
91
|
+
JettonWalletStablecoinV2 = "jetton_wallet_stablecoin_v2"
|
tonutils/types/messages.py
CHANGED
|
@@ -9,15 +9,17 @@ from pytoniq_core import (
|
|
|
9
9
|
)
|
|
10
10
|
|
|
11
11
|
from ..types.common import AddressLike, SendMode
|
|
12
|
+
from ..types.tlb.jetton import JettonTransferBody
|
|
13
|
+
from ..types.tlb.nft import NFTTransferBody
|
|
12
14
|
from ..types.tlb.text import TextComment
|
|
13
15
|
from ..utils.value_utils import to_nano
|
|
14
16
|
|
|
15
17
|
if t.TYPE_CHECKING:
|
|
16
18
|
from ..protocols import WalletProtocol
|
|
17
19
|
|
|
18
|
-
|
|
20
|
+
Wallet = WalletProtocol
|
|
19
21
|
else:
|
|
20
|
-
|
|
22
|
+
Wallet = t.Any
|
|
21
23
|
|
|
22
24
|
|
|
23
25
|
class BaseTransferMessage(abc.ABC):
|
|
@@ -25,28 +27,30 @@ class BaseTransferMessage(abc.ABC):
|
|
|
25
27
|
@abc.abstractmethod
|
|
26
28
|
async def to_wallet_msg(
|
|
27
29
|
self,
|
|
28
|
-
wallet:
|
|
30
|
+
wallet: Wallet,
|
|
29
31
|
) -> WalletMessage: ...
|
|
30
32
|
|
|
33
|
+
def __repr__(self) -> str:
|
|
34
|
+
parts = " ".join(f"{k}: {v!r}" for k, v in vars(self).items())
|
|
35
|
+
return f"< {self.__class__.__name__} {parts} >"
|
|
36
|
+
|
|
31
37
|
|
|
32
38
|
class TransferMessage(BaseTransferMessage):
|
|
33
39
|
|
|
34
40
|
def __init__(
|
|
35
41
|
self,
|
|
36
42
|
destination: AddressLike,
|
|
37
|
-
|
|
43
|
+
amount: int,
|
|
38
44
|
body: t.Optional[t.Union[Cell, str]] = None,
|
|
39
45
|
state_init: t.Optional[StateInit] = None,
|
|
40
46
|
send_mode: t.Optional[t.Union[SendMode, int]] = None,
|
|
41
47
|
bounce: t.Optional[bool] = None,
|
|
42
48
|
) -> None:
|
|
43
|
-
if isinstance(destination, str):
|
|
44
|
-
destination = Address(destination)
|
|
45
49
|
if isinstance(body, str):
|
|
46
50
|
body = TextComment(body).serialize()
|
|
47
51
|
|
|
48
52
|
self.destination = destination
|
|
49
|
-
self.
|
|
53
|
+
self.amount = amount
|
|
50
54
|
self.body = body
|
|
51
55
|
self.state_init = state_init
|
|
52
56
|
self.send_mode = send_mode
|
|
@@ -54,13 +58,13 @@ class TransferMessage(BaseTransferMessage):
|
|
|
54
58
|
|
|
55
59
|
async def to_wallet_msg(
|
|
56
60
|
self,
|
|
57
|
-
wallet:
|
|
61
|
+
wallet: Wallet,
|
|
58
62
|
) -> WalletMessage:
|
|
59
63
|
from ..utils.msg_builders import build_internal_wallet_msg
|
|
60
64
|
|
|
61
65
|
return build_internal_wallet_msg(
|
|
62
66
|
dest=self.destination,
|
|
63
|
-
value=self.
|
|
67
|
+
value=self.amount,
|
|
64
68
|
body=self.body,
|
|
65
69
|
state_init=self.state_init,
|
|
66
70
|
send_mode=self.send_mode,
|
|
@@ -75,31 +79,46 @@ class TransferNFTMessage(BaseTransferMessage):
|
|
|
75
79
|
destination: AddressLike,
|
|
76
80
|
nft_address: AddressLike,
|
|
77
81
|
response_address: t.Optional[AddressLike] = None,
|
|
82
|
+
custom_payload: t.Optional[t.Union[Cell]] = None,
|
|
83
|
+
forward_amount: int = 1,
|
|
78
84
|
forward_payload: t.Optional[t.Union[Cell, str]] = None,
|
|
79
|
-
|
|
80
|
-
value: t.Union[int, float] = to_nano(0.05),
|
|
85
|
+
total_amount: int = to_nano(0.05),
|
|
81
86
|
send_mode: t.Optional[t.Union[SendMode, int]] = None,
|
|
82
87
|
bounce: t.Optional[bool] = None,
|
|
83
88
|
) -> None:
|
|
84
|
-
if isinstance(nft_address, str):
|
|
85
|
-
nft_address = Address(nft_address)
|
|
86
89
|
if isinstance(forward_payload, str):
|
|
87
90
|
forward_payload = TextComment(forward_payload).serialize()
|
|
88
91
|
|
|
89
|
-
self.
|
|
92
|
+
self.destination_address = destination
|
|
90
93
|
self.nft_address = nft_address
|
|
91
94
|
self.response_address = response_address
|
|
92
|
-
self.
|
|
95
|
+
self.custom_payload = custom_payload
|
|
93
96
|
self.forward_amount = forward_amount
|
|
94
|
-
self.
|
|
97
|
+
self.forward_payload = forward_payload
|
|
98
|
+
self.total_amount = total_amount
|
|
95
99
|
self.send_mode = send_mode
|
|
96
100
|
self.bounce = bounce
|
|
97
101
|
|
|
98
102
|
async def to_wallet_msg(
|
|
99
103
|
self,
|
|
100
|
-
wallet:
|
|
104
|
+
wallet: Wallet,
|
|
101
105
|
) -> WalletMessage:
|
|
102
|
-
|
|
106
|
+
from ..utils.msg_builders import build_internal_wallet_msg
|
|
107
|
+
|
|
108
|
+
body = NFTTransferBody(
|
|
109
|
+
destination_address=self.destination_address,
|
|
110
|
+
response_address=self.response_address or wallet.address,
|
|
111
|
+
custom_payload=self.custom_payload,
|
|
112
|
+
forward_amount=self.forward_amount,
|
|
113
|
+
forward_payload=self.forward_payload,
|
|
114
|
+
)
|
|
115
|
+
return build_internal_wallet_msg(
|
|
116
|
+
dest=self.nft_address,
|
|
117
|
+
send_mode=self.send_mode,
|
|
118
|
+
value=self.total_amount,
|
|
119
|
+
body=body.serialize(),
|
|
120
|
+
bounce=self.bounce,
|
|
121
|
+
)
|
|
103
122
|
|
|
104
123
|
|
|
105
124
|
class TransferJettonMessage(BaseTransferMessage):
|
|
@@ -107,36 +126,62 @@ class TransferJettonMessage(BaseTransferMessage):
|
|
|
107
126
|
def __init__(
|
|
108
127
|
self,
|
|
109
128
|
destination: AddressLike,
|
|
129
|
+
jetton_amount: int,
|
|
110
130
|
jetton_master_address: AddressLike,
|
|
111
|
-
jetton_amount: t.Union[int, float],
|
|
112
|
-
jetton_decimals: int = 9,
|
|
113
131
|
jetton_wallet_address: t.Optional[AddressLike] = None,
|
|
132
|
+
response_address: t.Optional[AddressLike] = None,
|
|
133
|
+
custom_payload: t.Optional[Cell] = None,
|
|
134
|
+
forward_amount: int = 1,
|
|
114
135
|
forward_payload: t.Optional[t.Union[Cell, str]] = None,
|
|
115
|
-
|
|
116
|
-
value: t.Union[int, float] = to_nano(0.05),
|
|
136
|
+
total_amount: int = to_nano(0.05),
|
|
117
137
|
send_mode: t.Optional[t.Union[SendMode, int]] = None,
|
|
118
138
|
bounce: t.Optional[bool] = None,
|
|
119
139
|
) -> None:
|
|
120
|
-
if isinstance(jetton_master_address, str):
|
|
121
|
-
jetton_master_address = Address(jetton_master_address)
|
|
122
|
-
if isinstance(jetton_wallet_address, str):
|
|
123
|
-
jetton_wallet_address = Address(jetton_wallet_address)
|
|
124
140
|
if isinstance(forward_payload, str):
|
|
125
141
|
forward_payload = TextComment(forward_payload).serialize()
|
|
126
142
|
|
|
127
|
-
self.
|
|
128
|
-
self.jetton_master_address = jetton_master_address
|
|
143
|
+
self.destination_address = destination
|
|
129
144
|
self.jetton_amount = jetton_amount
|
|
130
|
-
self.
|
|
145
|
+
self.jetton_master_address = jetton_master_address
|
|
131
146
|
self.jetton_wallet_address = jetton_wallet_address
|
|
132
|
-
self.
|
|
147
|
+
self.response_address = response_address
|
|
148
|
+
self.custom_payload = custom_payload
|
|
133
149
|
self.forward_amount = forward_amount
|
|
134
|
-
self.
|
|
150
|
+
self.forward_payload = forward_payload
|
|
151
|
+
self.total_amount = total_amount
|
|
135
152
|
self.send_mode = send_mode
|
|
136
153
|
self.bounce = bounce
|
|
137
154
|
|
|
155
|
+
async def _get_jetton_wallet_address(self, wallet: Wallet) -> Address:
|
|
156
|
+
from ..contracts import JettonMasterGetMethods
|
|
157
|
+
|
|
158
|
+
return await JettonMasterGetMethods.get_wallet_address(
|
|
159
|
+
client=wallet.client,
|
|
160
|
+
address=self.jetton_master_address,
|
|
161
|
+
owner_address=wallet.address,
|
|
162
|
+
)
|
|
163
|
+
|
|
138
164
|
async def to_wallet_msg(
|
|
139
165
|
self,
|
|
140
|
-
wallet:
|
|
166
|
+
wallet: Wallet,
|
|
141
167
|
) -> WalletMessage:
|
|
142
|
-
|
|
168
|
+
from ..utils.msg_builders import build_internal_wallet_msg
|
|
169
|
+
|
|
170
|
+
if self.jetton_wallet_address is None:
|
|
171
|
+
self.jetton_wallet_address = await self._get_jetton_wallet_address(wallet)
|
|
172
|
+
|
|
173
|
+
body = JettonTransferBody(
|
|
174
|
+
jetton_amount=self.jetton_amount,
|
|
175
|
+
destination_address=self.destination_address,
|
|
176
|
+
response_address=self.response_address or wallet.address,
|
|
177
|
+
custom_payload=self.custom_payload,
|
|
178
|
+
forward_amount=self.forward_amount,
|
|
179
|
+
forward_payload=self.forward_payload,
|
|
180
|
+
)
|
|
181
|
+
return build_internal_wallet_msg(
|
|
182
|
+
dest=self.jetton_wallet_address,
|
|
183
|
+
send_mode=self.send_mode,
|
|
184
|
+
value=self.total_amount,
|
|
185
|
+
body=body.serialize(),
|
|
186
|
+
bounce=self.bounce,
|
|
187
|
+
)
|
tonutils/types/opcodes.py
CHANGED
|
@@ -8,8 +8,20 @@ class OpCode(int, Enum):
|
|
|
8
8
|
OUT_ACTION_SEND_MSG = 0x0EC3C86D
|
|
9
9
|
INTERNAL_TRANSFER = 0xAE42E5A4
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
11
|
+
NFT_TRANSFER = 0x5FCC3D14
|
|
12
|
+
NFT_EDIT_CONTENT = 0x1A0B9D51
|
|
13
|
+
NFT_TRANSFER_EDITORSHIP = 0x1C04412A
|
|
14
|
+
NFT_DESTORY = 0x1F04537A
|
|
15
|
+
NFT_REVOKE = 0x6F89F5E3
|
|
16
|
+
|
|
17
|
+
JETTON_TRANSFER = 0xF8A7EA5
|
|
18
|
+
JETTON_INTERNAL_TRANSFER = 0x178D4519
|
|
19
|
+
JETTON_BURN = 0x595F07BC
|
|
20
|
+
JETTON_PROVIDE_WALLET_ADDRESS = 0x2C76B973
|
|
21
|
+
JETTON_MINT = 0x642B7D07
|
|
22
|
+
JETTON_CHANGE_ADMIN = 0x6501F354
|
|
23
|
+
JETTON_CLAIM_ADMIN = 0xFB88E119
|
|
24
|
+
JETTON_DROP_ADMIN = 0x7431F221
|
|
25
|
+
JETTON_UPGRADE = 0x2508D66A
|
|
26
|
+
JETTON_TOP_UP = 0xD372158C
|
|
27
|
+
JETTON_CHANGE_METADATA_URI = 0xCB862902
|
tonutils/types/params.py
CHANGED
|
@@ -74,7 +74,7 @@ class WalletHighloadV3Params(BaseWalletParams):
|
|
|
74
74
|
|
|
75
75
|
def __post_init__(self) -> None:
|
|
76
76
|
if self.created_at is None:
|
|
77
|
-
self.created_at = int(time.time() -
|
|
77
|
+
self.created_at = int(time.time() - 60)
|
|
78
78
|
if self.query_id is None:
|
|
79
79
|
self.query_id = (self.created_at % (1 << 23)) & 0xFFFFFFFF
|
|
80
80
|
|
tonutils/types/tlb/__init__.py
CHANGED
|
@@ -1,27 +1,46 @@
|
|
|
1
1
|
from .content import (
|
|
2
|
+
ContentLike,
|
|
2
3
|
OffchainContent,
|
|
3
4
|
OnchainContent,
|
|
4
5
|
)
|
|
5
6
|
from .contract import BaseContractData
|
|
7
|
+
from .jetton import (
|
|
8
|
+
JettonBurnBody,
|
|
9
|
+
JettonDropAdminBody,
|
|
10
|
+
JettonChangeAdminBody,
|
|
11
|
+
JettonChangeContentBody,
|
|
12
|
+
JettonMintBody,
|
|
13
|
+
JettonMasterStandardData,
|
|
14
|
+
JettonMasterStablecoinData,
|
|
15
|
+
JettonInternalTransferBody,
|
|
16
|
+
JettonStandardChangeAdminBody,
|
|
17
|
+
JettonStandardChangeContentBody,
|
|
18
|
+
JettonStandardMintBody,
|
|
19
|
+
JettonTopUpBody,
|
|
20
|
+
JettonTransferBody,
|
|
21
|
+
JettonWalletStandardData,
|
|
22
|
+
JettonWalletStablecoinData,
|
|
23
|
+
JettonWalletStablecoinV2Data,
|
|
24
|
+
)
|
|
6
25
|
from .msg import OutActionSendMsg
|
|
7
26
|
from .nft import (
|
|
8
27
|
NFTCollectionContent,
|
|
9
28
|
NFTCollectionData,
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
29
|
+
NFTCollectionChangeContentBody,
|
|
30
|
+
NFTCollectionChangeOwnerBody,
|
|
31
|
+
NFTCollectionMintItemBody,
|
|
32
|
+
NFTCollectionBatchMintItemBody,
|
|
14
33
|
NFTItemEditableData,
|
|
15
|
-
|
|
34
|
+
NFTEditContentBody,
|
|
16
35
|
NFTItemEditableMintRef,
|
|
17
|
-
|
|
36
|
+
NFTTransferEditorshipBody,
|
|
18
37
|
NFTItemStandardData,
|
|
19
38
|
NFTItemStandardMintRef,
|
|
20
39
|
NFTItemSoulboundData,
|
|
21
|
-
|
|
22
|
-
|
|
40
|
+
NFTDestoryBody,
|
|
41
|
+
NFTRevokeBody,
|
|
23
42
|
NFTItemSoulboundMintRef,
|
|
24
|
-
|
|
43
|
+
NFTTransferBody,
|
|
25
44
|
OffchainContent,
|
|
26
45
|
OffchainCommonContent,
|
|
27
46
|
OffchainItemContent,
|
|
@@ -48,25 +67,41 @@ from .wallet import (
|
|
|
48
67
|
__all__ = [
|
|
49
68
|
"BaseContractData",
|
|
50
69
|
"BaseWalletData",
|
|
51
|
-
"
|
|
70
|
+
"ContentLike",
|
|
52
71
|
"EncryptedTextComment",
|
|
72
|
+
"JettonBurnBody",
|
|
73
|
+
"JettonDropAdminBody",
|
|
74
|
+
"JettonChangeAdminBody",
|
|
75
|
+
"JettonChangeContentBody",
|
|
76
|
+
"JettonMintBody",
|
|
77
|
+
"JettonMasterStandardData",
|
|
78
|
+
"JettonMasterStablecoinData",
|
|
79
|
+
"JettonInternalTransferBody",
|
|
80
|
+
"JettonStandardChangeAdminBody",
|
|
81
|
+
"JettonStandardChangeContentBody",
|
|
82
|
+
"JettonStandardMintBody",
|
|
83
|
+
"JettonTopUpBody",
|
|
84
|
+
"JettonTransferBody",
|
|
85
|
+
"JettonWalletStandardData",
|
|
86
|
+
"JettonWalletStablecoinData",
|
|
87
|
+
"JettonWalletStablecoinV2Data",
|
|
53
88
|
"NFTCollectionContent",
|
|
54
89
|
"NFTCollectionData",
|
|
55
|
-
"
|
|
56
|
-
"
|
|
57
|
-
"
|
|
58
|
-
"
|
|
90
|
+
"NFTCollectionChangeContentBody",
|
|
91
|
+
"NFTCollectionChangeOwnerBody",
|
|
92
|
+
"NFTCollectionMintItemBody",
|
|
93
|
+
"NFTCollectionBatchMintItemBody",
|
|
59
94
|
"NFTItemEditableData",
|
|
60
|
-
"
|
|
95
|
+
"NFTEditContentBody",
|
|
61
96
|
"NFTItemEditableMintRef",
|
|
62
|
-
"
|
|
97
|
+
"NFTTransferEditorshipBody",
|
|
63
98
|
"NFTItemStandardData",
|
|
64
99
|
"NFTItemStandardMintRef",
|
|
65
100
|
"NFTItemSoulboundData",
|
|
66
|
-
"
|
|
67
|
-
"
|
|
101
|
+
"NFTDestoryBody",
|
|
102
|
+
"NFTRevokeBody",
|
|
68
103
|
"NFTItemSoulboundMintRef",
|
|
69
|
-
"
|
|
104
|
+
"NFTTransferBody",
|
|
70
105
|
"OffchainContent",
|
|
71
106
|
"OffchainCommonContent",
|
|
72
107
|
"OffchainItemContent",
|