-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7ade172
commit 5276569
Showing
3 changed files
with
17 additions
and
1 deletion.
There are no files selected for viewing
16 changes: 16 additions & 0 deletions
16
docs/home/3-react-to-events/2-chain-data-extensions/1000-create-your-own.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# Create your own CDE | ||
|
||
Although custom CDEs do not have to be added to Paima (people can just use the [generic CDE](./999-Generic.md), adding a CDE to Paima itself helps both with usability and with type inference. | ||
|
||
To add a custom CDE to Paima, you need to do the following: | ||
|
||
- (templates - optional) add your contract to `packages/contracts` if you think this contract should be bundled with Paima (useful for specifications like ERC20, etc. that might be reused often) | ||
|
||
|
||
- fetcher (`@paima/funnel`): fetches your data from the blockchain | ||
- updater (`@paima/sm`): handles creating updates for the Paima state machine / database when data for the CDE is found | ||
- indexer (`@paima/db`): stores historical onchain CDE updates to the database for games to easily access | ||
- config (`@paima/runtime`): handles parsing CDE config files users will write | ||
- 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! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.