Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mutation test #28

Open
github-actions bot opened this issue May 1, 2023 · 0 comments
Open

Mutation test #28

github-actions bot opened this issue May 1, 2023 · 0 comments

Comments

@github-actions
Copy link

github-actions bot commented May 1, 2023

--- ./x/tokenfactory/keeper/before_send.go 2023-05-01 13:02:57.592546537 +0000
+++ /tmp/go-mutesting-2991160611/./x/tokenfactory/keeper/before_send.go.0 2023-05-01 13:06:05.017546761 +0000
@@ -26,8 +26,7 @@

 		store.Delete([]byte(types.BeforeSendHookAddressPrefixKey))
 		return nil
 	}
-
-	_, err = sdk.AccAddressFromBech32(cosmwasmAddress)
+	_, _, _ = err, sdk.AccAddressFromBech32, cosmwasmAddress
 	if err != nil {
 		return err
 	}

FAIL

"/tmp/go-mutesting-2991160611/./x/tokenfactory/keeper/before_send.go.0" with checksum b04f2bc9260e3cebd4670d120851485c
--- ./x/tokenfactory/keeper/before_send.go 2023-05-01 13:02:57.592546537 +0000
+++ /tmp/go-mutesting-2991160611/./x/tokenfactory/keeper/before_send.go.2 2023-05-01 13:06:33.089698886 +0000
@@ -23,7 +23,7 @@

 
 	// delete the store for denom prefix store when cosmwasm address is nil
 	if cosmwasmAddress == "" {
-		store.Delete([]byte(types.BeforeSendHookAddressPrefixKey))
+		_, _ = store.Delete, types.BeforeSendHookAddressPrefixKey
 		return nil
 	}
 

FAIL

"/tmp/go-mutesting-2991160611/./x/tokenfactory/keeper/before_send.go.2" with checksum a108cb88b9f96c36e981a749b6e002c6
--- ./x/tokenfactory/keeper/before_send.go 2023-05-01 13:02:57.592546537 +0000
+++ /tmp/go-mutesting-2991160611/./x/tokenfactory/keeper/before_send.go.3 2023-05-01 13:06:43.189753860 +0000
@@ -51,7 +51,8 @@

 func CWCoinsFromSDKCoins(in sdk.Coins) wasmvmtypes.Coins {
 	var cwCoins wasmvmtypes.Coins
 	for _, coin := range in {
-		cwCoins = append(cwCoins, CWCoinFromSDKCoin(coin))
+		_, _, _ = cwCoins, cwCoins, coin
+
 	}
 	return cwCoins
 }

FAIL

"/tmp/go-mutesting-2991160611/./x/tokenfactory/keeper/before_send.go.3" with checksum da21652bf5264c1eaa9b62e417ddccb3
--- ./x/tokenfactory/keeper/before_send.go 2023-05-01 13:02:57.592546537 +0000
+++ /tmp/go-mutesting-2991160611/./x/tokenfactory/keeper/before_send.go.7 2023-05-01 13:07:14.161923668 +0000
@@ -117,7 +117,7 @@

 						Amount: CWCoinFromSDKCoin(coin),
 					},
 				}
-				msgBz, err = json.Marshal(msg)
+				_, _, _, _ = msgBz, err, json.Marshal, msg
 			}
 			if err != nil {
 				return err

FAIL

"/tmp/go-mutesting-2991160611/./x/tokenfactory/keeper/before_send.go.7" with checksum 5999a925e4d3042e31471f2c9018440d
--- ./x/tokenfactory/keeper/msg_server.go 2023-05-01 13:02:57.592546537 +0000
+++ /tmp/go-mutesting-2991160611/./x/tokenfactory/keeper/msg_server.go.8 2023-05-01 13:11:21.263301040 +0000
@@ -134,15 +134,12 @@

 	if err != nil {
 		return nil, err
 	}
-
-	ctx.EventManager().EmitEvents(sdk.Events{
-		sdk.NewEvent(
-			types.TypeMsgForceTransfer,
-			sdk.NewAttribute(types.AttributeTransferFromAddress, msg.TransferFromAddress),
-			sdk.NewAttribute(types.AttributeTransferToAddress, msg.TransferToAddress),
-			sdk.NewAttribute(types.AttributeAmount, msg.Amount.String()),
-		),
-	})
+	_, _, _, _, _, _, _, _, _, _, _, _ = sdk.Events{},
+		sdk.NewEvent,
+		types.TypeMsgForceTransfer,
+		sdk.NewAttribute, types.AttributeTransferFromAddress, msg.TransferFromAddress,
+		sdk.NewAttribute, types.AttributeTransferToAddress, msg.TransferToAddress,
+		sdk.NewAttribute, types.AttributeAmount, msg.Amount.String
 
 	return &types.MsgForceTransferResponse{}, nil
 }

