Search Apps Documentation Source Content File Folder Download Copy Actions Download State String Boolean Number Struct Map Slice Pointer Function Closure Reference Nil Package Type Interface Unknown

roulette_v3 state

Back to all declarations

denom

untyped string

Value

"ugnot"

wheelSize

untyped bigint

// 0..37 (37 == "00")

Value

(38 <untyped> bigint)

payoutNumber

untyped bigint

// American straight-up

Value

(36 <untyped> bigint)

payoutOutside

untyped bigint

Value

(2 <untyped> bigint)

maxHistory

untyped bigint

Value

(20 <untyped> bigint)

statusIdle

untyped string

Value

"idle"

statusOpen

untyped string

Value

"open"

minLPDeposit

int64

// 1 GNOT

Value

1000000

chip05

int64

// 0.5 GNOT

Value

500000

chip1

int64

// 1 GNOT

Value

1000000

chip2

int64

// 2 GNOT

Value

2000000

chip5

int64

// 5 GNOT

Value

5000000

chip10

int64

// 10 GNOT

Value

10000000

BetNumber

untyped string

// straight up: 0, 37("00"), or 1–36 — pays 36x

Value

"NUMBER"

BetRed

untyped string

Accepted bet types.

Value

"RED"

BetBlack

untyped string

Accepted bet types.

Value

"BLACK"

BetEven

untyped string

Accepted bet types.

Value

"EVEN"

BetOdd

untyped string

Accepted bet types.

Value

"ODD"

BetLow

untyped string

// 1–18

Value

"LOW"

BetHigh

untyped string

// 19–36

Value

"HIGH"

reds

map[int]bool

American red pockets (18). Blacks are the remaining 1–36.

Open
OID
0ea135…b7a3:4
reds details

Inspect map

validAmounts

map[int64]bool
Open
OID
0ea135…b7a3:6
validAmounts details

Inspect map

Bet

type

Bet is a single wager for the open round.

Value

roulette_v3.Bet

RoundRecord

type

RoundRecord stores a resolved round for Render / audit.

Value

roulette_v3.RoundRecord

LP

type

LP is a liquidity provider position.

Value

roulette_v3.LP

admin

.uverse.address

Value

<gnolang.StringValue>

bankroll

int64

Value

21000000

status

string

Value

"open"

serverSeedHash

string

Value

"860bbccb32c2ad7d3dabfae76d398127abcfc60eebe9ad6bbe3d745257a70d2e"

roundID

int

Value

5

nonceCounter

int

Value

1

lastResult

int

Value

16

lps

[]roulette_v3.LP

Value

<zero>

totalShares

int64

Value

0

totalDeposits

int64

Value

0

accumulatedProfit

int64

Value

0

WithdrawBankroll

func(amount int64)
Open
OID
0ea135…b7a3:22
WithdrawBankroll details

Inspect func

PlaceBet

func(betType string, betValue int, clientSeed string)

PlaceBet records a wager. betType: NUMBER | RED | BLACK | EVEN | ODD | LOW | HIGH betValue: 0 / 37 / 1–36 when NUMBER, otherwise 0. Send must be exactly 0.5 / 1 / 2 / 5 / 10 GNOT.

Open
OID
0ea135…b7a3:24
PlaceBet details

Inspect func

ResolveRound

func(serverSeed string)
Open
OID
0ea135…b7a3:25
ResolveRound details

Inspect func

resolveRoundNoBet

func(serverSeed string)
Open
OID
0ea135…b7a3:26
resolveRoundNoBet details

Inspect func

appendRoundRecord

func(rec roulette_v3.RoundRecord)
Open
OID
0ea135…b7a3:27
appendRoundRecord details

Inspect func

VerifyFairness

func(serverSeed string, clientSeed string, nonce int) int

VerifyFairness — pure: sha256(serverSeed+clientSeed+nonce) → BE uint64 % 38

Open
OID
0ea135…b7a3:28
VerifyFairness details

Inspect func

VerifyFairnessRound

func(serverSeed string, roundNum int) int

VerifyFairnessRound — pure: sha256(serverSeed+roundID) → BE uint64 % 38 (no player bet).

Open
OID
0ea135…b7a3:29
VerifyFairnessRound details

Inspect func

DepositLiquidity

func()

DepositLiquidity accepts ugnot (-send) and mints proportional LP shares. Minimum deposit: 1 GNOT.

Open
OID
0ea135…b7a3:30
DepositLiquidity details

Inspect func

WithdrawLiquidity

func()

WithdrawLiquidity redeems the caller's full LP position (deposit + profit share).

Open
OID
0ea135…b7a3:31
WithdrawLiquidity details

Inspect func

GetLPInfo

func(addr string) string

GetLPInfo returns a human-readable summary for addr.

Open
OID
0ea135…b7a3:32
GetLPInfo details

Inspect func

GetPoolStats

func() string

GetPoolStats returns global LP pool statistics.

Open
OID
0ea135…b7a3:33
GetPoolStats details

Inspect func

findLP

func(addr .uverse.address) int
Open
OID
0ea135…b7a3:34
findLP details

Inspect func

GetServerSeedHash

func() string
Open
OID
0ea135…b7a3:40
GetServerSeedHash details

