Creates an instance of DeployableTarget.
Optionalpayload: DeployablePayloadOrAddress<ManagedBudgetWithFeesPayload>Either a given implementation's initialization payload, or an address to an existing on chain target.
OptionalisBase: booleanA property asserting that the protocol should eiher clone and initialize a new target from the base implementation, or re-use an existing contract without initializing.
StaticbasesA static property representing a map of stringified chain ID's to the address of the base implementation on chain, used when cloning base contracts.
StaticregistryThe target's registry type.
ReadonlyabiReadonly_isA property asserting that the protocol should eiher clone and initialize a new target from the base implementation, or re-use an existing contract without initializing.
Protected_payloadThe deployable payload used either for contract construction or initialization
Protected_configProtected_addressThe internally managed address for this contract
Protected Optional_accountIf it exists, Viem Local Account, if in a Node environment
A getter that will return the base implementation's static addresses by numerical chain ID
A getter that returns the registry type of the base implementation
Returns the attached account, if it exists
A getter returning this contract's deployed address, if it exists.
A getter returning this contract's Wagmi configuration.
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
Optionalparams: Partial<Omit<UnionCompute<UnionStrictOmit<SimulateContractParameters<Abi, string, readonly unknown[], Chain, Chain, (`0x${string}` | Account)>, "chain">> & ChainIdParameter<Config, number> & ConnectorParameter, 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
Optionalparams: Partial<Omit<UnionCompute<UnionStrictOmit<SimulateContractParameters<Abi, string, readonly unknown[], Chain, Chain, (`0x${string}` | Account)>, "chain">> & ChainIdParameter<Config, number> & ConnectorParameter, Clawbacks assets from the budget. Only the owner can directly clawback assets from the budget If the amount is zero, the entire balance of the asset will be transferred to the receiver If the asset transfer fails, the reclamation will revert
Optionalparams: Partial<Omit<UnionCompute<UnionStrictOmit<SimulateContractParameters<Abi, string, readonly unknown[], Chain, Chain, (`0x${string}` | Account)>, "chain">> & ChainIdParameter<Config, number> & ConnectorParameter, Clawbacks assets from the budget. Only the owner or admin can directly clawback assets from the budget If the amount is zero, the entire balance of the asset will be transferred to the receiver If the asset transfer fails, the reclamation will revert
Optionalparams: Partial<Omit<UnionCompute<UnionStrictOmit<SimulateContractParameters<Abi, string, readonly unknown[], Chain, Chain, (`0x${string}` | Account)>, "chain">> & ChainIdParameter<Config, number> & ConnectorParameter, Clawbacks assets from an incentive associated with the budget via Boost Core. Only the authorized users can clawback assets from an incentive. If the asset transfer fails, the reclamation will revert.
The address of a contract implementing clawback, typically BoostCore
The encoded data payload for the clawback, can be acquired with incentive.buildClawbackData
The ID of the boost
The ID of the incentive
Optionalparams: Partial<Omit<UnionCompute<UnionStrictOmit<SimulateContractParameters<Abi, string, readonly unknown[], Chain, Chain, (`0x${string}` | Account)>, "chain">> & ChainIdParameter<Config, number> & ConnectorParameter, Optional write parameters
Clawbacks assets from an incentive associated with the budget via Boost Core. Only the authorized users can clawback assets from an incentive. If the asset transfer fails, the reclamation will revert.
The address of a contract implementing clawback, typically BoostCore
The encoded data payload for the clawback, can be acquired with incentive.buildClawbackData
The ID of the boost
The ID of the incentive
Optionalparams: Partial<Omit<UnionCompute<UnionStrictOmit<SimulateContractParameters<Abi, string, readonly unknown[], Chain, Chain, (`0x${string}` | Account)>, "chain">> & ChainIdParameter<Config, number> & ConnectorParameter, Optional write parameters
Disburses assets from the budget to a single recipient If the asset transfer fails, the disbursement will revert
Optionalparams: Partial<Omit<UnionCompute<UnionStrictOmit<SimulateContractParameters<Abi, string, readonly unknown[], Chain, Chain, (`0x${string}` | Account)>, "chain">> & ChainIdParameter<Config, number> & ConnectorParameter, Disburses assets from the budget to a single recipient If the asset transfer fails, the disbursement will revert
Optionalparams: Partial<Omit<UnionCompute<UnionStrictOmit<SimulateContractParameters<Abi, string, readonly unknown[], Chain, Chain, (`0x${string}` | Account)>, "chain">> & ChainIdParameter<Config, number> & ConnectorParameter, Disburses assets from the budget to multiple recipients
Optionalparams: Partial<Omit<UnionCompute<UnionStrictOmit<SimulateContractParameters<Abi, string, readonly unknown[], Chain, Chain, (`0x${string}` | Account)>, "chain">> & ChainIdParameter<Config, number> & ConnectorParameter, Disburses assets from the budget to multiple recipients
Optionalparams: Partial<Omit<UnionCompute<UnionStrictOmit<SimulateContractParameters<Abi, string, readonly unknown[], Chain, Chain, (`0x${string}` | Account)>, "chain">> & ChainIdParameter<Config, number> & ConnectorParameter, Pays out reserved management fees to the boost owner for a given incentive
Optionalparams: Partial<Omit<UnionCompute<UnionStrictOmit<SimulateContractParameters<Abi, string, readonly unknown[], Chain, Chain, (`0x${string}` | Account)>, "chain">> & ChainIdParameter<Config, number> & ConnectorParameter, Pays out reserved management fees to the boost owner
Optionalparams: Partial<Omit<UnionCompute<UnionStrictOmit<SimulateContractParameters<Abi, string, readonly unknown[], Chain, Chain, (`0x${string}` | Account)>, "chain">> & ChainIdParameter<Config, number> & ConnectorParameter, Sets the management fee for the budget
Optionalparams: Partial<Omit<UnionCompute<UnionStrictOmit<SimulateContractParameters<Abi, string, readonly unknown[], Chain, Chain, (`0x${string}` | Account)>, "chain">> & ChainIdParameter<Config, number> & ConnectorParameter, Sets the management fee for the budget
Optionalparams: Partial<Omit<UnionCompute<UnionStrictOmit<SimulateContractParameters<Abi, string, readonly unknown[], Chain, Chain, (`0x${string}` | Account)>, "chain">> & ChainIdParameter<Config, number> & ConnectorParameter, Get the total amount of assets allocated to the budget, including any that have been distributed If a tokenId is provided, get the total amount of ERC1155 assets allocated to the budget, including any that have been distributed
Optionalasset: `0x${string}` = zeroAddressThe address of the asset
OptionaltokenId: bigintThe ID of the token
Optionalparams: Partial<Omit<ReadContractParameters, Get the amount of assets available for distribution from the budget. If a tokenId is provided, get the amount of ERC1155 assets available for distribution from the budget
Optionalasset: `0x${string}` = zeroAddressOptionaltokenId: bigintOptionalparams: Partial<Omit<ReadContractParameters, Get the amount of assets that have been distributed from the budget. If a tokenId is provided, get the amount of ERC1155 assets that have been distributed from the budget
Optionalasset: `0x${string}` = zeroAddressOptionaltokenId: bigintOptionalparams: Partial<Omit<ReadContractParameters, Base parameter constructor, should return a partial viem.deployContract parameters shape including abi, bytecode, and arguments, if any.
Expected to be overridden by protocol contracts.
Optional_payload: ManagedBudgetWithFeesPayloadOptional_options: DeployableOptionsSet the authorized status of the given accounts The mechanism for managing authorization is left to the implementing contract
The accounts to authorize or deauthorize
The authorization status for the given accounts
Optionalparams: Partial<Omit<UnionCompute<UnionStrictOmit<SimulateContractParameters<Abi, string, readonly unknown[], Chain, Chain, (`0x${string}` | Account)>, "chain">> & ChainIdParameter<Config, number> & ConnectorParameter, Set the authorized status of the given accounts The mechanism for managing authorization is left to the implementing contract
The accounts to authorize or deauthorize
The authorization status for the given accounts
Optionalparams: Partial<Omit<UnionCompute<UnionStrictOmit<SimulateContractParameters<Abi, string, readonly unknown[], Chain, Chain, (`0x${string}` | Account)>, "chain">> & ChainIdParameter<Config, number> & ConnectorParameter, Grant permissions for a user on the rbac.
Optionalparams: Partial<Omit<UnionCompute<UnionStrictOmit<SimulateContractParameters<Abi, string, readonly unknown[], Chain, Chain, (`0x${string}` | Account)>, "chain">> & ChainIdParameter<Config, number> & ConnectorParameter, Grant permissions for a user on the rbac.
Optionalparams: Partial<Omit<UnionCompute<UnionStrictOmit<SimulateContractParameters<Abi, string, readonly unknown[], Chain, Chain, (`0x${string}` | Account)>, "chain">> & ChainIdParameter<Config, number> & ConnectorParameter, Revoke permissions for a user on the rbac.
Optionalparams: Partial<Omit<UnionCompute<UnionStrictOmit<SimulateContractParameters<Abi, string, readonly unknown[], Chain, Chain, (`0x${string}` | Account)>, "chain">> & ChainIdParameter<Config, number> & ConnectorParameter, Revoke permissions for a user on the rbac.
Optionalparams: Partial<Omit<UnionCompute<UnionStrictOmit<SimulateContractParameters<Abi, string, readonly unknown[], Chain, Chain, (`0x${string}` | Account)>, "chain">> & ChainIdParameter<Config, number> & ConnectorParameter, Grant many accounts permissions on the rbac.
Optionalparams: Partial<Omit<UnionCompute<UnionStrictOmit<SimulateContractParameters<Abi, string, readonly unknown[], Chain, Chain, (`0x${string}` | Account)>, "chain">> & ChainIdParameter<Config, number> & ConnectorParameter, Grant many accounts permissions on the rbac.
Optionalparams: Partial<Omit<UnionCompute<UnionStrictOmit<SimulateContractParameters<Abi, string, readonly unknown[], Chain, Chain, (`0x${string}` | Account)>, "chain">> & ChainIdParameter<Config, number> & ConnectorParameter, Revoke many accounts' permissions on the rbac.
Optionalparams: Partial<Omit<UnionCompute<UnionStrictOmit<SimulateContractParameters<Abi, string, readonly unknown[], Chain, Chain, (`0x${string}` | Account)>, "chain">> & ChainIdParameter<Config, number> & ConnectorParameter, Revoke many accounts' permissions on the rbac.
Optionalparams: Partial<Omit<UnionCompute<UnionStrictOmit<SimulateContractParameters<Abi, string, readonly unknown[], Chain, Chain, (`0x${string}` | Account)>, "chain">> & ChainIdParameter<Config, number> & ConnectorParameter, Returns whether given account has any of the provided roles bitmap.
Optionalparams: Partial<Omit<ReadContractParameters, Returns whether given account has all of the provided roles bitmap.
Optionalparams: Partial<Omit<ReadContractParameters, Transfer ownership of the contract to a new address
The address to transfer ownership to
Optionalparams: Partial<Omit<UnionCompute<UnionStrictOmit<SimulateContractParameters<Abi, string, readonly unknown[], Chain, Chain, (`0x${string}` | Account)>, "chain">> & ChainIdParameter<Config, number> & ConnectorParameter, Transfer ownership of the contract to a new address
The address to transfer ownership to
Optionalparams: Partial<Omit<UnionCompute<UnionStrictOmit<SimulateContractParameters<Abi, string, readonly unknown[], Chain, Chain, (`0x${string}` | Account)>, "chain">> & ChainIdParameter<Config, number> & ConnectorParameter, Renounce ownership of the contract
Optionalparams: Partial<Omit<UnionCompute<UnionStrictOmit<SimulateContractParameters<Abi, string, readonly unknown[], Chain, Chain, (`0x${string}` | Account)>, "chain">> & ChainIdParameter<Config, number> & ConnectorParameter, Renounce ownership of the contract
Optionalparams: Partial<Omit<UnionCompute<UnionStrictOmit<SimulateContractParameters<Abi, string, readonly unknown[], Chain, Chain, (`0x${string}` | Account)>, "chain">> & ChainIdParameter<Config, number> & ConnectorParameter, Request a two-step ownership handover to the caller The request will automatically expire in 48 hours
Note: This is part of a two-step ownership transfer process:
Optionalparams: Partial<Omit<UnionCompute<UnionStrictOmit<SimulateContractParameters<Abi, string, readonly unknown[], Chain, Chain, (`0x${string}` | Account)>, "chain">> & ChainIdParameter<Config, number> & ConnectorParameter, Request a two-step ownership handover to the caller The request will automatically expire in 48 hours
Optionalparams: Partial<Omit<UnionCompute<UnionStrictOmit<SimulateContractParameters<Abi, string, readonly unknown[], Chain, Chain, (`0x${string}` | Account)>, "chain">> & ChainIdParameter<Config, number> & ConnectorParameter, Complete a pending ownership handover to a new owner Must be called by the current owner after the new owner has requested the handover
Note: This is part of a two-step ownership transfer process:
The address that requested the ownership handover
Optionalparams: Partial<Omit<UnionCompute<UnionStrictOmit<SimulateContractParameters<Abi, string, readonly unknown[], Chain, Chain, (`0x${string}` | Account)>, "chain">> & ChainIdParameter<Config, number> & ConnectorParameter, Complete a pending ownership handover to a new owner Must be called by the current owner after the new owner has requested the handover
The address that requested the ownership handover
Optionalparams: Partial<Omit<UnionCompute<UnionStrictOmit<SimulateContractParameters<Abi, string, readonly unknown[], Chain, Chain, (`0x${string}` | Account)>, "chain">> & ChainIdParameter<Config, number> & ConnectorParameter, Cancel a pending ownership handover request Must be called by the account that originally requested the handover
Optionalparams: Partial<Omit<UnionCompute<UnionStrictOmit<SimulateContractParameters<Abi, string, readonly unknown[], Chain, Chain, (`0x${string}` | Account)>, "chain">> & ChainIdParameter<Config, number> & ConnectorParameter, Cancel a pending ownership handover request Must be called by the account that originally requested the handover
Optionalparams: Partial<Omit<UnionCompute<UnionStrictOmit<SimulateContractParameters<Abi, string, readonly unknown[], Chain, Chain, (`0x${string}` | Account)>, "chain">> & ChainIdParameter<Config, number> & ConnectorParameter, Get the expiry timestamp for a pending ownership handover Returns 0 if there is no pending handover request for the given address
The address to check for pending handover requests
Optionalparams: Partial<Omit<ReadContractParameters, Allow the caller to remove their own roles If the caller does not have a role, then it will be a no-op for that role
Bitmap of roles to renounce
Optionalparams: Partial<Omit<UnionCompute<UnionStrictOmit<SimulateContractParameters<Abi, string, readonly unknown[], Chain, Chain, (`0x${string}` | Account)>, "chain">> & ChainIdParameter<Config, number> & ConnectorParameter, Allow the caller to remove their own roles If the caller does not have a role, then it will be a no-op for that role
Bitmap of roles to renounce
Optionalparams: Partial<Omit<UnionCompute<UnionStrictOmit<SimulateContractParameters<Abi, string, readonly unknown[], Chain, Chain, (`0x${string}` | Account)>, "chain">> & ChainIdParameter<Config, number> & ConnectorParameter, High level deployment function to deploy and await the contract address.
This is mainly a convenience method to easily deploy a contract, but will not initialize a Cloneable,
which makes it useless for Boost components.
Obviously you can ignore the TS warnings and use this, but you shouldn't in most all cases.
Optionalpayload: ManagedBudgetWithFeesPayloadOptionaloptions: DeployableOptionsOptionalwaitParams: Omit<WaitForTransactionReceiptParameters, "hash">The lower level contract deployment function that does not await for the transaction receipt.
This is mainly a convenience method to easily deploy a contract, but will not initialize a Cloneable,
which makes it useless for Boost components.
Obviously you can ignore the TS warnings and use this, but you shouldn't in most all cases.
Optional_payload: ManagedBudgetWithFeesPayloadOptional_options: DeployableOptionsCheck if the contract supports the given interface
The interface identifier
Optionalparams: Partial<Omit<ReadContractParameters, Return a cloneable's unique identifier for downstream consumers to differentiate various targets All implementations must override this function
Optionalparams: Partial<Omit<ReadContractParameters, Attaches a new payload for use with this deployable's initialization
Will set this contract's address and return the instance for chaining. Does not verify that provided address is valid.
Will set this contract's internal Wagmi Configuration and return the instance for chaining.
Utility function to validate the existence of an address on this Contract.
ContractAddressRequiredError if no address exists on this Contract instance
A typed wrapper for (viem.getLogs)[https://viem.sh/docs/actions/public/getLogs#getlogs].
Accepts eventName and eventNames as optional parameters to narrow the returned log types.
Optionalparams: Omit<GetLogsParams<readonly [{ const logs = contract.getLogs({ eventName: 'EventName' })
const logs = contract.getLogs({ eventNames: ['EventName'] })
@public
@async
@template {ContractEvent} event
@template {ExtractAbiEvent<
ContractAbi,
event
>} [abiEvent=ExtractAbiEvent<ContractAbi, event>]
@param {?Omit<
GetLogsParams<ContractAbi, event, abiEvent, abiEvent[]>,
'event' | 'events'
> & {
eventName?: event;
eventNames?: event[];
}} [params]
@returns {Promise<GetLogsReturnType<abiEvent, abiEvent
A typed wrapper for wagmi.watchContractEvent
Optionalparams: Partial<Omit<UnionCompute<WatchContractEventParameters<readonly [{ ProtectedvalidateProtectedInternal method used to ensure that a Wagmi configuration and payload are always present when deploying.
Optional_payload: POptional_options: DeployableOptionsProtectedoptionallyProtectedawaitProtectedOptionalwaitParams: Omit<WaitForTransactionReceiptParameters, "hash">
A minimal budget implementation that simply holds and distributes tokens (ERC20-like and native) This type of budget supports ETH, ERC20, and ERC1155 assets only
Export
ManagedBudgetWithFees