Examples: query, "exact match", wildcard*, wild?ard, wild*rd
Fuzzy search: cake~ (finds cakes, bake)
Term boost: "red velvet"^4, chocolate^2
Field grouping: tags:(+work -"fun-stuff")
Escape special characters +-&|!(){}[]^"~*?:\ - e.g. \+ \* \!
Range search: properties.timestamp:[1587729413488 TO *] (inclusive), properties.title:{A TO Z}(excluding A and Z)
Combinations: chocolate AND vanilla, chocolate OR vanilla, (chocolate OR vanilla) NOT "vanilla pudding"
Field search: properties.title:"The Title" AND text
Answered
How do you develop a lottery contract?

I would like to develop a lottery smart contract on TON. This would likely require a source of randomness. How would I start?


This question was imported from Telegram Chat: https://t.me/tondev_eng/7585

  
  
Posted one year ago
Votes Newest

Answers


A source of randomness is required, and there are plenty of ways to do it: https://docs.ton.org/ko/develop/smart-contracts/guidelines/random-number-generation

A basic version of a lottery script exists here, which uses the randomize_lt function:
https://github.com/pyAndr3w/ton-lottery-smc/blob/main/func/code.fc

1
1
Posted one year ago
Jeremy
404 × 5 Administrator
4K Views
1 Answer
one year ago
one year ago
Tags