Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add API to get module event #304

Merged
merged 4 commits into from
Feb 23, 2024
Merged

Add API to get module event #304

merged 4 commits into from
Feb 23, 2024

Conversation

0xaptosj
Copy link
Contributor

@0xaptosj 0xaptosj commented Feb 23, 2024

Description

Add new event API to get module event from indexer.

Test Plan

Uint test.

Related Links

aptos-labs/aptos-developer-discussions#6

@0xaptosj 0xaptosj requested a review from a team as a code owner February 23, 2024 20:57
Copy link

@alinush alinush left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Blind stamp

* @returns Promise<GetEventsResponse>
*/
async getModuleEventsByEventType(args: {
eventType: MoveStructId;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add a check here that if the event type is too long (wrapped for example) we should send a warning and possibly error. We cap indexed_event at length 300.

Copy link
Contributor Author

@0xaptosj 0xaptosj Feb 23, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added to internal function below

Copy link
Collaborator

@0xmaayan 0xmaayan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Please update changelog

@0xaptosj 0xaptosj force-pushed the j/add-module-event-api branch from 54e589b to 6514bbf Compare February 23, 2024 21:21
@0xaptosj 0xaptosj merged commit a9b634c into main Feb 23, 2024
7 checks passed
@0xaptosj 0xaptosj deleted the j/add-module-event-api branch February 23, 2024 21:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants