8000 GitHub - abjurato/tact-smart-battle: My solutions
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

abjurato/tact-smart-battle

ย 
ย 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

11 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿง  Tact Smart Battle ๐Ÿคœ๐Ÿค›

Organized by TON Studio & Codeforces

Welcome to the ultimate smart contract challenge built on Tact โ€” the language for scalable smart contracts on TON. Compete with other developers, write efficient on-chain code, and win Toncoin and exclusive SBTs.


๐Ÿ—‚๏ธ Challenge Structure

The challenge consists of 5 tasks with increasing complexity. Each one focuses on specific smart contract design and optimization patterns.

Task Level Title Description
1 Simple Voting A basic single-contract voting system.
2 Serial Voting Deploy multiple proposals through a master contract.
3 Scalable Voting Handle up to 4 billion voters within strict storage limits.
4 Voting with Refunds Add TON refund logic for voters and master contract top-ups.
5 Gas-Managed Voting Combine scalability, refunds, and gas management.

๐Ÿงช How to Participate

๐Ÿ›  Prerequisites

๐Ÿš€ Quick Start

  1. Create or log in to your Codeforces account

    • Go to codeforces.com
    • If you donโ€™t have an account yet, click โ€œRegisterโ€ and follow the instructions.
  2. Register for the Tact Smart Battle challenge

    • After logging in, visit the official challenge page on Codeforces (Registration guide).
    • Complete the registration form.
    • Be sure to enter your:
      • Telegram username โ€” for community contact and support
      • TON wallet address โ€” to receive Toncoin prizes and SBTs
  3. Clone the official challenge repository

    • This repo contains all templates, tests, and structure:
    git clone https://github.com/ton-studio/tact-smart-battle.git
    cd tact-smart-battle
  4. Install dependencies:

    npm install
  5. Solve tasks locally

    • Each task has a separate .tact file
    • You can run public tests using:
      npm run test1      # test for Task 1
      npm run test2      # test for Task 2
      npm run test       # run all public tests
  6. Submit your solution on Codeforces

    • Go to the Codeforces challenge page for the task youโ€™ve completed.
    • img_1.png
  • Upload your .tact file that matches the task:

    • solution1.tact โ€” for Task 1
    • solution2.tact โ€” for Task 2
    • and so on
  • Submit the file using the provided web form on Codeforces.

    • img_2.png
โš ๏ธ **Do not upload zipped folders or multiple files.** Each submission must contain only one `.tact` file for a single task.
  1. Repeat for other tasks

    • You can submit other tasks in the same way โ€” one at a time.
    • If you improve your solution, you can resubmit it.
    • You are allowed up to 3 submissions per hour per task.
    • The system will automatically select your highest scoring solution for each task and use it in the final leaderboard.

๐Ÿ“Š How results will be displayed

After you submit a solution, the system will automatically evaluate it and select your best attempt for each task. The final leaderboard will show your highest score per task and your total points.

The leaderboard will look like this, so you can see all of your submissions:

img_5.png Leaderboard Example

โœ… Only verified participants with at least one valid solution will appear on the final leaderboard.


โ— Error Feedback

The system provides feedback for the following types of errors:

  • Compilation errors โ€” if your .tact file fails to compile or crashes during test execution (e.g., throws an exit code), the error message and details will be shown.
  • Test failures โ€” if your contract does not pass the required interface or logic checks, the failed test cases will be displayed.

This helps you improve your solution and resubmit until you get the best possible result.

๐Ÿ“ฆ Submission Format

  • Submit only the smart contract file for the specific task:

    • solution1.tact โ€” for Task 1
    • solution2.tact โ€” for Task 2
    • solution3.tact โ€” and so on
  • Do not upload multiple files or zip archives.

  • File names must exactly match the required format, or your submission will be rejected.

โ— Each submission is for a single task only. You cannot submit all tasks at once.


๐Ÿงฎ Tact Smart Battle โ€“ Scoring System

The total score in this challenge is 1000 points, distributed across 5 tasks of increasing difficulty.

Each task includes:

  • Logic Score โ€” awarded for passing private tests.
  • Gas Bonus โ€” awarded for efficient, low-gas implementations (only for full-passing solutions).

๐ŸŽฏ Scoring Breakdown

Task Title Logic Score Gas Bonus Total Points
1 Simple Voting 90 +10 100
2 Master Contract 150 +20 170
3 Scalable Voting 200 +20 220
4 Voting + Refunds 220 +30 250
5 Gas-Managed Voting 230 +30 260
1000

โœ… Logic Score

Each task includes a set of private tests. You earn logic points only if you pass all of them.

For example:
If Task 3 has 10 private tests, and you pass all 10 โ€” you receive the full 200 points.
If you fail even one test โ€” you get 0 for the logic part.

This ensures your solution is fully correct and production-ready before itโ€™s rewarded.

โš™๏ธ Gas Bonus

To encourage optimization, each task also includes a Gas Bonus โ€” awarded only if your solution passes all private tests.

Contracts are compared based on actual gas usage during test runs.

  • The most gas-efficient solution gets the full gas bonus.
  • Other full-passing solutions receive a scaled bonus based on how close they are to the reference solution.

๐Ÿ’ก If your solution is more efficient than the reference, you can score above the listed Total Points for that task.

Gas really matters. Optimize smartly.


๐Ÿ”’ Notes

  • You can resubmit improved solutions. Only the highest scoring attempt per task will be used in the final result.

  • Partial solutions are still counted for logic points, but do not qualify for gas bonus.


Good luck, and aim for both correctness and efficiency! โš”๏ธ๐Ÿš€


๐Ÿ† Prize Pool

Total Prize Pool: $20,000 in Toncoin

Top 128 participants will receive Toncoin prizes and SBTs (Soulbound Tokens).

Prize Breakdown:

  • ๐Ÿฅ‡ Top 16 โ€” $10,000 total
  • ๐Ÿฅˆ Ranks 17โ€“64 โ€” $7,000 total
  • ๐Ÿฅ‰ Ranks 65โ€“128 โ€” $3,000 total

๐ŸŽ– Soulbound Tokens (SBTs)

  • Everyone who scores โ‰ฅ1 point and provides a valid, verifiable submission will receive a Participant SBT.
  • Top 16 participants will also receive a Winner SBT.

โš ๏ธ Public sharing of solutions before the deadline will disqualify your SBT eligibility.


๐Ÿ“ Submission Rules

  • Participants solve tasks locally in this repository.
  • Each solution is submitted individually via Codeforces: codeforces.com.
  • Final deadline: April 28, 12:00 (UTC+3).
  • Do not make public your solutions before the deadline.
  • If at least one solution passes, you will be included in the final leaderboard.
  • You can use all the features of the language

๐Ÿ“… Timeline

  • ๐Ÿ“ Registration: codeforces.com/register
  • ๐Ÿš€ Challenge is open now
  • ๐Ÿ›‘ Final Submission Deadline: April 28, 12:00 (UTC+3)

๐Ÿš€ Getting Started with Tact

New to Tact? These quickstart guides and tools will get you up to speed fast:

๐Ÿ“š Learn the Language

๐Ÿ›  Editor Support & Tools


๐Ÿ’ฌ Community & Support

Join the developer chats to ask questions and connect with other participants:


Good luck, and may your contracts be gas-efficient and bug-free โšก

About

My solutions

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 69.3%
  • Tact 30.7%
0