Fix prettier
This commit is contained in:
		
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							@@ -2,7 +2,18 @@
 | 
				
			|||||||
// tslint:disable:no-unused-variable
 | 
					// tslint:disable:no-unused-variable
 | 
				
			||||||
// tslint:disable:no-unbound-method
 | 
					// tslint:disable:no-unbound-method
 | 
				
			||||||
import { BaseContract } from '@0x/base-contract';
 | 
					import { BaseContract } from '@0x/base-contract';
 | 
				
			||||||
import { BlockParam, BlockParamLiteral, CallData, ContractAbi, ContractArtifact, DecodedLogArgs, MethodAbi, TxData, TxDataPayable, SupportedProvider } from 'ethereum-types';
 | 
					import {
 | 
				
			||||||
 | 
					    BlockParam,
 | 
				
			||||||
 | 
					    BlockParamLiteral,
 | 
				
			||||||
 | 
					    CallData,
 | 
				
			||||||
 | 
					    ContractAbi,
 | 
				
			||||||
 | 
					    ContractArtifact,
 | 
				
			||||||
 | 
					    DecodedLogArgs,
 | 
				
			||||||
 | 
					    MethodAbi,
 | 
				
			||||||
 | 
					    TxData,
 | 
				
			||||||
 | 
					    TxDataPayable,
 | 
				
			||||||
 | 
					    SupportedProvider,
 | 
				
			||||||
 | 
					} from 'ethereum-types';
 | 
				
			||||||
import { BigNumber, classUtils, logUtils, providerUtils } from '@0x/utils';
 | 
					import { BigNumber, classUtils, logUtils, providerUtils } from '@0x/utils';
 | 
				
			||||||
import { SimpleContractArtifact } from '@0x/types';
 | 
					import { SimpleContractArtifact } from '@0x/types';
 | 
				
			||||||
import { Web3Wrapper } from '@0x/web3-wrapper';
 | 
					import { Web3Wrapper } from '@0x/web3-wrapper';
 | 
				
			||||||
@@ -10,7 +21,6 @@ import * as ethers from 'ethers';
 | 
				
			|||||||
import * as _ from 'lodash';
 | 
					import * as _ from 'lodash';
 | 
				
			||||||
// tslint:enable:no-unused-variable
 | 
					// tslint:enable:no-unused-variable
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 | 
				
			||||||
/* istanbul ignore next */
 | 
					/* istanbul ignore next */
 | 
				
			||||||
// tslint:disable:no-parameter-reassignment
 | 
					// tslint:disable:no-parameter-reassignment
 | 
				
			||||||
// tslint:disable-next-line:class-name
 | 
					// tslint:disable-next-line:class-name
 | 
				
			||||||
