Squads Docs
Squads
Squads
  • Squads App
  • Twitter
  • Discord Support
  • Basics
    • Welcome to Squads Multisig
    • What is a multisig
    • Who we are - Squads Labs
    • Security
  • Getting Started
    • Quickstart Guide
    • Create a Squad
    • On and Off-Ramp
      • Virtual US Bank Account
      • Sphere
      • Coinflow Off-ramp
      • Bridge Off-Ramp
      • Third-Party Payouts
    • Treasury Management Overview
    • Pricing
  • Navigating your Squad
    • Dashboard
    • Transactions
      • Priority fees
      • Batch actions
      • Rent Reclaim
    • Members
      • Manage Members
      • Permissions
      • Fee Relayer
    • Treasury
      • Sub-accounts
      • Manage assets
      • Contacts
      • Airdrop Checker
    • Payments
    • Trade
      • Limit Orders
      • Swaps
    • Stake
      • Staking with Squads
      • Direct Staking
      • Liquid Staking
      • Marinade Native
    • Developers assets
      • Programs
      • Validators
      • Token Manager
      • Transaction Builder
    • Settings
      • Spending Limits
      • Coin List Filter
      • Privacy
      • Time Locks
      • Export CSV
    • Integrated apps
      • TipLink
      • Range
      • SNS
      • Safe
    • SquadsX
      • Start using SquadsX
      • Compatible Apps
    • Reporting and Accounting
      • Request Finance
      • Integral
  • Additional Resources
    • FAQs
    • Advanced Security Best Practices
    • Costs of using Squads
    • Sending assets to/from centralized exchange (CEXs)
    • Squads on Mobile
    • What if the Squads app goes down
    • Key aspects of using a multisig
Powered by GitBook
On this page
  • How to create a custom transaction draft
  • How to populate custom transaction drafts with instructions
  1. Navigating your Squad
  2. Developers assets

Transaction Builder

Learn how to use arbitrary instructions within Squads using Transaction Builder.

PreviousToken ManagerNextSettings

Last updated 7 months ago

Users can create custom transactions and populate them with arbitrary instructions using the Transaction Builder. This allows them to interact directly with any programs on Solana from a Squad.

How to create a custom transaction draft

To create a custom transaction draft:

  1. Go to the "TX Builder" tab and click the "Create transaction" button. If you already know the type of transaction you want to create, click on one of the templates.

  2. Choose the type of transaction you would like to create:

    • Anchor programs (with IDL)

    • Solana programs (written in Rust)

    • Import a base58 encoded transaction

    • Validators (using predefined templates)

    • Switchboard program

All custom transactions are initially saved as drafts and need to be populated with instructions data before launching. You can save your custom transaction after initiation for future reuse.

  1. Once you've selected the type, you'll be taken to the draft screen where you can add instructions to the transaction.

How to populate custom transaction drafts with instructions

To populate a custom transaction draft for programs written in Anchor:

  1. To add a custom instruction, click on the draft and select "Add instruction" from the dropdown menu.

  2. Choose the "Custom instruction" option and enter the program address. Click "Next".

  1. Select the desired instruction from the list and click "Add instruction".

  2. Fill out the required information in the Accounts section and click "Save draft". If necessary, you can add additional instructions to the draft to run multiple custom instructions in one transaction. You can also provide a name and description for the transaction.

After you populate the draft with arbitrary instructions you can run a simulation to check if your transaction is assembled correctly.

  1. After you populate the transaction with instructions and run a simulation to verify that everything is correct, launch a transaction inside your Squad by clicking on "Initiate Transaction". The custom transaction with arbitrary instructions will be launched upon transaction execution.

To populate a custom transaction draft for programs written in Rust

  1. To add a custom instruction, click on the draft and then click "Add instruction". Select the "Custom instruction" option.

  1. Insert the program address, and then click "Add instruction".

  2. Enter the account information and select the desired data options (Buffer or Raw). Finally, click "Save draft". You can add another instruction inside the draft to run two custom instructions in one transaction.

After populating the draft with arbitrary instructions, you can run a simulation to check if your transaction is assembled correctly.

  1. Once you have populated the transaction with instructions and run a simulation to verify that everything is correct, launch the transaction inside your Squad by clicking on "Initiate Transaction". The custom transaction with arbitrary instructions will be launched upon transaction execution.

To populate the draft with instructions from base58 encoded transactions

  1. To add an instruction, click on the draft and select "Add instruction". Then, choose the "Import base58 encoded tx" option.

  2. Insert the base58 encoded transaction and click "Next". Review the data and click "Add instruction".

  1. Once you have verified the data and run a simulation to ensure its correctness, initiate a transaction within your Squad by clicking on "Initiate Transaction". This will launch a custom transaction with arbitrary instructions upon execution.

To interact with the validators and stake pools using predefined templates

  1. Click on "Add instruction".

  2. Select the template you want to use from the list: Stake program, Vote program, Stake Pool program, or Switchboard program.

The Stake Program template allows you to interact with validators to deactivate and withdraw staked SOL.

The Vote Program template enables you to change the withdraw authority, withdraw stake rewards, and change the commission of the validator.

The Stake Pool Program template lets you set the manager, fees, and funding authority of the stake pool.

Switchboard Program template allows you to interact with, create, and manage feeds from a multisig in Switchboard.

  1. Populate any of the templates with the required data and launch a transaction. Once the transaction meets confirmation threshold and is executed, the interaction with the program will be made.

TX Builder tab
Select transaction type
Transaction draft
Populated transaction draft
Anchor transaction
Rust transaction
Base 58 transaction
Page cover image