Chaduranga
A decentralized chess app.
The problem Chaduranga solves
This is a chess dApp where any two players can stake coins of their choice and play a game of chess. A smart contract deployed on Polygon Mumbai testnet validates the moves using Chainlink Any API oracle by calling the external API deployed on google cloud run. Once in checkmate, all the coins are transferred to the winner's metamask wallet. Moralis is used for handling events and user account management.
Challenges I ran into
The chess moves validation logic to check whether the player has made a valid move or the opponent is in checkmate etc had to be outsourced to external API since it was incurring a higher gas fee and taking a long time to execute. An external endpoint was created and deployed on google cloud run and called from the smart contract using chainlink oracle. Found it difficult to build the time controls. The application state is managed purely on the client-side currently.