How to make your NFTs non-transferrable aka Soulbound
What is a Soulbound Token
Let’s first understand what a Soulbound Token (SBT) is:
A Soulbound Token is a type of digital asset or token that is unique and cannot be transferred to other individuals. This means that the owner of the token is the only one who has control over it and can use it for various purposes.
In simple words, a token that is non-transferrable is a Soulbound Token.
How to make your tokens Soulbound or Non-Transferrable
The easiest way to do this from the permissions tab on your thirdweb contract dashboard (Refer Guide).
If you prefer doing it via the Explorer, then you can follow the steps below to do so:
- Head to the thirdweb Dashboard and select your contract that you wish to make non-transferrable.
- Go to the “Explorer” tab on your contract dashboard.
- Under “write”, click on “revokeRole”.
- The “revokeRole” function expects two arguments to be provided, they are “Role” and “Account” respectively.
- The role that you would want to revoke is the “TRANSFER_ROLE”, and since the function expects the input for “Role” in bytes32 format, you would need to convert the string “TRANSFER_ROLE” into bytes32.
- Now the input you pass for “Role” would be
0x
+bytes32(”TRANSFER_ROLE)
, which is nothing but0x
+8502233096d909befbda0999bb8ea2f3a6be3c138b9fbf003752a4c8bce86f6c
- So the input you pass for “Role” would become
0x8502233096d909befbda0999bb8ea2f3a6be3c138b9fbf003752a4c8bce86f6c
- Now since you want to remove transfer permissions for everyone i.e. every wallet address (which holds or will hold the NFT), the input you pass for “Account” would be
0x0000000000000000000000000000000000000000
. - Refer to the example screenshot below:
- You can now go to the “Permissions” tab on your dashboard and check that the changes you made would have been reflected.
( Note: TRANSFER_ROLE
in bytes32 format would be 8502233096d909befbda0999bb8ea2f3a6be3c138b9fbf003752a4c8bce86f6c
Refer to Tool if you want to see how the bytes32 conversion works)
Can’t get this working? If you’ve followed the above and still have issues, contact our support team for help.