Skip to content
This repository was archived by the owner on Jan 18, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
169 changes: 0 additions & 169 deletions test/contracts/core/extensions/coreIssuanceOrderScenarios.ts

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -2,38 +2,24 @@ import * as chai from 'chai';
import { BigNumber } from 'bignumber.js';
import { SetProtocolUtils } from 'set-protocol-utils';

// Types
import { Bytes32, Bytes } from '../../../../../types/common.js';
import { ZeroExOrder } from '../../../../../types/zeroEx';

// Contract types
import { ZeroExOrderDataHandlerMockContract } from '../../../../../types/generated/zero_ex_order_data_handler_mock';

// Artifacts
const ZeroExOrderDataHandlerMock = artifacts.require('ZeroExOrderDataHandlerMock');

import ChaiSetup from '../../../../utils/chaiSetup';
import { BigNumberSetup } from '../../../../utils/bigNumberSetup';
import { ZeroExOrderDataHandlerMockContract } from '../../../../utils/contracts';
import {
bufferZeroExOrder,
createZeroExOrder,
generateStandardZeroExOrderBytesArray,
generateERC20TokenAssetData,
} from '../../../../../utils/zeroExExchangeWrapper';
generateERC20TokenAssetData
} from '../../../../utils/zeroExExchangeWrapper';
import { expectRevertError } from '../../../../utils/tokenAssertions';
import { Bytes32, Bytes } from '../../../../types/common.js';
import { ZeroExOrder } from '../../../../types/zeroEx';
import { LibraryMockWrapper } from '../../../../utils/libraryMockWrapper';

// Testing Set up
import { BigNumberSetup } from '../../../../../utils/bigNumberSetup';
import ChaiSetup from '../../../../../utils/chaiSetup';
BigNumberSetup.configure();
ChaiSetup.configure();
const { expect } = chai;

import {
expectRevertError,
} from '../../../../../utils/tokenAssertions';

import {
DEFAULT_GAS,
} from '../../../../../utils/constants';


