You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/// Creates message that will transfer jettons from source to destination.
140
+
/// Creates body cell that should be used to transfer jettons from source to destination.
141
141
/// </summary>
142
-
/// <param name="sourceJettonAddress">Jetton wallet address to send coins from (use <see cref="GetWalletAddress">GetWalletAddress</see> if needed).</param>
/// <param name="amount">Amount of transferred jettons <b>in elementary units</b>.</param>
145
144
/// <param name="destination">Address of the new owner of the jettons (user main-wallet address, not his jetton address).</param>
146
145
/// <param name="responseDestination">Address where to send a response with confirmation of a successful transfer and the rest of the incoming message Toncoins.</param>
147
146
/// <param name="customPayload">Optional custom data (which is used by either sender or receiver jetton wallet for inner logic).</param>
148
147
/// <param name="forwardTonAmount">The amount of nanotons to be sent to the destination address.</param>
149
148
/// <param name="forwardPayload">Optional custom data that should be sent to the destination address.</param>
150
-
/// <returns>Constructed and ready-to-be-sent Message (by editor/owner of <paramref name="sourceJettonAddress"/>).</returns>
149
+
/// <returns>Constructed Cell (body of message to send).</returns>
151
150
/// <remarks>
152
151
/// <para>Your Jetton wallet address must already be deployed and active, and contain enough jettons to send.</para>
153
152
/// </remarks>
154
153
/// <seealso href="https://github.com/ton-blockchain/TEPs/blob/master/text/0074-jettons-standard.md#1-transfer">Transfer message in TEP</seealso>
155
-
publicMessageCreateTransferMessage(
156
-
stringsourceJettonAddress,
154
+
publicCellCreateTransferCell(
157
155
ulongqueryId,
158
156
BigIntegeramount,
159
157
stringdestination,
@@ -162,7 +160,7 @@ public Message CreateTransferMessage(
162
160
decimalforwardTonAmount,
163
161
Cell?forwardPayload)
164
162
{
165
-
varbody=newCellBuilder()
163
+
returnnewCellBuilder()
166
164
.StoreUInt(OPTransfer)
167
165
.StoreULong(queryId)
168
166
.StoreCoins(amount)
@@ -171,48 +169,98 @@ public Message CreateTransferMessage(
/// Creates message that will transfer jettons from source to destination.
177
+
/// </summary>
178
+
/// <param name="sourceJettonAddress">Jetton wallet address to send coins from (use <see cref="GetWalletAddress">GetWalletAddress</see> if needed).</param>
/// <param name="amount">Amount of transferred jettons <b>in elementary units</b>.</param>
181
+
/// <param name="destination">Address of the new owner of the jettons (user main-wallet address, not his jetton address).</param>
182
+
/// <param name="responseDestination">Address where to send a response with confirmation of a successful transfer and the rest of the incoming message Toncoins.</param>
183
+
/// <param name="customPayload">Optional custom data (which is used by either sender or receiver jetton wallet for inner logic).</param>
184
+
/// <param name="forwardTonAmount">The amount of nanotons to be sent to the destination address.</param>
185
+
/// <param name="forwardPayload">Optional custom data that should be sent to the destination address.</param>
186
+
/// <returns>Constructed and ready-to-be-sent Message (by editor/owner of <paramref name="sourceJettonAddress"/>).</returns>
187
+
/// <remarks>
188
+
/// <para>Your Jetton wallet address must already be deployed and active, and contain enough jettons to send.</para>
189
+
/// </remarks>
190
+
/// <seealso href="https://github.com/ton-blockchain/TEPs/blob/master/text/0074-jettons-standard.md#1-transfer">Transfer message in TEP</seealso>
/// Creates message that will burn specified amount of jettons.
212
+
/// Creates body cell that should be used to burn specified amount of jettons.
186
213
/// </summary>
187
-
/// <param name="sourceJettonAddress">Jetton wallet address to send coins from (use <see cref="GetWalletAddress">GetWalletAddress</see> if needed).</param>
/// <param name="amount">Amount of jettons to burn <b>in elementary units</b>.</param>
190
216
/// <param name="responseDestination">Address where to send a response with confirmation of a successful transfer and the rest of the incoming message Toncoins.</param>
191
217
/// <param name="customPayload">Optional custom data (which is used by either sender or receiver jetton wallet for inner logic).</param>
192
-
/// <returns>Constructed and ready-to-be-sent Message (by editor/owner of <paramref name="sourceJettonAddress"/>).</returns>
218
+
/// <returns>Constructed Cell (body of message to send).</returns>
193
219
/// <remarks>
194
220
/// <para>Your Jetton wallet address must already be deployed and active, and contain enough jettons to send.</para>
195
221
/// </remarks>
196
222
/// <seealso href="https://github.com/ton-blockchain/TEPs/blob/master/text/0074-jettons-standard.md#2-burn">Burn message in TEP</seealso>
197
-
publicMessageCreateBurnMessage(
198
-
stringsourceJettonAddress,
223
+
publicCellCreateBurnCell(
199
224
ulongqueryId,
200
225
BigIntegeramount,
201
226
stringresponseDestination,
202
227
Cell?customPayload)
203
228
{
204
-
varbody=newCellBuilder()
229
+
returnnewCellBuilder()
205
230
.StoreUInt(OPBurn)
206
231
.StoreULong(queryId)
207
232
.StoreCoins(amount)
208
233
.StoreAddressIntStd(responseDestination)
209
234
.StoreDict(customPayload)
210
-
;
235
+
.Build();
236
+
}
237
+
238
+
/// <summary>
239
+
/// Creates message that will burn specified amount of jettons.
240
+
/// </summary>
241
+
/// <param name="sourceJettonAddress">Jetton wallet address to send coins from (use <see cref="GetWalletAddress">GetWalletAddress</see> if needed).</param>
/// <param name="amount">Amount of jettons to burn <b>in elementary units</b>.</param>
244
+
/// <param name="responseDestination">Address where to send a response with confirmation of a successful transfer and the rest of the incoming message Toncoins.</param>
245
+
/// <param name="customPayload">Optional custom data (which is used by either sender or receiver jetton wallet for inner logic).</param>
246
+
/// <returns>Constructed and ready-to-be-sent Message (by editor/owner of <paramref name="sourceJettonAddress"/>).</returns>
247
+
/// <remarks>
248
+
/// <para>Your Jetton wallet address must already be deployed and active, and contain enough jettons to send.</para>
249
+
/// </remarks>
250
+
/// <seealso href="https://github.com/ton-blockchain/TEPs/blob/master/text/0074-jettons-standard.md#2-burn">Burn message in TEP</seealso>
0 commit comments