Skip to content

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

Merged
itsdevbear merged 3 commits into
mainfrom
itsdevbear/event-manager-interface
Dec 22, 2022
Merged

refactor(context): Pass EventManager to the context as an interface.#14384
itsdevbear merged 3 commits into
mainfrom
itsdevbear/event-manager-interface

Conversation

@itsdevbear
Copy link
Copy Markdown

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 December 21, 2022 23:37
@ghost ghost requested review from a team, JeancarloBarrios and atheeshp and removed request for a team December 21, 2022 23:37
@itsdevbear
Copy link
Copy Markdown
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
Copy Markdown
Contributor

@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
Copy Markdown
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
@sonarqubecloud
Copy link
Copy Markdown

[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
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
Copy Markdown
Contributor

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

@alexanderbez
Copy link
Copy Markdown
Contributor

How was @itsdevbear able to merge?

Copy link
Copy Markdown
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
Copy Markdown
Author

👍 apologies

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