Funding
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
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.
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.
Before using allocate
, you must approve the ManagedBudget to spend the asset you want to allocate.
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.
total
= available
+ 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.