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

Once you’ve initialized a component through the Boost Registry, there are several methods to help you keep track of what you’ve deployed.

API

getCloneIdentifier

Retrieves the unique identifier for a previously initialized clone.

const id = await registry.getCloneIdentifier(
  RegistryType.BUDGET,
  ManagedBudget.bases[11155111],
  '0xME',
  'MyBudget'
)

Parameters

registryType
RegistryType
required

An enum representing the type of previously initialized component.

import { RegistryType } from '@boostxyz/sdk'
RegistryType.ACTION // 0
RegistryType.ALLOW_LIST // 1
RegistryType.BUDGET // 2
RegistryType.INCENTIVE // 3
RegistryType.VALIDATOR // 4
base
Address
required

The address of the base implementation your component was cloned from. You can either use Component.bases[chainId] or getBaseImplementation to retrieve this.

deployer
Address
required

The address of the user that initialized the clone.

displayName
string
required

The display name used when initializing the clone

parameters
Omit<wagmi.ReadContractParameters, 'address' | 'args' | 'functionName' | 'abi'>

Optional parameters to pass to the underlying readContract method. Checkout wagmi’s documentation for more information. address, args, functionName, abi are handled for you under the hood.

Returns

id
Promise<Hex>
required

Returns the clone’s unique identifier

const id = await registry.getCloneIdentifier(
  RegistryType.BUDGET,
  ManagedBudget.bases[11155111],
  '0xME',
  'MyBudget'
)
const address = await registry.getClone(id) // Address
const budget = core.ManagedBudget(address)

getClone

Retrieves an initialized clone given its identifier.

const id = await registry.getCloneIdentifier(
  RegistryType.BUDGET,
  ManagedBudget.bases[11155111],
  '0xME',
  'MyBudget'
)
const { instance, baseType, deployer, name } = await registry.getClone(id)
// initialize to interact with deployed budget
const budget = core.ManagedBudget(instance)

Parameters

identifier
Hex
required

The clone’s unique identifier, which can be ascertained with registry.getCloneIdentifier

parameters
Omit<wagmi.ReadContractParameters, 'address' | 'args' | 'functionName' | 'abi'>

Optional parameters to pass to the underlying readContract method. Checkout wagmi’s documentation for more information. address, args, functionName, abi are handled for you under the hood.

Returns

clone
Promise<Clone>
required

Returns the clone

getClones

Retrieves the identifiers for all clones initialized by a given address.

const identifiers = await registry.getClones('0xME')
const allClones = await Promise.all(identifiers.map(identifier => registry.getClone(identifier)))

Parameters

deployer
Address
required

The address of the clones’ deployer

parameters
Omit<wagmi.ReadContractParameters, 'address' | 'args' | 'functionName' | 'abi'>

Optional parameters to pass to the underlying readContract method. Checkout wagmi’s documentation for more information. address, args, functionName, abi are handled for you under the hood.

Returns

identifiers
Promise<Array<Hex>>
required

Returns a list of hex strings that can be used with registry.getClone

getBaseImplementation

Retrieves the address of an initialized clone’s base implementation. This is a low-level API, and base addresses are managed for you under the hood if using Boost components provided through the SDK.

const id = await registry.getCloneIdentifier(
  RegistryType.BUDGET,
  ManagedBudget.bases[11155111],
  '0xME',
  'MyBudget'
)
const managedBudgetBase = await registry.getBaseImplementation(id) // Address
const managedBudget = core.ManagedBudget(managedBudgetBase)
assert(managedBudget.isBase, true)

Parameters

identifier
Hex
required

The clone’s unique identifier, which can be ascertained with registry.getCloneIdentifier

parameters
Omit<wagmi.ReadContractParameters, 'address' | 'args' | 'functionName' | 'abi'>

Optional parameters to pass to the underlying readContract method. Checkout wagmi’s documentation for more information. address, args, functionName, abi are handled for you under the hood.

Returns

address
Promise<Address>
required

Returns the address of the clone’s base implementation.