Threed is a socialfi dApp built on the Sui blockchain that allows users to create and join communities using token-gated NFTs.
Users can also mint, list, and transfer NFTs within these communities.
Experience the new social at https://threed.cc
Follow us on X at https://twitter.com/threedapp
To get started with Threed on your local development environment, follow these steps:
-
Clone this repository: git clone [https://github.com/sqr3d/sui_TN]
cd Threed -
Install the required dependencies:
npm install -
Configure your Sui development environment, including Sui CLI and your local Sui node.
-
Build and deploy the smart contracts (see Deployment).
-
Start the dApp locally: npm start
The mint_nft.move
file contains the smart contract code for minting NFTs within a community. Only the owner of the community can mint NFTs.
The get_community_nfts.move
file provides functionality to retrieve the NFTs owned by a specific community. It filters NFTs based on the community ID.
The transfer_nft.move
file allows users to transfer ownership of NFTs to other users. Only the current owner of an NFT can initiate the transfer.
For detailed information on how these smart contracts work, refer to the individual contract files.
You can run tests for the smart contracts using the Sui testing framework. Ensure that you have set up your development environment correctly before running tests.
To run tests, use the following command:
sui test
To deploy the smart contracts to the Sui blockchain, use the Sui CLI or other deployment tools. Ensure that you have configured the deployment parameters and have the required tokens for gas fees.
Use the following commands to deploy the contracts:
sui deploy mint_nft.move
sui deploy get_community_nfts.move
sui deploy transfer_nft.move
Contributions to Threed are welcome! Feel free to open issues or submit pull requests for any improvements or bug fixes.
This project is licensed under the MIT License - see the LICENSE file for details.