kojhliang / battles

Smart Contracts for "Battles" mode.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Battles

Contract address: EQAIiXf9qEzipLci0MaR_a_7C5S8mb8cy2kU9cGGQId4qwZg

Website
Telegram mini app

A user can create a "Battle" for any amount above min_battle_value by sending a transaction with OP = 1.
Getter: get_min_battle_value

After that, all TON will be sent to a new battle address.
The battle address will remain active until either the second player joins the battle or the battle creator cancels it.

To participate in the battle, the second participant must send a slightly larger number of coins to the battle address with OP = 777.
(50 TON vs 50.0001 TON)

Each battle participant has a 50% chance of winning.
However, the fees for participants will be different.

In case of victory, the fee for the battle creator will be 2.5%.
For the battle participant, it will be 5%.

About

Smart Contracts for "Battles" mode.