Skip to main content

Solidity API

ILockKeyGrantHook​

Functions to be implemented by a KeyGrantedHook.

Lock hooks are configured by calling setEventHooks on the lock.

onKeyGranted​

function onKeyGranted(uint256 tokenId, address from, address recipient, address keyManager, uint256 expiration) external

If the lock owner has registered an implementer then this hook is called with every key granted.

the lock's address is the msg.sender when this function is called

Parameters​

NameTypeDescription
tokenIduint256the id of the granted key
fromaddressthe msg.sender granting the key
recipientaddressthe account which will be granted a key
keyManageraddressan additional keyManager for the key
expirationuint256the expiration timestamp of the key