aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLeonid Logvinov <logvinov.leon@gmail.com>2017-09-05 00:23:12 +0800
committerLeonid Logvinov <logvinov.leon@gmail.com>2017-09-05 00:23:12 +0800
commit2577d8f66267e618e633483277f1afe828764797 (patch)
treef0ebfd0bbdc4035372efa6672bceac551c39c2fc
parent1ad395cf86b2006c09bdae814607c2baf9790b91 (diff)
downloaddexon-0x-contracts-2577d8f66267e618e633483277f1afe828764797.tar.gz
dexon-0x-contracts-2577d8f66267e618e633483277f1afe828764797.tar.zst
dexon-0x-contracts-2577d8f66267e618e633483277f1afe828764797.zip
Use Web3.ContractInstance type
-rw-r--r--src/types.ts19
1 files changed, 5 insertions, 14 deletions
diff --git a/src/types.ts b/src/types.ts
index 9f8ba9729..e90c6fab4 100644
--- a/src/types.ts
+++ b/src/types.ts
@@ -40,7 +40,7 @@ export interface ContractEventObj {
}
export type CreateContractEvent = (indexFilterValues: IndexedFilterValues,
subscriptionOpts: SubscriptionOpts) => ContractEventObj;
-export interface ExchangeContract extends ContractInstance {
+export interface ExchangeContract extends Web3.ContractInstance {
isValidSignature: {
call: (signerAddressHex: string, dataHex: string, v: number, r: string, s: string,
txOpts?: TxOpts) => Promise<boolean>;
@@ -124,7 +124,7 @@ export interface ExchangeContract extends ContractInstance {
};
}
-export interface TokenContract extends ContractInstance {
+export interface TokenContract extends Web3.ContractInstance {
Transfer: CreateContractEvent;
Approval: CreateContractEvent;
balanceOf: {
@@ -139,7 +139,7 @@ export interface TokenContract extends ContractInstance {
approve: (proxyAddress: string, amountInBaseUnits: BigNumber.BigNumber, txOpts?: TxOpts) => Promise<void>;
}
-export interface TokenRegistryContract extends ContractInstance {
+export interface TokenRegistryContract extends Web3.ContractInstance {
getTokenMetaData: {
call: (address: string) => Promise<TokenMetadata>;
};
@@ -160,12 +160,12 @@ export interface TokenRegistryContract extends ContractInstance {
};
}
-export interface EtherTokenContract extends ContractInstance {
+export interface EtherTokenContract extends Web3.ContractInstance {
deposit: (txOpts: TxOpts) => Promise<void>;
withdraw: (amount: BigNumber.BigNumber, txOpts: TxOpts) => Promise<void>;
}
-export interface TokenTransferProxyContract extends ContractInstance {
+export interface TokenTransferProxyContract extends Web3.ContractInstance {
getAuthorizedAddresses: {
call: () => Promise<string[]>;
};
@@ -213,10 +213,6 @@ export enum ExchangeContractErrs {
BatchOrdersMustHaveAtLeastOneItem = 'BATCH_ORDERS_MUST_HAVE_AT_LEAST_ONE_ITEM',
}
-export interface ContractResponse {
- logs: ContractEvent[];
-}
-
export interface ContractEvent {
logIndex: number;
transactionIndex: number;
@@ -351,11 +347,6 @@ export interface OrderFillRequest {
export type AsyncMethod = (...args: any[]) => Promise<any>;
-export interface ContractInstance {
- address: string;
- abi: Web3.ContractAbi;
-}
-
export interface ContractEventEmitter {
watch: (eventCallback: EventCallback) => void;
stopWatchingAsync: () => Promise<void>;