Skip to content

Commit

Permalink
Remove msg event boilerplate replace in 0.47
Browse files Browse the repository at this point in the history
  • Loading branch information
cbrit committed Oct 29, 2024
1 parent 9cf139d commit 442e5b8
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 46 deletions.
4 changes: 0 additions & 4 deletions x/cork/keeper/msg_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,6 @@ func (k Keeper) ScheduleCork(c context.Context, msg *types.MsgScheduleCorkReques

ctx.EventManager().EmitEvents(
sdk.Events{
sdk.NewEvent(
sdk.EventTypeMessage,
sdk.NewAttribute(sdk.AttributeKeyModule, corktypes.AttributeValueCategory),
),
sdk.NewEvent(
corktypes.EventTypeCork,
sdk.NewAttribute(sdk.AttributeKeyModule, corktypes.AttributeValueCategory),
Expand Down
42 changes: 0 additions & 42 deletions x/pubsub/keeper/msg_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,6 @@ func (k Keeper) AddPublisherIntent(c context.Context, msg *types.MsgAddPublisher

ctx.EventManager().EmitEvents(
sdk.Events{
sdk.NewEvent(
sdk.EventTypeMessage,
sdk.NewAttribute(sdk.AttributeKeyModule, types.AttributeValueCategory),
sdk.NewAttribute(sdk.AttributeKeyAction, types.EventTypeAddPublisherIntent),
sdk.NewAttribute(sdk.AttributeKeySender, msg.Signer),
),
sdk.NewEvent(
types.EventTypeAddPublisherIntent,
sdk.NewAttribute(types.AttributeKeySubscriptionID, publisherIntent.SubscriptionId),
Expand Down Expand Up @@ -127,12 +121,6 @@ func (k Keeper) AddSubscriberIntent(c context.Context, msg *types.MsgAddSubscrib

ctx.EventManager().EmitEvents(
sdk.Events{
sdk.NewEvent(
sdk.EventTypeMessage,
sdk.NewAttribute(sdk.AttributeKeyModule, types.AttributeValueCategory),
sdk.NewAttribute(sdk.AttributeKeyAction, types.EventTypeAddSubscriberIntent),
sdk.NewAttribute(sdk.AttributeKeySender, msg.Signer),
),
sdk.NewEvent(
types.EventTypeAddSubscriberIntent,
sdk.NewAttribute(types.AttributeKeySubscriptionID, subscriberIntent.SubscriptionId),
Expand Down Expand Up @@ -164,12 +152,6 @@ func (k Keeper) AddSubscriber(c context.Context, msg *types.MsgAddSubscriberRequ

ctx.EventManager().EmitEvents(
sdk.Events{
sdk.NewEvent(
sdk.EventTypeMessage,
sdk.NewAttribute(sdk.AttributeKeyModule, types.AttributeValueCategory),
sdk.NewAttribute(sdk.AttributeKeyAction, types.EventTypeAddSubscriber),
sdk.NewAttribute(sdk.AttributeKeySender, msg.Signer),
),
sdk.NewEvent(
types.EventTypeAddSubscriber,
sdk.NewAttribute(types.AttributeKeySubscriberAddress, subscriber.Address),
Expand Down Expand Up @@ -212,12 +194,6 @@ func (k Keeper) RemovePublisherIntent(c context.Context, msg *types.MsgRemovePub

ctx.EventManager().EmitEvents(
sdk.Events{
sdk.NewEvent(
sdk.EventTypeMessage,
sdk.NewAttribute(sdk.AttributeKeyModule, types.AttributeValueCategory),
sdk.NewAttribute(sdk.AttributeKeyAction, types.EventTypeRemovePublisherIntent),
sdk.NewAttribute(sdk.AttributeKeySender, msg.Signer),
),
sdk.NewEvent(
types.EventTypeRemovePublisherIntent,
sdk.NewAttribute(types.AttributeKeySubscriptionID, subscriptionID),
Expand Down Expand Up @@ -263,12 +239,6 @@ func (k Keeper) RemoveSubscriberIntent(c context.Context, msg *types.MsgRemoveSu

ctx.EventManager().EmitEvents(
sdk.Events{
sdk.NewEvent(
sdk.EventTypeMessage,
sdk.NewAttribute(sdk.AttributeKeyModule, types.AttributeValueCategory),
sdk.NewAttribute(sdk.AttributeKeyAction, types.EventTypeRemoveSubscriberIntent),
sdk.NewAttribute(sdk.AttributeKeySender, msg.Signer),
),
sdk.NewEvent(
types.EventTypeRemoveSubscriberIntent,
sdk.NewAttribute(types.AttributeKeySubscriptionID, subscriptionID),
Expand Down Expand Up @@ -305,12 +275,6 @@ func (k Keeper) RemoveSubscriber(c context.Context, msg *types.MsgRemoveSubscrib

ctx.EventManager().EmitEvents(
sdk.Events{
sdk.NewEvent(
sdk.EventTypeMessage,
sdk.NewAttribute(sdk.AttributeKeyModule, types.AttributeValueCategory),
sdk.NewAttribute(sdk.AttributeKeyAction, types.EventTypeRemoveSubscriber),
sdk.NewAttribute(sdk.AttributeKeySender, msg.Signer),
),
sdk.NewEvent(
types.EventTypeRemoveSubscriber,
sdk.NewAttribute(types.AttributeKeySubscriptionID, subscriberAddress),
Expand Down Expand Up @@ -343,12 +307,6 @@ func (k Keeper) RemovePublisher(c context.Context, msg *types.MsgRemovePublisher

ctx.EventManager().EmitEvents(
sdk.Events{
sdk.NewEvent(
sdk.EventTypeMessage,
sdk.NewAttribute(sdk.AttributeKeyModule, types.AttributeValueCategory),
sdk.NewAttribute(sdk.AttributeKeyAction, types.EventTypeRemovePublisher),
sdk.NewAttribute(sdk.AttributeKeySender, msg.Signer),
),
sdk.NewEvent(
types.EventTypeRemovePublisher,
sdk.NewAttribute(types.AttributeKeyPublisherDomain, publisherDomain),
Expand Down

0 comments on commit 442e5b8

Please sign in to comment.