5/9 pfp
5/9
@fiveoutofnine.eth
How to represent a game of Tic-tac-toe with just 2.25 bytes: https://zora.co/collect/base:0x93625454e26f407ad6c3f62b3245bb197af44e80/3
2 replies
5 recasts
18 reactions

5/9 pfp
5/9
@fiveoutofnine.eth
First, you may come up with something like the following as your first representation. Besides the player addresses, this representation uses 104 bits and 2 storage slots.
1 reply
0 recast
1 reaction

5/9 pfp
5/9
@fiveoutofnine.eth
After tightly packing the struct, the representation is actually quite good already. On the EVM, setting empty storage slots costs a lot more gas than setting nonzero ones, and you need a minimum of 2 storage slots to store the player addresses (i.e. no significant savings).
1 reply
0 recast
0 reaction