diff --git a/go.sum b/go.sum index 78c40ef12..7b0de7875 100644 --- a/go.sum +++ b/go.sum @@ -1,3 +1,5 @@ +bou.ke/monkey v1.0.2 h1:kWcnsrCNUatbxncxR/ThdYqbytgOIArtYWqcQLQzKLI= +bou.ke/monkey v1.0.2/go.mod h1:OqickVX3tNx6t33n1xvtTtu85YN5s6cKwVug+oHMaIA= cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= diff --git a/x/oracle/keeper/msg_server_create_price.go b/x/oracle/keeper/msg_server_create_price.go index 78688e046..e41b429d7 100644 --- a/x/oracle/keeper/msg_server_create_price.go +++ b/x/oracle/keeper/msg_server_create_price.go @@ -22,8 +22,8 @@ func (ms msgServer) CreatePrice(goCtx context.Context, msg *types.MsgCreatePrice ctx.EventManager().EmitEvent(sdk.NewEvent( types.EventTypeCreatePrice, - sdk.NewAttribute(types.AttributeKeyFeederID, strconv.Itoa(int(msg.FeederID))), - sdk.NewAttribute(types.AttributeKeyBasedBlock, strconv.FormatInt(int64(msg.BasedBlock), 10)), + sdk.NewAttribute(types.AttributeKeyFeederID, strconv.FormatUint(msg.FeederID, 10)), + sdk.NewAttribute(types.AttributeKeyBasedBlock, strconv.FormatUint(msg.BasedBlock, 10)), sdk.NewAttribute(types.AttributeKeyProposer, msg.Creator), ), ) @@ -36,8 +36,8 @@ func (ms msgServer) CreatePrice(goCtx context.Context, msg *types.MsgCreatePrice ctx.EventManager().EmitEvent(sdk.NewEvent( types.EventTypeCreatePrice, - sdk.NewAttribute(types.AttributeKeyFeederID, strconv.Itoa(int(msg.FeederID))), - sdk.NewAttribute(types.AttributeKeyRoundID, strconv.FormatInt(int64(newItem.PriceTR.RoundID), 10)), + sdk.NewAttribute(types.AttributeKeyFeederID, strconv.FormatUint(msg.FeederID, 10)), + sdk.NewAttribute(types.AttributeKeyRoundID, strconv.FormatUint(newItem.PriceTR.RoundID, 10)), sdk.NewAttribute(types.AttributeKeyFinalPrice, newItem.PriceTR.Price), sdk.NewAttribute(types.AttributeKeyPriceUpdated, types.AttributeValuePriceUpdatedSuccess), ), diff --git a/x/oracle/module.go b/x/oracle/module.go index 6638310f7..ac5a376e3 100644 --- a/x/oracle/module.go +++ b/x/oracle/module.go @@ -182,7 +182,7 @@ func (am AppModule) EndBlock(ctx sdk.Context, _ abci.RequestEndBlock) []abci.Val for _, tokenID := range failed { event := sdk.NewEvent( types.EventTypeCreatePrice, - sdk.NewAttribute(types.AttributeKeyTokenID, strconv.Itoa(int(tokenID))), + sdk.NewAttribute(types.AttributeKeyTokenID, strconv.FormatUint(tokenID, 10)), sdk.NewAttribute(types.AttributeKeyPriceUpdated, types.AttributeValuePriceUpdatedFail), ) logInfo := fmt.Sprintf("add new round with previous price under fail aggregation, tokenID:%d", tokenID) @@ -192,7 +192,7 @@ func (am AppModule) EndBlock(ctx sdk.Context, _ abci.RequestEndBlock) []abci.Val logger.Info("add new round with previous price under fail aggregation", "tokenID", tokenID, "roundID", pTR.RoundID) logInfo += fmt.Sprintf(", roundID:%d, price:%s", pTR.RoundID, pTR.Price) event.AppendAttributes( - sdk.NewAttribute(types.AttributeKeyRoundID, strconv.Itoa(int(pTR.RoundID))), + sdk.NewAttribute(types.AttributeKeyRoundID, strconv.FormatUint(pTR.RoundID, 10)), sdk.NewAttribute(types.AttributeKeyFinalPrice, pTR.Price), ) } else { @@ -202,7 +202,7 @@ func (am AppModule) EndBlock(ctx sdk.Context, _ abci.RequestEndBlock) []abci.Val }) logInfo += fmt.Sprintf(", roundID:%d, price:-", nextRoundID) event.AppendAttributes( - sdk.NewAttribute(types.AttributeKeyRoundID, strconv.Itoa(int(nextRoundID))), + sdk.NewAttribute(types.AttributeKeyRoundID, strconv.FormatUint(nextRoundID, 10)), sdk.NewAttribute(types.AttributeKeyFinalPrice, "-"), ) }