FAIL

"/tmp/go-mutesting-2991160611/./x/tokenfactory/keeper/msg_server.go.8" with checksum 065f811fe3e6747389ddebbb40083a14
--- ./x/tokenfactory/keeper/msg_server.go 2023-05-01 13:02:57.592546537 +0000
+++ /tmp/go-mutesting-2991160611/./x/tokenfactory/keeper/msg_server.go.14 2023-05-01 13:12:28.555664842 +0000
@@ -221,14 +221,11 @@

 	if err != nil {
 		return nil, err
 	}
-
-	ctx.EventManager().EmitEvents(sdk.Events{
-		sdk.NewEvent(
-			types.TypeMsgSetBeforeSendHook,
-			sdk.NewAttribute(types.AttributeDenom, msg.GetDenom()),
-			sdk.NewAttribute(types.AttributeBeforeSendHookAddress, msg.GetCosmwasmAddress()),
-		),
-	})
+	_, _, _, _, _, _, _, _, _ = sdk.Events{},
+		sdk.NewEvent,
+		types.TypeMsgSetBeforeSendHook,
+		sdk.NewAttribute, types.AttributeDenom, msg.GetDenom,
+		sdk.NewAttribute, types.AttributeBeforeSendHookAddress, msg.GetCosmwasmAddress
 
 	return &types.MsgSetBeforeSendHookResponse{}, nil
 }

FAIL

"/tmp/go-mutesting-2991160611/./x/tokenfactory/keeper/msg_server.go.14" with checksum 47a57afae9b9cd147e550b001dd32065
--- ./x/tokenfactory/types/codec.go 2023-05-01 13:02:57.596546560 +0000
+++ /tmp/go-mutesting-2991160611/./x/tokenfactory/types/codec.go.3 2023-05-01 13:13:59.460195775 +0000
@@ -14,7 +14,7 @@

 	cdc.RegisterConcrete(&MsgCreateDenom{}, "osmosis/tokenfactory/create-denom", nil)
 	cdc.RegisterConcrete(&MsgMint{}, "osmosis/tokenfactory/mint", nil)
 	cdc.RegisterConcrete(&MsgBurn{}, "osmosis/tokenfactory/burn", nil)
-	cdc.RegisterConcrete(&MsgForceTransfer{}, "osmosis/tokenfactory/force-transfer", nil)
+	_ = cdc.RegisterConcrete
 	cdc.RegisterConcrete(&MsgChangeAdmin{}, "osmosis/tokenfactory/change-admin", nil)
 	cdc.RegisterConcrete(&MsgSetBeforeSendHook{}, "osmosis/tokenfactory/set-beforesend-hook", nil)
 }

FAIL

"/tmp/go-mutesting-2991160611/./x/tokenfactory/types/codec.go.3" with checksum e711d38fec03fde104ea89368720dce3
--- ./x/tokenfactory/types/codec.go 2023-05-01 13:02:57.596546560 +0000
+++ /tmp/go-mutesting-2991160611/./x/tokenfactory/types/codec.go.5 2023-05-01 13:14:17.468296250 +0000
@@ -16,7 +16,7 @@

 	cdc.RegisterConcrete(&MsgBurn{}, "osmosis/tokenfactory/burn", nil)
 	cdc.RegisterConcrete(&MsgForceTransfer{}, "osmosis/tokenfactory/force-transfer", nil)
 	cdc.RegisterConcrete(&MsgChangeAdmin{}, "osmosis/tokenfactory/change-admin", nil)
