Creates an instance of DeployableTarget.
Optionalpayload: DeployablePayloadOrAddress<CGDAIncentivePayload>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.
The configuration parameters for the CGDAIncentive
Optionalparams: Partial<Omit<ReadContractParameters, Claim the incentive
Optionalparams: Partial<Omit<UnionCompute<UnionStrictOmit<SimulateContractParameters<Abi, string, readonly unknown[], Chain, Chain, (`0x${string}` | Account)>, "chain">> & ChainIdParameter<Config, number> & ConnectorParameter, Claim the incentive
Optionalparams: Partial<Omit<UnionCompute<UnionStrictOmit<SimulateContractParameters<Abi, string, readonly unknown[], Chain, Chain, (`0x${string}` | Account)>, "chain">> & ChainIdParameter<Config, number> & ConnectorParameter, Clawback assets from the incentive
Optionalparams: Partial<Omit<UnionCompute<UnionStrictOmit<SimulateContractParameters<Abi, string, readonly unknown[], Chain, Chain, (`0x${string}` | Account)>, "chain">> & ChainIdParameter<Config, number> & ConnectorParameter, Clawback assets from the incentive
Optionalparams: Partial<Omit<UnionCompute<UnionStrictOmit<SimulateContractParameters<Abi, string, readonly unknown[], Chain, Chain, (`0x${string}` | Account)>, "chain">> & ChainIdParameter<Config, number> & ConnectorParameter, Check if an incentive is claimable
Optionalparams: Partial<Omit<ReadContractParameters, Check if any claims remain by comparing the incentive's balance against the current reward. Does not take requesting user's elligibility into account.
Optionalparams: Partial<Omit<ReadContractParameters, Check how many claims remain by comparing the incentive's balance against the current reward. Does not take requesting user's elligibility into account.
Optionalparams: Partial<Omit<ReadContractParameters, Calculates the current reward based on the time since the last claim.
The reward is calculated based on the time since the last claim, the available budget, and the reward parameters. It increases linearly over time in the absence of claims, with each hour adding rewardBoost to the current reward, up to the available budget.
For example, if there is one claim in the first hour, then no claims for three hours, the claimable reward would be initialReward - rewardDecay + (rewardBoost * 3)
Optionalparams: Partial<Omit<ReadContractParameters, Get the maximum amount that can be claimed by this incentive. Useful when used in conjunction with BoostCore.calculateProtocolFee
Optionalparams: Partial<Omit<ReadContractParameters, = Return a bigint representing that maximum amount that can be distributed by this incentive.
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: CGDAIncentivePayloadOptional_options: DeployableOptionsGenerates a top-up payload for the CGDAIncentive contract.
In this approach, we treat a "top-up" as incrementing the existing totalBudget
in the incentive by netAmount. The entire payload is re-encoded with the updated budget.
The additional tokens to add to totalBudget.
The ABI-encoded, updated CGDAIncentive payload.
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: CGDAIncentivePayloadOptionaloptions: 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: CGDAIncentivePayloadOptional_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">
Continuous Gradual Dutch Auction Incentive. An CGDA incentive implementation with reward amounts adjusting dynamically based on claim volume.
Export
CGDAIncentive