aboutsummaryrefslogtreecommitdiffstats
path: root/packages/order-utils/src/abstract
diff options
context:
space:
mode:
authorFabio Berger <me@fabioberger.com>2018-06-12 01:21:32 +0800
committerFabio Berger <me@fabioberger.com>2018-06-12 01:21:32 +0800
commit21f7722f1023cc9d1848737b7c986f7df7a07122 (patch)
treea4b9c57fa75fb8c92bf44ed968df8b7112f478de /packages/order-utils/src/abstract
parente4afe603f9c4dd5128f2446f9fe075516a3d4894 (diff)
downloaddexon-sol-tools-21f7722f1023cc9d1848737b7c986f7df7a07122.tar.gz
dexon-sol-tools-21f7722f1023cc9d1848737b7c986f7df7a07122.tar.zst
dexon-sol-tools-21f7722f1023cc9d1848737b7c986f7df7a07122.zip
Move OrderValidationUtils (+ tests) and ExchangeTransferSimulator to order-utils
Diffstat (limited to 'packages/order-utils/src/abstract')
-rw-r--r--packages/order-utils/src/abstract/abstract_balance_and_proxy_allowance_fetcher.ts4
-rw-r--r--packages/order-utils/src/abstract/abstract_balance_and_proxy_allowance_lazy_store.ts11
2 files changed, 13 insertions, 2 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
index 857c6167f..b2760d98e 100644
--- 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
@@ -1,6 +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>;
+ public abstract async getBalanceAsync(assetData: string, userAddress: string): Promise<BigNumber>;
+ public abstract async getProxyAllowanceAsync(assetData: string, userAddress: string): Promise<BigNumber>;
}
diff --git a/packages/order-utils/src/abstract/abstract_balance_and_proxy_allowance_lazy_store.ts b/packages/order-utils/src/abstract/abstract_balance_and_proxy_allowance_lazy_store.ts
new file mode 100644
index 000000000..38e08b7fe
--- /dev/null
+++ b/packages/order-utils/src/abstract/abstract_balance_and_proxy_allowance_lazy_store.ts
@@ -0,0 +1,11 @@
+import { BigNumber } from '@0xproject/utils';
+
+export abstract class AbstractBalanceAndProxyAllowanceLazyStore {
+ public abstract async getBalanceAsync(assetData: string, userAddress: string): Promise<BigNumber>;
+ public abstract async getProxyAllowanceAsync(assetData: string, userAddress: string): Promise<BigNumber>;
+ public abstract setBalance(assetData: string, userAddress: string, balance: BigNumber): void;
+ public abstract deleteBalance(assetData: string, userAddress: string): void;
+ public abstract setProxyAllowance(assetData: string, userAddress: string, proxyAllowance: BigNumber): void;
+ public abstract deleteProxyAllowance(assetData: string, userAddress: string): void;
+ public abstract deleteAll(): void;
+}