func SetGasMeter(simulate bool, ctx sdk.Context, gasLimit uint64) sdk.Context {
	if simulate || ctx.BlockHeight() == 0 {
		return ctx.WithGasMeter(sdk.NewInfiniteGasMeter())
	}
	return ctx.WithGasMeter(sdk.NewGasMeter(gasLimit))
}
SetGasMeter returns a new context with a gas meter set from a given context.
package ante
import (
	"github.com/Dipper-Labs/Dipper-Protocol/app/v0/auth/types"
	sdk "github.com/Dipper-Labs/Dipper-Protocol/types"
	sdkerrors "github.com/Dipper-Labs/Dipper-Protocol/types/errors"
)
var (
	_ GasTx = (*types.StdTx)(nil)  
)
type GasTx interface {
	sdk.Tx
	GetGas() uint64
}
type SetUpContextDecorator struct{}
func NewSetUpContextDecorator() SetUpContextDecorator {
	return SetUpContextDecorator{}
}
func (sud SetUpContextDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, simulate bool, next sdk.AnteHandler) (newCtx sdk.Context, err error) {
	gasTx, ok := tx.(GasTx)
	if !ok {
		newCtx = SetGasMeter(simulate, ctx, 0)
		return newCtx, sdkerrors.Wrap(sdkerrors.ErrTxDecode, "Tx must be GasTx")
	}
	newCtx = SetGasMeter(simulate, ctx, gasTx.GetGas())
	defer func() {
		if r := recover(); r != nil {
			switch rType := r.(type) {
			case sdk.ErrorOutOfGas:
				err = sdkerrors.Wrapf(sdkerrors.ErrOutOfGas, "out of gas in location: %v; gasWanted: %d, gasUsed: %d",
					rType.Descriptor, gasTx.GetGas(), newCtx.GasMeter().GasConsumed())
			default:
				panic(r)
			}
		}
	}()
	return next(newCtx, tx, simulate)
}