Switch Event Indexing Guide to CedraFramework for Cedra CLI#81
Open
deranalabs wants to merge 4 commits intocedra-labs:mainfrom
Open
Switch Event Indexing Guide to CedraFramework for Cedra CLI#81deranalabs wants to merge 4 commits intocedra-labs:mainfrom
deranalabs wants to merge 4 commits intocedra-labs:mainfrom
Conversation
This document outlines the Event Indexing pattern for building gas-efficient social feeds on Cedra, addressing state bloat and gas costs, and providing a code walkthrough for implementing the solution.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Cedra Builders Forge - Submission
Season 1
📋 Task Information
✅ Checklist
📝 What Was Built
This PR is a follow-up to the original Event Indexing Guide (#63).
It updates the example package to use CedraFramework so that builders can run the event-indexing tests directly with the Cedra CLI.
Key Features:
Move.tomlupdated to depend onCedraFramework(dev addresscedra_guide = 0xc2)cedra_guide::social_feednow importscedra_framework::{event, account, timestamp}test_end_to_endruns successfully viacedra move testTechnical Approach:
I reused the same event-indexing module and test, but switched the dependency from
AptosFrameworktoCedraFrameworkand aligned the imports with Cedra’s modules. The dev-address pattern follows the official Cedra NFT example so thatcedra move testworks out of the box.For Improvements:
AptosFramework+ Aptos CLI; after this PR, it also compiles and tests withCedraFramework+ Cedra CLI.🧪 Testing
Setup:
How to Test:
Install the Cedra CLI.
From
docs/guides/event-indexing, run:cedra move testConfirm that the
CedraEventGuide packagebuilds and all tests pass.Expected Results: The command should compile CedraFramework, build the
CedraEventGuide package, and run:0xc2::social_feed::test_end_to_end→ PASS📚 Documentation
🎯 Quality Check
I confirm my submission:
📸 Demo (Optional)
I have read and agree to follow all Cedra Builders Forge rules.