Pass around DevUtilsContract so it's only instantiated once

This commit is contained in:
fabioberger
2019-11-08 22:58:22 +00:00
parent 35925de320
commit 8813bd26f6
4 changed files with 7 additions and 6 deletions

View File

@@ -55,9 +55,9 @@ export class ExchangeTransferSimulator {
* @param store A class that implements AbstractBalanceAndProxyAllowanceLazyStore
* @return an instance of ExchangeTransferSimulator
*/
constructor(store: AbstractBalanceAndProxyAllowanceLazyStore, provider: SupportedProvider) {
constructor(store: AbstractBalanceAndProxyAllowanceLazyStore, devUtilsContract: DevUtilsContract) {
this._store = store;
this._devUtils = new DevUtilsContract(constants.NULL_ADDRESS, provider);
this._devUtils = devUtilsContract;
}
/**
* Simulates transferFrom call performed by a proxy