@@ -21,12 +31,9 @@ export class TECContract extends BaseContract {
 | 
				
			|||||||
            signature: string,
 | 
					            signature: string,
 | 
				
			||||||
            callData: Partial<CallData> = {},
 | 
					            callData: Partial<CallData> = {},
 | 
				
			||||||
            defaultBlock?: BlockParam,
 | 
					            defaultBlock?: BlockParam,
 | 
				
			||||||
        ): Promise<string
 | 
					        ): Promise<string> {
 | 
				
			||||||
        > {
 | 
					            const self = (this as any) as TECContract;
 | 
				
			||||||
            const self = this as any as TECContract;
 | 
					            const encodedData = self._strictEncodeArguments('getSignerAddress(bytes32,bytes)', [hash, signature]);
 | 
				
			||||||
            const encodedData = self._strictEncodeArguments('getSignerAddress(bytes32,bytes)', [hash,
 | 
					 | 
				
			||||||
        signature
 | 
					 | 
				
			||||||
        ]);
 | 
					 | 
				
			||||||
            const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
 | 
					            const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
 | 
				
			||||||
                {
 | 
					                {
 | 
				
			||||||
                    to: self.address,
 | 
					                    to: self.address,
 | 
				
			||||||
@@ -39,30 +46,39 @@ export class TECContract extends BaseContract {
 | 
				
			|||||||
            BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
 | 
					            BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
 | 
				
			||||||
            const abiEncoder = self._lookupAbiEncoder('getSignerAddress(bytes32,bytes)');
 | 
					            const abiEncoder = self._lookupAbiEncoder('getSignerAddress(bytes32,bytes)');
 | 
				
			||||||
            // tslint:disable boolean-naming
 | 
					            // tslint:disable boolean-naming
 | 
				
			||||||
            const result = abiEncoder.strictDecodeReturnValue<string
 | 
					            const result = abiEncoder.strictDecodeReturnValue<string>(rawCallResult);
 | 
				
			||||||
        >(rawCallResult);
 | 
					 | 
				
			||||||
            // tslint:enable boolean-naming
 | 
					            // tslint:enable boolean-naming
 | 
				
			||||||
            return result;
 | 
					            return result;
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
    };
 | 
					    };
 | 
				
			||||||
    public assertValidTransactionOrdersApproval = {
 | 
					    public assertValidTransactionOrdersApproval = {
 | 
				
			||||||
        async callAsync(
 | 
					        async callAsync(
 | 
				
			||||||
            transaction: {salt: BigNumber;signerAddress: string;data: string},
 | 
					            transaction: { salt: BigNumber; signerAddress: string; data: string },
 | 
				
			||||||
            orders: Array<{makerAddress: string;takerAddress: string;feeRecipientAddress: string;senderAddress: string;makerAssetAmount: BigNumber;takerAssetAmount: BigNumber;makerFee: BigNumber;takerFee: BigNumber;expirationTimeSeconds: BigNumber;salt: BigNumber;makerAssetData: string;takerAssetData: string}>,
 | 
					            orders: Array<{
 | 
				
			||||||
 | 
					                makerAddress: string;
 | 
				
			||||||
 | 
					                takerAddress: string;
 | 
				
			||||||
 | 
					                feeRecipientAddress: string;
 | 
				
			||||||
 | 
					                senderAddress: string;
 | 
				
			||||||
 | 
					                makerAssetAmount: BigNumber;
 | 
				
			||||||
 | 
					                takerAssetAmount: BigNumber;
 | 
				
			||||||
 | 
					                makerFee: BigNumber;
 | 
				
			||||||
 | 
					                takerFee: BigNumber;
 | 
				
			||||||
 | 
					                expirationTimeSeconds: BigNumber;
 | 
				
			||||||
 | 
					                salt: BigNumber;
 | 
				
			||||||
 | 
					                makerAssetData: string;
 | 
				
			||||||
 | 
					                takerAssetData: string;
 | 
				
			||||||
 | 
					            }>,
 | 
				
			||||||
            transactionSignature: string,
 | 
					            transactionSignature: string,
 | 
				
			||||||
            approvalExpirationTimeSeconds: BigNumber[],
 | 
					            approvalExpirationTimeSeconds: BigNumber[],
 | 
				
			||||||
            approvalSignatures: string[],
 | 
					            approvalSignatures: string[],
 | 
				
			||||||
            callData: Partial<CallData> = {},
 | 
					            callData: Partial<CallData> = {},
 | 
				
			||||||
            defaultBlock?: BlockParam,
 | 
					            defaultBlock?: BlockParam,
 | 
				
			||||||
        ): Promise<void
 | 
					        ): Promise<void> {
 | 
				
			||||||
        > {
 | 
					            const self = (this as any) as TECContract;
 | 
				
			||||||
            const self = this as any as TECContract;
 | 
					            const encodedData = self._strictEncodeArguments(
 | 
				
			||||||
            const encodedData = self._strictEncodeArguments('assertValidTransactionOrdersApproval((uint256,address,bytes),(address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes)[],bytes,uint256[],bytes[])', [transaction,
 | 
					                'assertValidTransactionOrdersApproval((uint256,address,bytes),(address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes)[],bytes,uint256[],bytes[])',
 | 
				
			||||||
        orders,
 | 
					                [transaction, orders, transactionSignature, approvalExpirationTimeSeconds, approvalSignatures],
 | 
				
			||||||
        transactionSignature,
 | 
					            );
 | 
				
			||||||
        approvalExpirationTimeSeconds,
 | 
					 | 
				
			||||||
        approvalSignatures
 | 
					 | 
				
			||||||
        ]);
 | 
					 | 
				
			||||||
            const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
 | 
					            const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
 | 
				
			||||||
                {
 | 
					                {
 | 
				
			||||||
                    to: self.address,
 | 
					                    to: self.address,
 | 
				
			||||||
@@ -73,30 +89,29 @@ export class TECContract extends BaseContract {
 | 
				
			|||||||
            );
 | 
					            );
 | 
				
			||||||
            const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
 | 
					            const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
 | 
				
			||||||
            BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
 | 
					            BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
 | 
				
			||||||
            const abiEncoder = self._lookupAbiEncoder('assertValidTransactionOrdersApproval((uint256,address,bytes),(address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes)[],bytes,uint256[],bytes[])');
 | 
					            const abiEncoder = self._lookupAbiEncoder(
 | 
				
			||||||
 | 
					                'assertValidTransactionOrdersApproval((uint256,address,bytes),(address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes)[],bytes,uint256[],bytes[])',
 | 
				
			||||||
 | 
					            );
 | 
				
			||||||
            // tslint:disable boolean-naming
 | 
					            // tslint:disable boolean-naming
 | 
				
			||||||
            const result = abiEncoder.strictDecodeReturnValue<void
 | 
					            const result = abiEncoder.strictDecodeReturnValue<void>(rawCallResult);
 | 
				
			||||||
        >(rawCallResult);
 | 
					 | 
				
			||||||
            // tslint:enable boolean-naming
 | 
					            // tslint:enable boolean-naming
 | 
				
			||||||
            return result;
 | 
					            return result;
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
    };
 | 
					    };
 | 
				
			||||||
    public assertValidTECApprovals = {
 | 
					    public assertValidTECApprovals = {
 | 
				
			||||||
        async callAsync(
 | 
					        async callAsync(
 | 
				
			||||||
            transaction: {salt: BigNumber;signerAddress: string;data: string},
 | 
					            transaction: { salt: BigNumber; signerAddress: string; data: string },
 | 
				
			||||||
            transactionSignature: string,
 | 
					            transactionSignature: string,
 | 
				
			||||||
            approvalExpirationTimeSeconds: BigNumber[],
 | 
					            approvalExpirationTimeSeconds: BigNumber[],
 | 
				
			||||||
            approvalSignatures: string[],
 | 
					            approvalSignatures: string[],
 | 
				
			||||||
            callData: Partial<CallData> = {},
 | 
					            callData: Partial<CallData> = {},
 | 
				
			||||||
            defaultBlock?: BlockParam,
 | 
					            defaultBlock?: BlockParam,
 | 
				
			||||||
        ): Promise<void
 | 
					        ): Promise<void> {
 | 
				
			||||||
        > {
 | 
					            const self = (this as any) as TECContract;
 | 
				
			||||||
            const self = this as any as TECContract;
 | 
					            const encodedData = self._strictEncodeArguments(
 | 
				
			||||||
            const encodedData = self._strictEncodeArguments('assertValidTECApprovals((uint256,address,bytes),bytes,uint256[],bytes[])', [transaction,
 | 
					                'assertValidTECApprovals((uint256,address,bytes),bytes,uint256[],bytes[])',
 | 
				
			||||||
        transactionSignature,
 | 
					                [transaction, transactionSignature, approvalExpirationTimeSeconds, approvalSignatures],
 | 
				
			||||||
        approvalExpirationTimeSeconds,
 | 
					            );
 | 
				
			||||||
        approvalSignatures
 | 
					 | 
				
			||||||
        ]);
 | 
					 | 
				
			||||||
            const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
 | 
					            const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
 | 
				
			||||||
                {
 | 
					                {
 | 
				
			||||||
                    to: self.address,
 | 
					                    to: self.address,
 | 
				
			||||||
@@ -107,21 +122,18 @@ export class TECContract extends BaseContract {
 | 
				
			|||||||
            );
 | 
					            );
 | 
				
			||||||
            const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
 | 
					            const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
 | 
				
			||||||
            BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
 | 
					            BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
 | 
				
			||||||
            const abiEncoder = self._lookupAbiEncoder('assertValidTECApprovals((uint256,address,bytes),bytes,uint256[],bytes[])');
 | 
					            const abiEncoder = self._lookupAbiEncoder(
 | 
				
			||||||
 | 
					                'assertValidTECApprovals((uint256,address,bytes),bytes,uint256[],bytes[])',
 | 
				
			||||||
 | 
					            );
 | 
				
			||||||
            // tslint:disable boolean-naming
 | 
					            // tslint:disable boolean-naming
 | 
				
			||||||
            const result = abiEncoder.strictDecodeReturnValue<void
 | 
					            const result = abiEncoder.strictDecodeReturnValue<void>(rawCallResult);
 | 
				
			||||||
        >(rawCallResult);
 | 
					 | 
				
			||||||
            // tslint:enable boolean-naming
 | 
					            // tslint:enable boolean-naming
 | 
				
			||||||
            return result;
 | 
					            return result;
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
    };
 | 
					    };
 | 
				
			||||||
    public EIP712_DOMAIN_HASH = {
 | 
					    public EIP712_DOMAIN_HASH = {
 | 
				
			||||||
        async callAsync(
 | 
					        async callAsync(callData: Partial<CallData> = {}, defaultBlock?: BlockParam): Promise<string> {
 | 
				
			||||||
            callData: Partial<CallData> = {},
 | 
					            const self = (this as any) as TECContract;
 | 
				
			||||||
            defaultBlock?: BlockParam,
 | 
					 | 
				
			||||||
        ): Promise<string
 | 
					 | 
				
			||||||
        > {
 | 
					 | 
				
			||||||
            const self = this as any as TECContract;
 | 
					 | 
				
			||||||
            const encodedData = self._strictEncodeArguments('EIP712_DOMAIN_HASH()', []);
 | 
					            const encodedData = self._strictEncodeArguments('EIP712_DOMAIN_HASH()', []);
 | 
				
			||||||
            const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
 | 
					            const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
 | 
				
			||||||
                {
 | 
					                {
 | 
				
			||||||
@@ -135,26 +147,24 @@ export class TECContract extends BaseContract {
 | 
				
			|||||||
            BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
 | 
					            BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
 | 
				
			||||||
            const abiEncoder = self._lookupAbiEncoder('EIP712_DOMAIN_HASH()');
 | 
					            const abiEncoder = self._lookupAbiEncoder('EIP712_DOMAIN_HASH()');
 | 
				
			||||||
            // tslint:disable boolean-naming
 | 
					            // tslint:disable boolean-naming
 | 
				
			||||||
            const result = abiEncoder.strictDecodeReturnValue<string
 | 
					            const result = abiEncoder.strictDecodeReturnValue<string>(rawCallResult);
 | 
				
			||||||
        >(rawCallResult);
 | 
					 | 
				
			||||||
            // tslint:enable boolean-naming
 | 
					            // tslint:enable boolean-naming
 | 
				
			||||||
            return result;
 | 
					            return result;
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
    };
 | 
					    };
 | 
				
			||||||
    public executeTransaction = {
 | 
					    public executeTransaction = {
 | 
				
			||||||
        async sendTransactionAsync(
 | 
					        async sendTransactionAsync(
 | 
				
			||||||
            transaction: {salt: BigNumber;signerAddress: string;data: string},
 | 
					            transaction: { salt: BigNumber; signerAddress: string; data: string },
 | 
				
			||||||
            transactionSignature: string,
 | 
					            transactionSignature: string,
 | 
				
			||||||
            approvalExpirationTimeSeconds: BigNumber[],
 | 
					            approvalExpirationTimeSeconds: BigNumber[],
 | 
				
			||||||
            approvalSignatures: string[],
 | 
					            approvalSignatures: string[],
 | 
				
			||||||
            txData: Partial<TxData> = {},
 | 
					            txData: Partial<TxData> = {},
 | 
				
			||||||
        ): Promise<string> {
 | 
					        ): Promise<string> {
 | 
				
			||||||
            const self = this as any as TECContract;
 | 
					            const self = (this as any) as TECContract;
 | 
				
			||||||
            const encodedData = self._strictEncodeArguments('executeTransaction((uint256,address,bytes),bytes,uint256[],bytes[])', [transaction,
 | 
					            const encodedData = self._strictEncodeArguments(
 | 
				
			||||||
    transactionSignature,
 | 
					                'executeTransaction((uint256,address,bytes),bytes,uint256[],bytes[])',
 | 
				
			||||||
    approvalExpirationTimeSeconds,
 | 
					                [transaction, transactionSignature, approvalExpirationTimeSeconds, approvalSignatures],
 | 
				
			||||||
    approvalSignatures
 | 
					            );
 | 
				
			||||||
    ]);
 | 
					 | 
				
			||||||
            const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
 | 
					            const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
 | 
				
			||||||
                {
 | 
					                {
 | 
				
			||||||
                    to: self.address,
 | 
					                    to: self.address,
 | 
				
			||||||
@@ -167,25 +177,24 @@ export class TECContract extends BaseContract {
 | 
				
			|||||||
                    transaction,
 | 
					                    transaction,
 | 
				
			||||||
                    transactionSignature,
 | 
					                    transactionSignature,
 | 
				
			||||||
                    approvalExpirationTimeSeconds,
 | 
					                    approvalExpirationTimeSeconds,
 | 
				
			||||||
                    approvalSignatures
 | 
					                    approvalSignatures,
 | 
				
			||||||
                ),
 | 
					                ),
 | 
				
			||||||
            );
 | 
					            );
 | 
				
			||||||
            const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults);
 | 
					            const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults);
 | 
				
			||||||
            return txHash;
 | 
					            return txHash;
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
        async estimateGasAsync(
 | 
					        async estimateGasAsync(
 | 
				
			||||||
            transaction: {salt: BigNumber;signerAddress: string;data: string},
 | 
					            transaction: { salt: BigNumber; signerAddress: string; data: string },
 | 
				
			||||||
            transactionSignature: string,
 | 
					            transactionSignature: string,
 | 
				
			||||||
            approvalExpirationTimeSeconds: BigNumber[],
 | 
					            approvalExpirationTimeSeconds: BigNumber[],
 | 
				
			||||||
            approvalSignatures: string[],
 | 
					            approvalSignatures: string[],
 | 
				
			||||||
            txData: Partial<TxData> = {},
 | 
					            txData: Partial<TxData> = {},
 | 
				
			||||||
        ): Promise<number> {
 | 
					        ): Promise<number> {
 | 
				
			||||||
            const self = this as any as TECContract;
 | 
					            const self = (this as any) as TECContract;
 | 
				
			||||||
            const encodedData = self._strictEncodeArguments('executeTransaction((uint256,address,bytes),bytes,uint256[],bytes[])', [transaction,
 | 
					            const encodedData = self._strictEncodeArguments(
 | 
				
			||||||
    transactionSignature,
 | 
					                'executeTransaction((uint256,address,bytes),bytes,uint256[],bytes[])',
 | 
				
			||||||
    approvalExpirationTimeSeconds,
 | 
					                [transaction, transactionSignature, approvalExpirationTimeSeconds, approvalSignatures],
 | 
				
			||||||
    approvalSignatures
 | 
					            );
 | 
				
			||||||
    ]);
 | 
					 | 
				
			||||||
            const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
 | 
					            const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
 | 
				
			||||||
                {
 | 
					                {
 | 
				
			||||||
                    to: self.address,
 | 
					                    to: self.address,
 | 
				
			||||||
@@ -198,34 +207,31 @@ export class TECContract extends BaseContract {
 | 
				
			|||||||
            return gas;
 | 
					            return gas;
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
        getABIEncodedTransactionData(
 | 
					        getABIEncodedTransactionData(
 | 
				
			||||||
            transaction: {salt: BigNumber;signerAddress: string;data: string},
 | 
					            transaction: { salt: BigNumber; signerAddress: string; data: string },
 | 
				
			||||||
            transactionSignature: string,
 | 
					            transactionSignature: string,
 | 
				
			||||||
            approvalExpirationTimeSeconds: BigNumber[],
 | 
					            approvalExpirationTimeSeconds: BigNumber[],
 | 
				
			||||||
            approvalSignatures: string[],
 | 
					            approvalSignatures: string[],
 | 
				
			||||||
        ): string {
 | 
					        ): string {
 | 
				
			||||||
            const self = this as any as TECContract;
 | 
					            const self = (this as any) as TECContract;
 | 
				
			||||||
            const abiEncodedTransactionData = self._strictEncodeArguments('executeTransaction((uint256,address,bytes),bytes,uint256[],bytes[])', [transaction,
 | 
					            const abiEncodedTransactionData = self._strictEncodeArguments(
 | 
				
			||||||
    transactionSignature,
 | 
					                'executeTransaction((uint256,address,bytes),bytes,uint256[],bytes[])',
 | 
				
			||||||
    approvalExpirationTimeSeconds,
 | 
					                [transaction, transactionSignature, approvalExpirationTimeSeconds, approvalSignatures],
 | 
				
			||||||
    approvalSignatures
 | 
					            );
 | 
				
			||||||
    ]);
 | 
					 | 
				
			||||||
            return abiEncodedTransactionData;
 | 
					            return abiEncodedTransactionData;
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
        async callAsync(
 | 
					        async callAsync(
 | 
				
			||||||
            transaction: {salt: BigNumber;signerAddress: string;data: string},
 | 
					            transaction: { salt: BigNumber; signerAddress: string; data: string },
 | 
				
			||||||
            transactionSignature: string,
 | 
					            transactionSignature: string,
 | 
				
			||||||
            approvalExpirationTimeSeconds: BigNumber[],
 | 
					            approvalExpirationTimeSeconds: BigNumber[],
 | 
				
			||||||
            approvalSignatures: string[],
 | 
					            approvalSignatures: string[],
 | 
				
			||||||
            callData: Partial<CallData> = {},
 | 
					            callData: Partial<CallData> = {},
 | 
				
			||||||
            defaultBlock?: BlockParam,
 | 
					            defaultBlock?: BlockParam,
 | 
				
			||||||
        ): Promise<void
 | 
					        ): Promise<void> {
 | 
				
			||||||
        > {
 | 
					            const self = (this as any) as TECContract;
 | 
				
			||||||
            const self = this as any as TECContract;
 | 
					            const encodedData = self._strictEncodeArguments(
 | 
				
			||||||
            const encodedData = self._strictEncodeArguments('executeTransaction((uint256,address,bytes),bytes,uint256[],bytes[])', [transaction,
 | 
					                'executeTransaction((uint256,address,bytes),bytes,uint256[],bytes[])',
 | 
				
			||||||
        transactionSignature,
 | 
					                [transaction, transactionSignature, approvalExpirationTimeSeconds, approvalSignatures],
 | 
				
			||||||
        approvalExpirationTimeSeconds,
 | 
					            );
 | 
				
			||||||
        approvalSignatures
 | 
					 | 
				
			||||||
        ]);
 | 
					 | 
				
			||||||
            const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
 | 
					            const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
 | 
				
			||||||
                {
 | 
					                {
 | 
				
			||||||
                    to: self.address,
 | 
					                    to: self.address,
 | 
				
			||||||
@@ -236,10 +242,11 @@ export class TECContract extends BaseContract {
 | 
				
			|||||||
            );
 | 
					            );
 | 
				
			||||||
            const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
 | 
					            const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
 | 
				
			||||||
            BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
 | 
					            BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
 | 
				
			||||||
            const abiEncoder = self._lookupAbiEncoder('executeTransaction((uint256,address,bytes),bytes,uint256[],bytes[])');
 | 
					            const abiEncoder = self._lookupAbiEncoder(
 | 
				
			||||||
 | 
					                'executeTransaction((uint256,address,bytes),bytes,uint256[],bytes[])',
 | 
				
			||||||
 | 
					            );
 | 
				
			||||||
            // tslint:disable boolean-naming
 | 
					            // tslint:disable boolean-naming
 | 
				
			||||||
            const result = abiEncoder.strictDecodeReturnValue<void
 | 
					            const result = abiEncoder.strictDecodeReturnValue<void>(rawCallResult);
 | 
				
			||||||
        >(rawCallResult);
 | 
					 | 
				
			||||||
            // tslint:enable boolean-naming
 | 
					            // tslint:enable boolean-naming
 | 
				
			||||||
            return result;
 | 
					            return result;
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
@@ -248,7 +255,7 @@ export class TECContract extends BaseContract {
 | 
				
			|||||||
        artifact: ContractArtifact | SimpleContractArtifact,
 | 
					        artifact: ContractArtifact | SimpleContractArtifact,
 | 
				
			||||||
        supportedProvider: SupportedProvider,
 | 
					        supportedProvider: SupportedProvider,
 | 
				
			||||||
        txDefaults: Partial<TxData>,
 | 
					        txDefaults: Partial<TxData>,
 | 
				
			||||||
            _exchange: string,
 | 
					        _exchange: string,
 | 
				
			||||||
    ): Promise<TECContract> {
 | 
					    ): Promise<TECContract> {
 | 
				
			||||||
        if (_.isUndefined(artifact.compilerOutput)) {
 | 
					        if (_.isUndefined(artifact.compilerOutput)) {
 | 
				
			||||||
            throw new Error('Compiler output not found in the artifact file');
 | 
					            throw new Error('Compiler output not found in the artifact file');
 | 
				
			||||||
@@ -256,32 +263,28 @@ export class TECContract extends BaseContract {
 | 
				
			|||||||
        const provider = providerUtils.standardizeOrThrow(supportedProvider);
 | 
					        const provider = providerUtils.standardizeOrThrow(supportedProvider);
 | 
				
			||||||
        const bytecode = artifact.compilerOutput.evm.bytecode.object;
 | 
					        const bytecode = artifact.compilerOutput.evm.bytecode.object;
 | 
				
			||||||
        const abi = artifact.compilerOutput.abi;
 | 
					        const abi = artifact.compilerOutput.abi;
 | 
				
			||||||
        return TECContract.deployAsync(bytecode, abi, provider, txDefaults, _exchange
 | 
					        return TECContract.deployAsync(bytecode, abi, provider, txDefaults, _exchange);
 | 
				
			||||||
);
 | 
					 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    public static async deployAsync(
 | 
					    public static async deployAsync(
 | 
				
			||||||
        bytecode: string,
 | 
					        bytecode: string,
 | 
				
			||||||
        abi: ContractAbi,
 | 
					        abi: ContractAbi,
 | 
				
			||||||
        supportedProvider: SupportedProvider,
 | 
					        supportedProvider: SupportedProvider,
 | 
				
			||||||
        txDefaults: Partial<TxData>,
 | 
					        txDefaults: Partial<TxData>,
 | 
				
			||||||
            _exchange: string,
 | 
					        _exchange: string,
 | 
				
			||||||
    ): Promise<TECContract> {
 | 
					    ): Promise<TECContract> {
 | 
				
			||||||
        const provider = providerUtils.standardizeOrThrow(supportedProvider);
 | 
					        const provider = providerUtils.standardizeOrThrow(supportedProvider);
 | 
				
			||||||
        const constructorAbi = BaseContract._lookupConstructorAbi(abi);
 | 
					        const constructorAbi = BaseContract._lookupConstructorAbi(abi);
 | 
				
			||||||
        [_exchange
 | 
					        [_exchange] = BaseContract._formatABIDataItemList(
 | 
				
			||||||
] = BaseContract._formatABIDataItemList(
 | 
					 | 
				
			||||||
            constructorAbi.inputs,
 | 
					            constructorAbi.inputs,
 | 
				
			||||||
            [_exchange
 | 
					            [_exchange],
 | 
				
			||||||
],
 | 
					 | 
				
			||||||
            BaseContract._bigNumberToString,
 | 
					            BaseContract._bigNumberToString,
 | 
				
			||||||
        );
 | 
					        );
 | 
				
			||||||
        const iface = new ethers.utils.Interface(abi);
 | 
					        const iface = new ethers.utils.Interface(abi);
 | 
				
			||||||
        const deployInfo = iface.deployFunction;
 | 
					        const deployInfo = iface.deployFunction;
 | 
				
			||||||
        const txData = deployInfo.encode(bytecode, [_exchange
 | 
					        const txData = deployInfo.encode(bytecode, [_exchange]);
 | 
				
			||||||
]);
 | 
					 | 
				
			||||||
        const web3Wrapper = new Web3Wrapper(provider);
 | 
					        const web3Wrapper = new Web3Wrapper(provider);
 | 
				
			||||||
        const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
 | 
					        const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
 | 
				
			||||||
            {data: txData},
 | 
					            { data: txData },
 | 
				
			||||||
            txDefaults,
 | 
					            txDefaults,
 | 
				
			||||||
            web3Wrapper.estimateGasAsync.bind(web3Wrapper),
 | 
					            web3Wrapper.estimateGasAsync.bind(web3Wrapper),
 | 
				
			||||||
        );
 | 
					        );
 | 
				
			||||||
@@ -290,8 +293,7 @@ export class TECContract extends BaseContract {
 | 
				
			|||||||
        const txReceipt = await web3Wrapper.awaitTransactionSuccessAsync(txHash);
 | 
					        const txReceipt = await web3Wrapper.awaitTransactionSuccessAsync(txHash);
 | 
				
			||||||
        logUtils.log(`TEC successfully deployed at ${txReceipt.contractAddress}`);
 | 
					        logUtils.log(`TEC successfully deployed at ${txReceipt.contractAddress}`);
 | 
				
			||||||
        const contractInstance = new TECContract(abi, txReceipt.contractAddress as string, provider, txDefaults);
 | 
					        const contractInstance = new TECContract(abi, txReceipt.contractAddress as string, provider, txDefaults);
 | 
				
			||||||
        contractInstance.constructorArgs = [_exchange
 | 
					        contractInstance.constructorArgs = [_exchange];
 | 
				
			||||||
];
 | 
					 | 
				
			||||||
        return contractInstance;
 | 
					        return contractInstance;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    constructor(abi: ContractAbi, address: string, supportedProvider: SupportedProvider, txDefaults?: Partial<TxData>) {
 | 
					    constructor(abi: ContractAbi, address: string, supportedProvider: SupportedProvider, txDefaults?: Partial<TxData>) {
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -2,7 +2,18 @@
 | 
				
			|||||||
// tslint:disable:no-unused-variable
 | 
					// tslint:disable:no-unused-variable
 | 
				
			||||||
// tslint:disable:no-unbound-method
 | 
					// tslint:disable:no-unbound-method
 | 
				
			||||||
import { BaseContract } from '@0x/base-contract';
 | 
					import { BaseContract } from '@0x/base-contract';
 | 
				
			||||||
import { BlockParam, BlockParamLiteral, CallData, ContractAbi, ContractArtifact, DecodedLogArgs, MethodAbi, TxData, TxDataPayable, SupportedProvider } from 'ethereum-types';
 | 
					import {
 | 
				
			||||||
 | 
					    BlockParam,
 | 
				
			||||||
 | 
					    BlockParamLiteral,
 | 
				
			||||||
 | 
					    CallData,
 | 
				
			||||||
 | 
					    ContractAbi,
 | 
				
			||||||
 | 
					    ContractArtifact,
 | 
				
			||||||
 | 
					    DecodedLogArgs,
 | 
				
			||||||
 | 
					    MethodAbi,
 | 
				
			||||||
 | 
					    TxData,
 | 
				
			||||||
 | 
					    TxDataPayable,
 | 
				
			||||||
 | 
					    SupportedProvider,
 | 
				
			||||||
 | 
					} from 'ethereum-types';
 | 
				
			||||||
import { BigNumber, classUtils, logUtils, providerUtils } from '@0x/utils';
 | 
					import { BigNumber, classUtils, logUtils, providerUtils } from '@0x/utils';
 | 
				
			||||||
import { SimpleContractArtifact } from '@0x/types';
 | 
					import { SimpleContractArtifact } from '@0x/types';
 | 
				
			||||||
import { Web3Wrapper } from '@0x/web3-wrapper';
 | 
					import { Web3Wrapper } from '@0x/web3-wrapper';
 | 
				
			||||||
@@ -10,21 +21,20 @@ import * as ethers from 'ethers';
 | 
				
			|||||||
import * as _ from 'lodash';
 | 
					import * as _ from 'lodash';
 | 
				
			||||||
// tslint:enable:no-unused-variable
 | 
					// tslint:enable:no-unused-variable
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 | 
				
			||||||
/* istanbul ignore next */
 | 
					/* istanbul ignore next */
 | 
				
			||||||
// tslint:disable:no-parameter-reassignment
 | 
					// tslint:disable:no-parameter-reassignment
 | 
				
			||||||
// tslint:disable-next-line:class-name
 | 
					// tslint:disable-next-line:class-name
 | 
				
			||||||
export class TestLibsContract extends BaseContract {
 | 
					export class TestLibsContract extends BaseContract {
 | 
				
			||||||
    public publicGetTransactionHash = {
 | 
					    public publicGetTransactionHash = {
 | 
				
			||||||
        async callAsync(
 | 
					        async callAsync(
 | 
				
			||||||
            transaction: {salt: BigNumber;signerAddress: string;data: string},
 | 
					            transaction: { salt: BigNumber; signerAddress: string; data: string },
 | 
				
			||||||
            callData: Partial<CallData> = {},
 | 
					            callData: Partial<CallData> = {},
 | 
				
			||||||
            defaultBlock?: BlockParam,
 | 
					            defaultBlock?: BlockParam,
 | 
				
			||||||
        ): Promise<string
 | 
					        ): Promise<string> {
 | 
				
			||||||
        > {
 | 
					            const self = (this as any) as TestLibsContract;
 | 
				
			||||||
            const self = this as any as TestLibsContract;
 | 
					            const encodedData = self._strictEncodeArguments('publicGetTransactionHash((uint256,address,bytes))', [
 | 
				
			||||||
            const encodedData = self._strictEncodeArguments('publicGetTransactionHash((uint256,address,bytes))', [transaction
 | 
					                transaction,
 | 
				
			||||||
        ]);
 | 
					            ]);
 | 
				
			||||||
            const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
 | 
					            const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
 | 
				
			||||||
                {
 | 
					                {
 | 
				
			||||||
                    to: self.address,
 | 
					                    to: self.address,
 | 
				
			||||||
@@ -37,22 +47,25 @@ export class TestLibsContract extends BaseContract {
 | 
				
			|||||||
            BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
 | 
					            BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
 | 
				
			||||||
            const abiEncoder = self._lookupAbiEncoder('publicGetTransactionHash((uint256,address,bytes))');
 | 
					            const abiEncoder = self._lookupAbiEncoder('publicGetTransactionHash((uint256,address,bytes))');
 | 
				
			||||||
            // tslint:disable boolean-naming
 | 
					            // tslint:disable boolean-naming
 | 
				
			||||||
            const result = abiEncoder.strictDecodeReturnValue<string
 | 
					            const result = abiEncoder.strictDecodeReturnValue<string>(rawCallResult);
 | 
				
			||||||
        >(rawCallResult);
 | 
					 | 
				
			||||||
            // tslint:enable boolean-naming
 | 
					            // tslint:enable boolean-naming
 | 
				
			||||||
            return result;
 | 
					            return result;
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
    };
 | 
					    };
 | 
				
			||||||
    public publicGetTECApprovalHash = {
 | 
					    public publicGetTECApprovalHash = {
 | 
				
			||||||
        async callAsync(
 | 
					        async callAsync(
 | 
				
			||||||
            approval: {transactionHash: string;transactionSignature: string;approvalExpirationTimeSeconds: BigNumber},
 | 
					            approval: {
 | 
				
			||||||
 | 
					                transactionHash: string;
 | 
				
			||||||
 | 
					                transactionSignature: string;
 | 
				
			||||||
 | 
					                approvalExpirationTimeSeconds: BigNumber;
 | 
				
			||||||
 | 
					            },
 | 
				
			||||||
            callData: Partial<CallData> = {},
 | 
					            callData: Partial<CallData> = {},
 | 
				
			||||||
            defaultBlock?: BlockParam,
 | 
					            defaultBlock?: BlockParam,
 | 
				
			||||||
        ): Promise<string
 | 
					        ): Promise<string> {
 | 
				
			||||||
        > {
 | 
					            const self = (this as any) as TestLibsContract;
 | 
				
			||||||
            const self = this as any as TestLibsContract;
 | 
					            const encodedData = self._strictEncodeArguments('publicGetTECApprovalHash((bytes32,bytes,uint256))', [
 | 
				
			||||||
            const encodedData = self._strictEncodeArguments('publicGetTECApprovalHash((bytes32,bytes,uint256))', [approval
 | 
					                approval,
 | 
				
			||||||
        ]);
 | 
					            ]);
 | 
				
			||||||
            const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
 | 
					            const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
 | 
				
			||||||
                {
 | 
					                {
 | 
				
			||||||
                    to: self.address,
 | 
					                    to: self.address,
 | 
				
			||||||
@@ -65,19 +78,14 @@ export class TestLibsContract extends BaseContract {
 | 
				
			|||||||
            BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
 | 
					            BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
 | 
				
			||||||
            const abiEncoder = self._lookupAbiEncoder('publicGetTECApprovalHash((bytes32,bytes,uint256))');
 | 
					            const abiEncoder = self._lookupAbiEncoder('publicGetTECApprovalHash((bytes32,bytes,uint256))');
 | 
				
			||||||
            // tslint:disable boolean-naming
 | 
					            // tslint:disable boolean-naming
 | 
				
			||||||
            const result = abiEncoder.strictDecodeReturnValue<string
 | 
					            const result = abiEncoder.strictDecodeReturnValue<string>(rawCallResult);
 | 
				
			||||||
        >(rawCallResult);
 | 
					 | 
				
			||||||
            // tslint:enable boolean-naming
 | 
					            // tslint:enable boolean-naming
 | 
				
			||||||
            return result;
 | 
					            return result;
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
    };
 | 
					    };
 | 
				
			||||||
    public EIP712_DOMAIN_HASH = {
 | 
					    public EIP712_DOMAIN_HASH = {
 | 
				
			||||||
        async callAsync(
 | 
					        async callAsync(callData: Partial<CallData> = {}, defaultBlock?: BlockParam): Promise<string> {
 | 
				
			||||||
            callData: Partial<CallData> = {},
 | 
					            const self = (this as any) as TestLibsContract;
 | 
				
			||||||
            defaultBlock?: BlockParam,
 | 
					 | 
				
			||||||
        ): Promise<string
 | 
					 | 
				
			||||||
        > {
 | 
					 | 
				
			||||||
            const self = this as any as TestLibsContract;
 | 
					 | 
				
			||||||
            const encodedData = self._strictEncodeArguments('EIP712_DOMAIN_HASH()', []);
 | 
					            const encodedData = self._strictEncodeArguments('EIP712_DOMAIN_HASH()', []);
 | 
				
			||||||
            const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
 | 
					            const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
 | 
				
			||||||
                {
 | 
					                {
 | 
				
			||||||
@@ -91,8 +99,7 @@ export class TestLibsContract extends BaseContract {
 | 
				
			|||||||
            BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
 | 
					            BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
 | 
				
			||||||
            const abiEncoder = self._lookupAbiEncoder('EIP712_DOMAIN_HASH()');
 | 
					            const abiEncoder = self._lookupAbiEncoder('EIP712_DOMAIN_HASH()');
 | 
				
			||||||
            // tslint:disable boolean-naming
 | 
					            // tslint:disable boolean-naming
 | 
				
			||||||
            const result = abiEncoder.strictDecodeReturnValue<string
 | 
					            const result = abiEncoder.strictDecodeReturnValue<string>(rawCallResult);
 | 
				
			||||||
        >(rawCallResult);
 | 
					 | 
				
			||||||
            // tslint:enable boolean-naming
 | 
					            // tslint:enable boolean-naming
 | 
				
			||||||
            return result;
 | 
					            return result;
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
@@ -108,7 +115,7 @@ export class TestLibsContract extends BaseContract {
 | 
				
			|||||||
        const provider = providerUtils.standardizeOrThrow(supportedProvider);
 | 
					        const provider = providerUtils.standardizeOrThrow(supportedProvider);
 | 
				
			||||||
        const bytecode = artifact.compilerOutput.evm.bytecode.object;
 | 
					        const bytecode = artifact.compilerOutput.evm.bytecode.object;
 | 
				
			||||||
        const abi = artifact.compilerOutput.abi;
 | 
					        const abi = artifact.compilerOutput.abi;
 | 
				
			||||||
        return TestLibsContract.deployAsync(bytecode, abi, provider, txDefaults, );
 | 
					        return TestLibsContract.deployAsync(bytecode, abi, provider, txDefaults);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    public static async deployAsync(
 | 
					    public static async deployAsync(
 | 
				
			||||||
        bytecode: string,
 | 
					        bytecode: string,
 | 
				
			||||||
@@ -118,17 +125,13 @@ export class TestLibsContract extends BaseContract {
 | 
				
			|||||||
    ): Promise<TestLibsContract> {
 | 
					    ): Promise<TestLibsContract> {
 | 
				
			||||||
        const provider = providerUtils.standardizeOrThrow(supportedProvider);
 | 
					        const provider = providerUtils.standardizeOrThrow(supportedProvider);
 | 
				
			||||||
        const constructorAbi = BaseContract._lookupConstructorAbi(abi);
 | 
					        const constructorAbi = BaseContract._lookupConstructorAbi(abi);
 | 
				
			||||||
        [] = BaseContract._formatABIDataItemList(
 | 
					        [] = BaseContract._formatABIDataItemList(constructorAbi.inputs, [], BaseContract._bigNumberToString);
 | 
				
			||||||
            constructorAbi.inputs,
 | 
					 | 
				
			||||||
            [],
 | 
					 | 
				
			||||||
            BaseContract._bigNumberToString,
 | 
					 | 
				
			||||||
        );
 | 
					 | 
				
			||||||
        const iface = new ethers.utils.Interface(abi);
 | 
					        const iface = new ethers.utils.Interface(abi);
 | 
				
			||||||
        const deployInfo = iface.deployFunction;
 | 
					        const deployInfo = iface.deployFunction;
 | 
				
			||||||
        const txData = deployInfo.encode(bytecode, []);
 | 
					        const txData = deployInfo.encode(bytecode, []);
 | 
				
			||||||
        const web3Wrapper = new Web3Wrapper(provider);
 | 
					        const web3Wrapper = new Web3Wrapper(provider);
 | 
				
			||||||
        const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
 | 
					        const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
 | 
				
			||||||
            {data: txData},
 | 
					            { data: txData },
 | 
				
			||||||
            txDefaults,
 | 
					            txDefaults,
 | 
				
			||||||
            web3Wrapper.estimateGasAsync.bind(web3Wrapper),
 | 
					            web3Wrapper.estimateGasAsync.bind(web3Wrapper),
 | 
				
			||||||
        );
 | 
					        );
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -2,7 +2,18 @@
 | 
				
			|||||||
// tslint:disable:no-unused-variable
 | 
					// tslint:disable:no-unused-variable
 | 
				
			||||||
// tslint:disable:no-unbound-method
 | 
					// tslint:disable:no-unbound-method
 | 
				
			||||||
import { BaseContract } from '@0x/base-contract';
 | 
					import { BaseContract } from '@0x/base-contract';
 | 
				
			||||||
import { BlockParam, BlockParamLiteral, CallData, ContractAbi, ContractArtifact, DecodedLogArgs, MethodAbi, TxData, TxDataPayable, SupportedProvider } from 'ethereum-types';
 | 
					import {
 | 
				
			||||||
 | 
					    BlockParam,
 | 
				
			||||||
 | 
					    BlockParamLiteral,
 | 
				
			||||||
 | 
					    CallData,
 | 
				
			||||||
 | 
					    ContractAbi,
 | 
				
			||||||
 | 
					    ContractArtifact,
 | 
				
			||||||
 | 
					    DecodedLogArgs,
 | 
				
			||||||
 | 
					    MethodAbi,
 | 
				
			||||||
 | 
					    TxData,
 | 
				
			||||||
 | 
					    TxDataPayable,
 | 
				
			||||||
 | 
					    SupportedProvider,
 | 
				
			||||||
 | 
					} from 'ethereum-types';
 | 
				
			||||||
import { BigNumber, classUtils, logUtils, providerUtils } from '@0x/utils';
 | 
					import { BigNumber, classUtils, logUtils, providerUtils } from '@0x/utils';
 | 
				
			||||||
import { SimpleContractArtifact } from '@0x/types';
 | 
					import { SimpleContractArtifact } from '@0x/types';
 | 
				
			||||||
import { Web3Wrapper } from '@0x/web3-wrapper';
 | 
					import { Web3Wrapper } from '@0x/web3-wrapper';
 | 
				
			||||||
@@ -10,7 +21,6 @@ import * as ethers from 'ethers';
 | 
				
			|||||||
import * as _ from 'lodash';
 | 
					import * as _ from 'lodash';
 | 
				
			||||||
// tslint:enable:no-unused-variable
 | 
					// tslint:enable:no-unused-variable
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 | 
				
			||||||
/* istanbul ignore next */
 | 
					/* istanbul ignore next */
 | 
				
			||||||
// tslint:disable:no-parameter-reassignment
 | 
					// tslint:disable:no-parameter-reassignment
 | 
				
			||||||
// tslint:disable-next-line:class-name
 | 
					// tslint:disable-next-line:class-name
 | 
				
			||||||
@@ -21,12 +31,9 @@ export class TestMixinsContract extends BaseContract {
 | 
				
			|||||||
            signature: string,
 | 
					            signature: string,
 | 
				
			||||||
            callData: Partial<CallData> = {},
 | 
					            callData: Partial<CallData> = {},
 | 
				
			||||||
            defaultBlock?: BlockParam,
 | 
					            defaultBlock?: BlockParam,
 | 
				
			||||||
        ): Promise<string
 | 
					        ): Promise<string> {
 | 
				
			||||||
        > {
 | 
					            const self = (this as any) as TestMixinsContract;
 | 
				
			||||||
            const self = this as any as TestMixinsContract;
 | 
					            const encodedData = self._strictEncodeArguments('getSignerAddress(bytes32,bytes)', [hash, signature]);
 | 
				
			||||||
            const encodedData = self._strictEncodeArguments('getSignerAddress(bytes32,bytes)', [hash,
 | 
					 | 
				
			||||||
        signature
 | 
					 | 
				
			||||||
        ]);
 | 
					 | 
				
			||||||
            const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
 | 
					            const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
 | 
				
			||||||
                {
 | 
					                {
 | 
				
			||||||
                    to: self.address,
 | 
					                    to: self.address,
 | 
				
			||||||
@@ -39,30 +46,39 @@ export class TestMixinsContract extends BaseContract {
 | 
				
			|||||||
            BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
 | 
					            BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
 | 
				
			||||||
            const abiEncoder = self._lookupAbiEncoder('getSignerAddress(bytes32,bytes)');
 | 
					            const abiEncoder = self._lookupAbiEncoder('getSignerAddress(bytes32,bytes)');
 | 
				
			||||||
            // tslint:disable boolean-naming
 | 
					            // tslint:disable boolean-naming
 | 
				
			||||||
            const result = abiEncoder.strictDecodeReturnValue<string
 | 
					            const result = abiEncoder.strictDecodeReturnValue<string>(rawCallResult);
 | 
				
			||||||
        >(rawCallResult);
 | 
					 | 
				
			||||||
            // tslint:enable boolean-naming
 | 
					            // tslint:enable boolean-naming
 | 
				
			||||||
            return result;
 | 
					            return result;
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
    };
 | 
					    };
 | 
				
			||||||
    public assertValidTransactionOrdersApproval = {
 | 
					    public assertValidTransactionOrdersApproval = {
 | 
				
			||||||
        async callAsync(
 | 
					        async callAsync(
 | 
				
			||||||
            transaction: {salt: BigNumber;signerAddress: string;data: string},
 | 
					            transaction: { salt: BigNumber; signerAddress: string; data: string },
 | 
				
			||||||
            orders: Array<{makerAddress: string;takerAddress: string;feeRecipientAddress: string;senderAddress: string;makerAssetAmount: BigNumber;takerAssetAmount: BigNumber;makerFee: BigNumber;takerFee: BigNumber;expirationTimeSeconds: BigNumber;salt: BigNumber;makerAssetData: string;takerAssetData: string}>,
 | 
					            orders: Array<{
 | 
				
			||||||
 | 
					                makerAddress: string;
 | 
				
			||||||
 | 
					                takerAddress: string;
 | 
				
			||||||
 | 
					                feeRecipientAddress: string;
 | 
				
			||||||
 | 
					                senderAddress: string;
 | 
				
			||||||
 | 
					                makerAssetAmount: BigNumber;
 | 
				
			||||||
 | 
					                takerAssetAmount: BigNumber;
 | 
				
			||||||
 | 
					                makerFee: BigNumber;
 | 
				
			||||||
 | 
					                takerFee: BigNumber;
 | 
				
			||||||
 | 
					                expirationTimeSeconds: BigNumber;
 | 
				
			||||||
 | 
					                salt: BigNumber;
 | 
				
			||||||
 | 
					                makerAssetData: string;
 | 
				
			||||||
 | 
					                takerAssetData: string;
 | 
				
			||||||
 | 
					            }>,
 | 
				
			||||||
            transactionSignature: string,
 | 
					            transactionSignature: string,
 | 
				
			||||||
            approvalExpirationTimeSeconds: BigNumber[],
 | 
					            approvalExpirationTimeSeconds: BigNumber[],
 | 
				
			||||||
            approvalSignatures: string[],
 | 
					            approvalSignatures: string[],
 | 
				
			||||||
            callData: Partial<CallData> = {},
 | 
					            callData: Partial<CallData> = {},
 | 
				
			||||||
            defaultBlock?: BlockParam,
 | 
					            defaultBlock?: BlockParam,
 | 
				
			||||||
        ): Promise<void
 | 
					        ): Promise<void> {
 | 
				
			||||||
        > {
 | 
					            const self = (this as any) as TestMixinsContract;
 | 
				
			||||||
            const self = this as any as TestMixinsContract;
 | 
					            const encodedData = self._strictEncodeArguments(
 | 
				
			||||||
            const encodedData = self._strictEncodeArguments('assertValidTransactionOrdersApproval((uint256,address,bytes),(address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes)[],bytes,uint256[],bytes[])', [transaction,
 | 
					                'assertValidTransactionOrdersApproval((uint256,address,bytes),(address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes)[],bytes,uint256[],bytes[])',
 | 
				
			||||||
        orders,
 | 
					                [transaction, orders, transactionSignature, approvalExpirationTimeSeconds, approvalSignatures],
 | 
				
			||||||
        transactionSignature,
 | 
					            );
 | 
				
			||||||
        approvalExpirationTimeSeconds,
 | 
					 | 
				
			||||||
        approvalSignatures
 | 
					 | 
				
			||||||
        ]);
 | 
					 | 
				
			||||||
            const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
 | 
					            const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
 | 
				
			||||||
                {
 | 
					                {
 | 
				
			||||||
                    to: self.address,
 | 
					                    to: self.address,
 | 
				
			||||||
@@ -73,30 +89,29 @@ export class TestMixinsContract extends BaseContract {
 | 
				
			|||||||
            );
 | 
					            );
 | 
				
			||||||
            const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
 | 
					            const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
 | 
				
			||||||
            BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
 | 
					            BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
 | 
				
			||||||
            const abiEncoder = self._lookupAbiEncoder('assertValidTransactionOrdersApproval((uint256,address,bytes),(address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes)[],bytes,uint256[],bytes[])');
 | 
					            const abiEncoder = self._lookupAbiEncoder(
 | 
				
			||||||
 | 
					                'assertValidTransactionOrdersApproval((uint256,address,bytes),(address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes)[],bytes,uint256[],bytes[])',
 | 
				
			||||||
 | 
					            );
 | 
				
			||||||
            // tslint:disable boolean-naming
 | 
					            // tslint:disable boolean-naming
 | 
				
			||||||
            const result = abiEncoder.strictDecodeReturnValue<void
 | 
					            const result = abiEncoder.strictDecodeReturnValue<void>(rawCallResult);
 | 
				
			||||||
        >(rawCallResult);
 | 
					 | 
				
			||||||
            // tslint:enable boolean-naming
 | 
					            // tslint:enable boolean-naming
 | 
				
			||||||
            return result;
 | 
					            return result;
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
    };
 | 
					    };
 | 
				
			||||||
    public assertValidTECApprovals = {
 | 
					    public assertValidTECApprovals = {
 | 
				
			||||||
        async callAsync(
 | 
					        async callAsync(
 | 
				
			||||||
            transaction: {salt: BigNumber;signerAddress: string;data: string},
 | 
					            transaction: { salt: BigNumber; signerAddress: string; data: string },
 | 
				
			||||||
            transactionSignature: string,
 | 
					            transactionSignature: string,
 | 
				
			||||||
            approvalExpirationTimeSeconds: BigNumber[],
 | 
					            approvalExpirationTimeSeconds: BigNumber[],
 | 
				
			||||||
            approvalSignatures: string[],
 | 
					            approvalSignatures: string[],
 | 
				
			||||||
            callData: Partial<CallData> = {},
 | 
					            callData: Partial<CallData> = {},
 | 
				
			||||||
            defaultBlock?: BlockParam,
 | 
					            defaultBlock?: BlockParam,
 | 
				
			||||||
        ): Promise<void
 | 
					        ): Promise<void> {
 | 
				
			||||||
        > {
 | 
					            const self = (this as any) as TestMixinsContract;
 | 
				
			||||||
            const self = this as any as TestMixinsContract;
 | 
					            const encodedData = self._strictEncodeArguments(
 | 
				
			||||||
            const encodedData = self._strictEncodeArguments('assertValidTECApprovals((uint256,address,bytes),bytes,uint256[],bytes[])', [transaction,
 | 
					                'assertValidTECApprovals((uint256,address,bytes),bytes,uint256[],bytes[])',
 | 
				
			||||||
        transactionSignature,
 | 
					                [transaction, transactionSignature, approvalExpirationTimeSeconds, approvalSignatures],
 | 
				
			||||||
        approvalExpirationTimeSeconds,
 | 
					            );
 | 
				
			||||||
        approvalSignatures
 | 
					 | 
				
			||||||
        ]);
 | 
					 | 
				
			||||||
            const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
 | 
					            const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
 | 
				
			||||||
                {
 | 
					                {
 | 
				
			||||||
                    to: self.address,
 | 
					                    to: self.address,
 | 
				
			||||||
@@ -107,21 +122,18 @@ export class TestMixinsContract extends BaseContract {
 | 
				
			|||||||
            );
 | 
					            );
 | 
				
			||||||
            const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
 | 
					            const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
 | 
				
			||||||
            BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
 | 
					            BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
 | 
				
			||||||
            const abiEncoder = self._lookupAbiEncoder('assertValidTECApprovals((uint256,address,bytes),bytes,uint256[],bytes[])');
 | 
					            const abiEncoder = self._lookupAbiEncoder(
 | 
				
			||||||
 | 
					                'assertValidTECApprovals((uint256,address,bytes),bytes,uint256[],bytes[])',
 | 
				
			||||||
 | 
					            );
 | 
				
			||||||
            // tslint:disable boolean-naming
 | 
					            // tslint:disable boolean-naming
 | 
				
			||||||
            const result = abiEncoder.strictDecodeReturnValue<void
 | 
					            const result = abiEncoder.strictDecodeReturnValue<void>(rawCallResult);
 | 
				
			||||||
        >(rawCallResult);
 | 
					 | 
				
			||||||
            // tslint:enable boolean-naming
 | 
					            // tslint:enable boolean-naming
 | 
				
			||||||
            return result;
 | 
					            return result;
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
    };
 | 
					    };
 | 
				
			||||||
    public EIP712_DOMAIN_HASH = {
 | 
					    public EIP712_DOMAIN_HASH = {
 | 
				
			||||||
        async callAsync(
 | 
					        async callAsync(callData: Partial<CallData> = {}, defaultBlock?: BlockParam): Promise<string> {
 | 
				
			||||||
            callData: Partial<CallData> = {},
 | 
					            const self = (this as any) as TestMixinsContract;
 | 
				
			||||||
            defaultBlock?: BlockParam,
 | 
					 | 
				
			||||||
        ): Promise<string
 | 
					 | 
				
			||||||
        > {
 | 
					 | 
				
			||||||
            const self = this as any as TestMixinsContract;
 | 
					 | 
				
			||||||
            const encodedData = self._strictEncodeArguments('EIP712_DOMAIN_HASH()', []);
 | 
					            const encodedData = self._strictEncodeArguments('EIP712_DOMAIN_HASH()', []);
 | 
				
			||||||
            const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
 | 
					            const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
 | 
				
			||||||
                {
 | 
					                {
 | 
				
			||||||
@@ -135,8 +147,7 @@ export class TestMixinsContract extends BaseContract {
 | 
				
			|||||||
            BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
 | 
					            BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
 | 
				
			||||||
            const abiEncoder = self._lookupAbiEncoder('EIP712_DOMAIN_HASH()');
 | 
					            const abiEncoder = self._lookupAbiEncoder('EIP712_DOMAIN_HASH()');
 | 
				
			||||||
            // tslint:disable boolean-naming
 | 
					            // tslint:disable boolean-naming
 | 
				
			||||||
            const result = abiEncoder.strictDecodeReturnValue<string
 | 
					            const result = abiEncoder.strictDecodeReturnValue<string>(rawCallResult);
 | 
				
			||||||
        >(rawCallResult);
 | 
					 | 
				
			||||||
            // tslint:enable boolean-naming
 | 
					            // tslint:enable boolean-naming
 | 
				
			||||||
            return result;
 | 
					            return result;
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
@@ -152,7 +163,7 @@ export class TestMixinsContract extends BaseContract {
 | 
				
			|||||||
        const provider = providerUtils.standardizeOrThrow(supportedProvider);
 | 
					        const provider = providerUtils.standardizeOrThrow(supportedProvider);
 | 
				
			||||||
        const bytecode = artifact.compilerOutput.evm.bytecode.object;
 | 
					        const bytecode = artifact.compilerOutput.evm.bytecode.object;
 | 
				
			||||||
        const abi = artifact.compilerOutput.abi;
 | 
					        const abi = artifact.compilerOutput.abi;
 | 
				
			||||||
        return TestMixinsContract.deployAsync(bytecode, abi, provider, txDefaults, );
 | 
					        return TestMixinsContract.deployAsync(bytecode, abi, provider, txDefaults);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    public static async deployAsync(
 | 
					    public static async deployAsync(
 | 
				
			||||||
        bytecode: string,
 | 
					        bytecode: string,
 | 
				
			||||||
@@ -162,17 +173,13 @@ export class TestMixinsContract extends BaseContract {
 | 
				
			|||||||
    ): Promise<TestMixinsContract> {
 | 
					    ): Promise<TestMixinsContract> {
 | 
				
			||||||
        const provider = providerUtils.standardizeOrThrow(supportedProvider);
 | 
					        const provider = providerUtils.standardizeOrThrow(supportedProvider);
 | 
				
			||||||
        const constructorAbi = BaseContract._lookupConstructorAbi(abi);
 | 
					        const constructorAbi = BaseContract._lookupConstructorAbi(abi);
 | 
				
			||||||
        [] = BaseContract._formatABIDataItemList(
 | 
					        [] = BaseContract._formatABIDataItemList(constructorAbi.inputs, [], BaseContract._bigNumberToString);
 | 
				
			||||||
            constructorAbi.inputs,
 | 
					 | 
				
			||||||
            [],
 | 
					 | 
				
			||||||
            BaseContract._bigNumberToString,
 | 
					 | 
				
			||||||
        );
 | 
					 | 
				
			||||||
        const iface = new ethers.utils.Interface(abi);
 | 
					        const iface = new ethers.utils.Interface(abi);
 | 
				
			||||||
        const deployInfo = iface.deployFunction;
 | 
					        const deployInfo = iface.deployFunction;
 | 
				
			||||||
        const txData = deployInfo.encode(bytecode, []);
 | 
					        const txData = deployInfo.encode(bytecode, []);
 | 
				
			||||||
        const web3Wrapper = new Web3Wrapper(provider);
 | 
					        const web3Wrapper = new Web3Wrapper(provider);
 | 
				
			||||||
        const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
 | 
					        const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
 | 
				
			||||||
            {data: txData},
 | 
					            { data: txData },
 | 
				
			||||||
            txDefaults,
 | 
					            txDefaults,
 | 
				
			||||||
            web3Wrapper.estimateGasAsync.bind(web3Wrapper),
 | 
					            web3Wrapper.estimateGasAsync.bind(web3Wrapper),
 | 
				
			||||||
        );
 | 
					        );
 | 
				
			||||||
 
 | 
				
			|||||||
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
		Reference in New Issue
	
	Block a user