Skip to main content

Solidity API

ILockKeyExtendHook​

Functions to be implemented by a keyExtendHook.

Lock hooks are configured by calling setEventHooks on the lock.

onKeyExtend​

function onKeyExtend(uint256 tokenId, address from, uint256 newTimestamp, uint256 prevTimestamp) external

This hook every time a key is extended.

Parameters​

NameTypeDescription
tokenIduint256tje id of the key
fromaddressthe msg.sender making the purchase
newTimestampuint256the new expiration timestamp after the key extension
prevTimestampuint256the expiration timestamp of the key before being extended