08/25/2024
Brace yourself, smart contracts are coming
Last updated
Brace yourself, smart contracts are coming
Last updated
Battleship first testnet game with smart contracts integrated!
We successfully launched the first deployment of Battleship smart contracts on the Alephium testnet. When two players join a game room, they are both prompted to make their payments. The first player automatically creates a subcontract that holds both players' entry fees. At the end of the game, the winner's wallet is set to receive both players' entries. If the second player fails to confirm the payment within a specified time window, the first player automatically wins and can reclaim their entry fee.
Both players have the option to call the "claim" function of the specific subcontract on a new table found on the Claim page (see the screenshot below). To make a claim, they need a signed coupon, which is generated in the background.
Why can both players claim and not just the winner?
The first player to submit their entry currently covers the subcontract creation fee (0.1 $ALPH). This fee is refunded when the game is claimed. If the first player loses the game, they can use the "claim" function to get their initial deposit of 0.1 $ALPH back.
What's Next:
While we are pleased with the initial smart contract implementation, there's always room for improvement and the addition of new features. We plan to enhance stability and introduce quality-of-life improvements for the claim function.
Most of our team will be on vacation in the second half of September, but we aim to launch the next test phase of Battleship on the Alephium testnet in October. Stay tuned!