Earn While Learning Web3 Programming>> Start Here FREE!!!
EXERCISE: :
i. Watch the above lesson video and also read through the recommended resources. Then, answer the following questions
ii. How To Create A Non-Transferable Lock On Unlock Protocol?
(Share your experience and challenges doing this for the first time)
iii. Summarize in your own word in this forum below:
(NOTE: please, don't just copy paste from other students - instead answer in your own word base on your level of understanding the lesson and resources)
NOTE:
This Is An Exercise From Our FREE COURSE with CERTIFICATION:
(If you have not enrolled yet, you can join the course totally for FREE).
How To Create A Non-Transferable Lock?
- You can not stop members from transferring unlock membership NFT to others but in some cases, you can discourage them from doing so
by deducting the access key duration per each transfer
- means member loses 100% or a certain percentage of access key feature of the NFT each time it is been transferred from one wallet to the other
- Here is How To Create A Non-Transferable Lock Membership NFT Key Step By Step:
- On dashboard go to explorer
- click write
- Search for this function in your deployed Lock smart contract "updateTransferFee"
- the "updateTransferFee" function deducts from the duration of the KEY validity per each transfer from one wallet to another
- put 10000 which means 100% (if this is used, the moment a member transfer this NFT KEY to another wallet, it expires and lose access to unlock your Locked contents
This makes the NFT non-transferable in the actual sense - even though it can still be sent from one wallet to another.
It expires immediate the new wallet receives it
- put 5000 for 50% (means the new wallet only has 50% KEY validy left).
For example, a Membership NFT of 1years/12months will now be cut to 6Months after transfer from the original wallet to another)
- put 2500 for 25% (means the new wallet only have 75% KEY validy left).
For example, a Membership NFT of 1years/12months will now be cut to 9Months after transfer from the original wallet to another)
- put 1000 for 10% (means the new wallet only have 90% KEY validy left).
For example, a Membership NFT of 1years/12months will now be cut to 10+Months after transfer from the original wallet to another)
UPDATE:
If you are not seeing the above function in the blockchain explorer. Then you need to first manually verify your lock smart contract following this short steps here https://docs.unlock-protocol.com/unlock/creators/faq#why-is-my-lock-contract-not-verified-on-the-block-explorer