// pre-define errors for supporting bytom errorFormatter
var (
- ErrDuplicateAlias = errors.New("duplicate account alias")
- ErrDuplicateIndex = errors.New("duplicate account with same xPubs and index")
- ErrFindAccount = errors.New("fail to find account")
- ErrMarshalAccount = errors.New("failed marshal account")
- ErrInvalidAddress = errors.New("invalid address")
- ErrFindCtrlProgram = errors.New("fail to find account control program")
- ErrDeriveRule = errors.New("invalid key derive rule")
- ErrContractIndex = errors.New("exceed the maximum addresses per account")
- ErrAccountIndex = errors.New("exceed the maximum accounts per xpub")
- ErrFindTransaction = errors.New("no transaction")
+ ErrDuplicateAlias = errors.New("Duplicate account alias")
+ ErrDuplicateIndex = errors.New("Duplicate account with same xPubs and index")
+ ErrFindAccount = errors.New("Failed to find account")
+ ErrMarshalAccount = errors.New("Failed to marshal account")
+ ErrInvalidAddress = errors.New("Invalid address")
+ ErrFindCtrlProgram = errors.New("Failed to find account control program")
+ ErrDeriveRule = errors.New("Invalid key derivation rule")
+ ErrContractIndex = errors.New("Exceeded maximum addresses per account")
+ ErrAccountIndex = errors.New("Exceeded maximum accounts per xpub")
+ ErrFindTransaction = errors.New("No transaction")
)
// ContractKey account control promgram store prefix
account.ErrInsufficient: {400, "BTM700", "Funds of account are insufficient"},
account.ErrImmature: {400, "BTM701", "Available funds of account are immature"},
account.ErrReserved: {400, "BTM702", "Available UTXOs of account have been reserved"},
- account.ErrMatchUTXO: {400, "BTM703", "Not found UTXO with given hash"},
+ account.ErrMatchUTXO: {400, "BTM703", "UTXO with given hash not found"},
ErrBadActionType: {400, "BTM704", "Invalid action type"},
ErrBadAction: {400, "BTM705", "Invalid action object"},
ErrBadActionConstruction: {400, "BTM706", "Invalid action construction"},
txbuilder.ErrMissingFields: {400, "BTM707", "One or more fields are missing"},
txbuilder.ErrBadAmount: {400, "BTM708", "Invalid asset amount"},
- account.ErrFindAccount: {400, "BTM709", "Not found account"},
- asset.ErrFindAsset: {400, "BTM710", "Not found asset"},
+ account.ErrFindAccount: {400, "BTM709", "Account not found"},
+ asset.ErrFindAsset: {400, "BTM710", "Asset not found"},
txbuilder.ErrBadContractArgType: {400, "BTM711", "Invalid contract argument type"},
- txbuilder.ErrOrphanTx: {400, "BTM712", "Not found transaction input utxo"},
- txbuilder.ErrExtTxFee: {400, "BTM713", "Transaction fee exceed max limit"},
+ txbuilder.ErrOrphanTx: {400, "BTM712", "Transaction input UTXO not found"},
+ txbuilder.ErrExtTxFee: {400, "BTM713", "Transaction fee exceeded max limit"},
txbuilder.ErrNoGasInput: {400, "BTM714", "Transaction has no gas input"},
// Submit transaction error namespace (73x ~ 79x)