diff options
author | Fabio Berger <me@fabioberger.com> | 2018-06-25 18:32:16 +0800 |
---|---|---|
committer | Fabio Berger <me@fabioberger.com> | 2018-06-25 18:32:16 +0800 |
commit | c50da5d0344cd23392f71d213fff9dfec7ec71c9 (patch) | |
tree | 067e106202a83c0cd3bc929a940145100293f2b1 /packages/contracts/src/utils/types.ts | |
parent | 9b196ba68c9f958cd82ef99ae87fdd87c70441a9 (diff) | |
parent | df79fb19aff1aa1ed7b1346feccfa3d235c25ea0 (diff) | |
download | dexon-sol-tools-c50da5d0344cd23392f71d213fff9dfec7ec71c9.tar dexon-sol-tools-c50da5d0344cd23392f71d213fff9dfec7ec71c9.tar.gz dexon-sol-tools-c50da5d0344cd23392f71d213fff9dfec7ec71c9.tar.bz2 dexon-sol-tools-c50da5d0344cd23392f71d213fff9dfec7ec71c9.tar.lz dexon-sol-tools-c50da5d0344cd23392f71d213fff9dfec7ec71c9.tar.xz dexon-sol-tools-c50da5d0344cd23392f71d213fff9dfec7ec71c9.tar.zst dexon-sol-tools-c50da5d0344cd23392f71d213fff9dfec7ec71c9.zip |
merge check-revert-reasons
Diffstat (limited to 'packages/contracts/src/utils/types.ts')
-rw-r--r-- | packages/contracts/src/utils/types.ts | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/packages/contracts/src/utils/types.ts b/packages/contracts/src/utils/types.ts index b792bb90a..e996ad96a 100644 --- a/packages/contracts/src/utils/types.ts +++ b/packages/contracts/src/utils/types.ts @@ -227,3 +227,47 @@ export interface FillScenario { makerStateScenario: TraderStateScenario; takerStateScenario: TraderStateScenario; } + +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', +} |