The Boost V2 Docs are under active development and will be subject to changes.

The Managed Budget contract is a flexible budget implementation that allows for the distribution of tokens with role-based access control. A Managed Budget is required to deploy boosts. In order to deploy boosts from a budget, the budget must be funded with enough ERC-20 tokens to cover the cost of the boost incentives, plus any fees.

ManagedBudget is designed to hold and distribute assets while providing fine-grained control over who can perform various operations.

Key Features

  • Role-based access control for management and administration
  • Flexible allocation and distribution of assets
  • Clawback functionality for asset recovery

Create a new ManagedBudget

To initialize a new ManagedBudget contract:

import { BoostCore } from '@boostxyz/sdk/BoostCore'
import { BoostRegistry } from '@boostxyz/sdk/BoostRegistry'
import { Roles } from '@boostxyz/sdk'
import { config } from "./config";

const core = new BoostCore({ config });
const registry = new BoostRegistry({ config });

// initialize a new budget contract
const budget = await registry.initialize(
  "MyBoostBudget",
  core.ManagedBudget({
    owner: account.address,
    authorized: [account.address, core.assertValidAddress()],
    roles: [Roles.ADMIN, Roles.MANAGER],
  })
);

const budgetAddress = budget.assertValidAddress();

Get an existing ManagedBudget

To get an existing ManagedBudget contract:

const budget = core.ManagedBudget("0xc55F719709bDad022B320E76f9DfF7e6F5680767")

// or if you want a budget from a specific chain
const budgetOnBase = core.ManagedBudget(
  "0xc55F719709bDad022B320E76f9DfF7e6F5680767",
  { chainId: 8453 }
)

Once a budget is created, it can be funded and used to deploy boosts.