diff options
author | Fabio Berger <me@fabioberger.com> | 2018-06-25 18:59:26 +0800 |
---|---|---|
committer | Fabio Berger <me@fabioberger.com> | 2018-06-25 18:59:26 +0800 |
commit | f811c07454c87775f18374e8d955583dc157627f (patch) | |
tree | 2814cb231c7969c3977b666c8fe313554e4e6bf0 /packages/types/src/index.ts | |
parent | bb8538282428dc18c60ac352639561f7bb2a8e1a (diff) | |
download | dexon-sol-tools-f811c07454c87775f18374e8d955583dc157627f.tar dexon-sol-tools-f811c07454c87775f18374e8d955583dc157627f.tar.gz dexon-sol-tools-f811c07454c87775f18374e8d955583dc157627f.tar.bz2 dexon-sol-tools-f811c07454c87775f18374e8d955583dc157627f.tar.lz dexon-sol-tools-f811c07454c87775f18374e8d955583dc157627f.tar.xz dexon-sol-tools-f811c07454c87775f18374e8d955583dc157627f.tar.zst dexon-sol-tools-f811c07454c87775f18374e8d955583dc157627f.zip |
Move RevertReasons to @0xproject/types package
Diffstat (limited to 'packages/types/src/index.ts')
-rw-r--r-- | packages/types/src/index.ts | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/packages/types/src/index.ts b/packages/types/src/index.ts index e5a0f41a9..70665a123 100644 --- a/packages/types/src/index.ts +++ b/packages/types/src/index.ts @@ -168,3 +168,47 @@ export interface ERC721AssetData { tokenId: BigNumber; receiverData: string; } + +export enum RevertReasons { + OrderUnfillable = 'ORDER_UNFILLABLE', + InvalidMaker = 'INVALID_MAKER', + InvalidTaker = 'INVALID_TAKER', + InvalidSender = 'INVALID_SENDER', + InvalidOrderSignature = 'INVALID_ORDER_SIGNATURE', + InvalidTakerAmount = 'INVALID_TAKER_AMOUNT', + RoundingError = 'ROUNDING_ERROR', + InvalidSignature = 'INVALID_SIGNATURE', + SignatureIllegal = 'SIGNATURE_ILLEGAL', + SignatureUnsupported = 'SIGNATURE_UNSUPPORTED', + InvalidNewOrderEpoch = 'INVALID_NEW_ORDER_EPOCH', + CompleteFillFailed = 'COMPLETE_FILL_FAILED', + NegativeSpreadRequired = 'NEGATIVE_SPREAD_REQUIRED', + ReentrancyIllegal = 'REENTRANCY_ILLEGAL', + InvalidTxHash = 'INVALID_TX_HASH', + InvalidTxSignature = 'INVALID_TX_SIGNATURE', + FailedExecution = 'FAILED_EXECUTION', + AssetProxyMismatch = 'ASSET_PROXY_MISMATCH', + AssetProxyIdMismatch = 'ASSET_PROXY_ID_MISMATCH', + LengthGreaterThan0Required = 'LENGTH_GREATER_THAN_0_REQUIRED', + Length0Required = 'LENGTH_0_REQUIRED', + Length65Required = 'LENGTH_65_REQUIRED', + InvalidAmount = 'INVALID_AMOUNT', + TransferFailed = 'TRANSFER_FAILED', + SenderNotAuthorized = 'SENDER_NOT_AUTHORIZED', + TargetNotAuthorized = 'TARGET_NOT_AUTHORIZED', + TargetAlreadyAuthorized = 'TARGET_ALREADY_AUTHORIZED', + IndexOutOfBounds = 'INDEX_OUT_OF_BOUNDS', + AuthorizedAddressMismatch = 'AUTHORIZED_ADDRESS_MISMATCH', + OnlyContractOwner = 'ONLY_CONTRACT_OWNER', + MakerNotWhitelisted = 'MAKER_NOT_WHITELISTED', + TakerNotWhitelisted = 'TAKER_NOT_WHITELISTED', + AssetProxyDoesNotExist = 'ASSET_PROXY_DOES_NOT_EXIST', + LibBytesGreaterThanZeroLengthRequired = 'GREATER_THAN_ZERO_LENGTH_REQUIRED', + LibBytesGreaterOrEqualTo4LengthRequired = 'GREATER_OR_EQUAL_TO_4_LENGTH_REQUIRED', + LibBytesGreaterOrEqualTo20LengthRequired = 'GREATER_OR_EQUAL_TO_20_LENGTH_REQUIRED', + LibBytesGreaterOrEqualTo32LengthRequired = 'GREATER_OR_EQUAL_TO_32_LENGTH_REQUIRED', + LibBytesGreaterOrEqualToNestedBytesLengthRequired = 'GREATER_OR_EQUAL_TO_NESTED_BYTES_LENGTH_REQUIRED', + LibBytesGreaterOrEqualToSourceBytesLengthRequired = 'GREATER_OR_EQUAL_TO_SOURCE_BYTES_LENGTH_REQUIRED', + Erc20InsufficientBalance = 'ERC20_INSUFFICIENT_BALANCE', + Erc20InsufficientAllowance = 'ERC20_INSUFFICIENT_ALLOWANCE', +} |