Inspiration

GameFi is slow on traditional EVM chains, Electroneum can change this experience with its 5 second transaction speed and instant finality. The game of tictactoe hopefully showcases the possibilities

What it does

It allows real time level upgrades to the traditional 3x3 Tictactoe game board, with additional cells to make a 9x9 board with pre-filled X and O strategically placed by level bidders to increase chances of player 1 or player 2 winning. The winning player is determined by 4 consecutive X or O's in Level 2

How we built it

We created a unique upgrade mechanism, where the game state is expanded by level contracts and the game delegates calls to the level implementation contracts to place the symbols X or O on the board.

Challenges we ran into

The proposals from the level bidders for the next level needed to be checked for pre-filled symbols placements according to certain rules, these sanity checks needed to be done on-chain in-order to have the system be transparent and fair. Most of these check were coded in yul assembly blocks to keep the gas costs low. Also the game state storage needed to be modular to make it possible to delegate call the level contracts to update the game state cells, for this we used inherited Base contracts to represents the level info, game board and symbols.

Accomplishments that we're proud of

The hybrid contract upgrade system which is a mix of structured storage upgrade, transparent upgrade, UUPS upgrade, and Diamond Proxy upgrade.

What we learned

We learnt a lot about yul and assembly its the intricacies, and also all smart contract upgrade mechainsms

What's next for Community TicTacToe

To integrate ZKP for hidden cells with special symbols

Built With

Share this project:

Updates