Skip to content

Commit

Permalink
make payload/stateInit optional
Browse files Browse the repository at this point in the history
  • Loading branch information
oleganza committed Jul 13, 2022
1 parent 797a99b commit ff8fde2
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -323,11 +323,19 @@ Parameters:

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

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.

Common cases:

1. No `payload`, no `stateInit`: simple transfer without a message.
2. `payload` is prefixed with 32 zero bits, no `stateInit`: simple transfer with a text message.
3. No `payload` or prefixed with 32 zero bits; `stateInit` is present: deployment of the contract.

Example:

```
await wallet.methods.transfer({
secretKey: ...
Expand Down

2 comments on commit ff8fde2

@hossen71
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@hossen71
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nais

Please sign in to comment.