aboutsummaryrefslogtreecommitdiffstats
path: root/src/contract_wrappers
diff options
context:
space:
mode:
authorLeonid Logvinov <logvinov.leon@gmail.com>2017-09-06 00:45:20 +0800
committerLeonid Logvinov <logvinov.leon@gmail.com>2017-09-06 00:45:20 +0800
commita7b2131db77b72379f0d57eaff694d5a925191cd (patch)
treef7c5d443f4bcbd9ee702c8897d1c60a7b6056510 /src/contract_wrappers
parentf0572679557ebdc6956d079ea2b1f54fd52c2c67 (diff)
downloaddexon-sol-tools-a7b2131db77b72379f0d57eaff694d5a925191cd.tar
dexon-sol-tools-a7b2131db77b72379f0d57eaff694d5a925191cd.tar.gz
dexon-sol-tools-a7b2131db77b72379f0d57eaff694d5a925191cd.tar.bz2
dexon-sol-tools-a7b2131db77b72379f0d57eaff694d5a925191cd.tar.lz
dexon-sol-tools-a7b2131db77b72379f0d57eaff694d5a925191cd.tar.xz
dexon-sol-tools-a7b2131db77b72379f0d57eaff694d5a925191cd.tar.zst
dexon-sol-tools-a7b2131db77b72379f0d57eaff694d5a925191cd.zip
Decode logs args in awaitTransactionMinedAsync
Diffstat (limited to 'src/contract_wrappers')
-rw-r--r--src/contract_wrappers/ether_token_wrapper.ts4
-rw-r--r--src/contract_wrappers/exchange_wrapper.ts4
-rw-r--r--src/contract_wrappers/token_registry_wrapper.ts4
-rw-r--r--src/contract_wrappers/token_transfer_proxy_wrapper.ts4
-rw-r--r--src/contract_wrappers/token_wrapper.ts7
5 files changed, 11 insertions, 12 deletions
diff --git a/src/contract_wrappers/ether_token_wrapper.ts b/src/contract_wrappers/ether_token_wrapper.ts
index d31069b22..b86309f90 100644
--- a/src/contract_wrappers/ether_token_wrapper.ts
+++ b/src/contract_wrappers/ether_token_wrapper.ts
@@ -4,7 +4,7 @@ import {ContractWrapper} from './contract_wrapper';
import {TokenWrapper} from './token_wrapper';
import {EtherTokenContract, ZeroExError} from '../types';
import {assert} from '../utils/assert';
-import * as EtherTokenArtifacts from '../artifacts/EtherToken.json';
+import {artifacts} from '../artifacts';
/**
* This class includes all the functionality related to interacting with a wrapped Ether ERC20 token contract.
@@ -76,7 +76,7 @@ export class EtherTokenWrapper extends ContractWrapper {
return this._etherTokenContractIfExists;
}
const contractInstance = await this._instantiateContractIfExistsAsync<EtherTokenContract>(
- EtherTokenArtifacts as any as Artifact,
+ artifacts.EtherTokenArtifact,
);
this._etherTokenContractIfExists = contractInstance as EtherTokenContract;
return this._etherTokenContractIfExists;
diff --git a/src/contract_wrappers/exchange_wrapper.ts b/src/contract_wrappers/exchange_wrapper.ts
index 2ce9b2922..115bd1110 100644
--- a/src/contract_wrappers/exchange_wrapper.ts
+++ b/src/contract_wrappers/exchange_wrapper.ts
@@ -35,7 +35,7 @@ import {ContractWrapper} from './contract_wrapper';
import {constants} from '../utils/constants';
import {TokenWrapper} from './token_wrapper';
import {decorators} from '../utils/decorators';
-import * as ExchangeArtifacts from '../artifacts/Exchange.json';
+import {artifacts} from '../artifacts';
/**
* This class includes all the functionality related to calling methods and subscribing to
@@ -706,7 +706,7 @@ export class ExchangeWrapper extends ContractWrapper {
return this._exchangeContractIfExists;
}
const contractInstance = await this._instantiateContractIfExistsAsync<ExchangeContract>(
- (ExchangeArtifacts as any as Artifact),
+ artifacts.ExchangeArtifact,
);
this._exchangeContractIfExists = contractInstance as ExchangeContract;
return this._exchangeContractIfExists;
diff --git a/src/contract_wrappers/token_registry_wrapper.ts b/src/contract_wrappers/token_registry_wrapper.ts
index 79eb516fe..528a88e06 100644
--- a/src/contract_wrappers/token_registry_wrapper.ts
+++ b/src/contract_wrappers/token_registry_wrapper.ts
@@ -4,7 +4,7 @@ import {assert} from '../utils/assert';
import {Token, TokenRegistryContract, TokenMetadata} from '../types';
import {constants} from '../utils/constants';
import {ContractWrapper} from './contract_wrapper';
-import * as TokenRegistryArtifacts from '../artifacts/TokenRegistry.json';
+import {artifacts} from '../artifacts';
/**
* This class includes all the functionality related to interacting with the 0x Token Registry smart contract.
@@ -102,7 +102,7 @@ export class TokenRegistryWrapper extends ContractWrapper {
return this._tokenRegistryContractIfExists;
}
const contractInstance = await this._instantiateContractIfExistsAsync<TokenRegistryContract>(
- TokenRegistryArtifacts as any as Artifact,
+ artifacts.TokenRegistryArtifact,
);
this._tokenRegistryContractIfExists = contractInstance as TokenRegistryContract;
return this._tokenRegistryContractIfExists;
diff --git a/src/contract_wrappers/token_transfer_proxy_wrapper.ts b/src/contract_wrappers/token_transfer_proxy_wrapper.ts
index 2ed198be6..528d661d1 100644
--- a/src/contract_wrappers/token_transfer_proxy_wrapper.ts
+++ b/src/contract_wrappers/token_transfer_proxy_wrapper.ts
@@ -1,6 +1,6 @@
import * as _ from 'lodash';
import {ContractWrapper} from './contract_wrapper';
-import * as TokenTransferProxyArtifacts from '../artifacts/TokenTransferProxy.json';
+import {artifacts} from '../artifacts';
import {TokenTransferProxyContract} from '../types';
/**
@@ -45,7 +45,7 @@ export class TokenTransferProxyWrapper extends ContractWrapper {
return this._tokenTransferProxyContractIfExists;
}
const contractInstance = await this._instantiateContractIfExistsAsync<TokenTransferProxyContract>(
- TokenTransferProxyArtifacts as any as Artifact,
+ artifacts.TokenTransferProxyArtifact,
);
this._tokenTransferProxyContractIfExists = contractInstance as TokenTransferProxyContract;
return this._tokenTransferProxyContractIfExists;
diff --git a/src/contract_wrappers/token_wrapper.ts b/src/contract_wrappers/token_wrapper.ts
index db1ce22b2..f1f967286 100644
--- a/src/contract_wrappers/token_wrapper.ts
+++ b/src/contract_wrappers/token_wrapper.ts
@@ -7,8 +7,7 @@ import {utils} from '../utils/utils';
import {eventUtils} from '../utils/event_utils';
import {constants} from '../utils/constants';
import {ContractWrapper} from './contract_wrapper';
-import * as TokenArtifacts from '../artifacts/Token.json';
-import * as TokenTransferProxyArtifacts from '../artifacts/TokenTransferProxy.json';
+import {artifacts} from '../artifacts';
import {
TokenContract,
ZeroExError,
@@ -286,7 +285,7 @@ export class TokenWrapper extends ContractWrapper {
return tokenContract;
}
const contractInstance = await this._instantiateContractIfExistsAsync<TokenContract>(
- TokenArtifacts as any as Artifact, tokenAddress,
+ artifacts.TokenArtifact, tokenAddress,
);
tokenContract = contractInstance as TokenContract;
this._tokenContractsByAddress[tokenAddress] = tokenContract;
@@ -296,7 +295,7 @@ export class TokenWrapper extends ContractWrapper {
const networkIdIfExists = await this._web3Wrapper.getNetworkIdIfExistsAsync();
const proxyNetworkConfigsIfExists = _.isUndefined(networkIdIfExists) ?
undefined :
- (TokenTransferProxyArtifacts as any).networks[networkIdIfExists];
+ artifacts.TokenTransferProxyArtifact.networks[networkIdIfExists];
if (_.isUndefined(proxyNetworkConfigsIfExists)) {
throw new Error(ZeroExError.ContractNotDeployedOnNetwork);
}