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

Commit

Permalink
Refactor integrations directory structure; move core.ts, balance stor…
Browse files Browse the repository at this point in the history
…es, and FillOrderWrapper to integrations
  • Loading branch information
moodlezoup committed Nov 15, 2019
1 parent bdca84f commit 7f4cbba
Show file tree
Hide file tree
Showing 50 changed files with 387 additions and 446 deletions.
37 changes: 0 additions & 37 deletions contracts/exchange/contracts/test/TestSignatureValidator.sol

This file was deleted.

2 changes: 0 additions & 2 deletions contracts/exchange/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
export * from './artifacts';
export * from './wrappers';
export import ExchangeRevertErrors = require('./revert_errors');
export { BlockchainBalanceStore } from './balance_stores/blockchain_balance_store';
export { LocalBalanceStore } from './balance_stores/local_balance_store';
export { exchangeDataEncoder } from './exchange_data_encoder';
2 changes: 0 additions & 2 deletions contracts/exchange/test/artifacts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ import * as TestLibExchangeRichErrorDecoder from '../test/generated-artifacts/Te
import * as TestProtocolFeeCollector from '../test/generated-artifacts/TestProtocolFeeCollector.json';
import * as TestProtocolFees from '../test/generated-artifacts/TestProtocolFees.json';
import * as TestProtocolFeesReceiver from '../test/generated-artifacts/TestProtocolFeesReceiver.json';
import * as TestSignatureValidator from '../test/generated-artifacts/TestSignatureValidator.json';
import * as TestTransactions from '../test/generated-artifacts/TestTransactions.json';
import * as TestValidatorWallet from '../test/generated-artifacts/TestValidatorWallet.json';
import * as TestWrapperFunctions from '../test/generated-artifacts/TestWrapperFunctions.json';
Expand Down Expand Up @@ -74,7 +73,6 @@ export const artifacts = {
TestProtocolFeeCollector: TestProtocolFeeCollector as ContractArtifact,
TestProtocolFees: TestProtocolFees as ContractArtifact,
TestProtocolFeesReceiver: TestProtocolFeesReceiver as ContractArtifact,
TestSignatureValidator: TestSignatureValidator as ContractArtifact,
TestTransactions: TestTransactions as ContractArtifact,
TestValidatorWallet: TestValidatorWallet as ContractArtifact,
TestWrapperFunctions: TestWrapperFunctions as ContractArtifact,
Expand Down
235 changes: 191 additions & 44 deletions contracts/exchange/test/signature_validator.ts

Large diffs are not rendered by default.

11 changes: 0 additions & 11 deletions contracts/exchange/test/utils/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,3 @@ export const constants = {
ExchangeFunctionName.DetachProtocolFeeCollector,
],
};

export enum ValidatorWalletAction {
Reject = 0,
Accept = 1,
Revert = 2,
UpdateState = 3,
MatchSignatureHash = 4,
ReturnTrue = 5,
ReturnNothing = 6,
NTypes = 7,
}
1 change: 0 additions & 1 deletion contracts/exchange/test/wrappers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ export * from '../test/generated-wrappers/test_lib_exchange_rich_error_decoder';
export * from '../test/generated-wrappers/test_protocol_fee_collector';
export * from '../test/generated-wrappers/test_protocol_fees';
export * from '../test/generated-wrappers/test_protocol_fees_receiver';
export * from '../test/generated-wrappers/test_signature_validator';
export * from '../test/generated-wrappers/test_transactions';
export * from '../test/generated-wrappers/test_validator_wallet';
export * from '../test/generated-wrappers/test_wrapper_functions';
1 change: 0 additions & 1 deletion contracts/exchange/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@
"test/generated-artifacts/TestProtocolFeeCollector.json",
"test/generated-artifacts/TestProtocolFees.json",
"test/generated-artifacts/TestProtocolFeesReceiver.json",
"test/generated-artifacts/TestSignatureValidator.json",
"test/generated-artifacts/TestTransactions.json",
"test/generated-artifacts/TestValidatorWallet.json",
"test/generated-artifacts/TestWrapperFunctions.json"
Expand Down
1 change: 1 addition & 0 deletions contracts/integrations/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@
"chai-as-promised": "^7.1.0",
"chai-bignumber": "^3.0.0",
"dirty-chai": "^2.0.1",
"js-combinatorics": "^0.5.3",
"make-promises-safe": "^1.1.0",
"mocha": "^6.2.0",
"npm-run-all": "^4.1.2",
Expand Down
1 change: 0 additions & 1 deletion contracts/integrations/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
export * from './artifacts';
export * from './wrappers';
export * from './function_assertions';
9 changes: 0 additions & 9 deletions contracts/integrations/test/actors/index.ts

This file was deleted.

11 changes: 7 additions & 4 deletions contracts/integrations/test/coordinator/coordinator_test.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
import { CoordinatorContract, CoordinatorRevertErrors, SignedCoordinatorApproval } from '@0x/contracts-coordinator';
import { DevUtilsContract } from '@0x/contracts-dev-utils';
import {
BlockchainBalanceStore,
ExchangeCancelEventArgs,
ExchangeCancelUpToEventArgs,
exchangeDataEncoder,
ExchangeEvents,
ExchangeFillEventArgs,
LocalBalanceStore,
} from '@0x/contracts-exchange';
import {
blockchainTests,
Expand All @@ -25,8 +23,13 @@ import { SignedOrder, SignedZeroExTransaction } from '@0x/types';
import { BigNumber } from '@0x/utils';
import { TransactionReceiptWithDecodedLogs } from 'ethereum-types';

import { Actor, actorAddressesByName, FeeRecipient, Maker } from '../actors';
import { DeploymentManager } from '../deployment_manager';
import { Actor } from '../framework/actors/base';
import { FeeRecipient } from '../framework/actors/fee_recipient';
import { Maker } from '../framework/actors/maker';
import { actorAddressesByName } from '../framework/actors/utils';
import { BlockchainBalanceStore } from '../framework/balances/blockchain_balance_store';
import { LocalBalanceStore } from '../framework/balances/local_balance_store';
import { DeploymentManager } from '../framework/deployment_manager';

import { deployCoordinatorAsync } from './deploy_coordinator';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { artifacts as exchangeArtifacts } from '@0x/contracts-exchange';
import { BlockchainTestsEnvironment } from '@0x/contracts-test-utils';
import { BigNumber } from '@0x/utils';

import { DeploymentManager } from '../deployment_manager';
import { DeploymentManager } from '../framework/deployment_manager';

/**
* Deploys a Coordinator contract configured to work alongside the provided `deployment`.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ import { AssetProxyId } from '@0x/types';
import { BigNumber } from '@0x/utils';
import { TxData } from 'ethereum-types';

import { AssetProxyDispatcher, Authorizable, Ownable } from '../wrapper_interfaces';
import { AssetProxyDispatcher, Authorizable, Ownable } from './framework/wrapper_interfaces';

// tslint:disable:no-unnecessary-type-assertion
blockchainTests('Deployment and Configuration End to End Tests', env => {
Expand Down
Loading

0 comments on commit 7f4cbba

Please sign in to comment.