aboutsummaryrefslogtreecommitdiffstats
path: root/packages/contract-wrappers/src/abstract
diff options
context:
space:
mode:
authorFabio Berger <me@fabioberger.com>2018-06-11 16:24:55 +0800
committerFabio Berger <me@fabioberger.com>2018-06-11 16:24:55 +0800
commitce6078ed9455aa21f31970f3d3acc4401200cc5d (patch)
tree50809c45b6d940f44b6ac753433b5bb20557940d /packages/contract-wrappers/src/abstract
parent817c332d11835f02726f0609374d1c25c9ab39b5 (diff)
downloaddexon-sol-tools-ce6078ed9455aa21f31970f3d3acc4401200cc5d.tar
dexon-sol-tools-ce6078ed9455aa21f31970f3d3acc4401200cc5d.tar.gz
dexon-sol-tools-ce6078ed9455aa21f31970f3d3acc4401200cc5d.tar.bz2
dexon-sol-tools-ce6078ed9455aa21f31970f3d3acc4401200cc5d.tar.lz
dexon-sol-tools-ce6078ed9455aa21f31970f3d3acc4401200cc5d.tar.xz
dexon-sol-tools-ce6078ed9455aa21f31970f3d3acc4401200cc5d.tar.zst
dexon-sol-tools-ce6078ed9455aa21f31970f3d3acc4401200cc5d.zip
Refactor ExchangeTransferSimulator public interface to accet an AbstractBalanceAndProxyAllowanceLazyStore so that this module could be re-used in different contexts.
Diffstat (limited to 'packages/contract-wrappers/src/abstract')
-rw-r--r--packages/contract-wrappers/src/abstract/abstract_balance_and_proxy_allowance_lazy_store.ts11
1 files changed, 11 insertions, 0 deletions
diff --git a/packages/contract-wrappers/src/abstract/abstract_balance_and_proxy_allowance_lazy_store.ts b/packages/contract-wrappers/src/abstract/abstract_balance_and_proxy_allowance_lazy_store.ts
new file mode 100644
index 000000000..1f139f1ef
--- /dev/null
+++ b/packages/contract-wrappers/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(tokenAddress: string, userAddress: string): Promise<BigNumber>;
+ public abstract async getProxyAllowanceAsync(tokenAddress: string, userAddress: string): Promise<BigNumber>;
+ public abstract setBalance(tokenAddress: string, userAddress: string, balance: BigNumber): void;
+ public abstract deleteBalance(tokenAddress: string, userAddress: string): void;
+ public abstract setProxyAllowance(tokenAddress: string, userAddress: string, proxyAllowance: BigNumber): void;
+ public abstract deleteProxyAllowance(tokenAddress: string, userAddress: string): void;
+ public abstract deleteAll(): void;
+}