Я не могу написать смарт-контракт по указанной ниже проблеме
Пожалуйста, помогите мне написать смарт-контракт для этого Напишите твердый смарт-контракт для следующей спецификации
- This is a gambling game with N players (N should be minimum 3).
- The owner of the contract upon initializing, will specify how many people are playing.
- The owner will also specify, how much each player will stake.
- Each player should stake the exact amount specified by the owner.
- If a player stakes more than specified, the contract will take the extra amount.
- Once a player has staked their amount, they are allowed to refund that amount up until all players have staked.
- Once all players have staked, anyone can then call a function that will select at random one of the players.
Note: Use chain link VRF to choose random player ([https://docs.chain.link/docs/chainlink-vrf/][1])
- All players should then be notified of the winner.
- 99% of the total staked amount, is paid to the winner. 1% is paid to the contract.
- The owner of the contract is able to withdraw from the contract when he sees fit.
- Each participant, must have an equal chance of winning.
- Assume that the owner is not allowed to participate.