From 442e5b843dfa19a806e84cfb942a7eeca1da9a34 Mon Sep 17 00:00:00 2001 From: Collin Brittain Date: Tue, 29 Oct 2024 09:45:10 -0500 Subject: [PATCH] Remove msg event boilerplate replace in 0.47 --- x/cork/keeper/msg_server.go | 4 ---- x/pubsub/keeper/msg_server.go | 42 ----------------------------------- 2 files changed, 46 deletions(-) diff --git a/x/cork/keeper/msg_server.go b/x/cork/keeper/msg_server.go index 58df9504..898f0d30 100644 --- a/x/cork/keeper/msg_server.go +++ b/x/cork/keeper/msg_server.go @@ -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), diff --git a/x/pubsub/keeper/msg_server.go b/x/pubsub/keeper/msg_server.go index 3bb7818d..a13d8878 100644 --- a/x/pubsub/keeper/msg_server.go +++ b/x/pubsub/keeper/msg_server.go @@ -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), @@ -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), @@ -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), @@ -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), @@ -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), @@ -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), @@ -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),