> ## 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.

# Get Boosts

<Warning>
  The One-Time Actions docs are under active development and will be subject to changes.
</Warning>

## API

### `getBoost`

Retrieves a single Boost by ID and instantiate the correct interfaces for all components.

```ts theme={null}
const boost = await core.getBoost(1n)
// You can also supply a numerical string, or hexadecimal representation
const boost = await core.getBoost(
  "1" // or "0x1"
)

// Afterwards, all components will be constructed with their correct interfaces
assert(boost.budget instanceof ManagedBudget)
```

This method also executes several read calls to ascertain the correct Boost component interfaces. If you'd like to save on calls, use [core.readBoost](#readboost) instead, which returns the raw on-chain representation with component addresses instead of instantiated classes.

#### Parameters

<ParamField path="id" type="string | bigint" required>
  A `bigint`, or numerical string, or hexadecimal string.
</ParamField>

<ParamField path="parameters" type="Omit<wagmi.ReadContractParameters, 'address' | 'args' | 'functionName' | 'abi'>">
  Optional parameters to pass to the underlying `readContract` method. Checkout [wagmi's documentation](https://wagmi.sh/core/api/actions/readContract#parameters) for more information. `address`, `args`, `functionName`, `abi` are handled for you under the hood.
</ParamField>

#### Returns

<ResponseField name="boost" type="Promise<Boost>" required>
  Returns the Boost if found. Otherwise, throws `BoostNotFoundError`
</ResponseField>

### `readBoost`

Retrieves the raw on-chain representation of a Boost.

```ts theme={null}
const boost = await core.readBoost(1n)
// You can also supply a numerical string, or hexadecimal representation
const boost = await core.readBoost(
  "1" // or "0x1"
)
// All fields and components are primitives
assert(isAddress(boost.budget))
const budget = await budgetFromAddress(boost.budget)
assert(budget instanceof ManagedBudget)
```

#### Parameters

<ParamField path="id" type="string | bigint" required>
  A `bigint`, or numerical string, or hexadecimal string.
</ParamField>

<ParamField path="parameters" type="Omit<wagmi.ReadContractParameters, 'address' | 'args' | 'functionName' | 'abi'>">
  Optional parameters to pass to the underlying `readContract` method. Checkout [wagmi's documentation](https://wagmi.sh/core/api/actions/readContract#parameters) for more information. `address`, `args`, `functionName`, `abi` are handled for you under the hood.
</ParamField>

#### Returns

<ResponseField name="boost" type="Promise<Boost>" required>
  Returns the Boost if found. Otherwise, throws `BoostNotFoundError`
</ResponseField>
