DAO DAO
LinksLaunch App
  • Welcome to DAO DAO
  • Introduction
    • Quickstart
      • Create your first DAO
      • Join a DAO
        • Joining and leaving a member-based DAO
        • Joining and leaving a token-based DAO
      • Create your first proposal
      • Voting
      • Congratulations!
    • What's a DAO?
    • What's a blockchain?
    • Technical breakdown
    • Contribute to DAO DAO!
  • DAO Management
    • Create a DAO
    • Update appearance
    • SubDAOs
      • What are SubDAOs?
      • How to create a SubDAO
      • How to act on behalf of a SubDAO
    • Treasury
      • Send tokens
      • Manage cross-chain tokens
      • Manage staking
      • Displaying tokens and NFTs
      • Enable vesting payments
    • Manage Members
      • Joining and leaving a member-based DAO
      • Joining and leaving a token-based DAO
    • Authz
      • Grant Authorization
      • Revoke Authorization
      • Execute via Authorization
      • Limitation
    • Cross-chain support
  • DAO Governance
    • Configuration
      • Voting
      • Proposal submission
      • Staking
    • Proposals
      • What are proposals?
      • Types of proposals
      • How to create a proposal
      • How to vote on a proposal
      • How to add a proposal module
      • How to change a pre-propose module
      • How to bulk import actions
      • How to create an autofill proposal link
    • Manage Vetoable DAOs
    • Migration
    • Notifications
      • Telegram Notifications
Powered by GitBook
On this page
  • JSON
  • CSV
  • Action keys
  • spend
  • execute
  • mintNft
  • mint
Export as PDF
  1. DAO Governance
  2. Proposals

How to bulk import actions

PreviousHow to change a pre-propose moduleNextHow to create an autofill proposal link

To bulk import actions, you can use the Bulk Import Actions action in the Advanced category of the Action Library when creating a proposal.

You can use either a JSON or CSV file. CSV files are easier to use but only support some of the actions, whereas JSON files support all actions.

JSON

The JSON file (with extension .json) must be formatted with one top-level actions key, which is an array of actions, like this:

{
  "actions": [
    // INSERT ACTIONS HERE
  ]
}

And an action looks like this:

{
  "key": "<ACTION KEY>",
  "data": {
    // INSERT ACTION DATA HERE
  }
}

CSV

The CSV file (with extension .csv) must have a header with an ACTION column and columns for each key in the data object of an action. Only actions with flat data objects (i.e. no nested objects or arrays) are supported.

A CSV that imports a bunch of Spend actions would look like this:

ACTION,to,amount,denom
spend,junoAddress,5,ujuno
spend,anotherJunoAddress,5,ujuno
spend,junoAddress,1,ibc/EAC38D55372F38F1AFD68DF7FE9EF762DCF69F26520643CF3F9D292A738D8034

Action keys

The action keys can be found in @dao-dao/types/actions.ts in the ActionKey enum. For example:

  • spend

  • execute

  • mintNft

  • mint

The key and data format for an action are defined in its README.md, and the actions can be found in the following places:

  • @dao-dao/stateful/actions/core/actions — common actions to all DAOs.

  • @dao-dao/stateful/voting-module-adapter/adapters/*/actions — each voting module adapter may contain specific actions (for example: member-based DAOs include a Manage Members action).

  • @dao-dao/stateful/proposal-module-adapter/adapters/*/common/actions — each proposal module adapter may contain specific actions (for example: single choice proposals have a different Update Proposal Submission Config action from multiple choice proposals).

  • @dao-dao/stateful/modules/modules/*/actions — each module may contain specific actions (for example: the vesting payments module adds an action to manage vesting payments).

Here are some common ones:

spend

For sending money from the treasury.

{
  "fromChainId": "<CHAIN ID>",
  "toChainId": "<CHAIN ID>",
  "from": "<FROM ADDRESS>",
  "to": "<RECIPIENT ADDRESS>",
  "amount": "<AMOUNT>",
  "denom": "<DENOM>"
}

execute

For executing a smart contract.

{
  "chainId": "<CHAIN ID>",
  "sender": "<EXECUTOR ADDRESS>",
  "address": "<SMART CONTRACT ADDRESS>",
  "message": "<SMART CONTRACT MESSAGE>",
  "funds": [
    {
      "denom": "<DENOM>",
      "amount": "<AMOUNT>",
      "decimals": "<DECIMALS>"
    }
  ]
}

mintNft

For minting an NFT in a collection the DAO controls.

{
  "contractChosen": true,
  "collectionAddress": "<NFT COLLECTION ADDRESS>",
  "mintMsg": {
    "owner": "<RECIPIENT ADDRESS>",
    "token_id": "<UNIQUE TOKEN ID>",
    "token_uri": "<JSON METADATA URL>"
  }
}

mint

For minting governance tokens in a token-based DAO.

{
  "recipient": "<RECIPIENT ADDRESS>",
  "amount": "<TOKEN AMOUNT>"
}
Bulk import actions