lotto

package
v0.0.0-...-20952ba Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 17, 2023 License: MIT Imports: 16 Imported by: 0

README

Dero Lotto

A decentralized lottery app powered by the unstoppable Dero platform.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DAPP_NAME = "lotto"
View Source
var SC_ID map[string]string = map[string]string{
	"mainnet":   "",
	"testnet":   "",
	"simulator": "95b938ea2aa43a9ddc7a30db3dbcaa311f3bb99320d4b8bde62f42739d35d0b8",
}

Functions

func App

func App() *cli.App

func CommandBuyTicket

func CommandBuyTicket() *cli.Command

func CommandCancelLotto

func CommandCancelLotto() *cli.Command

func CommandClaimReward

func CommandClaimReward() *cli.Command

func CommandCreateLotto

func CommandCreateLotto() *cli.Command

func CommandDrawLotto

func CommandDrawLotto() *cli.Command

func CommandLiveLotto

func CommandLiveLotto() *cli.Command

func CommandLottoTickets

func CommandLottoTickets() *cli.Command

func CommandViewLotto

func CommandViewLotto() *cli.Command

func CommandViewResult

func CommandViewResult() *cli.Command

Types

type Lotto

type Lotto struct {
	TxId           sql.NullString `db:"tx_id"`
	MaxTickets     sql.NullInt64  `db:"max_tickets"`
	TicketPrice    sql.NullInt64  `db:"ticket_price"`
	TicketCount    sql.NullInt64  `db:"ticket_count"`
	BaseReward     sql.NullInt64  `db:"base_reward"`
	Duration       sql.NullInt64  `db:"duration"`
	UniqueWallet   sql.NullBool   `db:"unique_wallet"`
	PasswordHash   sql.NullString `db:"password_hash"`
	DrawTimestamp  sql.NullInt64  `db:"draw_timestamp"`
	ClaimTxId      sql.NullString `db:"claim_tx_id"`
	ClaimTimestamp sql.NullInt64  `db:"claim_timestamp"`
	StartTimestamp sql.NullInt64  `db:"start_timestamp"`
	Winner         sql.NullString `db:"winner"`
	WinningTicket  sql.NullInt64  `db:"winning_ticket"`
	WinnerComment  sql.NullString `db:"winner_comment"`
	Owner          sql.NullString `db:"owner"`
	OwnerName      sql.NullString `db:"owner_name"`
	WinnerName     sql.NullString `db:"winner_name"`
}

func (*Lotto) DisplayCreator

func (l *Lotto) DisplayCreator() string

func (*Lotto) DisplayDrawTimestamp

func (l *Lotto) DisplayDrawTimestamp() string

func (*Lotto) DisplayStartTimestamp

func (l *Lotto) DisplayStartTimestamp() string

func (*Lotto) DisplayTickets

func (l *Lotto) DisplayTickets() string

func (*Lotto) DisplayWinner

func (l *Lotto) DisplayWinner() string

func (*Lotto) DisplayWinnerReward

func (l *Lotto) DisplayWinnerReward() string

func (*Lotto) Print

func (l *Lotto) Print()

type LottoTicket

type LottoTicket struct {
	LottoTxId    sql.NullString `db:"lotto_tx_id"`
	TicketNumber sql.NullInt64  `db:"ticker_number"`
	Owner        sql.NullString `db:"owner"`
	Timestamp    sql.NullInt64  `db:"timestamp"`
	PlayTxId     sql.NullString `db:"play_tx_id"`
	OwnerName    sql.NullString `db:"owner_name"`
}

func (*LottoTicket) DisplayOwner

func (lt *LottoTicket) DisplayOwner() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL