The Managed Budget contract is designed to hold and distribute assets that can be used to deploy boosts. The Boost SDK provides several methods to manage and view the available funds in a budget.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.
API
allocate
Allocates assets to the budget. The caller must have already approved the contract to transfer the asset. If the asset transfer fails, the allocation will revert.
You can also directly transfer tokens to the ManagedBudget contract address instead of using the
allocate function. This allows you to bypass the approval process for ERC20 tokens.Parameters
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 true if the allocation was successful.
available
Shows the available balance of an asset in the budget.
Parameters
The address of the asset. Leave blank to get the balance of the native asset. (ie: ETH)
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
The available balance of the asset.
distributed
Get the total amount of an asset distributed from the budget.
Parameters
The address of the asset. Leave blank to get the distributed amount of the native asset. (ie: ETH)
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
The total amount of the asset distributed from the budget.
total
Get the total amount of an asset allocated to the budget, including any that have been distributed.
Parameters
The address of the asset. Leave blank to get the total amount of the native asset. (ie: ETH)
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
The total amount of the asset allocated to the budget, including any that have been distributed.