All glory to the linter gods.

This commit is contained in:
Lawrence Forman 2019-03-25 22:38:48 -04:00 committed by Amir Bandeali
parent f77823ee24
commit c096eae644
14 changed files with 20 additions and 56 deletions

View File

@ -113,21 +113,9 @@ describe('Coordinator tests', () => {
const takerPrivateKey = devConstants.TESTRPC_PRIVATE_KEYS[accounts.indexOf(takerAddress)];
const feeRecipientPrivateKey = devConstants.TESTRPC_PRIVATE_KEYS[accounts.indexOf(feeRecipientAddress)];
orderFactory = new OrderFactory(makerPrivateKey, defaultOrderParams);
makerTransactionFactory = new TransactionFactory(
makerPrivateKey,
exchange.address,
chainId,
);
takerTransactionFactory = new TransactionFactory(
takerPrivateKey,
exchange.address,
chainId,
);
approvalFactory = new ApprovalFactory(
feeRecipientPrivateKey,
coordinatorContract.address,
chainId,
);
makerTransactionFactory = new TransactionFactory(makerPrivateKey, exchange.address, chainId);
takerTransactionFactory = new TransactionFactory(takerPrivateKey, exchange.address, chainId);
approvalFactory = new ApprovalFactory(feeRecipientPrivateKey, coordinatorContract.address, chainId);
});
beforeEach(async () => {
await blockchainLifecycle.startAsync();

View File

@ -72,21 +72,9 @@ describe('Mixins tests', () => {
devConstants.TESTRPC_PRIVATE_KEYS[accounts.indexOf(transactionSignerAddress)];
const approvalSignerPrivateKey1 = devConstants.TESTRPC_PRIVATE_KEYS[accounts.indexOf(approvalSignerAddress1)];
const approvalSignerPrivateKey2 = devConstants.TESTRPC_PRIVATE_KEYS[accounts.indexOf(approvalSignerAddress2)];
transactionFactory = new TransactionFactory(
transactionSignerPrivateKey,
exchangeAddress,
chainId,
);
approvalFactory1 = new ApprovalFactory(
approvalSignerPrivateKey1,
mixins.address,
chainId,
);
approvalFactory2 = new ApprovalFactory(
approvalSignerPrivateKey2,
mixins.address,
chainId,
);
transactionFactory = new TransactionFactory(transactionSignerPrivateKey, exchangeAddress, chainId);
approvalFactory1 = new ApprovalFactory(approvalSignerPrivateKey1, mixins.address, chainId);
approvalFactory2 = new ApprovalFactory(approvalSignerPrivateKey2, mixins.address, chainId);
});
beforeEach(async () => {
await blockchainLifecycle.startAsync();

View File

@ -10,11 +10,7 @@ export class ApprovalFactory {
private readonly _verifyingContractAddress: string;
private readonly _chainId: number;
constructor(
privateKey: Buffer,
verifyingContractAddress: string,
chainId: number,
) {
constructor(privateKey: Buffer, verifyingContractAddress: string, chainId: number) {
this._privateKey = privateKey;
this._verifyingContractAddress = verifyingContractAddress;
this._chainId = chainId;

View File

@ -30,7 +30,8 @@ export const hashUtils = {
transaction,
verifyingContractAddress,
txOrigin,
approvalExpirationTimeSeconds)
approvalExpirationTimeSeconds,
)
.toString('hex')}`;
return hashHex;
},

View File

@ -38,7 +38,6 @@ contract LibConstants {
bytes public ZRX_ASSET_DATA;
/// @param zrxAssetData Asset data for ZRX token. Used for fee transfers.
constructor (bytes memory zrxAssetData)
public

View File

@ -40,7 +40,6 @@ contract LibEIP712ExchangeDomain is
);
}
/// @dev Calculates EIP712 encoding for a hash struct in the EIP712 domain
/// of the Exchange contract.
/// @param hashStruct The EIP712 hash struct.

View File

@ -26,6 +26,7 @@ import "../src/LibFillResults.sol";
import "../src/LibAbiEncoder.sol";
// solhint-disable no-empty-blocks
contract TestLibs is
LibEIP712,
LibMath,

View File

@ -62,8 +62,7 @@ contract MixinTransactions is
salt,
signerAddress,
data
)
);
));
// Validate transaction has not been executed
require(

View File

@ -29,6 +29,7 @@ contract TestSignatureValidator is
MixinTransactions
{
// solhint-disable no-empty-blocks
constructor (uint256 chainId)
public
LibEIP712(chainId)

View File

@ -122,7 +122,7 @@ describe('matchOrders', () => {
provider,
txDefaults,
assetDataUtils.encodeERC20AssetData(zrxToken.address),
new BigNumber(chainId)
new BigNumber(chainId),
);
exchangeWrapper = new ExchangeWrapper(exchange, provider);
await exchangeWrapper.registerAssetProxyAsync(erc20Proxy.address, owner);

View File

@ -90,7 +90,7 @@ describe('Exchange transactions', () => {
provider,
txDefaults,
assetDataUtils.encodeERC20AssetData(zrxToken.address),
new BigNumber(chainId)
new BigNumber(chainId),
);
exchangeWrapper = new ExchangeWrapper(exchange, provider);
await exchangeWrapper.registerAssetProxyAsync(erc20Proxy.address, owner);
@ -116,16 +116,8 @@ describe('Exchange transactions', () => {
makerPrivateKey = constants.TESTRPC_PRIVATE_KEYS[accounts.indexOf(makerAddress)];
takerPrivateKey = constants.TESTRPC_PRIVATE_KEYS[accounts.indexOf(takerAddress)];
orderFactory = new OrderFactory(makerPrivateKey, defaultOrderParams);
makerTransactionFactory = new TransactionFactory(
makerPrivateKey,
exchange.address,
chainId,
);
takerTransactionFactory = new TransactionFactory(
takerPrivateKey,
exchange.address,
chainId,
);
makerTransactionFactory = new TransactionFactory(makerPrivateKey, exchange.address, chainId);
takerTransactionFactory = new TransactionFactory(takerPrivateKey, exchange.address, chainId);
});
describe('executeTransaction', () => {
describe('fillOrder', () => {

View File

@ -103,7 +103,7 @@ export async function fillOrderCombinatorialUtilsFactoryAsync(
provider,
txDefaults,
zrxAssetData,
new BigNumber(chainId)
new BigNumber(chainId),
);
const exchangeWrapper = new ExchangeWrapper(exchangeContract, provider);
await exchangeWrapper.registerAssetProxyAsync(erc20Proxy.address, ownerAddress);
@ -131,7 +131,7 @@ export async function fillOrderCombinatorialUtilsFactoryAsync(
erc721Token,
erc721Balances,
exchangeContract.address,
chainId
chainId,
);
const testLibsContract = await TestLibsContract.deployFrom0xArtifactAsync(

View File

@ -42,7 +42,7 @@ export class OrderFactoryFromScenario {
erc721Token: DummyERC721TokenContract,
erc721Balances: ERC721TokenIdsByOwner,
exchangeAddress: string,
chainId: number
chainId: number,
) {
this._userAddresses = userAddresses;
this._zrxAddress = zrxAddress;

View File

@ -90,7 +90,7 @@ describe('Exchange wrappers', () => {
provider,
txDefaults,
assetDataUtils.encodeERC20AssetData(zrxToken.address),
new BigNumber(chainId)
new BigNumber(chainId),
);
exchangeWrapper = new ExchangeWrapper(exchange, provider);
await exchangeWrapper.registerAssetProxyAsync(erc20Proxy.address, owner);