In addition to direct queries, I'd also like to subscribe to events to listen for whenever the expiry date changes (e.g. when it is renewed)
I've found that NodeOwner.sol
has an
available
function
whose implementation looks promising:
function available(uint256 tokenId) public view returns(bool) {
return expirationTime[tokenId] < now;
}
and that same file also defines an
ExpirationChanged
event:
event ExpirationChanged(uint256 tokenId, uint expirationTime);
What I haven't been able to figure out is:
- How to get the
NodeOwner
- which contract/ address should be queried? - If there are multiple possible addresses/ instances of
NodeOwner
, or there's only one of them.