-	cdc.RegisterConcrete(&MsgSetBeforeSendHook{}, "osmosis/tokenfactory/set-beforesend-hook", nil)
+	_ = cdc.RegisterConcrete
 }
 
 func RegisterInterfaces(registry cdctypes.InterfaceRegistry) {

FAIL

"/tmp/go-mutesting-2991160611/./x/tokenfactory/types/codec.go.5" with checksum 8933397ab0e2b4cd1d4536015a1d2783
--- ./x/tokenfactory/types/codec.go 2023-05-01 13:02:57.596546560 +0000
+++ /tmp/go-mutesting-2991160611/./x/tokenfactory/types/codec.go.7 2023-05-01 13:14:27.620350465 +0000
@@ -29,7 +29,7 @@

 		&MsgChangeAdmin{},
 		&MsgSetBeforeSendHook{},
 	)
-	msgservice.RegisterMsgServiceDesc(registry, &_Msg_serviceDesc)
+	_, _, _ = msgservice.RegisterMsgServiceDesc, registry, _Msg_serviceDesc
 }
 
 var (

FAIL

"/tmp/go-mutesting-2991160611/./x/tokenfactory/types/codec.go.7" with checksum bd8af4c79f5d292a5b5d371051bcfc16
--- ./x/tokenfactory/types/codec.go 2023-05-01 13:02:57.596546560 +0000
+++ /tmp/go-mutesting-2991160611/./x/tokenfactory/types/codec.go.8 2023-05-01 13:14:36.536392052 +0000
@@ -38,7 +38,8 @@

 )
 
 func init() {
-	RegisterCodec(amino)
+	_ = amino
+
 	// Register all Amino interfaces and concrete types on the authz Amino codec so that this can later be
 	// used to properly serialize MsgGrant and MsgExec instances
 	sdk.RegisterLegacyAminoCodec(amino)

FAIL

"/tmp/go-mutesting-2991160611/./x/tokenfactory/types/codec.go.8" with checksum 64b00bde75e552616fc7caeebbca3c39
--- ./x/tokenfactory/types/codec.go 2023-05-01 13:02:57.596546560 +0000
+++ /tmp/go-mutesting-2991160611/./x/tokenfactory/types/codec.go.9 2023-05-01 13:14:45.428444869 +0000
@@ -39,9 +39,10 @@

 
 func init() {
 	RegisterCodec(amino)
-	// Register all Amino interfaces and concrete types on the authz Amino codec so that this can later be
-	// used to properly serialize MsgGrant and MsgExec instances
-	sdk.RegisterLegacyAminoCodec(amino)
+	_, _ =
+		// Register all Amino interfaces and concrete types on the authz Amino codec so that this can later be
+		// used to properly serialize MsgGrant and MsgExec instances
+		sdk.RegisterLegacyAminoCodec, amino
 	RegisterCodec(authzcodec.Amino)
 
 	amino.Seal()

FAIL

"/tmp/go-mutesting-2991160611/./x/tokenfactory/types/codec.go.9" with checksum 15112eb3308393139d09a6ee5b633869
--- ./x/tokenfactory/types/codec.go 2023-05-01 13:02:57.596546560 +0000
+++ /tmp/go-mutesting-2991160611/./x/tokenfactory/types/codec.go.11 2023-05-01 13:15:03.572546082 +0000
@@ -43,6 +43,5 @@

 	// used to properly serialize MsgGrant and MsgExec instances
 	sdk.RegisterLegacyAminoCodec(amino)
 	RegisterCodec(authzcodec.Amino)
-
-	amino.Seal()
+	_ = amino.Seal
 }

FAIL

"/tmp/go-mutesting-2991160611/./x/tokenfactory/types/codec.go.11" with checksum 145e579f685e45999b96808d468c6431
--- ./x/tokenfactory/types/msgs.go 2023-05-01 13:02:57.596546560 +0000
+++ /tmp/go-mutesting-2991160611/./x/tokenfactory/types/msgs.go.2 2023-05-01 13:17:17.417046918 +0000
@@ -121,7 +121,7 @@

 		return sdkerrors.Wrapf(sdkerrors.ErrInvalidAddress, "Invalid sender address (%s)", err)
 	}
 
-	if !m.Amount.IsValid() || m.Amount.Amount.Equal(sdk.ZeroInt()) {
+	if false || m.Amount.Amount.Equal(sdk.ZeroInt()) {
 		return sdkerrors.Wrap(sdkerrors.ErrInvalidCoins, m.Amount.String())
 	}
 

FAIL

"/tmp/go-mutesting-2991160611/./x/tokenfactory/types/msgs.go.2" with checksum 6983a500c07ef5e0cb35098f3d501f28
--- ./x/tokenfactory/types/msgs.go 2023-05-01 13:02:57.596546560 +0000
+++ /tmp/go-mutesting-2991160611/./x/tokenfactory/types/msgs.go.3 2023-05-01 13:17:26.241081844 +0000
@@ -121,7 +121,7 @@

 		return sdkerrors.Wrapf(sdkerrors.ErrInvalidAddress, "Invalid sender address (%s)", err)
 	}
 
-	if !m.Amount.IsValid() || m.Amount.Amount.Equal(sdk.ZeroInt()) {
+	if !m.Amount.IsValid() || false {
 		return sdkerrors.Wrap(sdkerrors.ErrInvalidCoins, m.Amount.String())
 	}
 

FAIL

"/tmp/go-mutesting-2991160611/./x/tokenfactory/types/msgs.go.3" with checksum 885a819ca4d9f2dab1d6a0f287826a55
--- ./x/tokenfactory/types/msgs.go 2023-05-01 13:02:57.596546560 +0000
+++ /tmp/go-mutesting-2991160611/./x/tokenfactory/types/msgs.go.5 2023-05-01 13:17:48.881172944 +0000
@@ -156,8 +156,7 @@

 	if err != nil {
 		return sdkerrors.Wrapf(sdkerrors.ErrInvalidAddress, "Invalid sender address (%s)", err)
 	}
-
-	_, err = sdk.AccAddressFromBech32(m.TransferFromAddress)
+	_, _, _ = err, sdk.AccAddressFromBech32, m.TransferFromAddress
 	if err != nil {
 		return sdkerrors.Wrapf(sdkerrors.ErrInvalidAddress, "Invalid address (%s)", err)
 	}

FAIL

"/tmp/go-mutesting-2991160611/./x/tokenfactory/types/msgs.go.5" with checksum fa60027e4c0fba216ddc0b3c5d688f64
--- ./x/tokenfactory/types/msgs.go 2023-05-01 13:02:57.596546560 +0000
+++ /tmp/go-mutesting-2991160611/./x/tokenfactory/types/msgs.go.6 2023-05-01 13:18:03.009285790 +0000
@@ -161,7 +161,7 @@

 	if err != nil {
 		return sdkerrors.Wrapf(sdkerrors.ErrInvalidAddress, "Invalid address (%s)", err)
 	}
-	_, err = sdk.AccAddressFromBech32(m.TransferToAddress)
+	_, _, _ = err, sdk.AccAddressFromBech32, m.TransferToAddress
 	if err != nil {
 		return sdkerrors.Wrapf(sdkerrors.ErrInvalidAddress, "Invalid address (%s)", err)
 	}

FAIL

"/tmp/go-mutesting-2991160611/./x/tokenfactory/types/msgs.go.6" with checksum 96adbe4af8709cbdd4da9341c923fa67
--- ./x/tokenfactory/types/msgs.go 2023-05-01 13:02:57.596546560 +0000
+++ /tmp/go-mutesting-2991160611/./x/tokenfactory/types/msgs.go.7 2023-05-01 13:18:12.029327423 +0000
@@ -200,8 +200,7 @@

 	if err != nil {
 		return sdkerrors.Wrapf(sdkerrors.ErrInvalidAddress, "Invalid sender address (%s)", err)
 	}
-
-	_, err = sdk.AccAddressFromBech32(m.NewAdmin)
+	_, _, _ = err, sdk.AccAddressFromBech32, m.NewAdmin
 	if err != nil {
 		return sdkerrors.Wrapf(sdkerrors.ErrInvalidAddress, "Invalid address (%s)", err)
 	}

FAIL

"/tmp/go-mutesting-2991160611/./x/tokenfactory/types/msgs.go.7" with checksum 3a62f138e39837dba63d45d2d499b98a
--- ./x/tokenfactory/types/msgs.go 2023-05-01 13:02:57.596546560 +0000
+++ /tmp/go-mutesting-2991160611/./x/tokenfactory/types/msgs.go.8 2023-05-01 13:18:25.933394734 +0000
@@ -205,8 +205,7 @@

 	if err != nil {
 		return sdkerrors.Wrapf(sdkerrors.ErrInvalidAddress, "Invalid address (%s)", err)
 	}
-
-	_, _, err = DeconstructDenom(m.Denom)
+	_, _ = err, m.Denom
 	if err != nil {
 		return err
 	}

FAIL

"/tmp/go-mutesting-2991160611/./x/tokenfactory/types/msgs.go.8" with checksum 8b5f36cf7ea7ece728d8fc792364ead1
--- ./x/tokenfactory/types/msgs.go 2023-05-01 13:02:57.596546560 +0000
+++ /tmp/go-mutesting-2991160611/./x/tokenfactory/types/msgs.go.9 2023-05-01 13:18:34.849438283 +0000
@@ -240,8 +240,7 @@

 	if err != nil {
 		return sdkerrors.Wrapf(sdkerrors.ErrInvalidAddress, "Invalid sender address (%s)", err)
 	}
-
-	err = m.Metadata.Validate()
+	_, _ = err, m.Metadata.Validate
 	if err != nil {
 		return err
 	}

FAIL

"/tmp/go-mutesting-2991160611/./x/tokenfactory/types/msgs.go.9" with checksum 929073f544ddba5f55497fd1330d18b7
--- ./x/tokenfactory/types/msgs.go 2023-05-01 13:02:57.596546560 +0000
+++ /tmp/go-mutesting-2991160611/./x/tokenfactory/types/msgs.go.10 2023-05-01 13:18:48.633504767 +0000
@@ -245,8 +245,7 @@

 	if err != nil {
 		return err
 	}
-
-	_, _, err = DeconstructDenom(m.Metadata.Base)
+	_, _ = err, m.Metadata.Base
 	if err != nil {
 		return err
 	}

FAIL

"/tmp/go-mutesting-2991160611/./x/tokenfactory/types/msgs.go.10" with checksum 0f79b92489de4ad0ef3356acd0765301
--- ./x/tokenfactory/types/msgs.go 2023-05-01 13:02:57.596546560 +0000
+++ /tmp/go-mutesting-2991160611/./x/tokenfactory/types/msgs.go.11 2023-05-01 13:18:57.305546753 +0000
@@ -288,8 +288,7 @@

 			return sdkerrors.Wrapf(sdkerrors.ErrInvalidAddress, "Invalid cosmwasm contract address (%s)", err)
 		}
 	}
-
-	_, _, err = DeconstructDenom(m.Denom)
+	_, _ = err, m.Denom
 	if err != nil {
 		return ErrInvalidDenom
 	}

FAIL

"/tmp/go-mutesting-2991160611/./x/tokenfactory/types/msgs.go.11" with checksum c8a66181307c96e54885d1dcc339f993
--- ./x/tokenfactory/types/msgs.go 2023-05-01 13:02:57.596546560 +0000
+++ /tmp/go-mutesting-2991160611/./x/tokenfactory/types/msgs.go.12 2023-05-01 13:19:10.905613695 +0000
@@ -283,7 +283,7 @@

 	}
 
 	if m.CosmwasmAddress != "" {
-		_, err = sdk.AccAddressFromBech32(m.CosmwasmAddress)
+		_, _, _ = err, sdk.AccAddressFromBech32, m.CosmwasmAddress
 		if err != nil {
 			return sdkerrors.Wrapf(sdkerrors.ErrInvalidAddress, "Invalid cosmwasm contract address (%s)", err)
 		}

FAIL

"/tmp/go-mutesting-2991160611/./x/tokenfactory/types/msgs.go.12" with checksum 0cbad4d21a551100fa0ee20b8106e566
--- ./x/twap/listeners.go 2023-05-01 13:02:57.600546582 +0000
+++ /tmp/go-mutesting-2991160611/./x/twap/listeners.go.0 2023-05-01 13:20:57.358154645 +0000
@@ -24,7 +24,8 @@

 func (hook *epochhook) AfterEpochEnd(ctx sdk.Context, epochIdentifier string, epochNumber int64) error {
 	if epochIdentifier == hook.k.PruneEpochIdentifier(ctx) {
 		if err := hook.k.pruneRecords(ctx); err != nil {
-			ctx.Logger().Error("Error pruning old twaps at the epoch end", err)
+			_ = err
+
 		}
 	}
 	return nil

FAIL

"/tmp/go-mutesting-2991160611/./x/twap/listeners.go.0" with checksum 8d2b69c7273b5455edf41edb6ce2fc65
--- ./x/twap/store.go 2023-05-01 13:02:57.600546582 +0000
+++ /tmp/go-mutesting-2991160611/./x/twap/store.go.0 2023-05-01 13:28:46.368696350 +0000
@@ -205,7 +205,7 @@

 			return types.TwapRecord{}, timeTooOldError{Time: t}
 		}
 	}
