Function: renew(uint256 tokenId, uint256 expiresAt, string calldata correlationId)
This function renews an existing ownership token by updating its expiration date. It validates the new expiration date and ensures the token exists before updating. Only minters can execute this function.
Inputs
tokenId
Control: Full.
Constraints: Token existence is validated via
_ownerOf(tokenId)
, which returnsaddress(0)
for nonexistent tokens.Impact: Identifies the specific token to renew — ensures operation only applies to existing tokens.
expiresAt
Control: Full.
Constraints: Validated via
_validateExpirationDate()
to ensure future date is within a 10-year limit.Impact: New expiration timestamp for the token — must be a valid future date.
correlationId
Control: Full.
Constraints: N/A.
Impact: Used for off-chain tracking and correlation with renewal operations.
Branches and code coverage (including function calls)
Intended branches
Negative behavior