Skip to main content

Programmable Transaction Blocks

Programmable transaction blocks are a group of commands that complete a transaction on Sui.

What is a programmable transaction block?​

Programmable transaction blocks (PTBs) let you compose multiple commands into a single atomic transaction on Sui, meaning the commands succeed or fail together. Commands can transfer objects, call Move functions, split and merge coins, and more, with results from one command flowing into the next.

What commands can a PTB contain?​

Each command in a PTB is one of 7 types:

  • MoveCall: Calls a Move function.
  • TransferObjects: Transfers objects to a specified address.
  • SplitCoins: Splits a coin into N coins according to an array of amounts.
  • MergeCoins: Merges N coins into a provided coin.
  • MakeMoveVec: Constructs a vector from values of the same type.
  • Publish: Publishes a Move package.
  • Upgrade: Upgrades a Move package.