Skip to content
This repository has been archived by the owner on Jul 9, 2021. It is now read-only.

Commit

Permalink
Change verifyingContractAddress -> verifyingContract everywhere
Browse files Browse the repository at this point in the history
  • Loading branch information
abandeali1 committed Sep 23, 2019
1 parent b359738 commit ae75aed
Show file tree
Hide file tree
Showing 43 changed files with 86 additions and 86 deletions.
2 changes: 1 addition & 1 deletion contracts/coordinator/test/coordinator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ describe('Coordinator tests', () => {
makerFeeAssetData: assetDataUtils.encodeERC20AssetData(makerFeeToken.address),
takerFeeAssetData: assetDataUtils.encodeERC20AssetData(makerFeeToken.address),
domain: {
verifyingContractAddress: exchange.address,
verifyingContract: exchange.address,
chainId,
},
};
Expand Down
4 changes: 2 additions & 2 deletions contracts/coordinator/test/libs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ describe('Libs tests', () => {
signerAddress: constants.NULL_ADDRESS,
data: '0x1234',
domain: {
verifyingContractAddress: exchangeAddress,
verifyingContract: exchangeAddress,
chainId,
},
};
Expand All @@ -66,7 +66,7 @@ describe('Libs tests', () => {
data: '0x1234',
signature: '0x5678',
domain: {
verifyingContractAddress: exchangeAddress,
verifyingContract: exchangeAddress,
chainId,
},
};
Expand Down
2 changes: 1 addition & 1 deletion contracts/coordinator/test/mixins.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ describe('Mixins tests', () => {
const accounts = await web3Wrapper.getAvailableAddressesAsync();
[transactionSignerAddress, approvalSignerAddress1, approvalSignerAddress2] = accounts.slice(0, 3);
exchangeDomain = {
verifyingContractAddress: constants.NULL_ADDRESS,
verifyingContract: constants.NULL_ADDRESS,
chainId,
};
defaultOrder = {
Expand Down
4 changes: 2 additions & 2 deletions contracts/coordinator/test/utils/approval_factory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ export class ApprovalFactory {
private readonly _privateKey: Buffer;
private readonly _verifyingContractAddress: string;

constructor(privateKey: Buffer, verifyingContractAddress: string) {
constructor(privateKey: Buffer, verifyingContract: string) {
this._privateKey = privateKey;
this._verifyingContractAddress = verifyingContractAddress;
this._verifyingContractAddress = verifyingContract;
}

public newSignedApproval(
Expand Down
8 changes: 4 additions & 4 deletions contracts/coordinator/test/utils/hash_utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ import * as _ from 'lodash';
export const hashUtils = {
getApprovalHashBuffer(
transaction: SignedZeroExTransaction,
verifyingContractAddress: string,
verifyingContract: string,
txOrigin: string,
approvalExpirationTimeSeconds: BigNumber,
): Buffer {
const typedData = eip712Utils.createCoordinatorApprovalTypedData(
transaction,
verifyingContractAddress,
verifyingContract,
txOrigin,
approvalExpirationTimeSeconds,
);
Expand All @@ -21,12 +21,12 @@ export const hashUtils = {
},
getApprovalHashHex(
transaction: SignedZeroExTransaction,
verifyingContractAddress: string,
verifyingContract: string,
txOrigin: string,
approvalExpirationTimeSeconds: BigNumber,
): string {
const hashHex = `0x${hashUtils
.getApprovalHashBuffer(transaction, verifyingContractAddress, txOrigin, approvalExpirationTimeSeconds)
.getApprovalHashBuffer(transaction, verifyingContract, txOrigin, approvalExpirationTimeSeconds)
.toString('hex')}`;
return hashHex;
},
Expand Down
2 changes: 1 addition & 1 deletion contracts/dev-utils/test/order_validation_utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ describe('OrderValidationUtils/OrderTransferSimulatorUtils', () => {
makerFeeAssetData: feeAssetData,
takerFeeAssetData: feeAssetData,
domain: {
verifyingContractAddress: exchange.address,
verifyingContract: exchange.address,
chainId,
},
};
Expand Down
2 changes: 1 addition & 1 deletion contracts/exchange-forwarder/test/forwarder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ blockchainTests(ContractName.Forwarder, env => {
makerFee: Web3Wrapper.toBaseUnitAmount(0, DECIMALS_DEFAULT),
takerFee: Web3Wrapper.toBaseUnitAmount(0, DECIMALS_DEFAULT),
domain: {
verifyingContractAddress: exchangeInstance.address,
verifyingContract: exchangeInstance.address,
chainId,
},
};
Expand Down
8 changes: 4 additions & 4 deletions contracts/exchange-libs/test/lib_eip712_exchange_domain.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ blockchainTests('LibEIP712ExchangeDomain', env => {
constants.NULL_ADDRESS,
);
const domain = {
verifyingContractAddress: libEIP712ExchangeDomainContract.address,
verifyingContract: libEIP712ExchangeDomainContract.address,
chainId,
name: constants.EIP712_DOMAIN_NAME,
version: constants.EIP712_DOMAIN_VERSION,
Expand All @@ -28,17 +28,17 @@ blockchainTests('LibEIP712ExchangeDomain', env => {
});
it('should calculate the correct domain hash when verifyingContractAddressIfExists is set to a non-null address', async () => {
const chainId = 1;
const verifyingContractAddress = randomAddress();
const verifyingContract = randomAddress();
const libEIP712ExchangeDomainContract = await TestLibEIP712ExchangeDomainContract.deployFrom0xArtifactAsync(
artifacts.TestLibEIP712ExchangeDomain,
env.provider,
env.txDefaults,
{},
new BigNumber(chainId),
verifyingContractAddress,
verifyingContract,
);
const domain = {
verifyingContractAddress,
verifyingContract,
chainId,
name: constants.EIP712_DOMAIN_NAME,
version: constants.EIP712_DOMAIN_VERSION,
Expand Down
8 changes: 4 additions & 4 deletions contracts/exchange-libs/test/lib_fill_results.ts
Original file line number Diff line number Diff line change
Expand Up @@ -537,7 +537,7 @@ blockchainTests('LibFillResults', env => {
expirationTimeSeconds: randomUint256(),
salt: randomUint256(),
domain: {
verifyingContractAddress: constants.NULL_ADDRESS,
verifyingContract: constants.NULL_ADDRESS,
chainId: 1337, // The chain id for the isolated exchange
},
};
Expand All @@ -547,7 +547,7 @@ blockchainTests('LibFillResults', env => {
}

before(async () => {
ORDER_DEFAULTS.domain.verifyingContractAddress = libsContract.address;
ORDER_DEFAULTS.domain.verifyingContract = libsContract.address;
});

it('should correctly calculate the results when only the right order is fully filled', async () => {
Expand Down Expand Up @@ -1210,7 +1210,7 @@ blockchainTests('LibFillResults', env => {
expirationTimeSeconds: randomUint256(),
salt: randomUint256(),
domain: {
verifyingContractAddress: constants.NULL_ADDRESS,
verifyingContract: constants.NULL_ADDRESS,
chainId: 1337, // The chain id for the isolated exchange
},
};
Expand All @@ -1220,7 +1220,7 @@ blockchainTests('LibFillResults', env => {
}

before(async () => {
ORDER_DEFAULTS.domain.verifyingContractAddress = libsContract.address;
ORDER_DEFAULTS.domain.verifyingContract = libsContract.address;
});

it('should transfer correct amounts when right order is fully filled', async () => {
Expand Down
8 changes: 4 additions & 4 deletions contracts/exchange-libs/test/lib_order.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ blockchainTests('LibOrder', env => {

const EMPTY_ORDER: Order = {
domain: {
verifyingContractAddress: constants.NULL_ADDRESS,
verifyingContract: constants.NULL_ADDRESS,
chainId: 0,
},
senderAddress: constants.NULL_ADDRESS,
Expand Down Expand Up @@ -67,15 +67,15 @@ blockchainTests('LibOrder', env => {
...EMPTY_ORDER,
domain: {
...EMPTY_ORDER.domain,
verifyingContractAddress: libOrderContract.address,
verifyingContract: libOrderContract.address,
},
});
});

it('should correctly hash a non-empty order', async () => {
await testGetTypedDataHashAsync({
domain: {
verifyingContractAddress: libOrderContract.address,
verifyingContract: libOrderContract.address,
chainId: 1337,
},
senderAddress: randomAddress(),
Expand Down Expand Up @@ -136,7 +136,7 @@ blockchainTests('LibOrder', env => {
await testGetStructHashAsync({
// The domain is not used in this test, so it's okay if it is left empty.
domain: {
verifyingContractAddress: constants.NULL_ADDRESS,
verifyingContract: constants.NULL_ADDRESS,
chainId: 0,
},
senderAddress: randomAddress(),
Expand Down
8 changes: 4 additions & 4 deletions contracts/exchange-libs/test/lib_zero_ex_transaction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ blockchainTests('LibZeroExTransaction', env => {
signerAddress: constants.NULL_ADDRESS,
data: constants.NULL_BYTES,
domain: {
verifyingContractAddress: constants.NULL_ADDRESS,
verifyingContract: constants.NULL_ADDRESS,
chainId: 0,
},
};
Expand Down Expand Up @@ -58,7 +58,7 @@ blockchainTests('LibZeroExTransaction', env => {
...EMPTY_TRANSACTION,
domain: {
...EMPTY_TRANSACTION.domain,
verifyingContractAddress: libZeroExTransactionContract.address,
verifyingContract: libZeroExTransactionContract.address,
},
});
});
Expand All @@ -72,7 +72,7 @@ blockchainTests('LibZeroExTransaction', env => {
data: randomAssetData(),
domain: {
...EMPTY_TRANSACTION.domain,
verifyingContractAddress: libZeroExTransactionContract.address,
verifyingContract: libZeroExTransactionContract.address,
},
});
});
Expand Down Expand Up @@ -128,7 +128,7 @@ blockchainTests('LibZeroExTransaction', env => {
data: randomAssetData(),
// The domain is not used in this test, so it's okay if it is left empty.
domain: {
verifyingContractAddress: constants.NULL_ADDRESS,
verifyingContract: constants.NULL_ADDRESS,
chainId: 0,
},
});
Expand Down
2 changes: 1 addition & 1 deletion contracts/exchange/test/core.ts
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ blockchainTests.resets('Exchange core', () => {
makerFeeAssetData: assetDataUtils.encodeERC20AssetData(defaultFeeAssetAddress),
takerFeeAssetData: assetDataUtils.encodeERC20AssetData(defaultFeeAssetAddress),
domain: {
verifyingContractAddress: exchange.address,
verifyingContract: exchange.address,
chainId,
},
};
Expand Down
4 changes: 2 additions & 2 deletions contracts/exchange/test/internal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ blockchainTests('Exchange core internal functions', env => {
feeRecipientAddress: randomAddress(),
expirationTimeSeconds: new BigNumber(_.random(0, 1e8)),
domain: {
verifyingContractAddress: constants.NULL_ADDRESS,
verifyingContract: constants.NULL_ADDRESS,
chainId: 1337, // The chain id for the isolated exchange
},
};
Expand All @@ -67,7 +67,7 @@ blockchainTests('Exchange core internal functions', env => {
}

before(async () => {
ORDER_DEFAULTS.domain.verifyingContractAddress = testExchange.address;
ORDER_DEFAULTS.domain.verifyingContract = testExchange.address;
});

it('should revert if the maker asset multiplication should overflow', async () => {
Expand Down
2 changes: 1 addition & 1 deletion contracts/exchange/test/match_orders.ts
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ describe('matchOrders', () => {
defaultERC721AssetAddress = erc721Token.address;
defaultERC1155AssetAddress = erc1155Token.address;
const domain = {
verifyingContractAddress: exchange.address,
verifyingContract: exchange.address,
chainId,
};
// Create default order parameters
Expand Down
2 changes: 1 addition & 1 deletion contracts/exchange/test/signature_validator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,7 @@ blockchainTests.resets('MixinSignatureValidator', env => {
makerFee: constants.ZERO_AMOUNT,
takerFee: constants.ZERO_AMOUNT,
domain: {
verifyingContractAddress: signatureValidator.address,
verifyingContract: signatureValidator.address,
chainId,
},
};
Expand Down
2 changes: 1 addition & 1 deletion contracts/exchange/test/transactions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ blockchainTests.resets('Exchange transactions', env => {
defaultTakerFeeTokenAddress = takerFeeToken.address;

domain = {
verifyingContractAddress: exchangeInstance.address,
verifyingContract: exchangeInstance.address,
chainId,
};

Expand Down
4 changes: 2 additions & 2 deletions contracts/exchange/test/transactions_unit_tests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ blockchainTests.resets('Transaction Unit Tests', ({ provider, web3Wrapper, txDef
signerAddress: constants.NULL_ADDRESS,
data: constants.NULL_BYTES,
domain: {
verifyingContractAddress: constants.NULL_ADDRESS,
verifyingContract: constants.NULL_ADDRESS,
chainId: 0,
},
};
Expand All @@ -45,7 +45,7 @@ blockchainTests.resets('Transaction Unit Tests', ({ provider, web3Wrapper, txDef

// Set the default domain.
domain = {
verifyingContractAddress: transactionsContract.address,
verifyingContract: transactionsContract.address,
chainId: 1337,
};
});
Expand Down
2 changes: 1 addition & 1 deletion contracts/exchange/test/utils/isolated_exchange_wrapper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ export class IsolatedExchangeWrapper {

public getOrderHash(order: Order): string {
const domain = {
verifyingContractAddress: this.instance.address,
verifyingContract: this.instance.address,
chainId: IsolatedExchangeWrapper.CHAIN_ID,
};
return orderHashUtils.getOrderHashHex({ ...order, domain });
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,7 @@ export class OrderFactoryFromScenario {
feeRecipientAddress,
expirationTimeSeconds,
domain: {
verifyingContractAddress: this._exchangeAddress,
verifyingContract: this._exchangeAddress,
chainId: this._chainId,
},
};
Expand Down
2 changes: 1 addition & 1 deletion contracts/exchange/test/wrapper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ blockchainTests.resets('Exchange wrappers', env => {
makerFeeAssetData: assetDataUtils.encodeERC20AssetData(defaultFeeAssetAddress),
takerFeeAssetData: assetDataUtils.encodeERC20AssetData(defaultFeeAssetAddress),
domain: {
verifyingContractAddress: exchange.address,
verifyingContract: exchange.address,
chainId,
},
};
Expand Down
2 changes: 1 addition & 1 deletion contracts/exchange/test/wrapper_unit_tests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ blockchainTests('Exchange wrapper functions unit tests.', env => {
return orderHashUtils.getOrderHashHex({
...order,
domain: {
verifyingContractAddress: testContract.address,
verifyingContract: testContract.address,
chainId: CHAIN_ID,
},
});
Expand Down
2 changes: 1 addition & 1 deletion contracts/extensions/test/balance_threshold_filter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ describe(ContractName.BalanceThresholdFilter, () => {
takerFee: Web3Wrapper.toBaseUnitAmount(new BigNumber(150), DECIMALS_DEFAULT),
senderAddress: erc721BalanceThresholdFilterInstance.address,
domain: {
verifyingContractAddress: exchangeInstance.address,
verifyingContract: exchangeInstance.address,
chainId,
},
};
Expand Down
2 changes: 1 addition & 1 deletion contracts/extensions/test/dutch_auction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ describe(ContractName.DutchAuction, () => {
makerFee: constants.ZERO_AMOUNT,
takerFee: constants.ZERO_AMOUNT,
domain: {
verifyingContractAddress: exchangeInstance.address,
verifyingContract: exchangeInstance.address,
chainId,
},
};
Expand Down
2 changes: 1 addition & 1 deletion contracts/extensions/test/order_matcher.ts
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ describe('OrderMatcher', () => {
);

const domain = {
verifyingContractAddress: exchange.address,
verifyingContract: exchange.address,
chainId,
};

Expand Down
2 changes: 1 addition & 1 deletion contracts/test-utils/src/transaction_factory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export class TransactionFactory {
expirationTimeSeconds: new BigNumber(currentBlockTimestamp).plus(tenMinutesInSeconds),
gasPrice: new BigNumber(constants.DEFAULT_GAS_PRICE),
domain: {
verifyingContractAddress: this._exchangeAddress,
verifyingContract: this._exchangeAddress,
chainId: this._chainId,
},
...customTransactionParams,
Expand Down
Loading

0 comments on commit ae75aed

Please sign in to comment.