github.com/Finschia/finschia-sdk@v0.48.1/x/collection/errors.go (about) 1 package collection 2 3 import ( 4 sdkerrors "github.com/Finschia/finschia-sdk/types/errors" 5 ) 6 7 const collectionCodespace = ModuleName 8 9 var ( 10 ErrTokenNotExist = sdkerrors.Register(collectionCodespace, 2, "token symbol, token-id does not exist") 11 ErrTokenNotMintable = sdkerrors.Register(collectionCodespace, 3, "token symbol, token-id is not mintable") 12 ErrInvalidTokenName = sdkerrors.Register(collectionCodespace, 4, "token name should not be empty") 13 ErrInvalidTokenID = sdkerrors.Register(collectionCodespace, 5, "invalid token id") 14 ErrInvalidTokenDecimals = sdkerrors.Register(collectionCodespace, 6, "token decimals should be within the range in 0 ~ 18") 15 ErrInvalidIssueFT = sdkerrors.Register(collectionCodespace, 7, "Issuing token with amount[1], decimals[0], mintable[false] prohibited. Issue nft token instead.") 16 ErrInvalidAmount = sdkerrors.Register(collectionCodespace, 8, "invalid token amount") 17 ErrInvalidBaseImgURILength = sdkerrors.Register(collectionCodespace, 9, "invalid base_img_uri length") 18 ErrInvalidNameLength = sdkerrors.Register(collectionCodespace, 10, "invalid name length") 19 ErrInvalidTokenType = sdkerrors.Register(collectionCodespace, 11, "invalid token type pattern found") 20 ErrInvalidTokenIndex = sdkerrors.Register(collectionCodespace, 12, "invalid token index pattern found") 21 ErrCollectionExist = sdkerrors.Register(collectionCodespace, 13, "collection already exists") 22 ErrCollectionNotExist = sdkerrors.Register(collectionCodespace, 14, "collection does not exists") 23 ErrTokenTypeExist = sdkerrors.Register(collectionCodespace, 15, "token type for contract_id, token-type already exists") 24 ErrTokenTypeNotExist = sdkerrors.Register(collectionCodespace, 16, "token type for contract_id, token-type does not exist") 25 ErrTokenTypeFull = sdkerrors.Register(collectionCodespace, 17, "all token type for contract_id are occupied") 26 ErrTokenIndexFull = sdkerrors.Register(collectionCodespace, 18, "all non-fungible token index for contract_id, token-type are occupied") 27 ErrTokenIDFull = sdkerrors.Register(collectionCodespace, 19, "all fungible token-id for contract_id are occupied") 28 ErrTokenNoPermission = sdkerrors.Register(collectionCodespace, 20, "account does not have the permission") 29 ErrTokenAlreadyAChild = sdkerrors.Register(collectionCodespace, 21, "token is already a child of some other") 30 ErrTokenNotAChild = sdkerrors.Register(collectionCodespace, 22, "token is not a child of some other") 31 ErrTokenNotOwnedBy = sdkerrors.Register(collectionCodespace, 23, "token is being not owned by") 32 ErrTokenCannotTransferChildToken = sdkerrors.Register(collectionCodespace, 24, "cannot transfer a child token") 33 ErrTokenNotNFT = sdkerrors.Register(collectionCodespace, 25, "token is not a NFT") 34 ErrCannotAttachToItself = sdkerrors.Register(collectionCodespace, 26, "cannot attach token to itself") 35 ErrCannotAttachToADescendant = sdkerrors.Register(collectionCodespace, 27, "cannot attach token to a descendant") 36 ErrApproverProxySame = sdkerrors.Register(collectionCodespace, 28, "approver is same with proxy") 37 ErrCollectionNotApproved = sdkerrors.Register(collectionCodespace, 29, "proxy is not approved on the collection") 38 ErrCollectionAlreadyApproved = sdkerrors.Register(collectionCodespace, 30, "proxy is already approved on the collection") 39 ErrAccountExist = sdkerrors.Register(collectionCodespace, 31, "account already exists") 40 ErrAccountNotExist = sdkerrors.Register(collectionCodespace, 32, "account does not exists") 41 ErrInsufficientSupply = sdkerrors.Register(collectionCodespace, 33, "insufficient supply") 42 ErrInvalidCoin = sdkerrors.Register(collectionCodespace, 34, "invalid coin") 43 ErrInvalidChangesFieldCount = sdkerrors.Register(collectionCodespace, 35, "invalid count of field changes") 44 ErrEmptyChanges = sdkerrors.Register(collectionCodespace, 36, "changes is empty") 45 ErrInvalidChangesField = sdkerrors.Register(collectionCodespace, 37, "invalid field of changes") 46 ErrTokenIndexWithoutType = sdkerrors.Register(collectionCodespace, 38, "There is a token index but no token type") 47 ErrTokenTypeFTWithoutIndex = sdkerrors.Register(collectionCodespace, 39, "There is a token type of ft but no token index") 48 ErrInsufficientToken = sdkerrors.Register(collectionCodespace, 40, "insufficient token") 49 ErrDuplicateChangesField = sdkerrors.Register(collectionCodespace, 41, "duplicate field of changes") 50 ErrInvalidMetaLength = sdkerrors.Register(collectionCodespace, 42, "invalid meta length") 51 ErrSupplyOverflow = sdkerrors.Register(collectionCodespace, 43, "supply for collection reached maximum") 52 ErrEmptyField = sdkerrors.Register(collectionCodespace, 44, "required field cannot be empty") 53 ErrCompositionTooDeep = sdkerrors.Register(collectionCodespace, 45, "cannot attach token (composition too deep)") 54 ErrCompositionTooWide = sdkerrors.Register(collectionCodespace, 46, "cannot attach token (composition too wide)") 55 ErrBurnNonRootNFT = sdkerrors.Register(collectionCodespace, 47, "cannot burn non-root NFTs") 56 )