-	if twap.Asset0Denom != asset0Denom || twap.Asset1Denom != asset1Denom || twap.PoolId != poolId {
+	if false || twap.PoolId != poolId {
 		return types.TwapRecord{}, fmt.Errorf("internal error, got twap but its data is wrong")
 	}
 

FAIL

"/tmp/go-mutesting-2991160611/./x/twap/store.go.0" with checksum e779f39870d2717e67166a8a797cb497
--- ./x/twap/store.go 2023-05-01 13:02:57.600546582 +0000
+++ /tmp/go-mutesting-2991160611/./x/twap/store.go.1 2023-05-01 13:28:58.028760847 +0000
@@ -205,7 +205,7 @@

 			return types.TwapRecord{}, timeTooOldError{Time: t}
 		}
 	}
-	if twap.Asset0Denom != asset0Denom || twap.Asset1Denom != asset1Denom || twap.PoolId != poolId {
+	if twap.Asset0Denom != asset0Denom || twap.Asset1Denom != asset1Denom || false {
 		return types.TwapRecord{}, fmt.Errorf("internal error, got twap but its data is wrong")
 	}
 

FAIL

"/tmp/go-mutesting-2991160611/./x/twap/store.go.1" with checksum 7c47a887aece4b915f2a79183c20eea0
--- ./x/twap/store.go 2023-05-01 13:02:57.600546582 +0000
+++ /tmp/go-mutesting-2991160611/./x/twap/store.go.2 2023-05-01 13:29:09.456824060 +0000
@@ -205,7 +205,7 @@

 			return types.TwapRecord{}, timeTooOldError{Time: t}
 		}
 	}
-	if twap.Asset0Denom != asset0Denom || twap.Asset1Denom != asset1Denom || twap.PoolId != poolId {
+	if false || twap.Asset1Denom != asset1Denom || twap.PoolId != poolId {
 		return types.TwapRecord{}, fmt.Errorf("internal error, got twap but its data is wrong")
 	}
 

FAIL

"/tmp/go-mutesting-2991160611/./x/twap/store.go.2" with checksum d8f7cd611c3ac7a33fd62e069fdb0cc1
--- ./x/twap/store.go 2023-05-01 13:02:57.600546582 +0000
+++ /tmp/go-mutesting-2991160611/./x/twap/store.go.3 2023-05-01 13:29:20.656886025 +0000
@@ -205,7 +205,7 @@

 			return types.TwapRecord{}, timeTooOldError{Time: t}
 		}
 	}
-	if twap.Asset0Denom != asset0Denom || twap.Asset1Denom != asset1Denom || twap.PoolId != poolId {
+	if twap.Asset0Denom != asset0Denom || false || twap.PoolId != poolId {
 		return types.TwapRecord{}, fmt.Errorf("internal error, got twap but its data is wrong")
 	}
 

FAIL

"/tmp/go-mutesting-2991160611/./x/twap/store.go.3" with checksum 83844b335b8f87c4af20e23c0bc6ed19
--- ./x/twap/store.go 2023-05-01 13:02:57.600546582 +0000
+++ /tmp/go-mutesting-2991160611/./x/twap/store.go.13 2023-05-01 13:31:41.105680863 +0000
@@ -138,8 +138,8 @@

 	bz := store.Get(key)
 	twap, err := types.ParseTwapFromBz(bz)
 	if err != nil {
-		err = fmt.Errorf("error in get most recent twap, likely that asset 0 or asset 1 were wrong: %s %s."+
-			" Underlying error: %w", asset0Denom, asset1Denom, err)
+		_, _, _, _, _ = err, fmt.Errorf, asset0Denom, asset1Denom, err
+
 	}
 	return twap, err
 }

FAIL

"/tmp/go-mutesting-2991160611/./x/twap/store.go.13" with checksum 01c9b05702f881a9f23e2602d7bc044d
--- ./x/twap/types/genesis.go 2023-05-01 13:02:57.600546582 +0000
+++ /tmp/go-mutesting-2991160611/./x/twap/types/genesis.go.1 2023-05-01 13:34:33.214558327 +0000
@@ -57,7 +57,7 @@

 	// if there was an error in this record, the spot prices should be 0.
 	// else, the the spot prices must be positive.
 	if t.LastErrorTime.Equal(t.Time) {
-		if t.P0LastSpotPrice.IsNil() || !t.P0LastSpotPrice.IsZero() {
+		if false || !t.P0LastSpotPrice.IsZero() {
 			return fmt.Errorf("twap record p0 last spot price must be zero due to having an error, was (%s)", t.P0LastSpotPrice)
 		}
 

FAIL

"/tmp/go-mutesting-2991160611/./x/twap/types/genesis.go.1" with checksum 89f67363da46c44ccc15762dace7f7a3
--- ./x/twap/types/genesis.go 2023-05-01 13:02:57.600546582 +0000
+++ /tmp/go-mutesting-2991160611/./x/twap/types/genesis.go.3 2023-05-01 13:34:39.714591371 +0000
@@ -61,7 +61,7 @@

 			return fmt.Errorf("twap record p0 last spot price must be zero due to having an error, was (%s)", t.P0LastSpotPrice)
 		}
 
-		if t.P1LastSpotPrice.IsNil() || !t.P1LastSpotPrice.IsZero() {
+		if false || !t.P1LastSpotPrice.IsZero() {
 			return fmt.Errorf("twap record p1 last spot price must be zero due to having an error, was (%s)", t.P1LastSpotPrice)
 		}
 	} else {

FAIL

"/tmp/go-mutesting-2991160611/./x/twap/types/genesis.go.3" with checksum 6cbd8175c4bf734373fd5be18390b953
--- ./x/twap/types/params.go 2023-05-01 13:02:57.600546582 +0000
+++ /tmp/go-mutesting-2991160611/./x/twap/types/params.go.0 2023-05-01 13:35:29.258851463 +0000
@@ -69,7 +69,7 @@

 		return fmt.Errorf("invalid parameter type: %T", i)
 	}
 
-	if v <= 0 {
+	if v < 0 {
 		return fmt.Errorf("time must be positive: %d", v)
 	}
 

FAIL

"/tmp/go-mutesting-2991160611/./x/twap/types/params.go.0" with checksum f2364bb9226c25e4f03d81f2ef1f1cfe
--- ./x/twap/types/utils.go 2023-05-01 13:02:57.600546582 +0000
+++ /tmp/go-mutesting-2991160611/./x/twap/types/utils.go.1 2023-05-01 13:35:41.590918445 +0000
@@ -22,7 +22,7 @@

 
 	denomPairs := []DenomPair{}
 
-	for i := 0; i < len(denoms); i++ {
+	for i := 0; i <= len(denoms); i++ {
 		for j := i + 1; j < len(denoms); j++ {
 			if denoms[i] == denoms[j] {
 				panic("input had duplicated denom")

FAIL

"/tmp/go-mutesting-2991160611/./x/twap/types/utils.go.1" with checksum b7457f201acf7d1b2cd9ff4daadcad21
--- ./x/twap/types/utils.go 2023-05-01 13:02:57.600546582 +0000
+++ /tmp/go-mutesting-2991160611/./x/twap/types/utils.go.3 2023-05-01 13:35:48.058952834 +0000
@@ -54,7 +54,7 @@

 	if denom0 == denom1 {
 		return "", "", fmt.Errorf("both assets cannot be of the same denom: assetA: %s, assetB: %s", denom0, denom1)
 	}
-	if denom0 > denom1 {
+	if denom0 >= denom1 {
 		denom0, denom1 = denom1, denom0
 	}
 	return denom0, denom1, nil

FAIL

"/tmp/go-mutesting-2991160611/./x/twap/types/utils.go.3" with checksum 332007c4810729f31163bf260f681381
--- ./x/twap/types/twapmock/amminterface.go 2023-05-01 13:02:57.600546582 +0000
+++ /tmp/go-mutesting-2991160611/./x/twap/types/twapmock/amminterface.go.2 2023-05-01 13:36:06.955053243 +0000
@@ -43,7 +43,8 @@

 	if existingForPool, ok := p.programmedPoolDenoms[poolId]; ok {
 		poolDenoms = existingForPool.poolDenoms
 	} else {
-		poolDenoms = map[string]struct{}{}
+		_ = poolDenoms
+
 	}
 	for _, denom := range overrideDenoms {
 		poolDenoms[denom] = struct{}{}

FAIL

"/tmp/go-mutesting-2991160611/./x/twap/types/twapmock/amminterface.go.2" with checksum d4c6b718a8d03c3f2b71c1ccac183042
--- ./x/twap/types/twapmock/amminterface.go 2023-05-01 13:02:57.600546582 +0000
+++ /tmp/go-mutesting-2991160611/./x/twap/types/twapmock/amminterface.go.3 2023-05-01 13:36:08.027058879 +0000
@@ -46,7 +46,8 @@

 		poolDenoms = map[string]struct{}{}
 	}
 	for _, denom := range overrideDenoms {
-		poolDenoms[denom] = struct{}{}
+		_, _ = poolDenoms, denom
+
 	}
 	p.programmedPoolDenoms[poolId] = poolDenomsResult{poolDenoms, overrideErr}
 }

FAIL

"/tmp/go-mutesting-2991160611/./x/twap/types/twapmock/amminterface.go.3" with checksum ce77f9914dafa4c6a388d95fb031f180
--- ./x/twap/types/twapmock/amminterface.go 2023-05-01 13:02:57.600546582 +0000
+++ /tmp/go-mutesting-2991160611/./x/twap/types/twapmock/amminterface.go.5 2023-05-01 13:36:10.079069646 +0000
@@ -62,7 +62,8 @@

 	if res, ok := p.programmedPoolDenoms[poolId]; ok {
 		result := make([]string, 0, len(res.poolDenoms))
 		for denom := range res.poolDenoms {
-			result = append(result, denom)
+			_, _, _ = result, result, denom
+
 		}
 		return result, res.err
 	}

FAIL

"/tmp/go-mutesting-2991160611/./x/twap/types/twapmock/amminterface.go.5" with checksum c7019e65af886f18ca67bf09fa0154c4
The mutation score is 0.807487 (151 passed, 36 failed, 0 duplicated, 0 skipped, total is 187)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

0 participants