account.tech docs
  • Account.tech Documentation
  • Overview
    • Context
    • Stack Components
  • Design Philosophy
  • Move Framework
    • Concepts
      • Smart Accounts
      • Intents
      • Actions
      • Dependencies
      • Managed Assets
      • User
  • Implementation
    • Smart Account
    • Intent and Action
  • Packages
  • Move Registry
    • Multisig
  • DAO
  • Typescript Library
    • Untitled
  • Typescript SDKs
    • Untitled
Powered by GitBook
On this page
  1. Move Framework
  2. Concepts

Actions

PreviousIntentsNextDependencies

Last updated 7 days ago

Actions represent the concept of an elementary unit of execution on Sui, such as withdrawing an object or transferring it. Multiple actions can be stacked together to compose an intent that will process each one sequentially.

In the diagram below, you can see the processing flow of an intent composed of four actions. The first action withdraws (receives) an object from the account and returns it. The following action uses it as an input and transfers it to a recipient. The two subsequent actions perform the same operation with another object.

In Move, this is implemented as simple structs with a unique store ability. Each Action defines its own interface for adding it to an intent, executing it, and deleting it.

public struct WithdrawAction has store {
    // the owned object we want to access
    object_id: ID,
}

public struct TransferAction has store {
    // address to transfer to
    recipient: address,
}

Each action type implements three core functions:

  • New: Creates and adds the action to an intent

  • Do: Performs the action's operation during intent execution

  • Delete: Cleans up the action when the intent is destroyed