Skip to main content

Web3

Welcome to the Web3 Settings page, where you can unlock the full potential of our Web3 functionality to create and deploy your own smart contracts. With this powerful feature, you have the ability to enable token-gating for your content and comments, offering you opportunities to monetize your platform and incentivize user engagement.

Understanding the Smart Contract​

To make the most of the Web3 Settings, it's important to grasp how the contract works. Here are some key points to keep in mind:

How the contract works​

  • The person who initially deployed the contract is considered an "owner".
  • Users can send Ether to the contract address, triggering the smart contract to mint new ERC-20 tokens and allocate them to the sender. The number of tokens received by the sender is determined by the token price.
  • The token price, which represents the price of one Ether, can be set and updated by the "owner" using the setPrice() function. For example, a token price of 1000000000000000000n signifies one Ether.
  • The token supply is unlimited, but the "owner" can toggle the ability for the bank to mint new tokens using the pause() and unpause() functions.
  • The current token price can be retrieved by calling getPrice().
  • Events are emitted on-chain whenever the contract is paused, unpaused, or when the token price is changed, ensuring transparency and visibility.
  • The "owner" can withdraw Ether that was sent to the contract by users who purchased the ERC-20 tokens.

To enable token-gating on your platform, follow these steps:

  1. **Enabling your Module: Visit the Enabling your Module page to activate the necessary module for Web3 integration.
  2. Creating your Contract: Learn how to create your contract by referring to the Creating Your Contract guide.
  3. Configure your Web3 Settings: Head over to theConfiguring your Settings section to customize your Web3 settings.
  4. Token-Gating: Explore the Token-Gating feature to control access to content and comments based on users' token ownership.

By leveraging the Web3 Settings and enabling token-gating, you can unlock new possibilities for your platform and create a vibrant ecosystem of engagement and participation.

note

Web3 and token-gating are fairly new technologies and are still in the early stages of development. We are constantly working to improve our Web3 functionality and we welcome any feedback you may have. Please feel free to reach out to us at support@storypro.io.