TON Smart Contract for American Roulette (can be easy converted to European)
kQA_IZq2K78y4gtYwCBoi3ifz7ozMho45Gz2_0sBlibeU5db
Min bet: 1 GRAM
Max bet: 100.0 GRAM
-
Fift and lite-client must be installed
-
Create wallet
./wallet-v2/new-wallet-v2.fif 0
Send inital amount (eg. 1 gram) to Non-bounceable address
Send
new-wallet-query.boc
using lite-client -
Create play query (eg. to red):
./play.fif red
List all avaliable types of bets listed below
-
Create money send order with play query
./wallet-v2/wallet-v2.fif new-wallet kQA_IZq2K78y4gtYwCBoi3ifz7ozMho45Gz2_0sBlibeU5db <seqno> <amount> -B play-query.boc
-
Send
wallet-query.boc
using lite-client -
Check wallet balance after ~40 sec
bet | description | Payout |
---|---|---|
straight N | Bet on a single number N. N must be any in range 0 to 36 or 00 | 35 to 1 |
1st_dozen | Bet on any number in range 1 - 12 | 2 to 1 |
2st_dozen | Bet on any number in range 13 - 24 | 2 to 1 |
3st_dozen | Bet on any number in range 25 - 36 | 2 to 1 |
odd | Bet on any odd number | 1 to 1 |
even | Bet on any even number | 1 to 1 |
red | Bet on any red number | 1 to 1 |
black | Bet on any black number | 1 to 1 |
1to18 | Bet on any number in range 1 - 18 | 1 to 1 |
19to36 | Bet on any number in range 19 - 36 | 1 to 1 |
-
func-build contract
-
Create new contract query:
./new-contract.fif
Send inital amount eg. 1 gram to Non-bounceable address
Send new contract query
-
./admin-configure.fif <minBet> <maxBet> <seqno> <addr> [contract.pk]
Default min: 1 gram, max: 1000 gram
-
You can withdraw money from contract using
./admin-withdraw.fif <withdraw-to-addr> <amount> <seqno> <contract-addr> [contract.pk]
export TON="/Users/my-user/ton"
export TON_SRC="$TON/ton"
export TON_BUILD="$TON/ton-build"
export PATH="$TON/bin:$TON_BUILD/crypto:$PATH"
export FIFTPATH="$TON_SRC/crypto/fift/lib"
bin/
folder from this repo must be in $TON/
folder
Opcodes BALANCE & RANDSEED: ton-blockchain/ton#211