Skip to main content

Working with Programmable Transaction Blocks

Programmable transaction blocks (PTBs) are key elements of the Sui ecosystem. Understanding PTBs and using them correctly are key fundamentals to creating efficient and cost-effective smart contracts. See Programmable Transaction Blocks to learn about the structure of PTBs on Sui.

The topics in this section focus on effectively utilizing PTBs in your smart contracts.

Building Programmable Transaction Blocks

To fully appreciate the possibilities PTBs offer, you must build them. Using tools like the Sui TypeScript SDK, you can begin to understand the power and flexibility they provide.

Go to Building Programmable Transaction Blocks.

Coin Management

Coin objects on Sui are different than other blockchains in that they are owned objects. Whether you need your smart contract to utilize SUI for gas payments or deal with generic coins, understanding coin management is crucial. Smart contracts use common patterns to accept coins and the PTBs you create must provide the correct interface to those smart contracts to facilitate successful transactions.

Go to Coin Management.

Simulating References

The borrow module of the Sui framework offers some features you can use when your PTBs use objects by reference.

Go to Simulating References.

Review this content for a complete picture of PTBs on Sui.