diff --git a/module/x/gravity/keeper/contract_call.go b/module/x/gravity/keeper/contract_call.go index 3a18b3e06..2f94f4a54 100644 --- a/module/x/gravity/keeper/contract_call.go +++ b/module/x/gravity/keeper/contract_call.go @@ -3,6 +3,7 @@ package keeper import ( "bytes" "encoding/hex" + "fmt" "sort" "cosmossdk.io/errors" @@ -65,6 +66,12 @@ func (k Keeper) contractCallExecuted(ctx sdk.Context, invalidationScope []byte, }) k.CompleteOutgoingTx(ctx, completedCallTx) + + ctx.EventManager().EmitEvent(sdk.NewEvent( + types.EventTypeContractCallTxCompleted, + sdk.NewAttribute(types.AttributeKeyContractCallInvalidationScope, hex.EncodeToString(invalidationScope)), + sdk.NewAttribute(types.AttributeKeyContractCallInvalidationNonce, fmt.Sprint(invalidationNonce)), + )) } // orderContractCallsByNonceAscending sorts a slice of contract calls by nonce in ascending order diff --git a/module/x/gravity/types/events.go b/module/x/gravity/types/events.go index 08f75da45..979bbac3a 100644 --- a/module/x/gravity/types/events.go +++ b/module/x/gravity/types/events.go @@ -9,6 +9,7 @@ const ( EventTypeBridgeWithdrawalReceived = "withdrawal_received" EventTypeBridgeDepositReceived = "deposit_received" EventTypeBridgeWithdrawCanceled = "withdraw_canceled" + EventTypeContractCallTxCompleted = "contract_call_tx_completed" AttributeKeyEthereumEventVoteRecordID = "ethereum_event_vote_record_id" AttributeKeyBatchConfirmKey = "batch_confirm_key"