sdk.UnwrapSDKContext(ctx).EventManager().EmitEvent(sdk.NewEvent(
	types.EventTypeInitiateTokenDeposit,
	sdk.NewAttribute(types.AttributeKeyBridgeId, strconv.FormatUint(bridgeId, 10)),
	sdk.NewAttribute(types.AttributeKeyL1Sequence, strconv.FormatUint(l1Sequence, 10)),
	sdk.NewAttribute(types.AttributeKeyFrom, req.Sender),
	sdk.NewAttribute(types.AttributeKeyTo, req.To),
	sdk.NewAttribute(types.AttributeKeyL1Denom, coin.Denom),
	sdk.NewAttribute(types.AttributeKeyL2Denom, l2Denom),
	sdk.NewAttribute(types.AttributeKeyAmount, coin.Amount.String()),
	sdk.NewAttribute(types.AttributeKeyData, hex.EncodeToString(req.Data)),
))
// save all pending events to child db
err = eventhandler.SavePendingEvents(h.stage.WithPrefixedKey(h.child.DB().PrefixedKey), h.eventQueue)
event := sdk.NewEvent(
	types.EventTypeFinalizeTokenDeposit,
	sdk.NewAttribute(types.AttributeKeyL1Sequence, strconv.FormatUint(req.Sequence, 10)),
	sdk.NewAttribute(types.AttributeKeySender, req.From),
	sdk.NewAttribute(types.AttributeKeyRecipient, req.To),
	sdk.NewAttribute(types.AttributeKeyDenom, coin.Denom),
	sdk.NewAttribute(types.AttributeKeyBaseDenom, req.BaseDenom),
	sdk.NewAttribute(types.AttributeKeyAmount, coin.Amount.String()),
	sdk.NewAttribute(types.AttributeKeyFinalizeHeight, strconv.FormatUint(req.Height, 10)),
)
func (ch *Child) endBlockHandler(ctx types.Context, args nodetypes.EndBlockArgs) error {
	// ...

	// check value for pending events
1@>	challenges, processedEvents, err := ch.eventHandler.CheckValue(ctx, ch.eventQueue)
	if err != nil {
		return err
	}
	pendingChallenges = append(pendingChallenges, challenges...)

	// check timeout for unprocessed pending events
  	unprocessedEvents := ch.eventHandler.GetUnprocessedPendingEvents(processedEvents)
2@>	challenges, timeoutEvents := ch.eventHandler.CheckTimeout(args.Block.Header.Time, unprocessedEvents)
3@>	pendingChallenges = append(pendingChallenges, challenges...)

	// ...

	ch.eventHandler.DeletePendingEvents(processedEvents)
	ch.eventHandler.SetPendingEvents(timeoutEvents)
4@>	ch.challenger.SendPendingChallenges(challenges)
	return nil
}
func (ch *Child) endBlockHandler(ctx types.Context, args nodetypes.EndBlockArgs) error {
	// ...

	ch.eventHandler.DeletePendingEvents(processedEvents)
	ch.eventHandler.SetPendingEvents(timeoutEvents)
-	ch.challenger.SendPendingChallenges(challenges)
+	ch.challenger.SendPendingChallenges(pendingChallenges)
	return nil
}
