diff options
author | Leonid Logvinov <logvinov.leon@gmail.com> | 2017-07-12 05:16:09 +0800 |
---|---|---|
committer | Leonid Logvinov <logvinov.leon@gmail.com> | 2017-07-12 08:54:57 +0800 |
commit | 6033c1a5d5f494d1ed27b00488ca458952341ae6 (patch) | |
tree | 17b53c7971047ca57b235c5351e972da721c09a4 /src/types.ts | |
parent | 38fbf028a6699c7d8e853db4699a37cdf60e70c2 (diff) | |
download | dexon-0x-contracts-6033c1a5d5f494d1ed27b00488ca458952341ae6.tar dexon-0x-contracts-6033c1a5d5f494d1ed27b00488ca458952341ae6.tar.gz dexon-0x-contracts-6033c1a5d5f494d1ed27b00488ca458952341ae6.tar.bz2 dexon-0x-contracts-6033c1a5d5f494d1ed27b00488ca458952341ae6.tar.lz dexon-0x-contracts-6033c1a5d5f494d1ed27b00488ca458952341ae6.tar.xz dexon-0x-contracts-6033c1a5d5f494d1ed27b00488ca458952341ae6.tar.zst dexon-0x-contracts-6033c1a5d5f494d1ed27b00488ca458952341ae6.zip |
Use PascalCase names as string enum keys
Diffstat (limited to 'src/types.ts')
-rw-r--r-- | src/types.ts | 70 |
1 files changed, 35 insertions, 35 deletions
diff --git a/src/types.ts b/src/types.ts index db25c4f64..974057fed 100644 --- a/src/types.ts +++ b/src/types.ts @@ -2,19 +2,19 @@ import * as _ from 'lodash'; import * as Web3 from 'web3'; export enum ZeroExError { - CONTRACT_DOES_NOT_EXIST = 'CONTRACT_DOES_NOT_EXIST', - EXCHANGE_CONTRACT_DOES_NOT_EXIST = 'EXCHANGE_CONTRACT_DOES_NOT_EXIST', - UNHANDLED_ERROR = 'UNHANDLED_ERROR', - USER_HAS_NO_ASSOCIATED_ADDRESSES = 'USER_HAS_NO_ASSOCIATED_ADDRESSES', - INVALID_SIGNATURE = 'INVALID_SIGNATURE', - CONTRACT_NOT_DEPLOYED_ON_NETWORK = 'CONTRACT_NOT_DEPLOYED_ON_NETWORK', - ZRX_NOT_IN_TOKEN_REGISTRY = 'ZRX_NOT_IN_TOKEN_REGISTRY', - INSUFFICIENT_ALLOWANCE_FOR_TRANSFER = 'INSUFFICIENT_ALLOWANCE_FOR_TRANSFER', - INSUFFICIENT_BALANCE_FOR_TRANSFER = 'INSUFFICIENT_BALANCE_FOR_TRANSFER', - INSUFFICIENT_ETH_BALANCE_FOR_DEPOSIT = 'INSUFFICIENT_ETH_BALANCE_FOR_DEPOSIT', - INSUFFICIENT_WETH_BALANCE_FOR_WITHDRAWAL = 'INSUFFICIENT_WETH_BALANCE_FOR_WITHDRAWAL', - INVALID_JUMP = 'INVALID_JUMP', - OUT_OF_GAS = 'OUT_OF_GAS', + ContractDoesNotExist = 'CONTRACT_DOES_NOT_EXIST', + ExchangeContractDoesNotExist = 'EXCHANGE_CONTRACT_DOES_NOT_EXIST', + UnhandledError = 'UNHANDLED_ERROR', + UserHasNoAssociatedAddress = 'USER_HAS_NO_ASSOCIATED_ADDRESSES', + InvalidSignature = 'INVALID_SIGNATURE', + ContractNotDeployedOnNetwork = 'CONTRACT_NOT_DEPLOYED_ON_NETWORK', + ZrxNotInTokenRegistry = 'ZRX_NOT_IN_TOKEN_REGISTRY', + InsufficientAllowanceForTransfer = 'INSUFFICIENT_ALLOWANCE_FOR_TRANSFER', + InsufficientBalanceForTransfer = 'INSUFFICIENT_BALANCE_FOR_TRANSFER', + InsufficientEthBalanceForDeposit = 'INSUFFICIENT_ETH_BALANCE_FOR_DEPOSIT', + InsufficientWEthBalanceForWithdrawal = 'INSUFFICIENT_WETH_BALANCE_FOR_WITHDRAWAL', + InvalidJump = 'INVALID_JUMP', + OutOfGas = 'OUT_OF_GAS', } /** @@ -163,8 +163,8 @@ export interface ProxyContract extends ContractInstance { } export enum SolidityTypes { - address = 'address', - uint256 = 'uint256', + Address = 'address', + Uint256 = 'uint256', } export enum ExchangeContractErrCodes { @@ -177,26 +177,26 @@ export enum ExchangeContractErrCodes { } export enum ExchangeContractErrs { - ORDER_FILL_EXPIRED = 'ORDER_FILL_EXPIRED', - ORDER_CANCEL_EXPIRED = 'ORDER_CANCEL_EXPIRED', - ORDER_CANCEL_AMOUNT_ZERO = 'ORDER_CANCEL_AMOUNT_ZERO', - ORDER_ALREADY_CANCELLED_OR_FILLED = 'ORDER_ALREADY_CANCELLED_OR_FILLED', - ORDER_REMAINING_FILL_AMOUNT_ZERO = 'ORDER_REMAINING_FILL_AMOUNT_ZERO', - ORDER_FILL_ROUNDING_ERROR = 'ORDER_FILL_ROUNDING_ERROR', - FILL_BALANCE_ALLOWANCE_ERROR = 'FILL_BALANCE_ALLOWANCE_ERROR', - INSUFFICIENT_TAKER_BALANCE = 'INSUFFICIENT_TAKER_BALANCE', - INSUFFICIENT_TAKER_ALLOWANCE = 'INSUFFICIENT_TAKER_ALLOWANCE', - INSUFFICIENT_MAKER_BALANCE = 'INSUFFICIENT_MAKER_BALANCE', - INSUFFICIENT_MAKER_ALLOWANCE = 'INSUFFICIENT_MAKER_ALLOWANCE', - INSUFFICIENT_TAKER_FEE_BALANCE = 'INSUFFICIENT_TAKER_FEE_BALANCE', - INSUFFICIENT_TAKER_FEE_ALLOWANCE = 'INSUFFICIENT_TAKER_FEE_ALLOWANCE', - INSUFFICIENT_MAKER_FEE_BALANCE = 'INSUFFICIENT_MAKER_FEE_BALANCE', - INSUFFICIENT_MAKER_FEE_ALLOWANCE = 'INSUFFICIENT_MAKER_FEE_ALLOWANCE', - TRANSACTION_SENDER_IS_NOT_FILL_ORDER_TAKER = 'TRANSACTION_SENDER_IS_NOT_FILL_ORDER_TAKER', - MULTIPLE_MAKERS_IN_SINGLE_CANCEL_BATCH_DISALLOWED = 'MULTIPLE_MAKERS_IN_SINGLE_CANCEL_BATCH_DISALLOWED', - INSUFFICIENT_REMAINING_FILL_AMOUNT = 'INSUFFICIENT_REMAINING_FILL_AMOUNT', - MULTIPLE_TAKER_TOKENS_IN_FILL_UP_TO_DISALLOWED = 'MULTIPLE_TAKER_TOKENS_IN_FILL_UP_TO_DISALLOWED', - BATCH_ORDERS_MUST_HAVE_SAME_EXCHANGE_ADDRESS = 'BATCH_ORDERS_MUST_HAVE_SAME_EXCHANGE_ADDRESS', + OrderFillExpired = 'ORDER_FILL_EXPIRED', + OrderCancelExpired = 'ORDER_CANCEL_EXPIRED', + OrderCancelAmountZero = 'ORDER_CANCEL_AMOUNT_ZERO', + OrderAlreadyCancelledOrFilled = 'ORDER_ALREADY_CANCELLED_OR_FILLED', + OrderRemainingFillAmountZero = 'ORDER_REMAINING_FILL_AMOUNT_ZERO', + OrderFillRoundingError = 'ORDER_FILL_ROUNDING_ERROR', + FillBalanceAllowanceError = 'FILL_BALANCE_ALLOWANCE_ERROR', + InsufficientTakerBalance = 'INSUFFICIENT_TAKER_BALANCE', + InsufficientTakerAllowance = 'INSUFFICIENT_TAKER_ALLOWANCE', + InsufficientMakerBalance = 'INSUFFICIENT_MAKER_BALANCE', + InsufficientMakerAllowance = 'INSUFFICIENT_MAKER_ALLOWANCE', + InsufficientTakerFeeBalance = 'INSUFFICIENT_TAKER_FEE_BALANCE', + InsufficientTakerFeeAllowance = 'INSUFFICIENT_TAKER_FEE_ALLOWANCE', + InsufficientMakerFeeBalance = 'INSUFFICIENT_MAKER_FEE_BALANCE', + InsufficientMakerFeeAllowance = 'INSUFFICIENT_MAKER_FEE_ALLOWANCE', + TransactionSenderIsNotFillOrderTaker = 'TRANSACTION_SENDER_IS_NOT_FILL_ORDER_TAKER', + MultipleMakersInSingleCancelBatchDisallowed = 'MULTIPLE_MAKERS_IN_SINGLE_CANCEL_BATCH_DISALLOWED', + InsufficientRemainingFillAmount = 'INSUFFICIENT_REMAINING_FILL_AMOUNT', + MultipleTakerTokensInFillUpToDisallowed = 'MULTIPLE_TAKER_TOKENS_IN_FILL_UP_TO_DISALLOWED', + BatchOrdersMustHaveSameExchangeAddress = 'BATCH_ORDERS_MUST_HAVE_SAME_EXCHANGE_ADDRESS', } export interface ContractResponse { |