diff options
author | Alex Browne <stephenalexbrowne@gmail.com> | 2018-10-02 09:22:42 +0800 |
---|---|---|
committer | Alex Browne <stephenalexbrowne@gmail.com> | 2018-10-16 04:36:09 +0800 |
commit | 026ad1f9a10359723eed54f37c067ee2a61d8fcd (patch) | |
tree | c14d09b25ae07473e9d5b516b21331a8ad5c3621 /packages/contract-wrappers/src/contract_wrappers/order_validator_wrapper.ts | |
parent | 81c48872415998e53ad653aabf183e18257ec327 (diff) | |
download | dexon-sol-tools-026ad1f9a10359723eed54f37c067ee2a61d8fcd.tar dexon-sol-tools-026ad1f9a10359723eed54f37c067ee2a61d8fcd.tar.gz dexon-sol-tools-026ad1f9a10359723eed54f37c067ee2a61d8fcd.tar.bz2 dexon-sol-tools-026ad1f9a10359723eed54f37c067ee2a61d8fcd.tar.lz dexon-sol-tools-026ad1f9a10359723eed54f37c067ee2a61d8fcd.tar.xz dexon-sol-tools-026ad1f9a10359723eed54f37c067ee2a61d8fcd.tar.zst dexon-sol-tools-026ad1f9a10359723eed54f37c067ee2a61d8fcd.zip |
Update contract-wrappers package to use new contracts package for generated files
Diffstat (limited to 'packages/contract-wrappers/src/contract_wrappers/order_validator_wrapper.ts')
-rw-r--r-- | packages/contract-wrappers/src/contract_wrappers/order_validator_wrapper.ts | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/packages/contract-wrappers/src/contract_wrappers/order_validator_wrapper.ts b/packages/contract-wrappers/src/contract_wrappers/order_validator_wrapper.ts index 1da88f624..02f9dd4de 100644 --- a/packages/contract-wrappers/src/contract_wrappers/order_validator_wrapper.ts +++ b/packages/contract-wrappers/src/contract_wrappers/order_validator_wrapper.ts @@ -1,3 +1,4 @@ +import { artifacts, wrappers } from '@0xproject/contracts'; import { schemas } from '@0xproject/json-schemas'; import { SignedOrder } from '@0xproject/types'; import { BigNumber } from '@0xproject/utils'; @@ -5,19 +6,17 @@ import { Web3Wrapper } from '@0xproject/web3-wrapper'; import { ContractAbi } from 'ethereum-types'; import * as _ from 'lodash'; -import { artifacts } from '../artifacts'; import { BalanceAndAllowance, OrderAndTraderInfo, TraderInfo } from '../types'; import { assert } from '../utils/assert'; import { ContractWrapper } from './contract_wrapper'; -import { OrderValidatorContract } from './generated/order_validator'; /** * This class includes the functionality related to interacting with the OrderValidator contract. */ export class OrderValidatorWrapper extends ContractWrapper { public abi: ContractAbi = artifacts.OrderValidator.compilerOutput.abi; - private _orderValidatorContractIfExists?: OrderValidatorContract; + private _orderValidatorContractIfExists?: wrappers.OrderValidatorContract; /** * Instantiate OrderValidatorWrapper * @param web3Wrapper Web3Wrapper instance to use @@ -170,12 +169,12 @@ export class OrderValidatorWrapper extends ContractWrapper { private _invalidateContractInstance(): void { delete this._orderValidatorContractIfExists; } - private async _getOrderValidatorContractAsync(): Promise<OrderValidatorContract> { + private async _getOrderValidatorContractAsync(): Promise<wrappers.OrderValidatorContract> { if (!_.isUndefined(this._orderValidatorContractIfExists)) { return this._orderValidatorContractIfExists; } const [abi, address] = await this._getContractAbiAndAddressFromArtifactsAsync(artifacts.OrderValidator); - const contractInstance = new OrderValidatorContract( + const contractInstance = new wrappers.OrderValidatorContract( abi, address, this._web3Wrapper.getProvider(), |