aboutsummaryrefslogtreecommitdiffstats
path: root/packages/website/ts
diff options
context:
space:
mode:
authorAlex Browne <stephenalexbrowne@gmail.com>2018-10-05 07:56:01 +0800
committerAlex Browne <stephenalexbrowne@gmail.com>2018-10-16 04:37:56 +0800
commit255da32d290cbf6258ddfc49d875abcf32322673 (patch)
treeae4260743e4daa9f9c7c6b68a79bbab19fa4425e /packages/website/ts
parent29063cab186196dc7051ca16ca9409e8619c6673 (diff)
downloaddexon-sol-tools-255da32d290cbf6258ddfc49d875abcf32322673.tar
dexon-sol-tools-255da32d290cbf6258ddfc49d875abcf32322673.tar.gz
dexon-sol-tools-255da32d290cbf6258ddfc49d875abcf32322673.tar.bz2
dexon-sol-tools-255da32d290cbf6258ddfc49d875abcf32322673.tar.lz
dexon-sol-tools-255da32d290cbf6258ddfc49d875abcf32322673.tar.xz
dexon-sol-tools-255da32d290cbf6258ddfc49d875abcf32322673.tar.zst
dexon-sol-tools-255da32d290cbf6258ddfc49d875abcf32322673.zip
Update testnet-faucets and website to work with new artifacts and abi-gen wrappers
Diffstat (limited to 'packages/website/ts')
-rw-r--r--packages/website/ts/blockchain.ts20
1 files changed, 17 insertions, 3 deletions
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);