Skip to content

Framework

The plugin framework: everything about being a plugin, what a plugin is, how you build one, and how it's published, installed, updated, and uninstalled on a DAO, safely and repeatably. Source: osx src/framework, plus the plugin base contracts in common (osx src/common).

The core DAO is deliberately minimal and common is cross-cutting primitives; the framework is what turns "a contract can operate a DAO" into "a specific plugin version is installed on this DAO with exactly the right permissions, and nobody was left with unchecked control." A plugin isn't part of the core, it's a contract that uses this framework to operate a DAO.

New to plugins? Read the model, then how you build one, then the publish/install machinery.

What a plugin is, and building one

  • The plugin model — what a plugin is and how it acts on a DAO. Start here.
  • Choosing a plugin base — Plugin vs Cloneable vs UUPS, and how to decide.
  • Plugin setup — the per-version contract that deploys a plugin and declares its permissions.
  • Plugin metadata — the release/build JSON a version points to (incl. the install-params schema), and on-chain instance metadata.

Publishing and installing

A note on the word "factory"

OSx reuses "factory" for several distinct things; keep them apart by what they produce:

  • Plugin setup — assembles one plugin installation (deploys the plugin + declares its permissions). A "factory" only in the sense of producing a single install.
  • DAOFactory — deploys one DAO (optionally with plugins) in a transaction.
  • PluginRepoFactory (see PluginRepo) — deploys one plugin repo.
  • Protocol Factory — deploys the whole OSx stack onto a new chain.
  • The DAO Launchpad's one-shot factory — a project-specific contract that deploys one fully-configured DAO atomically.

Rule of thumb: setup = one install; DAOFactory / launchpad = one DAO; PluginRepoFactory = one repo; Protocol Factory = the whole protocol.

Builds on

Plugins reuse the cross-cutting primitives in common (conditions, proposals, membership, auth, proxies) and act on the DAO and its permission system from the core.