aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorFabio Berger <me@fabioberger.com>2017-06-03 02:54:44 +0800
committerFabio Berger <me@fabioberger.com>2017-06-03 02:54:44 +0800
commit2e5e8c8987c681ffd0dd1535cb26874a39b8abec (patch)
treefef753f54d92075f2a8a7866fa3d5237d2adb1dc /src
parent3e115eab4a100eb79ab4bfe4676656e838fb557d (diff)
downloaddexon-sol-tools-2e5e8c8987c681ffd0dd1535cb26874a39b8abec.tar
dexon-sol-tools-2e5e8c8987c681ffd0dd1535cb26874a39b8abec.tar.gz
dexon-sol-tools-2e5e8c8987c681ffd0dd1535cb26874a39b8abec.tar.bz2
dexon-sol-tools-2e5e8c8987c681ffd0dd1535cb26874a39b8abec.tar.lz
dexon-sol-tools-2e5e8c8987c681ffd0dd1535cb26874a39b8abec.tar.xz
dexon-sol-tools-2e5e8c8987c681ffd0dd1535cb26874a39b8abec.tar.zst
dexon-sol-tools-2e5e8c8987c681ffd0dd1535cb26874a39b8abec.zip
Consolidate the ExchangeContract type and flesh out type definition for isValidSignature.call
Diffstat (limited to 'src')
-rw-r--r--src/types.ts39
1 files changed, 19 insertions, 20 deletions
diff --git a/src/types.ts b/src/types.ts
index 602c63859..6a026f608 100644
--- a/src/types.ts
+++ b/src/types.ts
@@ -33,8 +33,26 @@ export type OrderAddresses = [string, string, string, string, string];
export type OrderValues = [BigNumber.BigNumber, BigNumber.BigNumber, BigNumber.BigNumber,
BigNumber.BigNumber, BigNumber.BigNumber, BigNumber.BigNumber];
+export type EventCallbackAsync = (err: Error, event: ContractEvent) => Promise<void>;
+export type EventCallbackSync = (err: Error, event: ContractEvent) => void;
+export type EventCallback = EventCallbackSync|EventCallbackAsync;
+export interface ContractEventObj {
+ watch: (eventWatch: EventCallback) => void;
+ stopWatching: () => void;
+}
+export type CreateContractEvent = (indexFilterValues: IndexFilterValues,
+ subscriptionOpts: SubscriptionOpts) => ContractEventObj;
export interface ExchangeContract {
- isValidSignature: any;
+ isValidSignature: {
+ call: (signerAddressHex: string, dataHex: string, v: number, r: string, s: string,
+ txOpts: TxOpts) => Promise<boolean>;
+ };
+ LogFill: CreateContractEvent;
+ LogCancel: CreateContractEvent;
+ LogError: CreateContractEvent;
+ ZRX: {
+ call: () => Promise<string>;
+ };
getUnavailableValueT: {
call: (orderHash: string) => BigNumber.BigNumber;
};
@@ -56,25 +74,6 @@ export interface ExchangeContract {
};
}
-export type EventCallbackAsync = (err: Error, event: ContractEvent) => Promise<void>;
-export type EventCallbackSync = (err: Error, event: ContractEvent) => void;
-export type EventCallback = EventCallbackSync|EventCallbackAsync;
-export interface ContractEventObj {
- watch: (eventWatch: EventCallback) => void;
- stopWatching: () => void;
-}
-export type CreateContractEvent = (indexFilterValues: IndexFilterValues,
- subscriptionOpts: SubscriptionOpts) => ContractEventObj;
-export interface ExchangeContract {
- isValidSignature: any;
- LogFill: CreateContractEvent;
- LogCancel: CreateContractEvent;
- LogError: CreateContractEvent;
- ZRX: {
- call: () => Promise<string>;
- };
-}
-
export interface TokenContract {
balanceOf: {
call: (address: string) => Promise<BigNumber.BigNumber>;