reward.watchRewardRecipientSet
Watches for reward recipient set events when token holders change their reward recipient.
Usage
import { } from './viem.config'
const = .reward.watchRewardRecipientSet({
: (, ) => {
.('Holder:', .holder)
.('Recipient:', .recipient)
},
: '0x20c0000000000000000000000000000000000001',
})
// Later, stop watching
()Return Type
type ReturnType = () => voidReturns a function to unsubscribe from the event.
Parameters
onRewardRecipientSet
- Type:
declare function onRewardRecipientSet(args: Args, log: Log): void
type Args = {
/** Token holder address who set their reward recipient */
holder: Address
/** New reward recipient address (zero address indicates opt-out) */
recipient: Address
}Callback to invoke when a reward recipient is set.
token
- Type:
Address
Address of the TIP-20 token to watch.
args (optional)
- Type:
object
type Args = {
/** Filter events by holder address */
holder?: Address
/** Filter events by recipient address */
recipient?: Address
}Optional filters for the event.