Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[docs] add an example of sending a token #20779

Merged
merged 2 commits into from
Jan 6, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions docs/content/guides/developer/sui-101/building-ptb.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,14 @@ With PTBs, you can use the gas payment coin to construct coins with a set balanc

You can also transfer the gas coin using `transferObjects`, in the event that you want to transfer all of your coin balance to another address.

Of course, you can also transfer other coins in your wallet using their `Object ID`. For example,

```ts
const otherCoin = tx.object('0xCoinObjectId');
const coin = tx.splitCoins(otherCoin, [tx.pure(100)]);
tx.transferObjects([coin], tx.pure(address));
```

## Get PTB bytes

If you need the PTB bytes, instead of signing or executing the PTB, you can use the `build` method on the transaction builder itself.
Expand Down
Loading