diff --git a/x/dex/keeper/deposit.go b/x/dex/keeper/deposit.go index e88f7116e..f7525ad12 100644 --- a/x/dex/keeper/deposit.go +++ b/x/dex/keeper/deposit.go @@ -176,6 +176,7 @@ func (k Keeper) ExecuteDeposit( depositAmount1, inAmount0, inAmount1, + pool.Id, outShares.Amount, ) events = append(events, depositEvent) diff --git a/x/dex/keeper/withdraw.go b/x/dex/keeper/withdraw.go index 04a4a98f5..2f7839649 100644 --- a/x/dex/keeper/withdraw.go +++ b/x/dex/keeper/withdraw.go @@ -135,6 +135,7 @@ func (k Keeper) ExecuteWithdraw( fee, outAmount0, outAmount1, + pool.Id, sharesToRemove, ) events = append(events, withdrawEvent) diff --git a/x/dex/types/events.go b/x/dex/types/events.go index 5313ad24e..1b7a14453 100644 --- a/x/dex/types/events.go +++ b/x/dex/types/events.go @@ -30,6 +30,7 @@ const ( AttributeTickIndex = "TickIndex" AttributeFee = "Fee" AttributeTrancheKey = "TrancheKey" + AttributePoolID = "PoolID" AttributeSharesMinted = "SharesMinted" AttributeReserves0Deposited = "ReservesZeroDeposited" AttributeReserves1Deposited = "ReservesOneDeposited" @@ -90,6 +91,7 @@ func CreateDepositEvent( depositAmountReserve1 math.Int, amountIn0 math.Int, amountIn1 math.Int, + poolID uint64, sharesMinted math.Int, ) sdk.Event { attrs := []sdk.Attribute{ @@ -103,6 +105,7 @@ func CreateDepositEvent( sdk.NewAttribute(AttributeFee, strconv.FormatUint(fee, 10)), sdk.NewAttribute(AttributeReserves0Deposited, depositAmountReserve0.String()), sdk.NewAttribute(AttributeReserves1Deposited, depositAmountReserve1.String()), + sdk.NewAttribute(AttributePoolID, strconv.FormatUint(poolID, 10)), sdk.NewAttribute(AttributeSharesMinted, sharesMinted.String()), sdk.NewAttribute(AttributeAmountIn0, amountIn0.String()), sdk.NewAttribute(AttributeAmountIn1, amountIn1.String()), @@ -120,6 +123,7 @@ func CreateWithdrawEvent( fee uint64, withdrawAmountReserve0 math.Int, withdrawAmountReserve1 math.Int, + poolID uint64, sharesRemoved math.Int, ) sdk.Event { attrs := []sdk.Attribute{ @@ -133,6 +137,7 @@ func CreateWithdrawEvent( sdk.NewAttribute(AttributeFee, strconv.FormatUint(fee, 10)), sdk.NewAttribute(AttributeReserves0Withdrawn, withdrawAmountReserve0.String()), sdk.NewAttribute(AttributeReserves1Withdrawn, withdrawAmountReserve1.String()), + sdk.NewAttribute(AttributePoolID, strconv.FormatUint(poolID, 10)), sdk.NewAttribute(AttributeSharesRemoved, sharesRemoved.String()), }