Creates an instance of DeployableTarget.
Optional
payload: DeployablePayloadOrAddress<ERC20IncentivePayload>Either a given implementation's initialization payload, or an address to an existing on chain target.
Optional
isBase: 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.
Static
basesA static property representing a map of stringified chain ID's to the address of the base implementation on chain, used when cloning base contracts.
Static
registryThe target's registry type.
Readonly
abiReadonly
_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
A getter returning this contract's deployed address, if it exists.
The owner of the incentive
Optional
params: Partial<Omit<ReadContractParameters<readonly [{ 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)
Optional
params: Partial<Omit<ReadContractParameters<readonly [{ The number of claims that have been made
Optional
params: Partial<Omit<ReadContractParameters<readonly [{ A mapping of address to claim status
Optional
params: Partial<Omit<ReadContractParameters<readonly [{ The address of the ERC20-like token
Optional
params: Partial<Omit<ReadContractParameters<readonly [{ The strategy for the incentive (MINT or POOL)
Optional
params: Partial<Omit<ReadContractParameters<readonly [{ The reward amount issued for each claim
Optional
params: Partial<Omit<ReadContractParameters<readonly [{ The limit (max claims, or max entries for raffles)
Optional
params: Partial<Omit<ReadContractParameters<readonly [{ The set of addresses that have claimed a slot in the incentive raffle, accessed by bigint index.
Index of address
Optional
params: Partial<Omit<ReadContractParameters<readonly [{ Claim the incentive
Optional
params: Partial<Omit<WriteContractParameters<readonly [{ Claim the incentive
Optional
params: Partial<Omit<WriteContractParameters<readonly [{ Clawback assets from the incentive
Optional
params: Partial<Omit<WriteContractParameters<readonly [{ Clawback assets from the incentive
Optional
params: Partial<Omit<WriteContractParameters<readonly [{ Check if an incentive is claimable. For the POOL strategy, the bytes data
portion of the payload ignored. The recipient must not have already claimed the incentive.
Optional
params: Partial<Omit<ReadContractParameters<readonly [{ = True if the incentive is claimable based on the data payload
Draw a winner from the raffle. Only callable by owner. Only valid when the strategy is set to Strategy.RAFFLE
Optional
params: Partial<Omit<WriteContractParameters<readonly [{ Draw a winner from the raffle. Only callable by owner. Only valid when the strategy is set to Strategy.RAFFLE
Optional
params: Partial<Omit<WriteContractParameters<readonly [{ 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: ERC20IncentivePayloadOptional
_options: DeployableOptionsHigh 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.
Optional
payload: ERC20IncentivePayloadOptional
options: DeployableOptionsOptional
waitParams: 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: ERC20IncentivePayloadOptional
_options: DeployableOptionsCheck if the contract supports the given interface
The interface identifier
Optional
params: Partial<Omit<ReadContractParameters<readonly [{ Return a cloneable's unique identifier for downstream consumers to differentiate various targets All implementations must override this function
Optional
params: Partial<Omit<ReadContractParameters<readonly [{ 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.
Optional
params: 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
Optional
params: Partial<Omit<UnionCompute<WatchContractEventParameters<readonly [{ Protected
validateProtected
Internal method used to ensure that a Wagmi configuration and payload are always present when deploying.
Optional
_payload: POptional
_options: DeployableOptionsProtected
optionallyProtected
awaitProtected
Optional
waitParams: Omit<WaitForTransactionReceiptParameters, "hash">
A simple ERC20 incentive implementation that allows claiming of tokens
Export
ERC20Incentive