Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.boost.xyz/llms.txt

Use this file to discover all available pages before exploring further.

In this example, you’ll learn how to deploy a Boost using the Boost SDK. Before you deploy a boost, you will need to have a budget account deployed and funded with the tokens you want to distribute. If you don’t have one, you can deploy one using the SDK, or by following the Budget Accounts guide to deploy one through the Boost interface. Below is a full example of how to deploy a Boost using the SDK. The action in this example targets the Zora TimedSalesStrategy contract. The main steps to deploying a boost are:
  1. Setting up the Action
  2. Setting up the Incentives
  3. Deploying the Boost
You can also optionally set up an AllowList, which is useful if you want to limit the participants of the boost. This example uses the OpenAllowList, which allows anyone to participate.
import { BoostCore } from "@boostxyz/sdk";
import { config } from "./config";
import { eventActionPayload } from "./eventAction";

const core = new BoostCore(config);
const budget = core.ManagedBudget('0x...');
const action = core.EventAction(eventActionPayload);

const incentives: [
  core.ERC20Incentive({
    asset: '0x...',
    reward: parseEther('0.5'),
    limit: 10n,
    strategy: StrategyType.POOL,
    manager: '0x...',
  }),
]

(async () => {
  await core.deployBoost(
    {
      maxParticipants: 10n,
      budget,
      action,
      incentives,
      allowList: core.OpenAllowList(),
    },
  )
})();