func ErrCheckUserTPSCapacity(accKey types.AccountKey) sdk.Error {
	return types.NewError(types.CodeCheckUserTPSCapacity, fmt.Sprintf("update user %v transaction capacity failed", accKey))
}
ErrCheckUserTPSCapacity - error when check user capacity failed
package types
import (
	"fmt"
	"github.com/lino-network/lino/types"
	sdk "github.com/cosmos/cosmos-sdk/types"
)
func ErrReceiverNotFound(username types.AccountKey) sdk.Error {
	return types.NewError(types.CodeReceiverNotFound, fmt.Sprintf("receiver %s not found", username))
}
func ErrSenderNotFound(username types.AccountKey) sdk.Error {
	return types.NewError(types.CodeSenderNotFound, fmt.Sprintf("sender %s not found", username))
}
func ErrAccountNotFound(username types.AccountKey) sdk.Error {
	return types.NewError(types.CodeAccountNotFound, fmt.Sprintf("account %s not found", username))
}
func ErrAccountBankNotFound(addr sdk.Address) sdk.Error {
	return types.NewError(types.CodeAccountBankNotFound, fmt.Sprintf("account bank not found: %s", addr))
}
func ErrReferrerNotFound(username types.AccountKey) sdk.Error {
	return types.NewError(types.CodeReferrerNotFound, fmt.Sprintf("referrer %s not found", username))
}
func ErrAccountAlreadyExists(accKey types.AccountKey) sdk.Error {
	return types.NewError(types.CodeAccountAlreadyExists, fmt.Sprintf("account %v already exists", accKey))
}
func ErrAddressAlreadyTaken(addr string) sdk.Error {
	return types.NewError(types.CodeAddressIsTaken, fmt.Sprintf("address %s is already taken", addr))
}
func ErrRegisterFeeInsufficient() sdk.Error {
	return types.NewError(types.CodeRegisterFeeInsufficient, fmt.Sprintf("register fee insufficient"))
}
func ErrAddSavingCoinWithFullCoinDay() sdk.Error {
	return types.NewError(types.CodeAddSavingCoinWithFullCoinDay, fmt.Sprint("failed to add saving coin with full coin day"))
}
func ErrAddSavingCoin() sdk.Error {
	return types.NewError(types.CodeAddSavingCoin, fmt.Sprint("failed to add saving coin"))
}
func ErrGetResetKey(accKey types.AccountKey) sdk.Error {
	return types.NewError(types.CodeGetResetKey, fmt.Sprintf("get %v reset key failed", accKey))
}
func ErrGetTransactionKey(accKey types.AccountKey) sdk.Error {
	return types.NewError(types.CodeGetTransactionKey, fmt.Sprintf("get %v transaction key failed", accKey))
}
func ErrGetAppKey(accKey types.AccountKey) sdk.Error {
	return types.NewError(types.CodeGetAppKey, fmt.Sprintf("get %v app key failed", accKey))
}
func ErrGetSigningKey(username types.AccountKey) sdk.Error {
	return types.NewError(types.CodeGetSigningKeyFailed, fmt.Sprintf("get %v signing key failed", username))
}
func ErrGetSavingFromBank(err error) sdk.Error {
	return types.NewError(types.CodeGetSavingFromBank, fmt.Sprintf("failed to get saving from bank: %s", err.Error()))
}
func ErrGetSequence(err error) sdk.Error {
	return types.NewError(types.CodeGetSequence, fmt.Sprintf("failed to get sequence: %s", err.Error()))
}
func ErrGetAddress(err error) sdk.Error {
	return types.NewError(types.CodeGetAddressFailed, fmt.Sprintf("failed to get address: %s", err.Error()))
}
func ErrGetLastReportOrUpvoteAt(err error) sdk.Error {
	return types.NewError(types.CodeGetLastReportOrUpvoteAt, fmt.Sprintf("failed to get last report or upvote at: %s", err.Error()))
}
func ErrUpdateLastReportOrUpvoteAt(err error) sdk.Error {
	return types.NewError(types.CodeUpdateLastReportOrUpvoteAt, fmt.Sprintf("failed to update last report or upvote at: %s", err.Error()))
}
func ErrGetLastPostAt(err error) sdk.Error {
	return types.NewError(types.CodeGetLastPostAt, fmt.Sprintf("failed to get last post at: %s", err.Error()))
}
func ErrUpdateLastPostAt(err error) sdk.Error {
	return types.NewError(types.CodeUpdateLastPostAt, fmt.Sprintf("failed to update last post at: %s", err.Error()))
}
func ErrIncreaseSequenceByOne(err error) sdk.Error {
	return types.NewError(types.CodeIncreaseSequenceByOne, fmt.Sprintf("failed to increase sequence by one: %s", err.Error()))
}
func ErrCheckResetKey() sdk.Error {
	return types.NewError(types.CodeCheckResetKey, fmt.Sprintf("transaction needs reset key"))
}
func ErrCheckTransactionKey() sdk.Error {
	return types.NewError(types.CodeCheckTransactionKey, fmt.Sprintf("transaction needs transaction key"))
}
func ErrCheckGrantAppKey() sdk.Error {
	return types.NewError(types.CodeCheckGrantAppKey, fmt.Sprintf("only user's own app key or above can sign grant or revoke app permission msg"))
}
func ErrGrantPubKeyNotFound() sdk.Error {
	return types.NewError(
		types.CodeGrantPubKeyNotFound, fmt.Sprintf("grant public key is not found"))
}
func ErrCheckAuthenticatePubKeyOwner(accKey types.AccountKey) sdk.Error {
	return types.NewError(types.CodeCheckAuthenticatePubKeyOwner, fmt.Sprintf("user %v authenticate public key match failed", accKey))
}
func ErrCheckAuthenticatePubKeyAddress(addr sdk.AccAddress) sdk.Error {
	return types.NewError(types.CodeCheckAuthenticatePubKeyOwner, fmt.Sprintf("address %v authenticate public key match failed", addr))
}
func ErrGrantKeyExpired(owner types.AccountKey) sdk.Error {
	return types.NewError(types.CodeGrantKeyExpired, fmt.Sprintf("grant user %v key expired", owner))
}
func ErrGrantKeyMismatch(owner types.AccountKey) sdk.Error {
	return types.NewError(types.CodeGrantKeyMismatch, fmt.Sprintf("grant user %v key can't match his own key", owner))
}
func ErrAppGrantKeyMismatch(owner types.AccountKey) sdk.Error {
	return types.NewError(types.CodeAppGrantKeyMismatch, fmt.Sprintf("grant user %v app key can't match his own key", owner))
}
func ErrPreAuthGrantKeyMismatch(owner types.AccountKey) sdk.Error {
	return types.NewError(types.CodeAppGrantKeyMismatch, fmt.Sprintf("grant user %v transaction key can't match his own key", owner))
}
func ErrPreAuthAmountInsufficient(owner types.AccountKey, balance, consume types.Coin) sdk.Error {
	return types.NewError(
		types.CodeAppGrantKeyMismatch,
		fmt.Sprintf("grant user %v doesn't have enough preauthorization balance, have %v, wanna consume %v", owner, balance, consume))
}
func ErrUnsupportGrantLevel() sdk.Error {
	return types.NewError(types.CodeUnsupportGrantLevel, fmt.Sprintf("unsupport grant level"))
}
func ErrRevokePermissionLevelMismatch(got, expect types.Permission) sdk.Error {
	return types.NewError(types.CodeRevokePermissionLevelMismatch, fmt.Sprintf("revoke permission level mismatch, got %v, expect %v", got, expect))
}