Skip to main content

ILockKeyTransferHook

Functions to be implemented by a hasValidKey Hook.

Lock hooks are configured by calling setEventHooks on the lock.

Methods​

onKeyTransfer​

function onKeyTransfer(address lockAddress, uint256 tokenId, address operator, address from, address to, uint256 expirationTimestamp) external nonpayable

If the lock owner has registered an implementer then this hook is called every time balanceOf is called

Parameters​

NameTypeDescription
lockAddressaddressthe address of the current lock
tokenIduint256the Id of the transferred key
operatoraddresswho initiated the transfer
fromaddressthe previous owner of transferred key
toaddressthe new owner of the key
expirationTimestampuint256the key expiration timestamp (after transfer)