Skip to content
This repository has been archived by the owner on Jan 18, 2023. It is now read-only.

Commit

Permalink
Move wrappers to directory (#310)
Browse files Browse the repository at this point in the history
  • Loading branch information
asoong committed Dec 1, 2018
1 parent 5253dba commit 672e1de
Show file tree
Hide file tree
Showing 34 changed files with 112 additions and 92 deletions.
3 changes: 2 additions & 1 deletion test/contracts/core/core.spec.ts
Expand Up @@ -8,9 +8,10 @@ import ChaiSetup from '@utils/chaiSetup';
import { BigNumberSetup } from '@utils/bigNumberSetup';
import { CoreContract, SignatureValidatorContract, TransferProxyContract, VaultContract } from '@utils/contracts';
import { Blockchain } from '@utils/blockchain';
import { CoreWrapper } from '@utils/coreWrapper';
import { getWeb3 } from '@utils/web3Helper';

import { CoreWrapper } from '@utils/wrappers/coreWrapper';

BigNumberSetup.configure();
ChaiSetup.configure();
const web3 = getWeb3();
Expand Down
Expand Up @@ -17,14 +17,15 @@ import {
} from '@utils/contracts';
import { ether } from '@utils/units';
import { ExchangeData } from '@utils/orders';
import { CoreWrapper } from '@utils/coreWrapper';
import { ERC20Wrapper } from '@utils/erc20Wrapper';
import { ExchangeWrapper } from '@utils/exchangeWrapper';
import { Blockchain } from '@utils/blockchain';
import { DEFAULT_GAS, KYBER_RESERVE_CONFIGURED_RATE, UNLIMITED_ALLOWANCE_IN_BASE_UNITS } from '@utils/constants';
import { expectRevertError } from '@utils/tokenAssertions';
import { getWeb3 } from '@utils/web3Helper';

import { CoreWrapper } from '@utils/wrappers/coreWrapper';
import { ERC20Wrapper } from '@utils/wrappers/erc20Wrapper';
import { ExchangeWrapper } from '@utils/wrappers/exchangeWrapper';

BigNumberSetup.configure();
ChaiSetup.configure();
const web3 = getWeb3();
Expand Down
Expand Up @@ -11,11 +11,12 @@ import { Order as ZeroExOrder } from '@0xproject/types';
import ChaiSetup from '@utils/chaiSetup';
import { BigNumberSetup } from '@utils/bigNumberSetup';
import { ZeroExOrderDataHandlerMockContract } from '@utils/contracts';
import { LibraryMockWrapper } from '@utils/libraryMockWrapper';
import { Blockchain } from '@utils/blockchain';
import { ether } from '@utils/units';
import { getWeb3 } from '@utils/web3Helper';

import { LibraryMockWrapper } from '@utils/wrappers/libraryMockWrapper';

BigNumberSetup.configure();
ChaiSetup.configure();
const web3 = getWeb3();
Expand Down
13 changes: 5 additions & 8 deletions test/contracts/core/exchange-wrappers/takerWalletWrapper.spec.ts
Expand Up @@ -16,20 +16,17 @@ import {
TransferProxyContract,
VaultContract,
} from '@utils/contracts';
import { CoreWrapper } from '@utils/coreWrapper';
import { ExchangeData } from '@utils/orders';
import { ERC20Wrapper } from '@utils/erc20Wrapper';
import { ExchangeWrapper } from '@utils/exchangeWrapper';
import { Blockchain } from '@utils/blockchain';
import { generateTakerWalletOrders } from '@utils/orders';
import {
DEFAULT_GAS,
DEPLOYED_TOKEN_QUANTITY,
UNLIMITED_ALLOWANCE_IN_BASE_UNITS,
} from '@utils/constants';
import { DEFAULT_GAS, DEPLOYED_TOKEN_QUANTITY, UNLIMITED_ALLOWANCE_IN_BASE_UNITS } from '@utils/constants';
import { expectRevertError } from '@utils/tokenAssertions';
import { getWeb3 } from '@utils/web3Helper';

import { CoreWrapper } from '@utils/wrappers/coreWrapper';
import { ERC20Wrapper } from '@utils/wrappers/erc20Wrapper';
import { ExchangeWrapper } from '@utils/wrappers/exchangeWrapper';

BigNumberSetup.configure();
ChaiSetup.configure();
const web3 = getWeb3();
Expand Down
Expand Up @@ -19,14 +19,15 @@ import {
} from '@utils/contracts';
import { expectRevertError } from '@utils/tokenAssertions';
import { Blockchain } from '@utils/blockchain';
import { CoreWrapper } from '@utils/coreWrapper';
import { ExchangeData } from '@utils/orders';
import { ERC20Wrapper } from '@utils/erc20Wrapper';
import { ExchangeWrapper } from '@utils/exchangeWrapper';
import { DEFAULT_GAS, UNLIMITED_ALLOWANCE_IN_BASE_UNITS, ZERO } from '@utils/constants';
import { ether } from '@utils/units';
import { getWeb3 } from '@utils/web3Helper';

import { CoreWrapper } from '@utils/wrappers/coreWrapper';
import { ERC20Wrapper } from '@utils/wrappers/erc20Wrapper';
import { ExchangeWrapper } from '@utils/wrappers/exchangeWrapper';

BigNumberSetup.configure();
ChaiSetup.configure();
const web3 = getWeb3();
Expand Down
13 changes: 4 additions & 9 deletions test/contracts/core/extensions/coreAccounting.spec.ts
Expand Up @@ -19,18 +19,13 @@ import {
} from '@utils/contracts';
import { assertTokenBalanceAsync, expectRevertError } from '@utils/tokenAssertions';
import { Blockchain } from '@utils/blockchain';
import { CoreWrapper } from '@utils/coreWrapper';
import { getExpectedTransferLogs } from '@utils/contract_logs/core';
import {
DEFAULT_GAS,
DEPLOYED_TOKEN_QUANTITY,
UNLIMITED_ALLOWANCE_IN_BASE_UNITS,
ZERO,
ONE,
} from '@utils/constants';
import { ERC20Wrapper } from '@utils/erc20Wrapper';
import { DEFAULT_GAS, DEPLOYED_TOKEN_QUANTITY, UNLIMITED_ALLOWANCE_IN_BASE_UNITS, ZERO, ONE } from '@utils/constants';
import { getWeb3 } from '@utils/web3Helper';

import { CoreWrapper } from '@utils/wrappers/coreWrapper';
import { ERC20Wrapper } from '@utils/wrappers/erc20Wrapper';

BigNumberSetup.configure();
ChaiSetup.configure();
const web3 = getWeb3();
Expand Down
5 changes: 3 additions & 2 deletions test/contracts/core/extensions/coreFactory.spec.ts
Expand Up @@ -13,10 +13,11 @@ import { expectRevertError } from '@utils/tokenAssertions';
import { Blockchain } from '@utils/blockchain';
import { extractNewSetTokenAddressFromLogs, SetTokenCreated } from '@utils/contract_logs/core';
import { ONE } from '@utils/constants';
import { CoreWrapper } from '@utils/coreWrapper';
import { ERC20Wrapper } from '@utils/erc20Wrapper';
import { getWeb3 } from '@utils/web3Helper';

import { CoreWrapper } from '@utils/wrappers/coreWrapper';
import { ERC20Wrapper } from '@utils/wrappers/erc20Wrapper';

BigNumberSetup.configure();
ChaiSetup.configure();
const web3 = getWeb3();
Expand Down
7 changes: 4 additions & 3 deletions test/contracts/core/extensions/coreInternal.spec.ts
Expand Up @@ -35,11 +35,12 @@ import {
import { expectRevertError } from '@utils/tokenAssertions';
import { Blockchain } from '@utils/blockchain';
import { STANDARD_NATURAL_UNIT, ZERO, DEFAULT_AUCTION_PRICE_DENOMINATOR } from '@utils/constants';
import { CoreWrapper } from '@utils/coreWrapper';
import { ERC20Wrapper } from '@utils/erc20Wrapper';
import { RebalancingWrapper } from '@utils/rebalancingWrapper';
import { getWeb3 } from '@utils/web3Helper';

import { CoreWrapper } from '@utils/wrappers/coreWrapper';
import { ERC20Wrapper } from '@utils/wrappers/erc20Wrapper';
import { RebalancingWrapper } from '@utils/wrappers/rebalancingWrapper';

BigNumberSetup.configure();
ChaiSetup.configure();
const web3 = getWeb3();
Expand Down
7 changes: 4 additions & 3 deletions test/contracts/core/extensions/coreIssuance.spec.ts
Expand Up @@ -32,11 +32,12 @@ import {
DEFAULT_REBALANCING_NATURAL_UNIT,
ONE_DAY_IN_SECONDS
} from '@utils/constants';
import { CoreWrapper } from '@utils/coreWrapper';
import { ERC20Wrapper } from '@utils/erc20Wrapper';
import { RebalancingWrapper } from '@utils/rebalancingWrapper';
import { getWeb3 } from '@utils/web3Helper';

import { CoreWrapper } from '@utils/wrappers/coreWrapper';
import { ERC20Wrapper } from '@utils/wrappers/erc20Wrapper';
import { RebalancingWrapper } from '@utils/wrappers/rebalancingWrapper';

BigNumberSetup.configure();
ChaiSetup.configure();
const web3 = getWeb3();
Expand Down
5 changes: 3 additions & 2 deletions test/contracts/core/extensions/coreModuleInteraction.spec.ts
Expand Up @@ -21,17 +21,18 @@ import {
import { ether } from '@utils/units';
import { assertTokenBalanceAsync, expectRevertError } from '@utils/tokenAssertions';
import { Blockchain } from '@utils/blockchain';
import { CoreWrapper } from '@utils/coreWrapper';
import { getExpectedTransferLogs } from '@utils/contract_logs/core';
import {
DEFAULT_GAS,
DEPLOYED_TOKEN_QUANTITY,
UNLIMITED_ALLOWANCE_IN_BASE_UNITS,
ZERO,
} from '@utils/constants';
import { ERC20Wrapper } from '@utils/erc20Wrapper';
import { getWeb3 } from '@utils/web3Helper';

import { CoreWrapper } from '@utils/wrappers/coreWrapper';
import { ERC20Wrapper } from '@utils/wrappers/erc20Wrapper';

BigNumberSetup.configure();
ChaiSetup.configure();
const web3 = getWeb3();
Expand Down
2 changes: 1 addition & 1 deletion test/contracts/core/extensions/coreOperationState.spec.ts
Expand Up @@ -13,7 +13,7 @@ import { expectRevertError } from '@utils/tokenAssertions';
import { Blockchain } from '@utils/blockchain';
import { OperationStateChanged } from '@utils/contract_logs/core';
import { ZERO, ONE } from '@utils/constants';
import { CoreWrapper } from '@utils/coreWrapper';
import { CoreWrapper } from '@utils/wrappers/coreWrapper';
import { getWeb3 } from '@utils/web3Helper';

BigNumberSetup.configure();
Expand Down
Expand Up @@ -8,9 +8,6 @@ import { BigNumber } from 'bignumber.js';
import { LinearAuctionPriceCurveContract } from '@utils/contracts';
import { expectRevertError } from '@utils/tokenAssertions';
import { Blockchain } from '@utils/blockchain';
import { ERC20Wrapper } from '@utils/erc20Wrapper';
import { CoreWrapper } from '@utils/coreWrapper';
import { RebalancingWrapper } from '@utils/rebalancingWrapper';
import { BigNumberSetup } from '@utils/bigNumberSetup';
import ChaiSetup from '@utils/chaiSetup';
import {
Expand All @@ -20,6 +17,10 @@ import {
} from '@utils/constants';
import { getWeb3 } from '@utils/web3Helper';

import { ERC20Wrapper } from '@utils/wrappers/erc20Wrapper';
import { CoreWrapper } from '@utils/wrappers/coreWrapper';
import { RebalancingWrapper } from '@utils/wrappers/rebalancingWrapper';

BigNumberSetup.configure();
ChaiSetup.configure();
const web3 = getWeb3();
Expand Down
3 changes: 2 additions & 1 deletion test/contracts/core/lib/eip712Library.spec.ts
Expand Up @@ -4,12 +4,13 @@ import * as chai from 'chai';
import { Bytes } from 'set-protocol-utils';

import { EIP712LibraryMockContract } from '@utils/contracts';
import { CoreWrapper } from '@utils/coreWrapper';
import { Blockchain } from '@utils/blockchain';
import { BigNumberSetup } from '@utils/bigNumberSetup';
import ChaiSetup from '@utils/chaiSetup';
import { getWeb3 } from '@utils/web3Helper';

import { CoreWrapper } from '@utils/wrappers/coreWrapper';

BigNumberSetup.configure();
ChaiSetup.configure();
const web3 = getWeb3();
Expand Down
5 changes: 3 additions & 2 deletions test/contracts/core/lib/orderLibrary.spec.ts
Expand Up @@ -17,14 +17,15 @@ import {
TransferProxyContract,
VaultContract
} from '@utils/contracts';
import { CoreWrapper } from '@utils/coreWrapper';
import { Blockchain } from '@utils/blockchain';
import { ether } from '@utils/units';
import { BigNumberSetup } from '@utils/bigNumberSetup';
import { expectRevertError } from '@utils/tokenAssertions';
import ChaiSetup from '@utils/chaiSetup';
import { getWeb3 } from '@utils/web3Helper';
import { ERC20Wrapper } from '@utils/erc20Wrapper';

import { CoreWrapper } from '@utils/wrappers/coreWrapper';
import { ERC20Wrapper } from '@utils/wrappers/erc20Wrapper';

BigNumberSetup.configure();
ChaiSetup.configure();
Expand Down
3 changes: 2 additions & 1 deletion test/contracts/core/lib/signatureValidator.spec.ts
Expand Up @@ -4,7 +4,6 @@ import { BigNumber } from 'bignumber.js';
import { Address } from 'set-protocol-utils';

import { SignatureValidatorContract } from '@utils/contracts';
import { CoreWrapper } from '@utils/coreWrapper';
import { generateFillOrderParameters } from '@utils/orders';
import { Blockchain } from '@utils/blockchain';
import { ether } from '@utils/units';
Expand All @@ -13,6 +12,8 @@ import { expectRevertError, expectNoRevertError } from '@utils/tokenAssertions';
import ChaiSetup from '@utils/chaiSetup';
import { getWeb3 } from '@utils/web3Helper';

import { CoreWrapper } from '@utils/wrappers/coreWrapper';

BigNumberSetup.configure();
ChaiSetup.configure();
const web3 = getWeb3();
Expand Down
7 changes: 4 additions & 3 deletions test/contracts/core/modules/issuanceOrderModule.spec.ts
Expand Up @@ -32,12 +32,13 @@ import { assertTokenBalanceAsync, expectRevertError } from '@utils/tokenAssertio
import { Blockchain } from '@utils/blockchain';
import { DEFAULT_GAS, DEPLOYED_TOKEN_QUANTITY, KYBER_RESERVE_CONFIGURED_RATE } from '@utils/constants';
import { getExpectedFillLog, getExpectedCancelLog } from '@utils/contract_logs/issuanceOrderModule';
import { ExchangeWrapper } from '@utils/exchangeWrapper';
import { generateOrdersDataWithIncorrectExchange } from '@utils/orders';
import { CoreWrapper } from '@utils/coreWrapper';
import { ERC20Wrapper } from '@utils/erc20Wrapper';
import { getWeb3 } from '@utils/web3Helper';

import { ExchangeWrapper } from '@utils/wrappers/exchangeWrapper';
import { CoreWrapper } from '@utils/wrappers/coreWrapper';
import { ERC20Wrapper } from '@utils/wrappers/erc20Wrapper';

BigNumberSetup.configure();
ChaiSetup.configure();
const web3 = getWeb3();
Expand Down
7 changes: 4 additions & 3 deletions test/contracts/core/modules/rebalanceAuctionModule.spec.ts
Expand Up @@ -30,12 +30,13 @@ import {
} from '@utils/constants';
import { expectRevertError } from '@utils/tokenAssertions';
import { Blockchain } from '@utils/blockchain';
import { CoreWrapper } from '@utils/coreWrapper';
import { ERC20Wrapper } from '@utils/erc20Wrapper';
import { RebalancingWrapper } from '@utils/rebalancingWrapper';
import { getWeb3 } from '@utils/web3Helper';
import { BidPlaced } from '@utils/contract_logs/rebalanceAuctionModule';

import { CoreWrapper } from '@utils/wrappers/coreWrapper';
import { ERC20Wrapper } from '@utils/wrappers/erc20Wrapper';
import { RebalancingWrapper } from '@utils/wrappers/rebalancingWrapper';

BigNumberSetup.configure();
ChaiSetup.configure();
const web3 = getWeb3();
Expand Down
7 changes: 4 additions & 3 deletions test/contracts/core/rebalancingSetToken.spec.ts
Expand Up @@ -39,11 +39,12 @@ import {
getExpectedRebalanceStartedLog,
} from '@utils/contract_logs/rebalancingSetToken';
import { expectRevertError, assertTokenBalanceAsync } from '@utils/tokenAssertions';
import { CoreWrapper } from '@utils/coreWrapper';
import { ERC20Wrapper } from '@utils/erc20Wrapper';
import { RebalancingWrapper } from '@utils/rebalancingWrapper';
import { getWeb3 } from '@utils/web3Helper';

import { CoreWrapper } from '@utils/wrappers/coreWrapper';
import { ERC20Wrapper } from '@utils/wrappers/erc20Wrapper';
import { RebalancingWrapper } from '@utils/wrappers/rebalancingWrapper';

BigNumberSetup.configure();
ChaiSetup.configure();
const web3 = getWeb3();
Expand Down
7 changes: 4 additions & 3 deletions test/contracts/core/rebalancingSetTokenFactory.spec.ts
Expand Up @@ -24,11 +24,12 @@ import { ether } from '@utils/units';
import { expectRevertError } from '@utils/tokenAssertions';
import { Blockchain } from '@utils/blockchain';
import { ZERO } from '@utils/constants';
import { CoreWrapper } from '@utils/coreWrapper';
import { ERC20Wrapper } from '@utils/erc20Wrapper';
import { RebalancingWrapper } from '@utils/rebalancingWrapper';
import { getWeb3 } from '@utils/web3Helper';

import { CoreWrapper } from '@utils/wrappers/coreWrapper';
import { ERC20Wrapper } from '@utils/wrappers/erc20Wrapper';
import { RebalancingWrapper } from '@utils/wrappers/rebalancingWrapper';

BigNumberSetup.configure();
ChaiSetup.configure();
const web3 = getWeb3();
Expand Down
5 changes: 3 additions & 2 deletions test/contracts/core/setToken.spec.ts
Expand Up @@ -15,10 +15,11 @@ import { assertTokenBalanceAsync, expectRevertError } from '@utils/tokenAssertio
import { Blockchain } from '@utils/blockchain';
import { STANDARD_COMPONENT_UNIT, STANDARD_NATURAL_UNIT, ZERO } from '@utils/constants';
import { getExpectedTransferLog } from '@utils/contract_logs/setToken';
import { CoreWrapper } from '@utils/coreWrapper';
import { ERC20Wrapper } from '@utils/erc20Wrapper';
import { getWeb3 } from '@utils/web3Helper';

import { CoreWrapper } from '@utils/wrappers/coreWrapper';
import { ERC20Wrapper } from '@utils/wrappers/erc20Wrapper';

BigNumberSetup.configure();
ChaiSetup.configure();
const web3 = getWeb3();
Expand Down
5 changes: 3 additions & 2 deletions test/contracts/core/setTokenFactory.spec.ts
Expand Up @@ -20,10 +20,11 @@ import {
import { expectRevertError } from '@utils/tokenAssertions';
import { Blockchain } from '@utils/blockchain';
import { ZERO, STANDARD_NATURAL_UNIT } from '@utils/constants';
import { CoreWrapper } from '@utils/coreWrapper';
import { ERC20Wrapper } from '@utils/erc20Wrapper';
import { getWeb3 } from '@utils/web3Helper';

import { CoreWrapper } from '@utils/wrappers/coreWrapper';
import { ERC20Wrapper } from '@utils/wrappers/erc20Wrapper';

BigNumberSetup.configure();
ChaiSetup.configure();
const web3 = getWeb3();
Expand Down
5 changes: 3 additions & 2 deletions test/contracts/core/transferProxy.spec.ts
Expand Up @@ -23,10 +23,11 @@ import {
} from '@utils/tokenAssertions';
import { Blockchain } from '@utils/blockchain';
import { DEPLOYED_TOKEN_QUANTITY, UNLIMITED_ALLOWANCE_IN_BASE_UNITS, ZERO } from '@utils/constants';
import { CoreWrapper } from '@utils/coreWrapper';
import { ERC20Wrapper } from '@utils/erc20Wrapper';
import { getWeb3 } from '@utils/web3Helper';

import { CoreWrapper } from '@utils/wrappers/coreWrapper';
import { ERC20Wrapper } from '@utils/wrappers/erc20Wrapper';

BigNumberSetup.configure();
ChaiSetup.configure();
const web3 = getWeb3();
Expand Down
5 changes: 3 additions & 2 deletions test/contracts/core/vault.spec.ts
Expand Up @@ -18,10 +18,11 @@ import {
import { assertTokenBalanceAsync, expectRevertError } from '@utils/tokenAssertions';
import { Blockchain } from '@utils/blockchain';
import { DEPLOYED_TOKEN_QUANTITY, ZERO } from '@utils/constants';
import { CoreWrapper } from '@utils/coreWrapper';
import { ERC20Wrapper } from '@utils/erc20Wrapper';
import { getWeb3 } from '@utils/web3Helper';

import { CoreWrapper } from '@utils/wrappers/coreWrapper';
import { ERC20Wrapper } from '@utils/wrappers/erc20Wrapper';

BigNumberSetup.configure();
ChaiSetup.configure();
const web3 = getWeb3();
Expand Down
3 changes: 2 additions & 1 deletion test/contracts/lib/authorizable.spec.ts
Expand Up @@ -11,9 +11,10 @@ import { BigNumberSetup } from '@utils/bigNumberSetup';
import { AuthorizableContract } from '@utils/contracts';
import { getExpectedAddAuthorizedLog, getExpectedRemoveAuthorizedLog } from '@utils/contract_logs/authorizable';
import { expectRevertError } from '@utils/tokenAssertions';
import { CoreWrapper } from '@utils/coreWrapper';
import { getWeb3 } from '@utils/web3Helper';

import { CoreWrapper } from '@utils/wrappers/coreWrapper';

BigNumberSetup.configure();
ChaiSetup.configure();
const web3 = getWeb3();
Expand Down

0 comments on commit 672e1de

Please sign in to comment.