TokenManager
TokenManagers can be applied to your contracts in order to govern how your tokens can be transferred or have their metadata updated. You can write your own custom logic, set the TokenManager to your contract, and your hooks will be invoked before the metadata update function or the transfer function can be successfully invoked.
A simple example of how you might use this is to freeze the metadata for your whole collection, or specific tokens, to demonstrate to holders that it can never change. Another simple example is creating soulbound tokens. More complex or novel examples might involve letting owners update the metadata for their own tokens, or letting anybody update token metadata based on specific criteria, or even letting groups of users vote on decisions to transfer tokens not owned by them.
See the interface at ITokenManager.sol for all the relevant functions, notably canSwap
and canRemoveItself
which allow the modules themselves to dictate whether they can be swapped out for another module. This allows developers to write modules which contain logic about whether or not they can be replaced, allowing you to do things like provably freezing metadata for a token set.
See the TokenManager directory in Github for example implementations and more ideas about how this can be used.
Last updated