aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--packages/testnet-faucets/src/ts/handler.ts18
-rw-r--r--packages/website/ts/blockchain.ts20
2 files changed, 33 insertions, 5 deletions
diff --git a/packages/testnet-faucets/src/ts/handler.ts b/packages/testnet-faucets/src/ts/handler.ts
index be42ebde8..b2d2226f4 100644
--- a/packages/testnet-faucets/src/ts/handler.ts
+++ b/packages/testnet-faucets/src/ts/handler.ts
@@ -65,7 +65,21 @@ export class Handler {
const web3Wrapper = new Web3Wrapper(providerObj);
// tslint:disable-next-line:custom-no-magic-numbers
const networkId = parseInt(networkIdString, 10);
- const contractWrappers = new ContractWrappers(providerObj, { networkId });
+ const contractWrappersConfig = {
+ networkId,
+ // TODO(albrow): Load in real contract addresses here.
+ contractAddresses: {
+ erc20Proxy: '',
+ erc721Proxy: '',
+ zrxToken: '',
+ etherToken: '',
+ exchange: '',
+ assetProxyOwner: '',
+ forwarder: '',
+ orderValidator: '',
+ },
+ };
+ const contractWrappers = new ContractWrappers(providerObj, contractWrappersConfig);
const dispatchQueue = new DispatchQueue();
this._networkConfigByNetworkId[networkId] = {
dispatchQueue,
@@ -172,7 +186,7 @@ export class Handler {
makerAssetData,
takerAssetData,
salt: generatePseudoRandomSalt(),
- exchangeAddress: networkConfig.contractWrappers.exchange.getContractAddress(),
+ exchangeAddress: networkConfig.contractWrappers.exchange.address,
feeRecipientAddress: NULL_ADDRESS,
senderAddress: NULL_ADDRESS,
// tslint:disable-next-line:custom-no-magic-numbers
diff --git a/packages/website/ts/blockchain.ts b/packages/website/ts/blockchain.ts
index b1181e4c6..14ab73531 100644
--- a/packages/website/ts/blockchain.ts
+++ b/packages/website/ts/blockchain.ts
@@ -374,7 +374,7 @@ export class Blockchain {
return unavailableTakerAmount;
}
public getExchangeContractAddressIfExists(): string | undefined {
- return this._contractWrappers.exchange.getContractAddress();
+ return this._contractWrappers.exchange.address;
}
public async validateFillOrderThrowIfInvalidAsync(
signedOrder: SignedOrder,
@@ -859,9 +859,23 @@ export class Blockchain {
shouldUserLedgerProvider,
);
if (!_.isUndefined(this._contractWrappers)) {
- this._contractWrappers.setProvider(provider, networkId);
+ this._contractWrappers.setProvider(provider);
} else {
- this._contractWrappers = new ContractWrappers(provider, { networkId });
+ const contractWrappersConfig = {
+ networkId,
+ // TODO(albrow): Load in real contract addresses here.
+ contractAddresses: {
+ erc20Proxy: '',
+ erc721Proxy: '',
+ zrxToken: '',
+ etherToken: '',
+ exchange: '',
+ assetProxyOwner: '',
+ forwarder: '',
+ orderValidator: '',
+ },
+ };
+ this._contractWrappers = new ContractWrappers(provider, contractWrappersConfig);
}
if (!_.isUndefined(this._zeroEx)) {
this._zeroEx.setProvider(provider, networkId);