Closed ra-phael closed 2 years ago
Looks good.
I'm wondering if we also want a function like updateExpiry
or even expire
where the owner/minter can update the expiry of an existing token in the past to automatically expire it.
I think the idea of an immutable expiry might not always work for all use-cases.
Good point! Issuers might have a reason to update the expiry. That's why they can use the inherited _setExpiryDate()
.
Did you mean we should add setExpiryDate()
to the IERC1238Expirable interface?
Yes exactly, otherwise the Expirable interface doesn't actually expose a way to directly set the expiry date as part of the feature "extension" because its just an internal function.
Optional extension which adds expiration to tokens using a simple mapping from token id to expiry date. Relying parties can then check if a token is expired or not by calling
isExpired(id)
.