I asked this question before but I worded it ambiguosly.
I have a function in a smartcontract that should only be accessible by users who have a signature, issued by the contract owner. The goal is, to allow a user to use this signature only once and get rejected every try thereafter. This signature will be issued off-chain and is unique to each user.
The issue with this approach however, is that, since the signatures would be issued off-chain, nothing would stop a user from saving their signature and to just use it to perform the transaction a second time.
The reason I am not just creating a mapping or an array of users who are allowed to access this function, or who have already accessed it, is that operations on those data structures can quickly become very expensive at scale. So I would like to avoid those.
Do you see any way to achieve this without resorting to on chain lists or mappings?
Thanks!