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 ManagedBudget contract allows authorized users to clawback or disburse funds from the budget.

API

clawback

The clawback function is used to reclaim available funds from the budget. Can only be called by owner or admin.

  • Using clawback with 0n will reclaim all available funds for the given asset.
  • Use the zero address (0x0000000000000000000000000000000000000000) to clawback native assets (ie. ETH).

Parameters

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

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

Promise<boolean>
boolean

Returns true if the clawback was successful.

disburse

Transfers available funds from the budget to a specified recipient. You must have the manager, admin or owner role to call this function.

The disburse method is authorized for the MANAGER role. Be aware that this allows a manager to disburse funds from the budget at will. Make sure you trust the manager before giving them authorization.

Parameters

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

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

Promise<boolean>
boolean

Returns true if the disbursement was successful.

disburseBatch

Transfers available funds from the budget to a list of specified recipients. You must have the manager, admin or owner role to call this function. This method is more gas-efficient for multiple transfers.

Parameters

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

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

Promise<boolean>
boolean

Returns true if the disbursement was successful.