Skip to content
This repository was archived by the owner on Mar 27, 2025. It is now read-only.

Commit ff8fde2

Browse files
committed
make payload/stateInit optional
1 parent 797a99b commit ff8fde2

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

README.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -323,11 +323,19 @@ Parameters:
323323

324324
* `address` (string, optional): destination address.
325325
* `amount` (decimal string): number of nanocoins to send.
326-
* `payload` (string base64): raw one-cell BoC encoded in Base64.
327-
* `stateInit` (string base64): raw once-cell BoC encoded in Base64.
326+
* `payload` (string base64, optional): raw one-cell BoC encoded in Base64.
327+
* `stateInit` (string base64, optional): raw once-cell BoC encoded in Base64.
328328

329329
Wallet simulates the execution of the message and present to the user summary of operations: "jetton XYZ will be transferred, N toncoins will be sent" etc.
330330

331+
Common cases:
332+
333+
1. No `payload`, no `stateInit`: simple transfer without a message.
334+
2. `payload` is prefixed with 32 zero bits, no `stateInit`: simple transfer with a text message.
335+
3. No `payload` or prefixed with 32 zero bits; `stateInit` is present: deployment of the contract.
336+
337+
Example:
338+
331339
```
332340
await wallet.methods.transfer({
333341
secretKey: ...

0 commit comments

Comments
 (0)