Inspect func

GetHistory

func() []roulette_v3.RoundRecord
Open
OID
0ea135…b7a3:41
GetHistory details

Inspect func

GetTotalShares

func() int64
Open
OID
0ea135…b7a3:43
GetTotalShares details

Inspect func

GetTotalDeposits

func() int64
Open
OID
0ea135…b7a3:44
GetTotalDeposits details

Inspect func

GetAccumulatedProfit

func() int64
Open
OID
0ea135…b7a3:45
GetAccumulatedProfit details

Inspect func

DisplayLabel

func(n int) string

DisplayLabel maps internal result 0..37 → "0" / "00" / "1".."36"

Open
OID
0ea135…b7a3:47
DisplayLabel details

Inspect func

validateBet

func(bt string, betValue int)
Open
OID
0ea135…b7a3:49
validateBet details

Inspect func

payoutFor

func(bt string) int64
Open
OID
0ea135…b7a3:50
payoutFor details

Inspect func

betWins

func(bt string, betValue int, result int) bool

betWins — 0 and 37 (00) lose every outside bet; NUMBER can still hit them.

Open
OID
0ea135…b7a3:51
betWins details

Inspect func

claimOrAssertAdmin

func(caller .uverse.address)
Open
OID
0ea135…b7a3:53
claimOrAssertAdmin details

Inspect func

requireUgnotSend

func() int64
Open
OID
0ea135…b7a3:55
requireUgnotSend details

Inspect func

sendUgnot

func(to .uverse.address, amount int64)
Open
OID
0ea135…b7a3:56
sendUgnot details

Inspect func
denom : untyped string ="ugnot"
wheelSize : untyped bigint =(38 <untyped> bigint)
payoutNumber : untyped bigint =(36 <untyped> bigint)
payoutOutside : untyped bigint =(2 <untyped> bigint)
maxHistory : untyped bigint =(20 <untyped> bigint)
statusIdle : untyped string ="idle"
statusOpen : untyped string ="open"
minLPDeposit : int64 =1000000
chip05 : int64 =500000
chip1 : int64 =1000000
chip2 : int64 =2000000
chip5 : int64 =5000000
chip10 : int64 =10000000
BetNumber : untyped string ="NUMBER"
BetRed : untyped string ="RED"
BetBlack : untyped string ="BLACK"
BetEven : untyped string ="EVEN"
BetOdd : untyped string ="ODD"
BetLow : untyped string ="LOW"
BetHigh : untyped string ="HIGH"
reds : map[int]bool Inspect
validAmounts : map[int64]bool Inspect
Bet : type =roulette_v3.Bet
RoundRecord : type =roulette_v3.RoundRecord
LP : type =roulette_v3.LP
admin : .uverse.address =<gnolang.StringValue>
bankroll : int64 =21000000
status : string ="open"
serverSeedHash : string ="860bbccb32c2ad7d3dabfae76d398127abcfc60eebe9ad6bbe3d745257a70d2e"
currentBet : *roulette_v3.Bet Inspect
roundID : int =5
nonceCounter : int =1
lastResult : int =16
history : []roulette_v3.RoundRecord (len=4) Inspect
lps : []roulette_v3.LP =<zero>
totalShares : int64 =0
totalDeposits : int64 =0
accumulatedProfit : int64 =0
DepositBankroll : func() Inspect
WithdrawBankroll : func(amount int64) Inspect
StartRound : func(hash string) Inspect
PlaceBet : func(betType string, betValue int, clientSeed string) Inspect
ResolveRound : func(serverSeed string) Inspect
resolveRoundNoBet : func(serverSeed string) Inspect
appendRoundRecord : func(rec roulette_v3.RoundRecord) Inspect
VerifyFairness : func(serverSeed string, clientSeed string, nonce int) int Inspect
VerifyFairnessRound : func(serverSeed string, roundNum int) int Inspect
DepositLiquidity : func() Inspect
WithdrawLiquidity : func() Inspect
GetLPInfo : func(addr string) string Inspect
GetPoolStats : func() string Inspect
findLP : func(addr .uverse.address) int Inspect
GetAdmin : func() .uverse.address Inspect
GetBankroll : func() int64 Inspect
GetStatus : func() string Inspect
GetLastResult : func() int Inspect
GetRoundID : func() int Inspect
GetServerSeedHash : func() string Inspect
GetHistory : func() []roulette_v3.RoundRecord Inspect
IsRed : func(n int) bool Inspect
GetTotalShares : func() int64 Inspect
GetTotalDeposits : func() int64 Inspect
GetAccumulatedProfit : func() int64 Inspect
GetLPCount : func() int Inspect
DisplayLabel : func(n int) string Inspect
Render : func(string) string Inspect
validateBet : func(bt string, betValue int) Inspect
payoutFor : func(bt string) int64 Inspect
betWins : func(bt string, betValue int, result int) bool Inspect
colorName : func(n int) string Inspect
claimOrAssertAdmin : func(caller .uverse.address) Inspect
requireUserCall : func() Inspect
requireUgnotSend : func() int64 Inspect
sendUgnot : func(to .uverse.address, amount int64) Inspect
hashHex : func(seed string) string Inspect