LensProfiles
Inherits: LensBaseERC721, ERC2981CollectionRoyalties, ILensProfiles
State Variables
TOKEN_GUARDIAN_COOLDOWN
uint256 internal immutable TOKEN_GUARDIAN_COOLDOWN;
Functions
constructor
constructor(uint256 tokenGuardianCooldown);
whenNotPaused
modifier whenNotPaused();
onlyProfileOwner
modifier onlyProfileOwner(address expectedOwner, uint256 profileId);
onlyEOA
modifier onlyEOA();
getTokenGuardianDisablingTimestamp
Returns the timestamp at which the Token Guardian will become effectively disabled.
function getTokenGuardianDisablingTimestamp(address wallet) external view returns (uint256);
Parameters
Name | Type | Description |
---|---|---|
wallet | address | The address to check the timestamp for. |
Returns
Name | Type | Description |
---|---|---|
<none> | uint256 | uint256 The timestamp at which the Token Guardian will become effectively disabled. Zero if enabled. |
DANGER__disableTokenGuardian
DANGER: Triggers disabling the profile protection mechanism for the msg.sender, which will allow transfers or approvals over profiles held by it. Disabling the mechanism will have a 7-day timelock before it becomes effective, allowing the owner to re-enable the protection back in case of being under attack. The protection layer only applies to EOA wallets.
function DANGER__disableTokenGuardian() external onlyEOA;
enableTokenGuardian
Enables back the profile protection mechanism for the msg.sender, preventing profile transfers or approvals (except when revoking them). The protection layer only applies to EOA wallets.
function enableTokenGuardian() external onlyEOA;
burn
Burns a profile, this maintains the profile data struct.
function burn(uint256 tokenId)
public
override(LensBaseERC721, IERC721Burnable)
whenNotPaused
onlyProfileOwner(msg.sender, tokenId);
tokenURI
Overrides the ERC721 tokenURI function to return the associated URI with a given profile.
function tokenURI(uint256 tokenId) public view override(LensBaseERC721, IERC721Metadata) returns (string memory);
approve
function approve(address to, uint256 tokenId) public override(LensBaseERC721, IERC721);
setApprovalForAll
function setApprovalForAll(address operator, bool approved) public override(LensBaseERC721, IERC721);
supportsInterface
See {IERC165-supportsInterface}.
function supportsInterface(bytes4 interfaceId)
public
view
virtual
override(LensBaseERC721, ERC2981CollectionRoyalties, IERC165)
returns (bool);
_hasTokenGuardianEnabled
function _hasTokenGuardianEnabled(address wallet) internal view returns (bool);
_getRoyaltiesInBasisPointsSlot
function _getRoyaltiesInBasisPointsSlot() internal pure override returns (uint256);
_getReceiver
function _getReceiver(uint256) internal view override returns (address);
_beforeRoyaltiesSet
function _beforeRoyaltiesSet(uint256) internal view override;
_beforeTokenTransfer
function _beforeTokenTransfer(address from, address to, uint256 tokenId) internal override whenNotPaused;