Skip to content

Commit

Permalink
Add FAQ to CDE section
Browse files Browse the repository at this point in the history
  • Loading branch information
SebastienGllmt committed Oct 10, 2023
1 parent 5276569 commit 23ad48b
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,11 @@ To add a custom CDE to Paima, you need to do the following:
- utils (`@paima/utils`): provides utility functions on top your CDE (ex: get all NFTs owned by a user)

With all these steps complete, your can create a pull request to the [Paima codebase](https://github.com/PaimaStudios/paima-engine/) so users can leverage your CDE!

## FAQ

**Q**: Do I need to write a CDE for my dApp? I have an API where people can fetch their account state in my dApp already \
**A**: It depends what you want. If actions in your dApp do no directly tie into the game world, you do not need a CDE. However, if you want actions in your dApp to be able to affect game state (ex: something like Pokemon where some pokemon only evolves if you trade them on a specific marketplace), then you will need a CDE so that the game can trustlessly update based on the onchain activity (otherwise, the game would break if your API ever goes down)

**Q**: All this seems only for reading state. What about writing state? \
**A**: CDEs are just about reading state from the chain and evolving the game based off of them. For creating transactions from the game frontend, you can use whatever API you prefer for creating the transaction. Do keep in mind that Paima does come with its own [account abstraction framework](https://docs.paimastudios.com/home/multichain-support/wallet-layer) for creating wallets, so if your API for creating transactions is too high-level (ex: if it handles the entire flow from wallet initialization through `window.ethereum` down to creating the transaction) it may be hard to combine with our account abstraction framework.

0 comments on commit 23ad48b

Please sign in to comment.