aboutsummaryrefslogtreecommitdiffstats
path: root/packages/order-utils/src/abstract
diff options
context:
space:
mode:
authorFabio Berger <me@fabioberger.com>2018-05-10 02:36:28 +0800
committerFabio Berger <me@fabioberger.com>2018-05-10 02:36:28 +0800
commit209266dbed9d7d038c90c2da8d9b99acab77c80c (patch)
treecfefd5ab15bc237716b15687629e0f41362a8e86 /packages/order-utils/src/abstract
parent69a6166b6a1d39afc24b8dd950ec5d8539a03420 (diff)
downloaddexon-0x-contracts-209266dbed9d7d038c90c2da8d9b99acab77c80c.tar.gz
dexon-0x-contracts-209266dbed9d7d038c90c2da8d9b99acab77c80c.tar.zst
dexon-0x-contracts-209266dbed9d7d038c90c2da8d9b99acab77c80c.zip
Split 0x.js into contract-wrappers, order-watcher but keep 0x.js as a unifying library with the same interface
Diffstat (limited to 'packages/order-utils/src/abstract')
-rw-r--r--packages/order-utils/src/abstract/abstract_balance_and_proxy_allowance_fetcher.ts6
-rw-r--r--packages/order-utils/src/abstract/abstract_order_filled_cancelled_fetcher.ts8
2 files changed, 14 insertions, 0 deletions
diff --git a/packages/order-utils/src/abstract/abstract_balance_and_proxy_allowance_fetcher.ts b/packages/order-utils/src/abstract/abstract_balance_and_proxy_allowance_fetcher.ts
new file mode 100644
index 000000000..857c6167f
--- /dev/null
+++ b/packages/order-utils/src/abstract/abstract_balance_and_proxy_allowance_fetcher.ts
@@ -0,0 +1,6 @@
+import { BigNumber } from '@0xproject/utils';
+
+export abstract class AbstractBalanceAndProxyAllowanceFetcher {
+ public abstract async getBalanceAsync(tokenAddress: string, userAddress: string): Promise<BigNumber>;
+ public abstract async getProxyAllowanceAsync(tokenAddress: string, userAddress: string): Promise<BigNumber>;
+}
diff --git a/packages/order-utils/src/abstract/abstract_order_filled_cancelled_fetcher.ts b/packages/order-utils/src/abstract/abstract_order_filled_cancelled_fetcher.ts
new file mode 100644
index 000000000..f54bed6f1
--- /dev/null
+++ b/packages/order-utils/src/abstract/abstract_order_filled_cancelled_fetcher.ts
@@ -0,0 +1,8 @@
+import { BigNumber } from '@0xproject/utils';
+
+export abstract class AbstractOrderFilledCancelledFetcher {
+ public abstract async getFilledTakerAmountAsync(orderHash: string): Promise<BigNumber>;
+ public abstract async getCancelledTakerAmountAsync(orderHash: string): Promise<BigNumber>;
+ public abstract async getUnavailableTakerAmountAsync(orderHash: string): Promise<BigNumber>;
+ public abstract getZRXTokenAddress(): string;
+}