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

refactor(context): Pass EventManager to the context as an interface. #14384

Merged
merged 3 commits into from
Dec 22, 2022

Conversation

itsdevbear
Copy link
Contributor

This PR modifies the sdk.Context to support passing in the EventManager as an interface. This is useful for chains who want to add custom event behaviour to their application.

@itsdevbear itsdevbear requested a review from a team as a code owner December 21, 2022 23:37
@github-prbot github-prbot requested review from a team, JeancarloBarrios and atheeshp and removed request for a team December 21, 2022 23:37
@itsdevbear
Copy link
Contributor Author

Would be great to get this backported into 0.47 if possible. Didn't know where to put EventManagerI so just stuck it there for now.

Copy link
Member

@julienrbrt julienrbrt left a comment

Choose a reason for hiding this comment

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

You've made golangci mad with that deprecated comment 😅. But the changes make sense to me.

Btw i believe there is still discussion about the typed event design, so maybe the other shouldn't be marked as deprecated just yet. Don't take my word on it though I may be wrong, but the SDK does not use it for all its modules yet.

@itsdevbear
Copy link
Contributor Author

They were marked as deprecated on the functions themselves so I just kept it consistent in the interface.

Weird it didn't flag ci before

@itsdevbear itsdevbear changed the title feat(context): Pass EventManager to the context as an interface. impr(context): Pass EventManager to the context as an interface. Dec 22, 2022
@itsdevbear itsdevbear changed the title impr(context): Pass EventManager to the context as an interface. refactor(context): Pass EventManager to the context as an interface. Dec 22, 2022
@itsdevbear itsdevbear force-pushed the itsdevbear/event-manager-interface branch from 96195d9 to c49f663 Compare December 22, 2022 04:42
@sonarcloud
Copy link

sonarcloud bot commented Dec 22, 2022

[Cosmos SDK] Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@itsdevbear itsdevbear merged commit ebf1e86 into main Dec 22, 2022
@itsdevbear itsdevbear deleted the itsdevbear/event-manager-interface branch December 22, 2022 05:29
@itsdevbear itsdevbear added the backport/v0.47.x PR scheduled for inclusion in the v0.47's next stable release label Dec 22, 2022
mergify bot pushed a commit that referenced this pull request Dec 22, 2022
#14384)

(cherry picked from commit ebf1e86)

# Conflicts:
#	CHANGELOG.md
@tac0turtle
Copy link
Member

@itsdevbear please don't merge so fast, while its a simple change we should still have 2 reviewers.

@alexanderbez
Copy link
Contributor

How was @itsdevbear able to merge?

Copy link
Contributor

@alexanderbez alexanderbez left a comment

Choose a reason for hiding this comment

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

LGTM

@itsdevbear
Copy link
Contributor Author

👍 apologies

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport/v0.47.x PR scheduled for inclusion in the v0.47's next stable release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants