func NewTxBuilderFromCLI() TxBuilder {
	kb, err := keys.NewKeyBaseFromHomeFlag()
	if err != nil {
		panic(err)
	}
	txbldr := TxBuilder{
		keybase:            kb,
		accountNumber:      uint64(viper.GetInt64(flags.FlagAccountNumber)),
		sequence:           uint64(viper.GetInt64(flags.FlagSequence)),
		gas:                flags.GasFlagVar.Gas,
		gasAdjustment:      viper.GetFloat64(flags.FlagGasAdjustment),
		simulateAndExecute: flags.GasFlagVar.Simulate,
		chainID:            viper.GetString(flags.FlagChainID),
		memo:               viper.GetString(flags.FlagMemo),
	}
	txbldr = txbldr.WithFees(viper.GetString(flags.FlagFees))
	txbldr = txbldr.WithGasPrices(viper.GetString(flags.FlagGasPrices))
	return txbldr
}
NewTxBuilderFromCLI returns a new initialized TxBuilder with parameters from
the command line using Viper.
package types
import (
	"errors"
	"fmt"
	"strings"
	"github.com/spf13/viper"
	"github.com/Dipper-Labs/Dipper-Protocol/client/flags"
	"github.com/Dipper-Labs/Dipper-Protocol/client/keys"
	crkeys "github.com/Dipper-Labs/Dipper-Protocol/crypto/keys"
	sdk "github.com/Dipper-Labs/Dipper-Protocol/types"
)
type TxBuilder struct {
	txEncoder          sdk.TxEncoder
	keybase            crkeys.Keybase
	accountNumber      uint64
	sequence           uint64
	gas                uint64
	gasAdjustment      float64
	simulateAndExecute bool
	chainID            string
	memo               string
	fees               sdk.Coins
	gasPrices          sdk.DecCoins
}
func NewTxBuilder(
	txEncoder sdk.TxEncoder, accNumber, seq, gas uint64, gasAdj float64,
	simulateAndExecute bool, chainID, memo string, fees sdk.Coins, gasPrices sdk.DecCoins,
) TxBuilder {
	return TxBuilder{
		txEncoder:          txEncoder,
		keybase:            nil,
		accountNumber:      accNumber,
		sequence:           seq,
		gas:                gas,
		gasAdjustment:      gasAdj,
		simulateAndExecute: simulateAndExecute,
		chainID:            chainID,
		memo:               memo,
		fees:               fees,
		gasPrices:          gasPrices,
	}
}