How to limit/restrict/prevent the transfers of owned objects in Sui move? I want to block a user from sending an object in his/her wallet to make the object soulbound like some of the SuiFrens. I've have had a look at the sui::transfer module code and the docs but did not find how to do this.
How to limit the transfer of owned objects in Sui move?
199 views Asked by Sinus At
1
If an object
T
does not have thestore
ability, it cannot be transferred except by code inside the module that declaresT
. A useful pattern is to declare a "custom transfer" function, wrappingsui::transfer::transfer
and imposing the restrictions inside the function. Here is an example: examples.sui.io/basics/custom-transferCredit to Sam Blackshear for answering the question on Telegram