Introduction

Custom actions are hoon code that is executed based on the outcome of a vote in the Ballot application. This feature gives Urbit developers a way to extend Ballot's base functionality. There is no limit to what a custom action can do. Anything that can be done within the Urbit platform using Hoon code can be done with a custom action.

Custom actions follow a strict standard to ensure interoperability with the Ballot application. This standard comes with configuration, file naming conventions, and specific gate/arm input parameter expectations and setup. All of this will be discussed in detail later in this manual.

Custom actions are defined per ship (master list) and therefore are available to all booths and proposals defined within the Ballot application on the ship.

Ships provide a list of custom actions they support using a configuration file stored within the ship's desk. When creating a new proposal, the list of custom actions supported by the ship are made available for selection. These custom actions are bound to a given voting outcome (choice). All of this is set using the proposal editor.

The custom action feature comes with two sample custom actions that developers/ships can leverage "out of the box":

  1. invite-member - invites a member to a group in Landscape

  2. kick-member - remove (kick) a member from a group in Landscape

Last updated