> For the complete documentation index, see [llms.txt](https://pokebets.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://pokebets.gitbook.io/docs/pokebetting-contract/resolving-bets.md).

# Resolving Bets

The resolveBet function allows the owner of the contract to resolve a bet, by specifying the winning outcome. This function checks the current state of the contract, stores the winning outcome in the

### Function Breakdown

* The function first checks if the contract is in the `Closed` state. If not, it reverts the transaction.
* It then stores the winning outcome in the contract's state variables.
* The state of the contract is then changed to `Resolved`.
* Finally, a `BetResolved` event is emitted, with the winning outcome and the current version of the contract.
