alefmanvladimir / tact-challenge-2

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

πŸš€ Social Network | Tact Challenge #2 by TON Foundation

Overview

This challenge is designed to engage participants in creating a decentralized social network prototype utilizing the Tact smart contract language. The project consists of five stages, each aimed at implementing a core feature of the social network, from user profiles to decentralized management.

πŸ“… Timeline

  • Challenge Start Date: March 28
  • Submission Deadline: April 4

πŸ“ Tasks Overview

Stage β„–1: Creation of the User Contract

  • Develop a contract representing the user profile with initial data including user's and master contract's address.
  • Fields for storage:
    • master_address
    • user_address
    • name
    • avatar_url
    • short_description
    • age
    • post_index = 0
  • Implement functionality for the user to update avatar_url and short_description.
  • Include a getter getUserData to retrieve user profile details.
  • More details about stage β„–1 here

Stage β„–2: Posting

  • Enhance the user contract to deploy post contracts, incrementing post_index with each new post.
  • Post contract storage should include fields like title, text, and likes_count.
  • Add a getter getPostData in the post contract to return post details.
    • More details about stage β„–2 here

Stage β„–3: Social Interaction

  • Allow users to like posts and comment on them through user contracts, which communicate with post contracts accordingly.
  • Implement a mechanism to verify actions (likes/comments) are performed by legitimate user contracts.
  • Include a getter getCommentData in the comment contract to return comment details.
    • More details about stage β„–3 here

Stage β„–4: Rewards for Activity

  • Implement functionality in the master contract to distribute tokens based on likes and comments.
  • Post contracts should send data to the master contract, which in turn sends tokens to the user based on the activity.
    • More details about stage β„–4 here

Stage β„–5: Decentralized Management

  • Implement a voting mechanism in the master contract for decision-making by the community.
  • Launch a vote with a 24-hour countdown to decide whether to change rewards for activity (likes, comments)
    • More details about stage β„–5 here

πŸ“… Solution submission guide and terms

  1. Registration Process: Before you begin, make sure to go through the registration process via the @smartchallengebot. Your solutions will not be accepted if you are not properly registered.

  2. Create a Private GitHub Repository: Clone this repository and set it as your own private GitHub repo. Ensuring the visibility configs are set to "private" is crucial to safeguarding your solution.

  3. Set Your Token: Utilize the token provided to you during registration in Telegram bot and set it as a secret variable called USER_TOKEN in your private repository. You can learn more about setting secret variables in the official GitHub documentation.

  4. Submit Your Solution: When you are ready to submit your solution, simply push your code into your private repository. The code will be sent to the task review server, and GitHub actions will display the status of your submission.

  5. Solution Evaluation: If at least one of your solutions works well, your submission will be counted. Feel free to push solutions for more tasks; GitHub actions will run your code against tests and count successful submissions. To see a detailed report on your submission, proceed to GitHub Actions tab and you will see a similar report along with possible errors if present:

Stage Compiled Tests Passed Points Gas Used Compilation Error
1 ❌ ❌ 0 N/A Error Details
2 βœ… ❌ 0/6 0 0
3 βœ… βœ… 10/10 5.127 491,235,717
4 ❌ ❌ 0 N/A Error Details
5 ❌ ❌ 0 N/A Error Details
  1. Check Your Points: To check your solution points, review the logs of the GitHub action for your latest commit. Additionally, you can find your solution points in the menu button inside of the Telegram bot.

Best of luck with your submissions!

‼️ Important rules:

  • It's forbidden to use any FunC/Fift code inside of submitted Tact solutions. Participants who will have FunC/Fift code in their submissions will be disqualified. This rule applies to Tact bindings as they're using a lower level of abstraction thus compromising the nature of Tact Challenge.
  • Please don't share your solution's code with anybody. If someone's submission will be suspected of using your code - both participants will be disqualified. Repeated case will cause lifetime ban from TON Smart Challenges.

πŸ† Scoring and Prizes

Winners of the contest will receive prizes denominated in Toncoin, the native cryptocurrency of TON blockchain, which is also used as a resource for contract execution.

Each stage can bring you a max of 6 points. You get 5 points for solving a stage. You get an extra point if you solve it without using any gas.

Minimum amount of points to be eligible for the prize is 6 points.

Prizes:

  • The top 15% of participants share $7,000 in TON
  • The middle 30% of participants share $7,000 in TON
  • The bottom 55% of participants share $6,000 in TON

Each prize pool is shared equally among the participants in that group. In total, we're giving away $20,000 in TON prizes.

The total prize might change depending on the number of participants.

πŸš€ Getting Started with TON

New to blockchain or TON development? Start here:

πŸ“˜ Essential Tact Resources

Master the Tact language with these must-have materials:

Find ready-to-use smart contract examples here. Explore more about Tact in the awesome-tact repository.

πŸ› οΈ Tools for Tact Compilation and Testing

For Tact Challenge

For Tact Challenge we recommend cloning current repository and follow the submission guide described above.

To quickstart your own Tact projects

We recommend using blueprint framework for a smooth Tact development experience:

Online IDE to get started without additional setups

https://ide.nujan.io/

Tact syntax highlight

For a more streamlined coding experience, consider using Tact-specific IDE or editor plugins for syntax highlighting and typechecking.

🌍 TON Developers Community Chats

Stay in the loop and engage with other developers:

About


Languages

Language:TypeScript 100.0%