diff options
author | Leonid <logvinov.leon@gmail.com> | 2017-07-04 03:28:34 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-07-04 03:28:34 +0800 |
commit | d4cef89587ef8ea0f7fbab1146c4524e8f588eac (patch) | |
tree | 93dcf602b5a738bad03c121384707fcf19518310 /src/types.ts | |
parent | d506a1f98562dd11ecff5e936a93fce6d14e48a9 (diff) | |
parent | 8204409c6d6bf773aa8ebb38006a3975ed43a684 (diff) | |
download | dexon-sol-tools-d4cef89587ef8ea0f7fbab1146c4524e8f588eac.tar dexon-sol-tools-d4cef89587ef8ea0f7fbab1146c4524e8f588eac.tar.gz dexon-sol-tools-d4cef89587ef8ea0f7fbab1146c4524e8f588eac.tar.bz2 dexon-sol-tools-d4cef89587ef8ea0f7fbab1146c4524e8f588eac.tar.lz dexon-sol-tools-d4cef89587ef8ea0f7fbab1146c4524e8f588eac.tar.xz dexon-sol-tools-d4cef89587ef8ea0f7fbab1146c4524e8f588eac.tar.zst dexon-sol-tools-d4cef89587ef8ea0f7fbab1146c4524e8f588eac.zip |
Merge pull request #82 from 0xProject/add-exchange-address-to-order-struct
Allow multiple Exchange contracts and multiple artifacts
Diffstat (limited to 'src/types.ts')
-rw-r--r-- | src/types.ts | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/types.ts b/src/types.ts index 200e65d56..2af778677 100644 --- a/src/types.ts +++ b/src/types.ts @@ -12,6 +12,7 @@ function strEnum(values: string[]): {[key: string]: string} { export const ZeroExError = strEnum([ 'CONTRACT_DOES_NOT_EXIST', + 'EXCHANGE_CONTRACT_DOES_NOT_EXIST', 'UNHANDLED_ERROR', 'USER_HAS_NO_ASSOCIATED_ADDRESSES', 'INVALID_SIGNATURE', @@ -147,6 +148,12 @@ export interface EtherTokenContract extends ContractInstance { withdraw: (amount: BigNumber.BigNumber, txOpts: TxOpts) => Promise<void>; } +export interface ProxyContract extends ContractInstance { + authorized: { + call: (address: string) => Promise<boolean>; + }; +} + export const SolidityTypes = strEnum([ 'address', 'uint256', @@ -182,6 +189,7 @@ export const ExchangeContractErrs = strEnum([ 'MULTIPLE_MAKERS_IN_SINGLE_CANCEL_BATCH_DISALLOWED', 'INSUFFICIENT_REMAINING_FILL_AMOUNT', 'MULTIPLE_TAKER_TOKENS_IN_FILL_UP_TO_DISALLOWED', + 'BATCH_ORDERS_MUST_HAVE_SAME_EXCHANGE_ADDRESS', ]); export type ExchangeContractErrs = keyof typeof ExchangeContractErrs; @@ -240,6 +248,7 @@ export interface Order { makerTokenAddress: string; takerTokenAddress: string; salt: BigNumber.BigNumber; + exchangeContractAddress: string; feeRecipient: string; expirationUnixTimestampSec: BigNumber.BigNumber; } @@ -325,3 +334,15 @@ export interface ContractEventEmitter { * It is however a `Web3` library type, not a native `0x.js` type. */ export type Web3Provider = Web3.Provider; + +export interface ExchangeContractByAddress { + [address: string]: ExchangeContract; +} + +export interface ContractArtifact { + networks: { + [networkId: number]: { + address: string; + }; + }; +} |