-
This is a smart contract for a lottery pool on any EVM-compatible blockchains. The contract defines various parameters such as the ticket price, maximum number of tickets per round, and commission taken per ticket. It also has a duration for each round. The contract allows users to buy tickets, check their winnings, and withdraw their winnings if they are the winner. The lottery operator can also withdraw their commission and draw a winner at the end of the round. If the lottery is not expired, users can refund their tickets. The contract uses a random number generated from the block hash and timestamp to determine the winner. The contract also has various access control modifiers to ensure that only the lottery operator can perform certain functions.
-
The winners (top 3) of the lottery round shall be picked based on the
modulo operation
of :
- number 1 prize = 60% from the total prize pool
- number 2 prize = 25% from the total prize pool
- number 3 prize = 15% from the total prize pool
- hashed of the
current block timestamp
andcurrent number - tickets length
- the tickets length
- the winners odds shall increased based on how many REXX NFT they are holding!
- if the user has
1 to 3 REXX NFT
, increase the odds by2%
AKATIER 1 REXX
- if the user has
4 to 6 REXXNFT
, increase the odds by6%
AKATIER 2 REXX
- if the user has
7 REXX NFT
, increase the odds by10%
AKATIER 3 REXX
After any changes to the contract, run:
npm run build
to compile your contracts. This will also detect the Contracts Extensions Docs detected on your contract.
When you're ready to deploy your contracts, just run one of the following command to deploy you're contracts:
npm run deploy
If you want to release a version of your contracts publicly, you can use one of the followings command:
npm run release