contract('ZeroExOrderDataHandlerMock', accounts => {
const [
Expand All @@ -44,6 +30,8 @@ contract('ZeroExOrderDataHandlerMock', accounts => {
makerTokenAddress,
takerTokenAddress,
] = accounts;

const libraryMockWrapper: LibraryMockWrapper = new LibraryMockWrapper(ownerAccount);
let zeroExExchangeWrapper: ZeroExOrderDataHandlerMockContract;

// Signature
Expand Down Expand Up @@ -78,14 +66,7 @@ contract('ZeroExOrderDataHandlerMock', accounts => {
);

beforeEach(async () => {
const zeroExExchangeWrapperInstance = await ZeroExOrderDataHandlerMock.new(
{ from: ownerAccount, gas: DEFAULT_GAS },
);

zeroExExchangeWrapper = new ZeroExOrderDataHandlerMockContract(
web3.eth.contract(zeroExExchangeWrapperInstance.abi).at(zeroExExchangeWrapperInstance.address),
{ from: ownerAccount },
);
zeroExExchangeWrapper = await libraryMockWrapper.deployZeroExOrderDataHandlerLibraryAsync();
});

describe('#parseOrderDataHeader', async () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,38 +1,29 @@
import * as chai from 'chai';
import * as _ from 'lodash';

import * as chai from 'chai';
import { BigNumber } from 'bignumber.js';

// Types
import { Address, Bytes } from '../../../../types/common.js';

// Contract types
import { StandardTokenMockContract } from '../../../../types/generated/standard_token_mock';
import { TakerWalletWrapperContract } from '../../../../types/generated/taker_wallet_wrapper';
import { TransferProxyContract } from '../../../../types/generated/transfer_proxy';

// Wrappers
import { CoreWrapper } from '../../../../utils/coreWrapper';
import { ERC20Wrapper } from '../../../../utils/erc20Wrapper';
import { ExchangeWrapper } from '../../../../utils/exchangeWrapper';
import { generateTakerWalletOrders } from '../../../../utils/orders';

// Testing Set up
import { BigNumberSetup } from '../../../../utils/bigNumberSetup';
import ChaiSetup from '../../../../utils/chaiSetup';
BigNumberSetup.configure();
ChaiSetup.configure();
const { expect } = chai;

import ChaiSetup from '../../../utils/chaiSetup';
import { BigNumberSetup } from '../../../utils/bigNumberSetup';
import {
StandardTokenMockContract,
TakerWalletWrapperContract,
TransferProxyContract
} from '../../../utils/contracts';
import { Address, Bytes } from '../../../types/common.js';
import { CoreWrapper } from '../../../utils/coreWrapper';
import { ERC20Wrapper } from '../../../utils/erc20Wrapper';
import { ExchangeWrapper } from '../../../utils/exchangeWrapper';
import { generateTakerWalletOrders } from '../../../utils/orders';
import {
DEFAULT_GAS,
DEPLOYED_TOKEN_QUANTITY,
UNLIMITED_ALLOWANCE_IN_BASE_UNITS,
} from '../../../../utils/constants';
} from '../../../utils/constants';
import { expectRevertError } from '../../../utils/tokenAssertions';

import {
expectRevertError,
} from '../../../../utils/tokenAssertions';
BigNumberSetup.configure();
ChaiSetup.configure();
const { expect } = chai;


contract('TakerWalletWrapper', accounts => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,29 +7,29 @@ import * as ABIDecoder from "abi-decoder";
import { BigNumber } from "bignumber.js";

// Types
import { Address, Bytes32, Log, UInt } from "../../../../types/common.js";
import { ZeroExOrderHeader, ZeroExOrder } from "../../../../types/zeroEx";
import { Address, Bytes32, Log, UInt } from "../../../types/common.js";
import { ZeroExOrderHeader, ZeroExOrder } from "../../../types/zeroEx";

// Contract types
import { ZeroExExchangeWrapperContract } from "../../../../types/generated/zero_ex_exchange_wrapper";
import { ZeroExExchangeWrapperContract } from "../../../types/generated/zero_ex_exchange_wrapper";

// Artifacts
const ZeroExExchangeWrapper = artifacts.require("ZeroExExchangeWrapper");

import {
createZeroExOrder,
} from "../../../../utils/zeroExExchangeWrapper";
} from "../../../utils/zeroExExchangeWrapper";

// Testing Set up
import { BigNumberSetup } from "../../../../utils/bigNumberSetup";
import ChaiSetup from "../../../../utils/chaiSetup";
import { BigNumberSetup } from "../../../utils/bigNumberSetup";
import ChaiSetup from "../../../utils/chaiSetup";
BigNumberSetup.configure();
ChaiSetup.configure();
const { expect, assert } = chai;

import {
DEFAULT_GAS,
} from "../../../../utils/constants";
} from "../../../utils/constants";

contract("ZeroExExchangeWrapper", (accounts) => {
const [ownerAccount, takerAddress, feeRecipientAddress, senderAddress] = accounts;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,38 +1,26 @@
import * as chai from 'chai';
import * as _ from 'lodash';

import * as chai from 'chai';
import { BigNumber } from 'bignumber.js';

// Types
import { Address } from '../../../../types/common.js';

// Contract types
import { CoreContract } from '../../../../types/generated/core';
import { SetTokenFactoryContract } from '../../../../types/generated/set_token_factory';
import { StandardTokenMockContract } from '../../../../types/generated/standard_token_mock';
import { TransferProxyContract } from '../../../../types/generated/transfer_proxy';
import { VaultContract } from '../../../../types/generated/vault';

// Core wrapper
import { CoreWrapper } from '../../../../utils/coreWrapper';
import { ERC20Wrapper } from '../../../../utils/erc20Wrapper';
import ChaiSetup from '../../../utils/chaiSetup';
import { BigNumberSetup } from '../../../utils/bigNumberSetup';
import {
CoreContract,
SetTokenFactoryContract,
StandardTokenMockContract,
TransferProxyContract,
VaultContract
} from '../../../utils/contracts';
import { Address } from '../../../types/common.js';
import { assertTokenBalance, expectRevertError } from '../../../utils/tokenAssertions';
import { DEPLOYED_TOKEN_QUANTITY, UNLIMITED_ALLOWANCE_IN_BASE_UNITS } from '../../../utils/constants';
import { CoreWrapper } from '../../../utils/coreWrapper';
import { ERC20Wrapper } from '../../../utils/erc20Wrapper';

// Testing Set up
import { BigNumberSetup } from '../../../../utils/bigNumberSetup';
import ChaiSetup from '../../../../utils/chaiSetup';
BigNumberSetup.configure();
ChaiSetup.configure();
const { expect } = chai;

import {
assertTokenBalance,
expectRevertError,
} from '../../../../utils/tokenAssertions';

import {
DEPLOYED_TOKEN_QUANTITY,
UNLIMITED_ALLOWANCE_IN_BASE_UNITS,
} from '../../../../utils/constants';

contract('CoreAccounting', accounts => {
const [
Expand Down
Loading