Initializing Components
Under Construction The V2 Protocol, SDK, and these docs are under active development. You can find the latest testnet deployments here
In prerelease Currently the SDK and protocol only support Sepolia. Public API’s are stable, but could still change before our initial release. If you experience any bugs, please open a Github issue
Boost components aren’t instantiated traditionally, with parameters supplied to the contract’s constructor on deployment. Instead, to ensure each Boost component is compliant with a registered base implementation, and save on gas, components are either cloned from a deployed base contract and initialized ahead of time through registry before being referenced in Boost creation, or, for some components, initialized at time of Boost creation.
Incentives
are not re-usable between multiple Boosts, and cannot be initialized by the registry.
What is a base implementation?
A base implementation is any deployed contract registered with the registry, thus valid for use with Boost creation, that satisfies the interfaces for either Action
, AllowList
, Budget
, Incentive
or Validator
. For example, ManagedBudget is a base implementation that satisfies the Budget interface.
API
initialize
Deploys and initializes a new instance of a registered component’s base implementation and returns the component with its address attached.
Clones are uniquely identified by hashing the component’s type, base address, your address, and name. For example, you cannot initialize two ManagedBudget
’s with the same displayName
Parameters
A display name for the new instance. Must be unique per account and base implementation.
An instance of the component you’d like to initialize.
Optional parameters to pass to the underlying writeContract
method. Checkout wagmi’s documentation for more information. address
, args
, functionName
, abi
are handled for you under the hood.
Returns
Returns the target parameter with its deployed address attached.
You can then reuse it during Boost creation.