Introduce publicFacingContracts config in all package.jsons, refactor all imports from src in contracts packages
This commit is contained in:
parent
bc1dca3f6f
commit
86b76a3e75
@ -36,6 +36,7 @@
|
||||
"compile:truffle": "truffle compile"
|
||||
},
|
||||
"config": {
|
||||
"publicInterfaceContracts": "ERC1155Proxy,ERC20Proxy,ERC721Proxy,MultiAssetProxy,StaticCallProxy,ERC20BridgeProxy,Eth2DaiBridge,IAssetData,IAssetProxy,UniswapBridge,TestStaticCallTarget",
|
||||
"abis": "./test/generated-artifacts/@(ERC1155Proxy|ERC20BridgeProxy|ERC20Proxy|ERC721Proxy|Eth2DaiBridge|IAssetData|IAssetProxy|IAssetProxyDispatcher|IAuthorizable|IERC20Bridge|IEth2Dai|IUniswapExchange|IUniswapExchangeFactory|MixinAssetProxyDispatcher|MixinAuthorizable|MultiAssetProxy|Ownable|StaticCallProxy|TestERC20Bridge|TestEth2DaiBridge|TestStaticCallTarget|TestUniswapBridge|UniswapBridge).json",
|
||||
"abis:comment": "This list is auto-generated by contracts-gen. Don't edit manually."
|
||||
},
|
||||
|
@ -12,44 +12,20 @@ import * as ERC721Proxy from '../generated-artifacts/ERC721Proxy.json';
|
||||
import * as Eth2DaiBridge from '../generated-artifacts/Eth2DaiBridge.json';
|
||||
import * as IAssetData from '../generated-artifacts/IAssetData.json';
|
||||
import * as IAssetProxy from '../generated-artifacts/IAssetProxy.json';
|
||||
import * as IAssetProxyDispatcher from '../generated-artifacts/IAssetProxyDispatcher.json';
|
||||
import * as IAuthorizable from '../generated-artifacts/IAuthorizable.json';
|
||||
import * as IERC20Bridge from '../generated-artifacts/IERC20Bridge.json';
|
||||
import * as IEth2Dai from '../generated-artifacts/IEth2Dai.json';
|
||||
import * as IUniswapExchange from '../generated-artifacts/IUniswapExchange.json';
|
||||
import * as IUniswapExchangeFactory from '../generated-artifacts/IUniswapExchangeFactory.json';
|
||||
import * as MixinAssetProxyDispatcher from '../generated-artifacts/MixinAssetProxyDispatcher.json';
|
||||
import * as MixinAuthorizable from '../generated-artifacts/MixinAuthorizable.json';
|
||||
import * as MultiAssetProxy from '../generated-artifacts/MultiAssetProxy.json';
|
||||
import * as Ownable from '../generated-artifacts/Ownable.json';
|
||||
import * as StaticCallProxy from '../generated-artifacts/StaticCallProxy.json';
|
||||
import * as TestERC20Bridge from '../generated-artifacts/TestERC20Bridge.json';
|
||||
import * as TestEth2DaiBridge from '../generated-artifacts/TestEth2DaiBridge.json';
|
||||
import * as TestStaticCallTarget from '../generated-artifacts/TestStaticCallTarget.json';
|
||||
import * as TestUniswapBridge from '../generated-artifacts/TestUniswapBridge.json';
|
||||
import * as UniswapBridge from '../generated-artifacts/UniswapBridge.json';
|
||||
export const artifacts = {
|
||||
MixinAssetProxyDispatcher: MixinAssetProxyDispatcher as ContractArtifact,
|
||||
MixinAuthorizable: MixinAuthorizable as ContractArtifact,
|
||||
Ownable: Ownable as ContractArtifact,
|
||||
ERC1155Proxy: ERC1155Proxy as ContractArtifact,
|
||||
ERC20BridgeProxy: ERC20BridgeProxy as ContractArtifact,
|
||||
ERC20Proxy: ERC20Proxy as ContractArtifact,
|
||||
ERC721Proxy: ERC721Proxy as ContractArtifact,
|
||||
MultiAssetProxy: MultiAssetProxy as ContractArtifact,
|
||||
StaticCallProxy: StaticCallProxy as ContractArtifact,
|
||||
ERC20BridgeProxy: ERC20BridgeProxy as ContractArtifact,
|
||||
Eth2DaiBridge: Eth2DaiBridge as ContractArtifact,
|
||||
UniswapBridge: UniswapBridge as ContractArtifact,
|
||||
IAssetData: IAssetData as ContractArtifact,
|
||||
IAssetProxy: IAssetProxy as ContractArtifact,
|
||||
IAssetProxyDispatcher: IAssetProxyDispatcher as ContractArtifact,
|
||||
IAuthorizable: IAuthorizable as ContractArtifact,
|
||||
IERC20Bridge: IERC20Bridge as ContractArtifact,
|
||||
IEth2Dai: IEth2Dai as ContractArtifact,
|
||||
IUniswapExchange: IUniswapExchange as ContractArtifact,
|
||||
IUniswapExchangeFactory: IUniswapExchangeFactory as ContractArtifact,
|
||||
TestERC20Bridge: TestERC20Bridge as ContractArtifact,
|
||||
TestEth2DaiBridge: TestEth2DaiBridge as ContractArtifact,
|
||||
UniswapBridge: UniswapBridge as ContractArtifact,
|
||||
TestStaticCallTarget: TestStaticCallTarget as ContractArtifact,
|
||||
TestUniswapBridge: TestUniswapBridge as ContractArtifact,
|
||||
};
|
||||
|
@ -10,19 +10,7 @@ export * from '../generated-wrappers/erc721_proxy';
|
||||
export * from '../generated-wrappers/eth2_dai_bridge';
|
||||
export * from '../generated-wrappers/i_asset_data';
|
||||
export * from '../generated-wrappers/i_asset_proxy';
|
||||
export * from '../generated-wrappers/i_asset_proxy_dispatcher';
|
||||
export * from '../generated-wrappers/i_authorizable';
|
||||
export * from '../generated-wrappers/i_erc20_bridge';
|
||||
export * from '../generated-wrappers/i_eth2_dai';
|
||||
export * from '../generated-wrappers/i_uniswap_exchange';
|
||||
export * from '../generated-wrappers/i_uniswap_exchange_factory';
|
||||
export * from '../generated-wrappers/mixin_asset_proxy_dispatcher';
|
||||
export * from '../generated-wrappers/mixin_authorizable';
|
||||
export * from '../generated-wrappers/multi_asset_proxy';
|
||||
export * from '../generated-wrappers/ownable';
|
||||
export * from '../generated-wrappers/static_call_proxy';
|
||||
export * from '../generated-wrappers/test_erc20_bridge';
|
||||
export * from '../generated-wrappers/test_eth2_dai_bridge';
|
||||
export * from '../generated-wrappers/test_static_call_target';
|
||||
export * from '../generated-wrappers/test_uniswap_bridge';
|
||||
export * from '../generated-wrappers/uniswap_bridge';
|
||||
|
@ -5,7 +5,9 @@ import { BigNumber } from '@0x/utils';
|
||||
import * as chai from 'chai';
|
||||
import * as _ from 'lodash';
|
||||
|
||||
import { artifacts, MixinAuthorizableContract } from '../src';
|
||||
import { artifacts } from './artifacts';
|
||||
|
||||
import { MixinAuthorizableContract } from './wrappers';
|
||||
|
||||
chaiSetup.configure();
|
||||
const expect = chai.expect;
|
||||
|
@ -23,7 +23,10 @@ import { LogWithDecodedArgs } from 'ethereum-types';
|
||||
import * as ethUtil from 'ethereumjs-util';
|
||||
import * as _ from 'lodash';
|
||||
|
||||
import { artifacts, ERC1155ProxyContract, ERC1155ProxyWrapper, IAssetDataContract } from '../src';
|
||||
import { ERC1155ProxyContract, IAssetDataContract } from '../src/wrappers';
|
||||
|
||||
import { artifacts } from './artifacts';
|
||||
import { ERC1155ProxyWrapper } from './utils/erc1155_proxy_wrapper';
|
||||
|
||||
chaiSetup.configure();
|
||||
const expect = chai.expect;
|
||||
|
@ -14,12 +14,13 @@ import { AbiEncoder, AuthorizableRevertErrors, BigNumber, StringRevertError } fr
|
||||
import { DecodedLogs } from 'ethereum-types';
|
||||
import * as _ from 'lodash';
|
||||
|
||||
import { artifacts } from './artifacts';
|
||||
|
||||
import {
|
||||
artifacts,
|
||||
ERC20BridgeProxyContract,
|
||||
TestERC20BridgeBridgeWithdrawToEventArgs,
|
||||
TestERC20BridgeContract,
|
||||
} from '../src';
|
||||
} from './wrappers';
|
||||
|
||||
blockchainTests.resets('ERC20BridgeProxy unit tests', env => {
|
||||
const PROXY_ID = AssetProxyId.ERC20Bridge;
|
||||
|
@ -15,14 +15,15 @@ import { BigNumber, RawRevertError } from '@0x/utils';
|
||||
import { DecodedLogs } from 'ethereum-types';
|
||||
import * as _ from 'lodash';
|
||||
|
||||
import { artifacts } from './artifacts';
|
||||
|
||||
import {
|
||||
artifacts,
|
||||
TestEth2DaiBridgeContract,
|
||||
TestEth2DaiBridgeEvents,
|
||||
TestEth2DaiBridgeSellAllAmountEventArgs,
|
||||
TestEth2DaiBridgeTokenApproveEventArgs,
|
||||
TestEth2DaiBridgeTokenTransferEventArgs,
|
||||
} from '../src';
|
||||
} from './wrappers';
|
||||
|
||||
blockchainTests.resets('Eth2DaiBridge unit tests', env => {
|
||||
const txHelper = new TransactionHelper(env.web3Wrapper, artifacts);
|
||||
|
@ -29,18 +29,13 @@ import * as chai from 'chai';
|
||||
import { LogWithDecodedArgs } from 'ethereum-types';
|
||||
import * as _ from 'lodash';
|
||||
|
||||
import {
|
||||
artifacts,
|
||||
ERC1155ProxyContract,
|
||||
ERC1155ProxyWrapper,
|
||||
ERC20ProxyContract,
|
||||
ERC20Wrapper,
|
||||
ERC721ProxyContract,
|
||||
ERC721Wrapper,
|
||||
IAssetDataContract,
|
||||
IAssetProxyContract,
|
||||
MultiAssetProxyContract,
|
||||
} from '../src';
|
||||
import { ERC1155ProxyContract, ERC20ProxyContract, ERC721ProxyContract } from '../src/wrappers';
|
||||
|
||||
import { artifacts } from './artifacts';
|
||||
import { ERC1155ProxyWrapper } from './utils/erc1155_proxy_wrapper';
|
||||
import { ERC20Wrapper } from './utils/erc20_wrapper';
|
||||
import { ERC721Wrapper } from './utils/erc721_wrapper';
|
||||
import { IAssetDataContract, IAssetProxyContract, MultiAssetProxyContract } from './wrappers';
|
||||
|
||||
chaiSetup.configure();
|
||||
const expect = chai.expect;
|
||||
|
@ -14,7 +14,9 @@ import { AbiEncoder, BigNumber } from '@0x/utils';
|
||||
import * as chai from 'chai';
|
||||
import * as ethUtil from 'ethereumjs-util';
|
||||
|
||||
import { artifacts, IAssetProxyContract, StaticCallProxyContract, TestStaticCallTargetContract } from '../src';
|
||||
import { artifacts } from './artifacts';
|
||||
|
||||
import { IAssetProxyContract, StaticCallProxyContract, TestStaticCallTargetContract } from './wrappers';
|
||||
|
||||
chaiSetup.configure();
|
||||
const expect = chai.expect;
|
||||
|
@ -16,8 +16,9 @@ import { BigNumber } from '@0x/utils';
|
||||
import { DecodedLogs } from 'ethereum-types';
|
||||
import * as _ from 'lodash';
|
||||
|
||||
import { artifacts } from './artifacts';
|
||||
|
||||
import {
|
||||
artifacts,
|
||||
TestUniswapBridgeContract,
|
||||
TestUniswapBridgeEthToTokenTransferInputEventArgs as EthToTokenTransferInputArgs,
|
||||
TestUniswapBridgeEvents as ContractEvents,
|
||||
@ -27,7 +28,7 @@ import {
|
||||
TestUniswapBridgeTokenTransferEventArgs as TokenTransferArgs,
|
||||
TestUniswapBridgeWethDepositEventArgs as WethDepositArgs,
|
||||
TestUniswapBridgeWethWithdrawEventArgs as WethWithdrawArgs,
|
||||
} from '../src';
|
||||
} from './wrappers';
|
||||
|
||||
blockchainTests.resets('UniswapBridge unit tests', env => {
|
||||
const txHelper = new TransactionHelper(env.web3Wrapper, artifacts);
|
||||
|
@ -13,7 +13,9 @@ import { Web3Wrapper } from '@0x/web3-wrapper';
|
||||
import { Provider, TransactionReceiptWithDecodedLogs } from 'ethereum-types';
|
||||
import * as _ from 'lodash';
|
||||
|
||||
import { artifacts, ERC1155ProxyContract, IAssetProxyContract } from '../../src';
|
||||
import { artifacts } from '../../src/artifacts';
|
||||
|
||||
import { ERC1155ProxyContract, IAssetProxyContract } from '../../src/wrappers';
|
||||
|
||||
export class ERC1155ProxyWrapper {
|
||||
private readonly _tokenOwnerAddresses: string[];
|
||||
|
@ -5,7 +5,9 @@ import { BigNumber } from '@0x/utils';
|
||||
import { ZeroExProvider } from 'ethereum-types';
|
||||
import * as _ from 'lodash';
|
||||
|
||||
import { artifacts, ERC20ProxyContract } from '../../src';
|
||||
import { artifacts } from '../../src/artifacts';
|
||||
|
||||
import { ERC20ProxyContract } from '../../src/wrappers';
|
||||
|
||||
export class ERC20Wrapper {
|
||||
private readonly _tokenOwnerAddresses: string[];
|
||||
|
@ -5,7 +5,9 @@ import { BigNumber } from '@0x/utils';
|
||||
import { ZeroExProvider } from 'ethereum-types';
|
||||
import * as _ from 'lodash';
|
||||
|
||||
import { artifacts, ERC721ProxyContract } from '../../src';
|
||||
import { artifacts } from '../../src/artifacts';
|
||||
|
||||
import { ERC721ProxyContract } from '../../src/wrappers';
|
||||
|
||||
export class ERC721Wrapper {
|
||||
private readonly _tokenOwnerAddresses: string[];
|
||||
|
@ -10,21 +10,9 @@
|
||||
"generated-artifacts/Eth2DaiBridge.json",
|
||||
"generated-artifacts/IAssetData.json",
|
||||
"generated-artifacts/IAssetProxy.json",
|
||||
"generated-artifacts/IAssetProxyDispatcher.json",
|
||||
"generated-artifacts/IAuthorizable.json",
|
||||
"generated-artifacts/IERC20Bridge.json",
|
||||
"generated-artifacts/IEth2Dai.json",
|
||||
"generated-artifacts/IUniswapExchange.json",
|
||||
"generated-artifacts/IUniswapExchangeFactory.json",
|
||||
"generated-artifacts/MixinAssetProxyDispatcher.json",
|
||||
"generated-artifacts/MixinAuthorizable.json",
|
||||
"generated-artifacts/MultiAssetProxy.json",
|
||||
"generated-artifacts/Ownable.json",
|
||||
"generated-artifacts/StaticCallProxy.json",
|
||||
"generated-artifacts/TestERC20Bridge.json",
|
||||
"generated-artifacts/TestEth2DaiBridge.json",
|
||||
"generated-artifacts/TestStaticCallTarget.json",
|
||||
"generated-artifacts/TestUniswapBridge.json",
|
||||
"generated-artifacts/UniswapBridge.json",
|
||||
"test/generated-artifacts/ERC1155Proxy.json",
|
||||
"test/generated-artifacts/ERC20BridgeProxy.json",
|
||||
|
@ -36,6 +36,7 @@
|
||||
"compile:truffle": "truffle compile"
|
||||
},
|
||||
"config": {
|
||||
"publicInterfaceContracts": "Coordinator,CoordinatorRegistry,LibCoordinatorApproval,LibCoordinatorRichErrors,LibEIP712CoordinatorDomain,LibConstants",
|
||||
"abis": "./test/generated-artifacts/@(Coordinator|CoordinatorRegistry|ICoordinatorApprovalVerifier|ICoordinatorCore|ICoordinatorRegistryCore|ICoordinatorSignatureValidator|LibConstants|LibCoordinatorApproval|LibCoordinatorRichErrors|LibEIP712CoordinatorDomain|MixinCoordinatorApprovalVerifier|MixinCoordinatorCore|MixinCoordinatorRegistryCore|MixinSignatureValidator).json",
|
||||
"abis:comment": "This list is auto-generated by contracts-gen. Don't edit manually."
|
||||
},
|
||||
|
@ -7,31 +7,15 @@ import { ContractArtifact } from 'ethereum-types';
|
||||
|
||||
import * as Coordinator from '../generated-artifacts/Coordinator.json';
|
||||
import * as CoordinatorRegistry from '../generated-artifacts/CoordinatorRegistry.json';
|
||||
import * as ICoordinatorApprovalVerifier from '../generated-artifacts/ICoordinatorApprovalVerifier.json';
|
||||
import * as ICoordinatorCore from '../generated-artifacts/ICoordinatorCore.json';
|
||||
import * as ICoordinatorRegistryCore from '../generated-artifacts/ICoordinatorRegistryCore.json';
|
||||
import * as ICoordinatorSignatureValidator from '../generated-artifacts/ICoordinatorSignatureValidator.json';
|
||||
import * as LibConstants from '../generated-artifacts/LibConstants.json';
|
||||
import * as LibCoordinatorApproval from '../generated-artifacts/LibCoordinatorApproval.json';
|
||||
import * as LibCoordinatorRichErrors from '../generated-artifacts/LibCoordinatorRichErrors.json';
|
||||
import * as LibEIP712CoordinatorDomain from '../generated-artifacts/LibEIP712CoordinatorDomain.json';
|
||||
import * as MixinCoordinatorApprovalVerifier from '../generated-artifacts/MixinCoordinatorApprovalVerifier.json';
|
||||
import * as MixinCoordinatorCore from '../generated-artifacts/MixinCoordinatorCore.json';
|
||||
import * as MixinCoordinatorRegistryCore from '../generated-artifacts/MixinCoordinatorRegistryCore.json';
|
||||
import * as MixinSignatureValidator from '../generated-artifacts/MixinSignatureValidator.json';
|
||||
export const artifacts = {
|
||||
Coordinator: Coordinator as ContractArtifact,
|
||||
MixinCoordinatorApprovalVerifier: MixinCoordinatorApprovalVerifier as ContractArtifact,
|
||||
MixinCoordinatorCore: MixinCoordinatorCore as ContractArtifact,
|
||||
MixinSignatureValidator: MixinSignatureValidator as ContractArtifact,
|
||||
ICoordinatorApprovalVerifier: ICoordinatorApprovalVerifier as ContractArtifact,
|
||||
ICoordinatorCore: ICoordinatorCore as ContractArtifact,
|
||||
ICoordinatorSignatureValidator: ICoordinatorSignatureValidator as ContractArtifact,
|
||||
LibConstants: LibConstants as ContractArtifact,
|
||||
CoordinatorRegistry: CoordinatorRegistry as ContractArtifact,
|
||||
LibCoordinatorApproval: LibCoordinatorApproval as ContractArtifact,
|
||||
LibCoordinatorRichErrors: LibCoordinatorRichErrors as ContractArtifact,
|
||||
LibEIP712CoordinatorDomain: LibEIP712CoordinatorDomain as ContractArtifact,
|
||||
CoordinatorRegistry: CoordinatorRegistry as ContractArtifact,
|
||||
MixinCoordinatorRegistryCore: MixinCoordinatorRegistryCore as ContractArtifact,
|
||||
ICoordinatorRegistryCore: ICoordinatorRegistryCore as ContractArtifact,
|
||||
LibConstants: LibConstants as ContractArtifact,
|
||||
};
|
||||
|
@ -5,15 +5,7 @@
|
||||
*/
|
||||
export * from '../generated-wrappers/coordinator';
|
||||
export * from '../generated-wrappers/coordinator_registry';
|
||||
export * from '../generated-wrappers/i_coordinator_approval_verifier';
|
||||
export * from '../generated-wrappers/i_coordinator_core';
|
||||
export * from '../generated-wrappers/i_coordinator_registry_core';
|
||||
export * from '../generated-wrappers/i_coordinator_signature_validator';
|
||||
export * from '../generated-wrappers/lib_constants';
|
||||
export * from '../generated-wrappers/lib_coordinator_approval';
|
||||
export * from '../generated-wrappers/lib_coordinator_rich_errors';
|
||||
export * from '../generated-wrappers/lib_e_i_p712_coordinator_domain';
|
||||
export * from '../generated-wrappers/mixin_coordinator_approval_verifier';
|
||||
export * from '../generated-wrappers/mixin_coordinator_core';
|
||||
export * from '../generated-wrappers/mixin_coordinator_registry_core';
|
||||
export * from '../generated-wrappers/mixin_signature_validator';
|
||||
|
@ -1,6 +1,8 @@
|
||||
import { blockchainTests, expect, verifyEvents } from '@0x/contracts-test-utils';
|
||||
|
||||
import { artifacts, CoordinatorRegistryContract, CoordinatorRegistryCoordinatorEndpointSetEventArgs } from '../src';
|
||||
import { artifacts } from './artifacts';
|
||||
|
||||
import { CoordinatorRegistryContract, CoordinatorRegistryCoordinatorEndpointSetEventArgs } from './wrappers';
|
||||
|
||||
// tslint:disable:no-unnecessary-type-assertion
|
||||
blockchainTests.resets('Coordinator Registry tests', env => {
|
||||
|
@ -2,7 +2,11 @@ import { blockchainTests, constants, expect, randomAddress } from '@0x/contracts
|
||||
import { transactionHashUtils } from '@0x/order-utils';
|
||||
import { BigNumber } from '@0x/utils';
|
||||
|
||||
import { artifacts, CoordinatorContract, hashUtils } from '../src';
|
||||
import { hashUtils } from './utils/hash_utils';
|
||||
|
||||
import { artifacts } from './artifacts';
|
||||
|
||||
import { CoordinatorContract } from './wrappers';
|
||||
|
||||
blockchainTests.resets('Libs tests', env => {
|
||||
let coordinatorContract: CoordinatorContract;
|
||||
|
@ -13,7 +13,11 @@ import { CoordinatorRevertErrors, transactionHashUtils } from '@0x/order-utils';
|
||||
import { SignatureType, SignedOrder } from '@0x/types';
|
||||
import { BigNumber, LibBytesRevertErrors } from '@0x/utils';
|
||||
|
||||
import { ApprovalFactory, artifacts, CoordinatorContract } from '../src';
|
||||
import { ApprovalFactory } from './utils/approval_factory';
|
||||
|
||||
import { artifacts } from './artifacts';
|
||||
|
||||
import { CoordinatorContract } from './wrappers';
|
||||
|
||||
blockchainTests.resets('Mixins tests', env => {
|
||||
let chainId: number;
|
||||
|
@ -5,18 +5,10 @@
|
||||
"files": [
|
||||
"generated-artifacts/Coordinator.json",
|
||||
"generated-artifacts/CoordinatorRegistry.json",
|
||||
"generated-artifacts/ICoordinatorApprovalVerifier.json",
|
||||
"generated-artifacts/ICoordinatorCore.json",
|
||||
"generated-artifacts/ICoordinatorRegistryCore.json",
|
||||
"generated-artifacts/ICoordinatorSignatureValidator.json",
|
||||
"generated-artifacts/LibConstants.json",
|
||||
"generated-artifacts/LibCoordinatorApproval.json",
|
||||
"generated-artifacts/LibCoordinatorRichErrors.json",
|
||||
"generated-artifacts/LibEIP712CoordinatorDomain.json",
|
||||
"generated-artifacts/MixinCoordinatorApprovalVerifier.json",
|
||||
"generated-artifacts/MixinCoordinatorCore.json",
|
||||
"generated-artifacts/MixinCoordinatorRegistryCore.json",
|
||||
"generated-artifacts/MixinSignatureValidator.json",
|
||||
"test/generated-artifacts/Coordinator.json",
|
||||
"test/generated-artifacts/CoordinatorRegistry.json",
|
||||
"test/generated-artifacts/ICoordinatorApprovalVerifier.json",
|
||||
|
@ -24,6 +24,7 @@
|
||||
"compile:truffle": "truffle compile"
|
||||
},
|
||||
"config": {
|
||||
"publicInterfaceContracts": "DevUtils,LibAssetData,LibTransactionDecoder",
|
||||
"abis": "./test/generated-artifacts/@(DevUtils|EthBalanceChecker|LibAssetData|LibTransactionDecoder|OrderTransferSimulationUtils|OrderValidationUtils).json",
|
||||
"abis:comment": "This list is auto-generated by contracts-gen. Don't edit manually."
|
||||
},
|
||||
|
@ -6,16 +6,10 @@
|
||||
import { ContractArtifact } from 'ethereum-types';
|
||||
|
||||
import * as DevUtils from '../generated-artifacts/DevUtils.json';
|
||||
import * as EthBalanceChecker from '../generated-artifacts/EthBalanceChecker.json';
|
||||
import * as LibAssetData from '../generated-artifacts/LibAssetData.json';
|
||||
import * as LibTransactionDecoder from '../generated-artifacts/LibTransactionDecoder.json';
|
||||
import * as OrderTransferSimulationUtils from '../generated-artifacts/OrderTransferSimulationUtils.json';
|
||||
import * as OrderValidationUtils from '../generated-artifacts/OrderValidationUtils.json';
|
||||
export const artifacts = {
|
||||
DevUtils: DevUtils as ContractArtifact,
|
||||
EthBalanceChecker: EthBalanceChecker as ContractArtifact,
|
||||
LibAssetData: LibAssetData as ContractArtifact,
|
||||
LibTransactionDecoder: LibTransactionDecoder as ContractArtifact,
|
||||
OrderTransferSimulationUtils: OrderTransferSimulationUtils as ContractArtifact,
|
||||
OrderValidationUtils: OrderValidationUtils as ContractArtifact,
|
||||
};
|
||||
|
@ -4,8 +4,5 @@
|
||||
* -----------------------------------------------------------------------------
|
||||
*/
|
||||
export * from '../generated-wrappers/dev_utils';
|
||||
export * from '../generated-wrappers/eth_balance_checker';
|
||||
export * from '../generated-wrappers/lib_asset_data';
|
||||
export * from '../generated-wrappers/lib_transaction_decoder';
|
||||
export * from '../generated-wrappers/order_transfer_simulation_utils';
|
||||
export * from '../generated-wrappers/order_validation_utils';
|
||||
|
@ -4,11 +4,8 @@
|
||||
"include": ["./src/**/*", "./test/**/*", "./generated-wrappers/**/*"],
|
||||
"files": [
|
||||
"generated-artifacts/DevUtils.json",
|
||||
"generated-artifacts/EthBalanceChecker.json",
|
||||
"generated-artifacts/LibAssetData.json",
|
||||
"generated-artifacts/LibTransactionDecoder.json",
|
||||
"generated-artifacts/OrderTransferSimulationUtils.json",
|
||||
"generated-artifacts/OrderValidationUtils.json",
|
||||
"test/generated-artifacts/DevUtils.json",
|
||||
"test/generated-artifacts/EthBalanceChecker.json",
|
||||
"test/generated-artifacts/LibAssetData.json",
|
||||
|
@ -36,6 +36,7 @@
|
||||
"compile:truffle": "truffle compile"
|
||||
},
|
||||
"config": {
|
||||
"publicInterfaceContracts": "ERC1155,ERC1155Mintable,IERC1155Receiver,DummyERC1155Receiver",
|
||||
"abis": "./test/generated-artifacts/@(DummyERC1155Receiver|ERC1155|ERC1155Mintable|IERC1155|IERC1155Mintable|IERC1155Receiver|MixinNonFungibleToken).json",
|
||||
"abis:comment": "This list is auto-generated by contracts-gen. Don't edit manually."
|
||||
},
|
||||
|
@ -8,16 +8,10 @@ import { ContractArtifact } from 'ethereum-types';
|
||||
import * as DummyERC1155Receiver from '../generated-artifacts/DummyERC1155Receiver.json';
|
||||
import * as ERC1155 from '../generated-artifacts/ERC1155.json';
|
||||
import * as ERC1155Mintable from '../generated-artifacts/ERC1155Mintable.json';
|
||||
import * as IERC1155 from '../generated-artifacts/IERC1155.json';
|
||||
import * as IERC1155Mintable from '../generated-artifacts/IERC1155Mintable.json';
|
||||
import * as IERC1155Receiver from '../generated-artifacts/IERC1155Receiver.json';
|
||||
import * as MixinNonFungibleToken from '../generated-artifacts/MixinNonFungibleToken.json';
|
||||
export const artifacts = {
|
||||
ERC1155: ERC1155 as ContractArtifact,
|
||||
ERC1155Mintable: ERC1155Mintable as ContractArtifact,
|
||||
MixinNonFungibleToken: MixinNonFungibleToken as ContractArtifact,
|
||||
IERC1155: IERC1155 as ContractArtifact,
|
||||
IERC1155Mintable: IERC1155Mintable as ContractArtifact,
|
||||
IERC1155Receiver: IERC1155Receiver as ContractArtifact,
|
||||
DummyERC1155Receiver: DummyERC1155Receiver as ContractArtifact,
|
||||
};
|
||||
|
@ -6,7 +6,4 @@
|
||||
export * from '../generated-wrappers/dummy_erc1155_receiver';
|
||||
export * from '../generated-wrappers/erc1155';
|
||||
export * from '../generated-wrappers/erc1155_mintable';
|
||||
export * from '../generated-wrappers/i_erc1155_mintable';
|
||||
export * from '../generated-wrappers/i_erc1155_receiver';
|
||||
export * from '../generated-wrappers/ierc1155';
|
||||
export * from '../generated-wrappers/mixin_non_fungible_token';
|
||||
|
@ -13,14 +13,11 @@ import * as chai from 'chai';
|
||||
import { LogWithDecodedArgs } from 'ethereum-types';
|
||||
import * as _ from 'lodash';
|
||||
|
||||
import {
|
||||
artifacts,
|
||||
DummyERC1155ReceiverBatchTokenReceivedEventArgs,
|
||||
DummyERC1155ReceiverContract,
|
||||
ERC1155MintableContract,
|
||||
} from '../src';
|
||||
import { ERC1155MintableContract } from '../src/wrappers';
|
||||
|
||||
import { artifacts } from './artifacts';
|
||||
import { Erc1155Wrapper } from './utils/erc1155_wrapper';
|
||||
import { DummyERC1155ReceiverBatchTokenReceivedEventArgs, DummyERC1155ReceiverContract } from './wrappers';
|
||||
chaiSetup.configure();
|
||||
const expect = chai.expect;
|
||||
const blockchainLifecycle = new BlockchainLifecycle(web3Wrapper);
|
||||
|
@ -5,7 +5,9 @@ import * as chai from 'chai';
|
||||
import { LogWithDecodedArgs, Provider, TransactionReceiptWithDecodedLogs } from 'ethereum-types';
|
||||
import * as _ from 'lodash';
|
||||
|
||||
import { artifacts, ERC1155MintableContract, ERC1155TransferSingleEventArgs } from '../../src';
|
||||
import { ERC1155MintableContract, ERC1155TransferSingleEventArgs } from '../../src/wrappers';
|
||||
|
||||
import { artifacts } from '../artifacts';
|
||||
|
||||
const expect = chai.expect;
|
||||
|
||||
|
@ -6,10 +6,7 @@
|
||||
"generated-artifacts/DummyERC1155Receiver.json",
|
||||
"generated-artifacts/ERC1155.json",
|
||||
"generated-artifacts/ERC1155Mintable.json",
|
||||
"generated-artifacts/IERC1155.json",
|
||||
"generated-artifacts/IERC1155Mintable.json",
|
||||
"generated-artifacts/IERC1155Receiver.json",
|
||||
"generated-artifacts/MixinNonFungibleToken.json",
|
||||
"test/generated-artifacts/DummyERC1155Receiver.json",
|
||||
"test/generated-artifacts/ERC1155.json",
|
||||
"test/generated-artifacts/ERC1155Mintable.json",
|
||||
|
@ -35,6 +35,7 @@
|
||||
"lint-contracts": "solhint -c ../.solhint.json contracts/**/**/**/**/*.sol"
|
||||
},
|
||||
"config": {
|
||||
"publicInterfaceContracts": "DummyERC20Token,ERC20Token,WETH9,ZRXToken,DummyNoReturnERC20Token,DummyMultipleReturnERC20Token",
|
||||
"abis": "./test/generated-artifacts/@(DummyERC20Token|DummyMultipleReturnERC20Token|DummyNoReturnERC20Token|ERC20Token|IERC20Token|IEtherToken|LibERC20Token|MintableERC20Token|TestLibERC20Token|TestLibERC20TokenTarget|UnlimitedAllowanceERC20Token|UntransferrableDummyERC20Token|WETH9|ZRXToken).json",
|
||||
"abis:comment": "This list is auto-generated by contracts-gen. Don't edit manually."
|
||||
},
|
||||
|
@ -9,29 +9,13 @@ import * as DummyERC20Token from '../generated-artifacts/DummyERC20Token.json';
|
||||
import * as DummyMultipleReturnERC20Token from '../generated-artifacts/DummyMultipleReturnERC20Token.json';
|
||||
import * as DummyNoReturnERC20Token from '../generated-artifacts/DummyNoReturnERC20Token.json';
|
||||
import * as ERC20Token from '../generated-artifacts/ERC20Token.json';
|
||||
import * as IERC20Token from '../generated-artifacts/IERC20Token.json';
|
||||
import * as IEtherToken from '../generated-artifacts/IEtherToken.json';
|
||||
import * as LibERC20Token from '../generated-artifacts/LibERC20Token.json';
|
||||
import * as MintableERC20Token from '../generated-artifacts/MintableERC20Token.json';
|
||||
import * as TestLibERC20Token from '../generated-artifacts/TestLibERC20Token.json';
|
||||
import * as TestLibERC20TokenTarget from '../generated-artifacts/TestLibERC20TokenTarget.json';
|
||||
import * as UnlimitedAllowanceERC20Token from '../generated-artifacts/UnlimitedAllowanceERC20Token.json';
|
||||
import * as UntransferrableDummyERC20Token from '../generated-artifacts/UntransferrableDummyERC20Token.json';
|
||||
import * as WETH9 from '../generated-artifacts/WETH9.json';
|
||||
import * as ZRXToken from '../generated-artifacts/ZRXToken.json';
|
||||
export const artifacts = {
|
||||
DummyERC20Token: DummyERC20Token as ContractArtifact,
|
||||
ERC20Token: ERC20Token as ContractArtifact,
|
||||
LibERC20Token: LibERC20Token as ContractArtifact,
|
||||
MintableERC20Token: MintableERC20Token as ContractArtifact,
|
||||
UnlimitedAllowanceERC20Token: UnlimitedAllowanceERC20Token as ContractArtifact,
|
||||
WETH9: WETH9 as ContractArtifact,
|
||||
ZRXToken: (ZRXToken as any) as ContractArtifact,
|
||||
IERC20Token: IERC20Token as ContractArtifact,
|
||||
IEtherToken: IEtherToken as ContractArtifact,
|
||||
DummyERC20Token: DummyERC20Token as ContractArtifact,
|
||||
DummyMultipleReturnERC20Token: DummyMultipleReturnERC20Token as ContractArtifact,
|
||||
DummyNoReturnERC20Token: DummyNoReturnERC20Token as ContractArtifact,
|
||||
TestLibERC20Token: TestLibERC20Token as ContractArtifact,
|
||||
TestLibERC20TokenTarget: TestLibERC20TokenTarget as ContractArtifact,
|
||||
UntransferrableDummyERC20Token: UntransferrableDummyERC20Token as ContractArtifact,
|
||||
DummyMultipleReturnERC20Token: DummyMultipleReturnERC20Token as ContractArtifact,
|
||||
};
|
||||
|
@ -7,13 +7,5 @@ export * from '../generated-wrappers/dummy_erc20_token';
|
||||
export * from '../generated-wrappers/dummy_multiple_return_erc20_token';
|
||||
export * from '../generated-wrappers/dummy_no_return_erc20_token';
|
||||
export * from '../generated-wrappers/erc20_token';
|
||||
export * from '../generated-wrappers/i_erc20_token';
|
||||
export * from '../generated-wrappers/i_ether_token';
|
||||
export * from '../generated-wrappers/lib_erc20_token';
|
||||
export * from '../generated-wrappers/mintable_erc20_token';
|
||||
export * from '../generated-wrappers/test_lib_erc20_token';
|
||||
export * from '../generated-wrappers/test_lib_erc20_token_target';
|
||||
export * from '../generated-wrappers/unlimited_allowance_erc20_token';
|
||||
export * from '../generated-wrappers/untransferrable_dummy_erc20_token';
|
||||
export * from '../generated-wrappers/weth9';
|
||||
export * from '../generated-wrappers/zrx_token';
|
||||
|
@ -9,7 +9,9 @@ import {
|
||||
} from '@0x/contracts-test-utils';
|
||||
import { RawRevertError, StringRevertError } from '@0x/utils';
|
||||
|
||||
import { artifacts, TestLibERC20TokenContract, TestLibERC20TokenTargetEvents } from '../src';
|
||||
import { TestLibERC20TokenContract, TestLibERC20TokenTargetEvents } from './wrappers';
|
||||
|
||||
import { artifacts } from './artifacts';
|
||||
|
||||
blockchainTests('LibERC20Token', env => {
|
||||
let testContract: TestLibERC20TokenContract;
|
||||
|
@ -11,7 +11,9 @@ import { RevertReason } from '@0x/types';
|
||||
import { BigNumber } from '@0x/utils';
|
||||
import * as chai from 'chai';
|
||||
|
||||
import { artifacts, DummyERC20TokenContract } from '../src';
|
||||
import { DummyERC20TokenContract } from './wrappers';
|
||||
|
||||
import { artifacts } from './artifacts';
|
||||
|
||||
chaiSetup.configure();
|
||||
const expect = chai.expect;
|
||||
|
@ -12,7 +12,9 @@ import { BigNumber } from '@0x/utils';
|
||||
import { Web3Wrapper } from '@0x/web3-wrapper';
|
||||
import * as chai from 'chai';
|
||||
|
||||
import { artifacts, WETH9Contract } from '../src';
|
||||
import { WETH9Contract } from './wrappers';
|
||||
|
||||
import { artifacts } from './artifacts';
|
||||
|
||||
chaiSetup.configure();
|
||||
const expect = chai.expect;
|
||||
|
@ -4,7 +4,9 @@ import { BigNumber } from '@0x/utils';
|
||||
import { Web3Wrapper } from '@0x/web3-wrapper';
|
||||
import * as chai from 'chai';
|
||||
|
||||
import { artifacts, ZRXTokenContract } from '../src';
|
||||
import { ZRXTokenContract } from './wrappers';
|
||||
|
||||
import { artifacts } from './artifacts';
|
||||
|
||||
chaiSetup.configure();
|
||||
const expect = chai.expect;
|
||||
|
@ -7,14 +7,6 @@
|
||||
"generated-artifacts/DummyMultipleReturnERC20Token.json",
|
||||
"generated-artifacts/DummyNoReturnERC20Token.json",
|
||||
"generated-artifacts/ERC20Token.json",
|
||||
"generated-artifacts/IERC20Token.json",
|
||||
"generated-artifacts/IEtherToken.json",
|
||||
"generated-artifacts/LibERC20Token.json",
|
||||
"generated-artifacts/MintableERC20Token.json",
|
||||
"generated-artifacts/TestLibERC20Token.json",
|
||||
"generated-artifacts/TestLibERC20TokenTarget.json",
|
||||
"generated-artifacts/UnlimitedAllowanceERC20Token.json",
|
||||
"generated-artifacts/UntransferrableDummyERC20Token.json",
|
||||
"generated-artifacts/WETH9.json",
|
||||
"generated-artifacts/ZRXToken.json",
|
||||
"test/generated-artifacts/DummyERC20Token.json",
|
||||
|
@ -36,6 +36,7 @@
|
||||
"compile:truffle": "truffle compile"
|
||||
},
|
||||
"config": {
|
||||
"publicInterfaceContracts": "DummyERC721Token,ERC721Token,IERC721Receiver,DummyERC721Receiver",
|
||||
"abis": "./test/generated-artifacts/@(DummyERC721Receiver|DummyERC721Token|ERC721Token|IERC721Receiver|IERC721Token|InvalidERC721Receiver|MintableERC721Token).json",
|
||||
"abis:comment": "This list is auto-generated by contracts-gen. Don't edit manually."
|
||||
},
|
||||
|
@ -9,15 +9,9 @@ import * as DummyERC721Receiver from '../generated-artifacts/DummyERC721Receiver
|
||||
import * as DummyERC721Token from '../generated-artifacts/DummyERC721Token.json';
|
||||
import * as ERC721Token from '../generated-artifacts/ERC721Token.json';
|
||||
import * as IERC721Receiver from '../generated-artifacts/IERC721Receiver.json';
|
||||
import * as IERC721Token from '../generated-artifacts/IERC721Token.json';
|
||||
import * as InvalidERC721Receiver from '../generated-artifacts/InvalidERC721Receiver.json';
|
||||
import * as MintableERC721Token from '../generated-artifacts/MintableERC721Token.json';
|
||||
export const artifacts = {
|
||||
ERC721Token: ERC721Token as ContractArtifact,
|
||||
MintableERC721Token: MintableERC721Token as ContractArtifact,
|
||||
IERC721Receiver: IERC721Receiver as ContractArtifact,
|
||||
IERC721Token: IERC721Token as ContractArtifact,
|
||||
DummyERC721Receiver: DummyERC721Receiver as ContractArtifact,
|
||||
DummyERC721Token: DummyERC721Token as ContractArtifact,
|
||||
InvalidERC721Receiver: InvalidERC721Receiver as ContractArtifact,
|
||||
ERC721Token: ERC721Token as ContractArtifact,
|
||||
IERC721Receiver: IERC721Receiver as ContractArtifact,
|
||||
DummyERC721Receiver: DummyERC721Receiver as ContractArtifact,
|
||||
};
|
||||
|
@ -7,6 +7,3 @@ export * from '../generated-wrappers/dummy_erc721_receiver';
|
||||
export * from '../generated-wrappers/dummy_erc721_token';
|
||||
export * from '../generated-wrappers/erc721_token';
|
||||
export * from '../generated-wrappers/i_erc721_receiver';
|
||||
export * from '../generated-wrappers/i_erc721_token';
|
||||
export * from '../generated-wrappers/invalid_erc721_receiver';
|
||||
export * from '../generated-wrappers/mintable_erc721_token';
|
||||
|
@ -15,13 +15,14 @@ import * as chai from 'chai';
|
||||
import { LogWithDecodedArgs } from 'ethereum-types';
|
||||
|
||||
import {
|
||||
artifacts,
|
||||
DummyERC721ReceiverContract,
|
||||
DummyERC721ReceiverTokenReceivedEventArgs,
|
||||
DummyERC721TokenContract,
|
||||
DummyERC721TokenTransferEventArgs,
|
||||
InvalidERC721ReceiverContract,
|
||||
} from '../src';
|
||||
} from './wrappers';
|
||||
|
||||
import { artifacts } from './artifacts';
|
||||
|
||||
chaiSetup.configure();
|
||||
const expect = chai.expect;
|
||||
|
@ -7,9 +7,6 @@
|
||||
"generated-artifacts/DummyERC721Token.json",
|
||||
"generated-artifacts/ERC721Token.json",
|
||||
"generated-artifacts/IERC721Receiver.json",
|
||||
"generated-artifacts/IERC721Token.json",
|
||||
"generated-artifacts/InvalidERC721Receiver.json",
|
||||
"generated-artifacts/MintableERC721Token.json",
|
||||
"test/generated-artifacts/DummyERC721Receiver.json",
|
||||
"test/generated-artifacts/DummyERC721Token.json",
|
||||
"test/generated-artifacts/ERC721Token.json",
|
||||
|
@ -35,6 +35,7 @@
|
||||
"compile:truffle": "truffle compile"
|
||||
},
|
||||
"config": {
|
||||
"publicInterfaceContracts": "Forwarder",
|
||||
"abis": "./test/generated-artifacts/@(Forwarder|IAssets|IForwarder|IForwarderCore|LibConstants|LibForwarderRichErrors|MixinAssets|MixinExchangeWrapper|MixinForwarderCore|MixinWeth).json",
|
||||
"abis:comment": "This list is auto-generated by contracts-gen. Don't edit manually."
|
||||
},
|
||||
|
@ -6,24 +6,4 @@
|
||||
import { ContractArtifact } from 'ethereum-types';
|
||||
|
||||
import * as Forwarder from '../generated-artifacts/Forwarder.json';
|
||||
import * as IAssets from '../generated-artifacts/IAssets.json';
|
||||
import * as IForwarder from '../generated-artifacts/IForwarder.json';
|
||||
import * as IForwarderCore from '../generated-artifacts/IForwarderCore.json';
|
||||
import * as LibConstants from '../generated-artifacts/LibConstants.json';
|
||||
import * as LibForwarderRichErrors from '../generated-artifacts/LibForwarderRichErrors.json';
|
||||
import * as MixinAssets from '../generated-artifacts/MixinAssets.json';
|
||||
import * as MixinExchangeWrapper from '../generated-artifacts/MixinExchangeWrapper.json';
|
||||
import * as MixinForwarderCore from '../generated-artifacts/MixinForwarderCore.json';
|
||||
import * as MixinWeth from '../generated-artifacts/MixinWeth.json';
|
||||
export const artifacts = {
|
||||
Forwarder: Forwarder as ContractArtifact,
|
||||
MixinAssets: MixinAssets as ContractArtifact,
|
||||
MixinExchangeWrapper: MixinExchangeWrapper as ContractArtifact,
|
||||
MixinForwarderCore: MixinForwarderCore as ContractArtifact,
|
||||
MixinWeth: MixinWeth as ContractArtifact,
|
||||
IAssets: IAssets as ContractArtifact,
|
||||
IForwarder: IForwarder as ContractArtifact,
|
||||
IForwarderCore: IForwarderCore as ContractArtifact,
|
||||
LibConstants: LibConstants as ContractArtifact,
|
||||
LibForwarderRichErrors: LibForwarderRichErrors as ContractArtifact,
|
||||
};
|
||||
export const artifacts = { Forwarder: Forwarder as ContractArtifact };
|
||||
|
@ -4,12 +4,3 @@
|
||||
* -----------------------------------------------------------------------------
|
||||
*/
|
||||
export * from '../generated-wrappers/forwarder';
|
||||
export * from '../generated-wrappers/i_assets';
|
||||
export * from '../generated-wrappers/i_forwarder';
|
||||
export * from '../generated-wrappers/i_forwarder_core';
|
||||
export * from '../generated-wrappers/lib_constants';
|
||||
export * from '../generated-wrappers/lib_forwarder_rich_errors';
|
||||
export * from '../generated-wrappers/mixin_assets';
|
||||
export * from '../generated-wrappers/mixin_exchange_wrapper';
|
||||
export * from '../generated-wrappers/mixin_forwarder_core';
|
||||
export * from '../generated-wrappers/mixin_weth';
|
||||
|
@ -4,15 +4,6 @@
|
||||
"include": ["./src/**/*", "./test/**/*", "./generated-wrappers/**/*"],
|
||||
"files": [
|
||||
"generated-artifacts/Forwarder.json",
|
||||
"generated-artifacts/IAssets.json",
|
||||
"generated-artifacts/IForwarder.json",
|
||||
"generated-artifacts/IForwarderCore.json",
|
||||
"generated-artifacts/LibConstants.json",
|
||||
"generated-artifacts/LibForwarderRichErrors.json",
|
||||
"generated-artifacts/MixinAssets.json",
|
||||
"generated-artifacts/MixinExchangeWrapper.json",
|
||||
"generated-artifacts/MixinForwarderCore.json",
|
||||
"generated-artifacts/MixinWeth.json",
|
||||
"test/generated-artifacts/Forwarder.json",
|
||||
"test/generated-artifacts/IAssets.json",
|
||||
"test/generated-artifacts/IForwarder.json",
|
||||
|
@ -36,6 +36,7 @@
|
||||
"compile:truffle": "truffle compile"
|
||||
},
|
||||
"config": {
|
||||
"publicInterfaceContracts": "IWallet,LibEIP712ExchangeDomain,LibExchangeRichErrors,LibMath,LibMathRichErrors,LibOrder,LibZeroExTransaction",
|
||||
"abis": "./test/generated-artifacts/@(IWallet|LibEIP712ExchangeDomain|LibExchangeRichErrors|LibFillResults|LibMath|LibMathRichErrors|LibOrder|LibZeroExTransaction|TestLibEIP712ExchangeDomain|TestLibFillResults|TestLibMath|TestLibOrder|TestLibZeroExTransaction).json",
|
||||
"abis:comment": "This list is auto-generated by contracts-gen. Don't edit manually."
|
||||
},
|
||||
|
@ -8,28 +8,16 @@ import { ContractArtifact } from 'ethereum-types';
|
||||
import * as IWallet from '../generated-artifacts/IWallet.json';
|
||||
import * as LibEIP712ExchangeDomain from '../generated-artifacts/LibEIP712ExchangeDomain.json';
|
||||
import * as LibExchangeRichErrors from '../generated-artifacts/LibExchangeRichErrors.json';
|
||||
import * as LibFillResults from '../generated-artifacts/LibFillResults.json';
|
||||
import * as LibMath from '../generated-artifacts/LibMath.json';
|
||||
import * as LibMathRichErrors from '../generated-artifacts/LibMathRichErrors.json';
|
||||
import * as LibOrder from '../generated-artifacts/LibOrder.json';
|
||||
import * as LibZeroExTransaction from '../generated-artifacts/LibZeroExTransaction.json';
|
||||
import * as TestLibEIP712ExchangeDomain from '../generated-artifacts/TestLibEIP712ExchangeDomain.json';
|
||||
import * as TestLibFillResults from '../generated-artifacts/TestLibFillResults.json';
|
||||
import * as TestLibMath from '../generated-artifacts/TestLibMath.json';
|
||||
import * as TestLibOrder from '../generated-artifacts/TestLibOrder.json';
|
||||
import * as TestLibZeroExTransaction from '../generated-artifacts/TestLibZeroExTransaction.json';
|
||||
export const artifacts = {
|
||||
IWallet: IWallet as ContractArtifact,
|
||||
LibEIP712ExchangeDomain: LibEIP712ExchangeDomain as ContractArtifact,
|
||||
LibExchangeRichErrors: LibExchangeRichErrors as ContractArtifact,
|
||||
LibFillResults: LibFillResults as ContractArtifact,
|
||||
LibMath: LibMath as ContractArtifact,
|
||||
LibMathRichErrors: LibMathRichErrors as ContractArtifact,
|
||||
LibOrder: LibOrder as ContractArtifact,
|
||||
LibZeroExTransaction: LibZeroExTransaction as ContractArtifact,
|
||||
TestLibEIP712ExchangeDomain: TestLibEIP712ExchangeDomain as ContractArtifact,
|
||||
TestLibFillResults: TestLibFillResults as ContractArtifact,
|
||||
TestLibMath: TestLibMath as ContractArtifact,
|
||||
TestLibOrder: TestLibOrder as ContractArtifact,
|
||||
TestLibZeroExTransaction: TestLibZeroExTransaction as ContractArtifact,
|
||||
};
|
||||
|
@ -6,13 +6,7 @@
|
||||
export * from '../generated-wrappers/i_wallet';
|
||||
export * from '../generated-wrappers/lib_e_i_p712_exchange_domain';
|
||||
export * from '../generated-wrappers/lib_exchange_rich_errors';
|
||||
export * from '../generated-wrappers/lib_fill_results';
|
||||
export * from '../generated-wrappers/lib_math';
|
||||
export * from '../generated-wrappers/lib_math_rich_errors';
|
||||
export * from '../generated-wrappers/lib_order';
|
||||
export * from '../generated-wrappers/lib_zero_ex_transaction';
|
||||
export * from '../generated-wrappers/test_lib_e_i_p712_exchange_domain';
|
||||
export * from '../generated-wrappers/test_lib_fill_results';
|
||||
export * from '../generated-wrappers/test_lib_math';
|
||||
export * from '../generated-wrappers/test_lib_order';
|
||||
export * from '../generated-wrappers/test_lib_zero_ex_transaction';
|
||||
|
@ -2,7 +2,9 @@ import { blockchainTests, constants, expect, randomAddress } from '@0x/contracts
|
||||
import { BigNumber, signTypedDataUtils } from '@0x/utils';
|
||||
import * as ethUtil from 'ethereumjs-util';
|
||||
|
||||
import { artifacts, TestLibEIP712ExchangeDomainContract } from '../src';
|
||||
import { TestLibEIP712ExchangeDomainContract } from './wrappers';
|
||||
|
||||
import { artifacts } from './artifacts';
|
||||
|
||||
blockchainTests('LibEIP712ExchangeDomain', env => {
|
||||
describe('constructor', () => {
|
||||
|
@ -13,7 +13,10 @@ import { BigNumber, SafeMathRevertErrors } from '@0x/utils';
|
||||
import { Web3Wrapper } from '@0x/web3-wrapper';
|
||||
import * as _ from 'lodash';
|
||||
|
||||
import { artifacts, ReferenceFunctions, TestLibFillResultsContract } from '../src';
|
||||
import { addFillResults, calculateFillResults, getPartialAmountFloor } from '../src/reference_functions';
|
||||
|
||||
import { artifacts } from './artifacts';
|
||||
import { TestLibFillResultsContract } from './wrappers';
|
||||
|
||||
blockchainTests('LibFillResults', env => {
|
||||
interface PartialMatchedFillResults {
|
||||
@ -92,7 +95,7 @@ blockchainTests('LibFillResults', env => {
|
||||
// in any mathematical operation in either the reference TypeScript
|
||||
// implementation or the Solidity implementation of
|
||||
// calculateFillResults.
|
||||
return ReferenceFunctions.calculateFillResults(
|
||||
return calculateFillResults(
|
||||
makeOrder(otherAmount, orderTakerAssetAmount, otherAmount, otherAmount),
|
||||
takerAssetFilledAmount,
|
||||
takerAssetFilledAmount, // Using this so that the gas price is distinct from protocolFeeMultiplier
|
||||
@ -139,7 +142,7 @@ blockchainTests('LibFillResults', env => {
|
||||
takerFee: ONE_ETHER.times(0.0025),
|
||||
});
|
||||
const takerAssetFilledAmount = ONE_ETHER.dividedToIntegerBy(3);
|
||||
const expected = ReferenceFunctions.calculateFillResults(
|
||||
const expected = calculateFillResults(
|
||||
order,
|
||||
takerAssetFilledAmount,
|
||||
DEFAULT_PROTOCOL_FEE_MULTIPLIER,
|
||||
@ -184,7 +187,7 @@ blockchainTests('LibFillResults', env => {
|
||||
makerFee: MAX_UINT256_ROOT.times(11),
|
||||
});
|
||||
const takerAssetFilledAmount = MAX_UINT256_ROOT.dividedToIntegerBy(10);
|
||||
const makerAssetFilledAmount = ReferenceFunctions.getPartialAmountFloor(
|
||||
const makerAssetFilledAmount = getPartialAmountFloor(
|
||||
takerAssetFilledAmount,
|
||||
order.takerAssetAmount,
|
||||
order.makerAssetAmount,
|
||||
@ -272,7 +275,7 @@ blockchainTests('LibFillResults', env => {
|
||||
makerFee: new BigNumber(100),
|
||||
});
|
||||
const takerAssetFilledAmount = order.takerAssetAmount.dividedToIntegerBy(3);
|
||||
const makerAssetFilledAmount = ReferenceFunctions.getPartialAmountFloor(
|
||||
const makerAssetFilledAmount = getPartialAmountFloor(
|
||||
takerAssetFilledAmount,
|
||||
order.takerAssetAmount,
|
||||
order.makerAssetAmount,
|
||||
@ -299,7 +302,7 @@ blockchainTests('LibFillResults', env => {
|
||||
takerFee: new BigNumber(100),
|
||||
});
|
||||
const takerAssetFilledAmount = order.takerAssetAmount.dividedToIntegerBy(3);
|
||||
const makerAssetFilledAmount = ReferenceFunctions.getPartialAmountFloor(
|
||||
const makerAssetFilledAmount = getPartialAmountFloor(
|
||||
takerAssetFilledAmount,
|
||||
order.takerAssetAmount,
|
||||
order.makerAssetAmount,
|
||||
@ -349,7 +352,7 @@ blockchainTests('LibFillResults', env => {
|
||||
makerFee: new BigNumber(100),
|
||||
});
|
||||
const takerAssetFilledAmount = order.takerAssetAmount.dividedToIntegerBy(3);
|
||||
const makerAssetFilledAmount = ReferenceFunctions.getPartialAmountFloor(
|
||||
const makerAssetFilledAmount = getPartialAmountFloor(
|
||||
takerAssetFilledAmount,
|
||||
order.takerAssetAmount,
|
||||
order.makerAssetAmount,
|
||||
@ -392,7 +395,7 @@ blockchainTests('LibFillResults', env => {
|
||||
|
||||
it('matches the output of the reference function', async () => {
|
||||
const [a, b] = DEFAULT_FILL_RESULTS;
|
||||
const expected = ReferenceFunctions.addFillResults(a, b);
|
||||
const expected = addFillResults(a, b);
|
||||
const actual = await libsContract.addFillResults.callAsync(a, b);
|
||||
expect(actual).to.deep.equal(expected);
|
||||
});
|
||||
|
@ -9,7 +9,17 @@ import {
|
||||
import { LibMathRevertErrors } from '@0x/order-utils';
|
||||
import { BigNumber, SafeMathRevertErrors } from '@0x/utils';
|
||||
|
||||
import { artifacts, ReferenceFunctions, TestLibMathContract } from '../src';
|
||||
import {
|
||||
getPartialAmountCeil,
|
||||
getPartialAmountFloor,
|
||||
isRoundingErrorCeil,
|
||||
isRoundingErrorFloor,
|
||||
safeGetPartialAmountCeil,
|
||||
safeGetPartialAmountFloor,
|
||||
} from '../src/reference_functions';
|
||||
|
||||
import { artifacts } from './artifacts';
|
||||
import { TestLibMathContract } from './wrappers';
|
||||
|
||||
blockchainTests('LibMath', env => {
|
||||
const { ONE_ETHER, MAX_UINT256, MAX_UINT256_ROOT, ZERO_AMOUNT } = constants;
|
||||
@ -42,7 +52,7 @@ blockchainTests('LibMath', env => {
|
||||
describe.optional('combinatorial tests', () => {
|
||||
testCombinatoriallyWithReferenceFunc(
|
||||
'getPartialAmountFloor',
|
||||
createAsyncReferenceFunction(ReferenceFunctions.getPartialAmountFloor),
|
||||
createAsyncReferenceFunction(getPartialAmountFloor),
|
||||
createContractTestFunction('getPartialAmountFloor'),
|
||||
[uint256Values, uint256Values, uint256Values],
|
||||
);
|
||||
@ -53,7 +63,7 @@ blockchainTests('LibMath', env => {
|
||||
const numerator = ONE_ETHER;
|
||||
const denominator = ONE_ETHER.dividedToIntegerBy(2);
|
||||
const target = ONE_ETHER.times(0.01);
|
||||
const expected = ReferenceFunctions.getPartialAmountFloor(numerator, denominator, target);
|
||||
const expected = getPartialAmountFloor(numerator, denominator, target);
|
||||
const actual = await libsContract.getPartialAmountFloor.callAsync(numerator, denominator, target);
|
||||
expect(actual).to.bignumber.eq(expected);
|
||||
});
|
||||
@ -101,7 +111,7 @@ blockchainTests('LibMath', env => {
|
||||
describe.optional('combinatorial tests', () => {
|
||||
testCombinatoriallyWithReferenceFunc(
|
||||
'getPartialAmountCeil',
|
||||
createAsyncReferenceFunction(ReferenceFunctions.getPartialAmountCeil),
|
||||
createAsyncReferenceFunction(getPartialAmountCeil),
|
||||
createContractTestFunction('getPartialAmountCeil'),
|
||||
[uint256Values, uint256Values, uint256Values],
|
||||
);
|
||||
@ -112,7 +122,7 @@ blockchainTests('LibMath', env => {
|
||||
const numerator = ONE_ETHER;
|
||||
const denominator = ONE_ETHER.dividedToIntegerBy(2);
|
||||
const target = ONE_ETHER.times(0.01);
|
||||
const expected = ReferenceFunctions.getPartialAmountCeil(numerator, denominator, target);
|
||||
const expected = getPartialAmountCeil(numerator, denominator, target);
|
||||
const actual = await libsContract.getPartialAmountCeil.callAsync(numerator, denominator, target);
|
||||
expect(actual).to.bignumber.eq(expected);
|
||||
});
|
||||
@ -161,7 +171,7 @@ blockchainTests('LibMath', env => {
|
||||
describe.optional('combinatorial tests', () => {
|
||||
testCombinatoriallyWithReferenceFunc(
|
||||
'safeGetPartialAmountFloor',
|
||||
createAsyncReferenceFunction(ReferenceFunctions.safeGetPartialAmountFloor),
|
||||
createAsyncReferenceFunction(safeGetPartialAmountFloor),
|
||||
createContractTestFunction('safeGetPartialAmountFloor'),
|
||||
[uint256Values, uint256Values, uint256Values],
|
||||
);
|
||||
@ -172,7 +182,7 @@ blockchainTests('LibMath', env => {
|
||||
const numerator = ONE_ETHER;
|
||||
const denominator = ONE_ETHER.dividedToIntegerBy(2);
|
||||
const target = ONE_ETHER.times(0.01);
|
||||
const expected = ReferenceFunctions.safeGetPartialAmountFloor(numerator, denominator, target);
|
||||
const expected = safeGetPartialAmountFloor(numerator, denominator, target);
|
||||
const actual = await libsContract.safeGetPartialAmountFloor.callAsync(numerator, denominator, target);
|
||||
expect(actual).to.bignumber.eq(expected);
|
||||
});
|
||||
@ -226,7 +236,7 @@ blockchainTests('LibMath', env => {
|
||||
describe.optional('combinatorial tests', () => {
|
||||
testCombinatoriallyWithReferenceFunc(
|
||||
'safeGetPartialAmountCeil',
|
||||
createAsyncReferenceFunction(ReferenceFunctions.safeGetPartialAmountCeil),
|
||||
createAsyncReferenceFunction(safeGetPartialAmountCeil),
|
||||
createContractTestFunction('safeGetPartialAmountCeil'),
|
||||
[uint256Values, uint256Values, uint256Values],
|
||||
);
|
||||
@ -237,7 +247,7 @@ blockchainTests('LibMath', env => {
|
||||
const numerator = ONE_ETHER;
|
||||
const denominator = ONE_ETHER.dividedToIntegerBy(2);
|
||||
const target = ONE_ETHER.times(0.01);
|
||||
const expected = ReferenceFunctions.safeGetPartialAmountCeil(numerator, denominator, target);
|
||||
const expected = safeGetPartialAmountCeil(numerator, denominator, target);
|
||||
const actual = await libsContract.safeGetPartialAmountCeil.callAsync(numerator, denominator, target);
|
||||
expect(actual).to.bignumber.eq(expected);
|
||||
});
|
||||
@ -291,7 +301,7 @@ blockchainTests('LibMath', env => {
|
||||
describe.optional('combinatorial tests', () => {
|
||||
testCombinatoriallyWithReferenceFunc(
|
||||
'isRoundingErrorFloor',
|
||||
createAsyncReferenceFunction(ReferenceFunctions.isRoundingErrorFloor),
|
||||
createAsyncReferenceFunction(isRoundingErrorFloor),
|
||||
createContractTestFunction('isRoundingErrorFloor'),
|
||||
[uint256Values, uint256Values, uint256Values],
|
||||
);
|
||||
@ -321,7 +331,7 @@ blockchainTests('LibMath', env => {
|
||||
const denominator = ONE_ETHER.dividedToIntegerBy(2);
|
||||
const target = ONE_ETHER.times(0.01);
|
||||
// tslint:disable-next-line: boolean-naming
|
||||
const expected = ReferenceFunctions.isRoundingErrorFloor(numerator, denominator, target);
|
||||
const expected = isRoundingErrorFloor(numerator, denominator, target);
|
||||
// tslint:disable-next-line: boolean-naming
|
||||
const actual = await libsContract.isRoundingErrorFloor.callAsync(numerator, denominator, target);
|
||||
expect(actual).to.eq(expected);
|
||||
@ -357,7 +367,7 @@ blockchainTests('LibMath', env => {
|
||||
describe.optional('combinatorial tests', () => {
|
||||
testCombinatoriallyWithReferenceFunc(
|
||||
'isRoundingErrorCeil',
|
||||
createAsyncReferenceFunction(ReferenceFunctions.isRoundingErrorCeil),
|
||||
createAsyncReferenceFunction(isRoundingErrorCeil),
|
||||
createContractTestFunction('isRoundingErrorCeil'),
|
||||
[uint256Values, uint256Values, uint256Values],
|
||||
);
|
||||
@ -387,7 +397,7 @@ blockchainTests('LibMath', env => {
|
||||
const denominator = ONE_ETHER.dividedToIntegerBy(2);
|
||||
const target = ONE_ETHER.times(0.01);
|
||||
// tslint:disable-next-line: boolean-naming
|
||||
const expected = ReferenceFunctions.isRoundingErrorCeil(numerator, denominator, target);
|
||||
const expected = isRoundingErrorCeil(numerator, denominator, target);
|
||||
// tslint:disable-next-line: boolean-naming
|
||||
const actual = await libsContract.isRoundingErrorCeil.callAsync(numerator, denominator, target);
|
||||
expect(actual).to.eq(expected);
|
||||
|
@ -5,7 +5,9 @@ import { BigNumber, signTypedDataUtils } from '@0x/utils';
|
||||
import * as ethUtil from 'ethereumjs-util';
|
||||
import * as _ from 'lodash';
|
||||
|
||||
import { artifacts, TestLibOrderContract } from '../src';
|
||||
import { TestLibOrderContract } from './wrappers';
|
||||
|
||||
import { artifacts } from './artifacts';
|
||||
|
||||
blockchainTests('LibOrder', env => {
|
||||
let libOrderContract: TestLibOrderContract;
|
||||
|
@ -5,7 +5,9 @@ import { BigNumber, signTypedDataUtils } from '@0x/utils';
|
||||
import * as ethUtil from 'ethereumjs-util';
|
||||
import * as _ from 'lodash';
|
||||
|
||||
import { artifacts, TestLibZeroExTransactionContract } from '../src';
|
||||
import { TestLibZeroExTransactionContract } from './wrappers';
|
||||
|
||||
import { artifacts } from './artifacts';
|
||||
|
||||
blockchainTests('LibZeroExTransaction', env => {
|
||||
let libZeroExTransactionContract: TestLibZeroExTransactionContract;
|
||||
|
@ -6,16 +6,10 @@
|
||||
"generated-artifacts/IWallet.json",
|
||||
"generated-artifacts/LibEIP712ExchangeDomain.json",
|
||||
"generated-artifacts/LibExchangeRichErrors.json",
|
||||
"generated-artifacts/LibFillResults.json",
|
||||
"generated-artifacts/LibMath.json",
|
||||
"generated-artifacts/LibMathRichErrors.json",
|
||||
"generated-artifacts/LibOrder.json",
|
||||
"generated-artifacts/LibZeroExTransaction.json",
|
||||
"generated-artifacts/TestLibEIP712ExchangeDomain.json",
|
||||
"generated-artifacts/TestLibFillResults.json",
|
||||
"generated-artifacts/TestLibMath.json",
|
||||
"generated-artifacts/TestLibOrder.json",
|
||||
"generated-artifacts/TestLibZeroExTransaction.json",
|
||||
"test/generated-artifacts/IWallet.json",
|
||||
"test/generated-artifacts/LibEIP712ExchangeDomain.json",
|
||||
"test/generated-artifacts/LibExchangeRichErrors.json",
|
||||
|
@ -14,6 +14,8 @@ import { BigNumber } from '@0x/utils';
|
||||
import { TransactionReceiptWithDecodedLogs } from 'ethereum-types';
|
||||
import * as _ from 'lodash';
|
||||
|
||||
import { ExchangeContract } from '../wrappers';
|
||||
|
||||
import {
|
||||
BalanceStore,
|
||||
BlockchainBalanceStore,
|
||||
@ -21,9 +23,7 @@ import {
|
||||
TokenContractsByName,
|
||||
TokenIds,
|
||||
TokenOwnersByName,
|
||||
} from '../../src';
|
||||
|
||||
import { ExchangeContract } from '../wrappers';
|
||||
} from './../balance_stores';
|
||||
|
||||
export class FillOrderWrapper {
|
||||
private readonly _blockchainBalanceStore: BlockchainBalanceStore;
|
||||
|
@ -4,7 +4,7 @@ import * as chai from 'chai';
|
||||
chaiSetup.configure();
|
||||
const expect = chai.expect;
|
||||
|
||||
import { artifacts } from '../src';
|
||||
import { artifacts } from './artifacts';
|
||||
|
||||
describe('Contract Size Checks', () => {
|
||||
describe('Exchange', () => {
|
||||
|
@ -11,7 +11,7 @@ import {
|
||||
TestStaticCallTargetContract,
|
||||
} from '@0x/contracts-asset-proxy';
|
||||
import { DevUtilsContract } from '@0x/contracts-dev-utils';
|
||||
import { ERC1155MintableContract } from '@0x/contracts-erc1155';
|
||||
import { ERC1155MintableContract, Erc1155Wrapper } from '@0x/contracts-erc1155';
|
||||
import {
|
||||
artifacts as erc20Artifacts,
|
||||
DummyERC20TokenContract,
|
||||
@ -40,22 +40,11 @@ import { Web3Wrapper } from '@0x/web3-wrapper';
|
||||
import { LogWithDecodedArgs } from 'ethereum-types';
|
||||
import * as _ from 'lodash';
|
||||
|
||||
import { Erc1155Wrapper } from '../../erc1155/lib/src';
|
||||
import { ExchangeWrapper, ValidatorWalletAction } from './utils';
|
||||
|
||||
import {
|
||||
ExchangeWrapper,
|
||||
ValidatorWalletAction,
|
||||
} from './utils';
|
||||
|
||||
import {
|
||||
artifacts,
|
||||
} from './artifacts';
|
||||
import { artifacts } from './artifacts';
|
||||
import { FillOrderWrapper } from './assertion_wrappers/fill_order_wrapper';
|
||||
import {
|
||||
ExchangeCancelEventArgs,
|
||||
ExchangeContract,
|
||||
TestValidatorWalletContract,
|
||||
} from './wrappers';
|
||||
import { ExchangeCancelEventArgs, ExchangeContract, TestValidatorWalletContract } from './wrappers';
|
||||
|
||||
// tslint:disable:no-unnecessary-type-assertion
|
||||
blockchainTests.resets('Exchange core', () => {
|
||||
|
@ -36,6 +36,7 @@
|
||||
"compile:truffle": "truffle compile"
|
||||
},
|
||||
"config": {
|
||||
"publicInterfaceContracts": "DutchAuction,OrderMatcher,BalanceThresholdFilter",
|
||||
"abis": "./generated-artifacts/@(BalanceThresholdFilter|DutchAuction|Exchange|ExchangeWrapper|OrderMatcher|WETH9).json",
|
||||
"abis:comment": "This list is auto-generated by contracts-gen. Don't edit manually."
|
||||
},
|
||||
|
@ -24,7 +24,11 @@ import {
|
||||
web3Wrapper,
|
||||
} from '@0x/contracts-test-utils';
|
||||
|
||||
import { artifacts, BalanceThresholdFilterContract, BalanceThresholdWrapper } from '../src';
|
||||
import { BalanceThresholdWrapper } from './utils/balance_threshold_wrapper';
|
||||
|
||||
import { BalanceThresholdFilterContract } from './wrappers';
|
||||
|
||||
import { artifacts } from './artifacts';
|
||||
|
||||
chaiSetup.configure();
|
||||
const expect = chai.expect;
|
||||
@ -139,12 +143,9 @@ describe(ContractName.BalanceThresholdFilter, () => {
|
||||
new BigNumber(chainId),
|
||||
);
|
||||
// Register proxies
|
||||
await exchangeInstance.registerAssetProxy.awaitTransactionSuccessAsync(
|
||||
erc20Proxy.address,
|
||||
{
|
||||
from: owner,
|
||||
},
|
||||
);
|
||||
await exchangeInstance.registerAssetProxy.awaitTransactionSuccessAsync(erc20Proxy.address, {
|
||||
from: owner,
|
||||
});
|
||||
await erc20Proxy.addAuthorizedAddress.sendTransactionAsync(exchangeInstance.address, {
|
||||
from: owner,
|
||||
});
|
||||
|
@ -22,7 +22,9 @@ import { Web3Wrapper } from '@0x/web3-wrapper';
|
||||
import * as chai from 'chai';
|
||||
import * as _ from 'lodash';
|
||||
|
||||
import { artifacts, DutchAuctionContract, DutchAuctionTestWrapper, WETH9Contract } from '../src';
|
||||
import { DutchAuctionContract, DutchAuctionTestWrapper, WETH9Contract } from './wrappers';
|
||||
|
||||
import { artifacts } from './artifacts';
|
||||
|
||||
chaiSetup.configure();
|
||||
const expect = chai.expect;
|
||||
@ -98,18 +100,12 @@ describe(ContractName.DutchAuction, () => {
|
||||
zrxAssetData,
|
||||
new BigNumber(chainId),
|
||||
);
|
||||
await exchangeInstance.registerAssetProxy.awaitTransactionSuccessAsync(
|
||||
erc20Proxy.address,
|
||||
{
|
||||
from: owner,
|
||||
},
|
||||
);
|
||||
await exchangeInstance.registerAssetProxy.awaitTransactionSuccessAsync(
|
||||
erc721Proxy.address,
|
||||
{
|
||||
from: owner,
|
||||
},
|
||||
);
|
||||
await exchangeInstance.registerAssetProxy.awaitTransactionSuccessAsync(erc20Proxy.address, {
|
||||
from: owner,
|
||||
});
|
||||
await exchangeInstance.registerAssetProxy.awaitTransactionSuccessAsync(erc721Proxy.address, {
|
||||
from: owner,
|
||||
});
|
||||
|
||||
await erc20Proxy.addAuthorizedAddress.sendTransactionAsync(exchangeInstance.address, {
|
||||
from: owner,
|
||||
|
@ -30,7 +30,9 @@ import * as chai from 'chai';
|
||||
import { LogWithDecodedArgs } from 'ethereum-types';
|
||||
import * as _ from 'lodash';
|
||||
|
||||
import { artifacts, ExchangeFillEventArgs, OrderMatcherContract } from '../src';
|
||||
import { ExchangeFillEventArgs, OrderMatcherContract } from './wrappers';
|
||||
|
||||
import { artifacts } from './artifacts';
|
||||
|
||||
const blockchainLifecycle = new BlockchainLifecycle(web3Wrapper);
|
||||
chaiSetup.configure();
|
||||
@ -117,18 +119,12 @@ describe('OrderMatcher', () => {
|
||||
await devUtils.encodeERC20AssetData.callAsync(zrxToken.address),
|
||||
new BigNumber(chainId),
|
||||
);
|
||||
await exchange.registerAssetProxy.awaitTransactionSuccessAsync(
|
||||
erc20Proxy.address,
|
||||
{
|
||||
from: owner,
|
||||
},
|
||||
);
|
||||
await exchange.registerAssetProxy.awaitTransactionSuccessAsync(
|
||||
erc721Proxy.address,
|
||||
{
|
||||
from: owner,
|
||||
},
|
||||
); // Authorize ERC20 trades by exchange
|
||||
await exchange.registerAssetProxy.awaitTransactionSuccessAsync(erc20Proxy.address, {
|
||||
from: owner,
|
||||
});
|
||||
await exchange.registerAssetProxy.awaitTransactionSuccessAsync(erc721Proxy.address, {
|
||||
from: owner,
|
||||
}); // Authorize ERC20 trades by exchange
|
||||
await web3Wrapper.awaitTransactionSuccessAsync(
|
||||
await erc20Proxy.addAuthorizedAddress.sendTransactionAsync(exchange.address, {
|
||||
from: owner,
|
||||
|
@ -13,7 +13,9 @@ import { BigNumber } from '@0x/utils';
|
||||
import { Web3Wrapper } from '@0x/web3-wrapper';
|
||||
import { TransactionReceiptWithDecodedLogs } from 'ethereum-types';
|
||||
|
||||
import { artifacts, BalanceThresholdFilterContract } from '../../src';
|
||||
import { BalanceThresholdFilterContract } from './wrappers';
|
||||
|
||||
import { artifacts } from './artifacts';
|
||||
|
||||
export class BalanceThresholdWrapper {
|
||||
private readonly _balanceThresholdFilter: BalanceThresholdFilterContract;
|
||||
|
@ -36,6 +36,7 @@
|
||||
"compile:truffle": "truffle compile"
|
||||
},
|
||||
"config": {
|
||||
"publicInterfaceContracts": "TestFramework",
|
||||
"abis": "./test/generated-artifacts/@(TestFramework).json",
|
||||
"abis:comment": "This list is auto-generated by contracts-gen. Don't edit manually."
|
||||
},
|
||||
|
@ -2,9 +2,11 @@ import { blockchainTests, constants, expect, filterLogsToArguments, getRandomInt
|
||||
import { BigNumber, StringRevertError } from '@0x/utils';
|
||||
import { TransactionReceiptWithDecodedLogs } from 'ethereum-types';
|
||||
|
||||
import { artifacts, TestFrameworkContract, TestFrameworkEventEventArgs, TestFrameworkEvents } from '../../src';
|
||||
import { FunctionAssertion, Result } from '../utils/function_assertions';
|
||||
|
||||
import { artifacts } from '../artifacts';
|
||||
import { TestFrameworkContract, TestFrameworkEventEventArgs, TestFrameworkEvents } from '../wrappers';
|
||||
|
||||
const { ZERO_AMOUNT, MAX_UINT256 } = constants;
|
||||
|
||||
blockchainTests.resets('FunctionAssertion Unit Tests', env => {
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { artifacts as assetProxyArtifacts } from '@0x/contracts-asset-proxy';
|
||||
import { DevUtilsContract } from '@0x/contracts-dev-utils';
|
||||
import { IERC20TokenEvents, IERC20TokenTransferEventArgs } from '@0x/contracts-erc20';
|
||||
import { ERC20TokenEvents, ERC20TokenTransferEventArgs } from '@0x/contracts-erc20';
|
||||
import {
|
||||
artifacts as exchangeArtifacts,
|
||||
BlockchainBalanceStore,
|
||||
@ -192,7 +192,7 @@ blockchainTests.resets('Exchange wrappers', env => {
|
||||
function verifyFillEvents(receipt: TransactionReceiptWithDecodedLogs, fillTestInfos: FillTestInfo[]): void {
|
||||
const expectedFillEvents: IExchangeFillEventArgs[] = [];
|
||||
|
||||
let expectedTransferEvents: IERC20TokenTransferEventArgs[] = [];
|
||||
let expectedTransferEvents: ERC20TokenTransferEventArgs[] = [];
|
||||
|
||||
for (const { signedOrder, expectedFillResults, shouldPayWethFees } of fillTestInfos) {
|
||||
const orderHash = orderHashUtils.getOrderHashHex(signedOrder);
|
||||
@ -248,7 +248,7 @@ blockchainTests.resets('Exchange wrappers', env => {
|
||||
expectedTransferEvents = expectedTransferEvents.concat(transferEvents);
|
||||
}
|
||||
verifyEvents<IExchangeFillEventArgs>(receipt, expectedFillEvents, IExchangeEvents.Fill);
|
||||
verifyEvents<IERC20TokenTransferEventArgs>(receipt, expectedTransferEvents, IERC20TokenEvents.Transfer);
|
||||
verifyEvents<ERC20TokenTransferEventArgs>(receipt, expectedTransferEvents, ERC20TokenEvents.Transfer);
|
||||
}
|
||||
|
||||
function calculateScaledFillResultsWithMaker(signedOrder: SignedOrder, fillAmount: BigNumber): FillResults {
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { DevUtilsContract } from '@0x/contracts-dev-utils';
|
||||
import { IERC20TokenEvents, IERC20TokenTransferEventArgs } from '@0x/contracts-erc20';
|
||||
import { ERC20TokenEvents, ERC20TokenTransferEventArgs } from '@0x/contracts-erc20';
|
||||
import {
|
||||
BlockchainBalanceStore,
|
||||
ExchangeEvents,
|
||||
@ -166,7 +166,7 @@ blockchainTests.resets('fillOrder integration tests', env => {
|
||||
);
|
||||
|
||||
// Ensure that the transfer events were correctly emitted.
|
||||
verifyEvents<IERC20TokenTransferEventArgs>(
|
||||
verifyEvents<ERC20TokenTransferEventArgs>(
|
||||
receipt,
|
||||
[
|
||||
{
|
||||
@ -180,7 +180,7 @@ blockchainTests.resets('fillOrder integration tests', env => {
|
||||
_value: order.makerAssetAmount,
|
||||
},
|
||||
],
|
||||
IERC20TokenEvents.Transfer,
|
||||
ERC20TokenEvents.Transfer,
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -35,6 +35,7 @@
|
||||
"lint-contracts": "solhint -c ../.solhint.json contracts/**/**/**/**/*.sol"
|
||||
},
|
||||
"config": {
|
||||
"publicInterfaceContracts": "MultiSigWalletWithTimeLock,ZeroExGovernor",
|
||||
"abis": "./test/generated-artifacts/@(ContractCallReceiver|MultiSigWallet|MultiSigWalletWithTimeLock|TestRejectEther|TestZeroExGovernor|ZeroExGovernor).json",
|
||||
"abis:comment": "This list is auto-generated by contracts-gen. Don't edit manually."
|
||||
},
|
||||
|
@ -5,17 +5,9 @@
|
||||
*/
|
||||
import { ContractArtifact } from 'ethereum-types';
|
||||
|
||||
import * as ContractCallReceiver from '../generated-artifacts/ContractCallReceiver.json';
|
||||
import * as MultiSigWallet from '../generated-artifacts/MultiSigWallet.json';
|
||||
import * as MultiSigWalletWithTimeLock from '../generated-artifacts/MultiSigWalletWithTimeLock.json';
|
||||
import * as TestRejectEther from '../generated-artifacts/TestRejectEther.json';
|
||||
import * as TestZeroExGovernor from '../generated-artifacts/TestZeroExGovernor.json';
|
||||
import * as ZeroExGovernor from '../generated-artifacts/ZeroExGovernor.json';
|
||||
export const artifacts = {
|
||||
MultiSigWallet: MultiSigWallet as ContractArtifact,
|
||||
MultiSigWalletWithTimeLock: MultiSigWalletWithTimeLock as ContractArtifact,
|
||||
ZeroExGovernor: ZeroExGovernor as ContractArtifact,
|
||||
ContractCallReceiver: ContractCallReceiver as ContractArtifact,
|
||||
TestRejectEther: TestRejectEther as ContractArtifact,
|
||||
TestZeroExGovernor: TestZeroExGovernor as ContractArtifact,
|
||||
};
|
||||
|
@ -3,9 +3,5 @@
|
||||
* Warning: This file is auto-generated by contracts-gen. Don't edit manually.
|
||||
* -----------------------------------------------------------------------------
|
||||
*/
|
||||
export * from '../generated-wrappers/contract_call_receiver';
|
||||
export * from '../generated-wrappers/multi_sig_wallet';
|
||||
export * from '../generated-wrappers/multi_sig_wallet_with_time_lock';
|
||||
export * from '../generated-wrappers/test_reject_ether';
|
||||
export * from '../generated-wrappers/test_zero_ex_governor';
|
||||
export * from '../generated-wrappers/zero_ex_governor';
|
||||
|
@ -15,17 +15,18 @@ import * as chai from 'chai';
|
||||
import { LogWithDecodedArgs } from 'ethereum-types';
|
||||
import * as _ from 'lodash';
|
||||
|
||||
import { artifacts } from './artifacts';
|
||||
import {
|
||||
artifacts,
|
||||
MultiSigWalletWithTimeLockConfirmationEventArgs,
|
||||
MultiSigWalletWithTimeLockConfirmationTimeSetEventArgs,
|
||||
MultiSigWalletWithTimeLockContract,
|
||||
MultiSigWalletWithTimeLockExecutionEventArgs,
|
||||
MultiSigWalletWithTimeLockExecutionFailureEventArgs,
|
||||
MultiSigWalletWithTimeLockSubmissionEventArgs,
|
||||
MultiSigWrapper,
|
||||
TestRejectEtherContract,
|
||||
} from '../src';
|
||||
} from './wrappers';
|
||||
|
||||
import { MultiSigWrapper } from './utils/multi_sig_wrapper';
|
||||
|
||||
chaiSetup.configure();
|
||||
const expect = chai.expect;
|
||||
|
@ -3,8 +3,8 @@ import { BigNumber } from '@0x/utils';
|
||||
import { Web3Wrapper } from '@0x/web3-wrapper';
|
||||
import { TransactionReceiptWithDecodedLogs } from 'ethereum-types';
|
||||
|
||||
import { MultiSigWalletContract, MultiSigWalletWithTimeLockContract } from '../../src';
|
||||
import { artifacts } from '../../src/artifacts';
|
||||
import { artifacts } from '../artifacts';
|
||||
import { MultiSigWalletContract, MultiSigWalletWithTimeLockContract } from '../wrappers';
|
||||
|
||||
export class MultiSigWrapper {
|
||||
private readonly _multiSig: MultiSigWalletContract | MultiSigWalletWithTimeLockContract;
|
||||
|
@ -3,7 +3,7 @@ import { AbiEncoder, BigNumber } from '@0x/utils';
|
||||
import { LogWithDecodedArgs, TransactionReceiptWithDecodedLogs } from 'ethereum-types';
|
||||
import * as _ from 'lodash';
|
||||
|
||||
import { TestZeroExGovernorContract, ZeroExGovernorContract, ZeroExGovernorSubmissionEventArgs } from '../../src';
|
||||
import { TestZeroExGovernorContract, ZeroExGovernorContract, ZeroExGovernorSubmissionEventArgs } from '../wrappers';
|
||||
|
||||
// tslint:disable: no-unnecessary-type-assertion
|
||||
export class ZeroExGovernorWrapper {
|
||||
|
@ -4,15 +4,16 @@ import { BigNumber, LibBytesRevertErrors } from '@0x/utils';
|
||||
import { LogEntry, LogWithDecodedArgs } from 'ethereum-types';
|
||||
import * as _ from 'lodash';
|
||||
|
||||
import { ZeroExGovernorWrapper } from './utils/zero_ex_governor_wrapper';
|
||||
|
||||
import { artifacts } from './artifacts';
|
||||
import {
|
||||
artifacts,
|
||||
ContractCallReceiverContract,
|
||||
ContractCallReceiverEventArgs,
|
||||
TestZeroExGovernorContract,
|
||||
ZeroExGovernorExecutionEventArgs,
|
||||
ZeroExGovernorFunctionCallTimeLockRegistrationEventArgs,
|
||||
ZeroExGovernorWrapper,
|
||||
} from '../src';
|
||||
} from './wrappers';
|
||||
|
||||
// tslint:disable: no-unnecessary-type-assertion
|
||||
blockchainTests.resets('ZeroExGovernor', env => {
|
||||
|
@ -3,11 +3,7 @@
|
||||
"compilerOptions": { "outDir": "lib", "rootDir": ".", "resolveJsonModule": true },
|
||||
"include": ["./src/**/*", "./test/**/*", "./generated-wrappers/**/*"],
|
||||
"files": [
|
||||
"generated-artifacts/ContractCallReceiver.json",
|
||||
"generated-artifacts/MultiSigWallet.json",
|
||||
"generated-artifacts/MultiSigWalletWithTimeLock.json",
|
||||
"generated-artifacts/TestRejectEther.json",
|
||||
"generated-artifacts/TestZeroExGovernor.json",
|
||||
"generated-artifacts/ZeroExGovernor.json",
|
||||
"test/generated-artifacts/ContractCallReceiver.json",
|
||||
"test/generated-artifacts/MultiSigWallet.json",
|
||||
|
@ -37,6 +37,7 @@
|
||||
"compile:truffle": "truffle compile"
|
||||
},
|
||||
"config": {
|
||||
"publicInterfaceContracts": "IStaking,IStakingEvents,IStakingProxy,IZrxVault,LibStakingRichErrors,Staking,StakingProxy,ZrxVault,TestStaking",
|
||||
"abis:comment": "This list is auto-generated by contracts-gen. Don't edit manually.",
|
||||
"abis": "./test/generated-artifacts/@(IStaking|IStakingEvents|IStakingProxy|IStorage|IStorageInit|IStructs|IZrxVault|LibCobbDouglas|LibFixedMath|LibFixedMathRichErrors|LibSafeDowncast|LibStakingRichErrors|MixinAbstract|MixinConstants|MixinCumulativeRewards|MixinDeploymentConstants|MixinExchangeFees|MixinExchangeManager|MixinFinalizer|MixinParams|MixinScheduler|MixinStake|MixinStakeBalances|MixinStakeStorage|MixinStakingPool|MixinStakingPoolRewards|MixinStorage|Staking|StakingProxy|TestAssertStorageParams|TestCobbDouglas|TestCumulativeRewardTracking|TestDelegatorRewards|TestExchangeManager|TestFinalizer|TestInitTarget|TestLibFixedMath|TestLibSafeDowncast|TestMixinCumulativeRewards|TestMixinParams|TestMixinScheduler|TestMixinStake|TestMixinStakeBalances|TestMixinStakeStorage|TestMixinStakingPool|TestMixinStakingPoolRewards|TestProtocolFees|TestProxyDestination|TestStaking|TestStakingNoWETH|TestStakingProxy|TestStakingProxyUnit|TestStorageLayoutAndConstants|ZrxVault).json"
|
||||
},
|
||||
|
@ -8,110 +8,20 @@ import { ContractArtifact } from 'ethereum-types';
|
||||
import * as IStaking from '../generated-artifacts/IStaking.json';
|
||||
import * as IStakingEvents from '../generated-artifacts/IStakingEvents.json';
|
||||
import * as IStakingProxy from '../generated-artifacts/IStakingProxy.json';
|
||||
import * as IStorage from '../generated-artifacts/IStorage.json';
|
||||
import * as IStorageInit from '../generated-artifacts/IStorageInit.json';
|
||||
import * as IStructs from '../generated-artifacts/IStructs.json';
|
||||
import * as IZrxVault from '../generated-artifacts/IZrxVault.json';
|
||||
import * as LibCobbDouglas from '../generated-artifacts/LibCobbDouglas.json';
|
||||
import * as LibFixedMath from '../generated-artifacts/LibFixedMath.json';
|
||||
import * as LibFixedMathRichErrors from '../generated-artifacts/LibFixedMathRichErrors.json';
|
||||
import * as LibSafeDowncast from '../generated-artifacts/LibSafeDowncast.json';
|
||||
import * as LibStakingRichErrors from '../generated-artifacts/LibStakingRichErrors.json';
|
||||
import * as MixinAbstract from '../generated-artifacts/MixinAbstract.json';
|
||||
import * as MixinConstants from '../generated-artifacts/MixinConstants.json';
|
||||
import * as MixinCumulativeRewards from '../generated-artifacts/MixinCumulativeRewards.json';
|
||||
import * as MixinDeploymentConstants from '../generated-artifacts/MixinDeploymentConstants.json';
|
||||
import * as MixinExchangeFees from '../generated-artifacts/MixinExchangeFees.json';
|
||||
import * as MixinExchangeManager from '../generated-artifacts/MixinExchangeManager.json';
|
||||
import * as MixinFinalizer from '../generated-artifacts/MixinFinalizer.json';
|
||||
import * as MixinParams from '../generated-artifacts/MixinParams.json';
|
||||
import * as MixinScheduler from '../generated-artifacts/MixinScheduler.json';
|
||||
import * as MixinStake from '../generated-artifacts/MixinStake.json';
|
||||
import * as MixinStakeBalances from '../generated-artifacts/MixinStakeBalances.json';
|
||||
import * as MixinStakeStorage from '../generated-artifacts/MixinStakeStorage.json';
|
||||
import * as MixinStakingPool from '../generated-artifacts/MixinStakingPool.json';
|
||||
import * as MixinStakingPoolRewards from '../generated-artifacts/MixinStakingPoolRewards.json';
|
||||
import * as MixinStorage from '../generated-artifacts/MixinStorage.json';
|
||||
import * as Staking from '../generated-artifacts/Staking.json';
|
||||
import * as StakingProxy from '../generated-artifacts/StakingProxy.json';
|
||||
import * as TestAssertStorageParams from '../generated-artifacts/TestAssertStorageParams.json';
|
||||
import * as TestCobbDouglas from '../generated-artifacts/TestCobbDouglas.json';
|
||||
import * as TestCumulativeRewardTracking from '../generated-artifacts/TestCumulativeRewardTracking.json';
|
||||
import * as TestDelegatorRewards from '../generated-artifacts/TestDelegatorRewards.json';
|
||||
import * as TestExchangeManager from '../generated-artifacts/TestExchangeManager.json';
|
||||
import * as TestFinalizer from '../generated-artifacts/TestFinalizer.json';
|
||||
import * as TestInitTarget from '../generated-artifacts/TestInitTarget.json';
|
||||
import * as TestLibFixedMath from '../generated-artifacts/TestLibFixedMath.json';
|
||||
import * as TestLibSafeDowncast from '../generated-artifacts/TestLibSafeDowncast.json';
|
||||
import * as TestMixinCumulativeRewards from '../generated-artifacts/TestMixinCumulativeRewards.json';
|
||||
import * as TestMixinParams from '../generated-artifacts/TestMixinParams.json';
|
||||
import * as TestMixinScheduler from '../generated-artifacts/TestMixinScheduler.json';
|
||||
import * as TestMixinStake from '../generated-artifacts/TestMixinStake.json';
|
||||
import * as TestMixinStakeBalances from '../generated-artifacts/TestMixinStakeBalances.json';
|
||||
import * as TestMixinStakeStorage from '../generated-artifacts/TestMixinStakeStorage.json';
|
||||
import * as TestMixinStakingPool from '../generated-artifacts/TestMixinStakingPool.json';
|
||||
import * as TestMixinStakingPoolRewards from '../generated-artifacts/TestMixinStakingPoolRewards.json';
|
||||
import * as TestProtocolFees from '../generated-artifacts/TestProtocolFees.json';
|
||||
import * as TestProxyDestination from '../generated-artifacts/TestProxyDestination.json';
|
||||
import * as TestStaking from '../generated-artifacts/TestStaking.json';
|
||||
import * as TestStakingNoWETH from '../generated-artifacts/TestStakingNoWETH.json';
|
||||
import * as TestStakingProxy from '../generated-artifacts/TestStakingProxy.json';
|
||||
import * as TestStakingProxyUnit from '../generated-artifacts/TestStakingProxyUnit.json';
|
||||
import * as TestStorageLayoutAndConstants from '../generated-artifacts/TestStorageLayoutAndConstants.json';
|
||||
import * as ZrxVault from '../generated-artifacts/ZrxVault.json';
|
||||
export const artifacts = {
|
||||
Staking: Staking as ContractArtifact,
|
||||
StakingProxy: StakingProxy as ContractArtifact,
|
||||
ZrxVault: ZrxVault as ContractArtifact,
|
||||
MixinExchangeFees: MixinExchangeFees as ContractArtifact,
|
||||
MixinExchangeManager: MixinExchangeManager as ContractArtifact,
|
||||
MixinConstants: MixinConstants as ContractArtifact,
|
||||
MixinDeploymentConstants: MixinDeploymentConstants as ContractArtifact,
|
||||
MixinStorage: MixinStorage as ContractArtifact,
|
||||
IStaking: IStaking as ContractArtifact,
|
||||
IStakingEvents: IStakingEvents as ContractArtifact,
|
||||
IStakingProxy: IStakingProxy as ContractArtifact,
|
||||
IStorage: IStorage as ContractArtifact,
|
||||
IStorageInit: IStorageInit as ContractArtifact,
|
||||
IStructs: IStructs as ContractArtifact,
|
||||
IZrxVault: IZrxVault as ContractArtifact,
|
||||
LibCobbDouglas: LibCobbDouglas as ContractArtifact,
|
||||
LibFixedMath: LibFixedMath as ContractArtifact,
|
||||
LibFixedMathRichErrors: LibFixedMathRichErrors as ContractArtifact,
|
||||
LibSafeDowncast: LibSafeDowncast as ContractArtifact,
|
||||
LibStakingRichErrors: LibStakingRichErrors as ContractArtifact,
|
||||
MixinStake: MixinStake as ContractArtifact,
|
||||
MixinStakeBalances: MixinStakeBalances as ContractArtifact,
|
||||
MixinStakeStorage: MixinStakeStorage as ContractArtifact,
|
||||
MixinCumulativeRewards: MixinCumulativeRewards as ContractArtifact,
|
||||
MixinStakingPool: MixinStakingPool as ContractArtifact,
|
||||
MixinStakingPoolRewards: MixinStakingPoolRewards as ContractArtifact,
|
||||
MixinAbstract: MixinAbstract as ContractArtifact,
|
||||
MixinFinalizer: MixinFinalizer as ContractArtifact,
|
||||
MixinParams: MixinParams as ContractArtifact,
|
||||
MixinScheduler: MixinScheduler as ContractArtifact,
|
||||
TestAssertStorageParams: TestAssertStorageParams as ContractArtifact,
|
||||
TestCobbDouglas: TestCobbDouglas as ContractArtifact,
|
||||
TestCumulativeRewardTracking: TestCumulativeRewardTracking as ContractArtifact,
|
||||
TestDelegatorRewards: TestDelegatorRewards as ContractArtifact,
|
||||
TestExchangeManager: TestExchangeManager as ContractArtifact,
|
||||
TestFinalizer: TestFinalizer as ContractArtifact,
|
||||
TestInitTarget: TestInitTarget as ContractArtifact,
|
||||
TestLibFixedMath: TestLibFixedMath as ContractArtifact,
|
||||
TestLibSafeDowncast: TestLibSafeDowncast as ContractArtifact,
|
||||
TestMixinCumulativeRewards: TestMixinCumulativeRewards as ContractArtifact,
|
||||
TestMixinParams: TestMixinParams as ContractArtifact,
|
||||
TestMixinScheduler: TestMixinScheduler as ContractArtifact,
|
||||
TestMixinStake: TestMixinStake as ContractArtifact,
|
||||
TestMixinStakeBalances: TestMixinStakeBalances as ContractArtifact,
|
||||
TestMixinStakeStorage: TestMixinStakeStorage as ContractArtifact,
|
||||
TestMixinStakingPool: TestMixinStakingPool as ContractArtifact,
|
||||
TestMixinStakingPoolRewards: TestMixinStakingPoolRewards as ContractArtifact,
|
||||
TestProtocolFees: TestProtocolFees as ContractArtifact,
|
||||
TestProxyDestination: TestProxyDestination as ContractArtifact,
|
||||
Staking: Staking as ContractArtifact,
|
||||
StakingProxy: StakingProxy as ContractArtifact,
|
||||
ZrxVault: ZrxVault as ContractArtifact,
|
||||
TestStaking: TestStaking as ContractArtifact,
|
||||
TestStakingNoWETH: TestStakingNoWETH as ContractArtifact,
|
||||
TestStakingProxy: TestStakingProxy as ContractArtifact,
|
||||
TestStakingProxyUnit: TestStakingProxyUnit as ContractArtifact,
|
||||
TestStorageLayoutAndConstants: TestStorageLayoutAndConstants as ContractArtifact,
|
||||
};
|
||||
|
@ -6,54 +6,9 @@
|
||||
export * from '../generated-wrappers/i_staking';
|
||||
export * from '../generated-wrappers/i_staking_events';
|
||||
export * from '../generated-wrappers/i_staking_proxy';
|
||||
export * from '../generated-wrappers/i_storage';
|
||||
export * from '../generated-wrappers/i_storage_init';
|
||||
export * from '../generated-wrappers/i_structs';
|
||||
export * from '../generated-wrappers/i_zrx_vault';
|
||||
export * from '../generated-wrappers/lib_cobb_douglas';
|
||||
export * from '../generated-wrappers/lib_fixed_math';
|
||||
export * from '../generated-wrappers/lib_fixed_math_rich_errors';
|
||||
export * from '../generated-wrappers/lib_safe_downcast';
|
||||
export * from '../generated-wrappers/lib_staking_rich_errors';
|
||||
export * from '../generated-wrappers/mixin_abstract';
|
||||
export * from '../generated-wrappers/mixin_constants';
|
||||
export * from '../generated-wrappers/mixin_cumulative_rewards';
|
||||
export * from '../generated-wrappers/mixin_deployment_constants';
|
||||
export * from '../generated-wrappers/mixin_exchange_fees';
|
||||
export * from '../generated-wrappers/mixin_exchange_manager';
|
||||
export * from '../generated-wrappers/mixin_finalizer';
|
||||
export * from '../generated-wrappers/mixin_params';
|
||||
export * from '../generated-wrappers/mixin_scheduler';
|
||||
export * from '../generated-wrappers/mixin_stake';
|
||||
export * from '../generated-wrappers/mixin_stake_balances';
|
||||
export * from '../generated-wrappers/mixin_stake_storage';
|
||||
export * from '../generated-wrappers/mixin_staking_pool';
|
||||
export * from '../generated-wrappers/mixin_staking_pool_rewards';
|
||||
export * from '../generated-wrappers/mixin_storage';
|
||||
export * from '../generated-wrappers/staking';
|
||||
export * from '../generated-wrappers/staking_proxy';
|
||||
export * from '../generated-wrappers/test_assert_storage_params';
|
||||
export * from '../generated-wrappers/test_cobb_douglas';
|
||||
export * from '../generated-wrappers/test_cumulative_reward_tracking';
|
||||
export * from '../generated-wrappers/test_delegator_rewards';
|
||||
export * from '../generated-wrappers/test_exchange_manager';
|
||||
export * from '../generated-wrappers/test_finalizer';
|
||||
export * from '../generated-wrappers/test_init_target';
|
||||
export * from '../generated-wrappers/test_lib_fixed_math';
|
||||
export * from '../generated-wrappers/test_lib_safe_downcast';
|
||||
export * from '../generated-wrappers/test_mixin_cumulative_rewards';
|
||||
export * from '../generated-wrappers/test_mixin_params';
|
||||
export * from '../generated-wrappers/test_mixin_scheduler';
|
||||
export * from '../generated-wrappers/test_mixin_stake';
|
||||
export * from '../generated-wrappers/test_mixin_stake_balances';
|
||||
export * from '../generated-wrappers/test_mixin_stake_storage';
|
||||
export * from '../generated-wrappers/test_mixin_staking_pool';
|
||||
export * from '../generated-wrappers/test_mixin_staking_pool_rewards';
|
||||
export * from '../generated-wrappers/test_protocol_fees';
|
||||
export * from '../generated-wrappers/test_proxy_destination';
|
||||
export * from '../generated-wrappers/test_staking';
|
||||
export * from '../generated-wrappers/test_staking_no_w_e_t_h';
|
||||
export * from '../generated-wrappers/test_staking_proxy';
|
||||
export * from '../generated-wrappers/test_staking_proxy_unit';
|
||||
export * from '../generated-wrappers/test_storage_layout_and_constants';
|
||||
export * from '../generated-wrappers/zrx_vault';
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { constants, expect, getCodesizeFromArtifact } from '@0x/contracts-test-utils';
|
||||
|
||||
import { artifacts } from '../src';
|
||||
import { artifacts } from './artifacts';
|
||||
|
||||
describe('Contract Size Checks', () => {
|
||||
describe('Staking', () => {
|
||||
|
@ -1,6 +1,7 @@
|
||||
import { blockchainTests } from '@0x/contracts-test-utils';
|
||||
|
||||
import { artifacts, TestStorageLayoutAndConstantsContract } from '../src';
|
||||
import { artifacts } from './artifacts';
|
||||
import { TestStorageLayoutAndConstantsContract } from './wrappers';
|
||||
|
||||
blockchainTests('Storage Layout and Deployment Constants Regression Tests', env => {
|
||||
it('Should successfully deploy the staking contract after running the layout and regression test', async () => {
|
||||
|
@ -3,14 +3,15 @@ import { StakingRevertErrors } from '@0x/order-utils';
|
||||
import { AuthorizableRevertErrors, BigNumber, StringRevertError } from '@0x/utils';
|
||||
|
||||
import {
|
||||
artifacts,
|
||||
StakingContract,
|
||||
StakingProxyContract,
|
||||
TestAssertStorageParamsContract,
|
||||
TestInitTargetContract,
|
||||
TestStakingProxyContract,
|
||||
TestStakingProxyStakingContractAttachedToProxyEventArgs,
|
||||
} from '../src/';
|
||||
} from './wrappers';
|
||||
|
||||
import { artifacts } from './artifacts';
|
||||
|
||||
import { constants as stakingConstants } from './utils/constants';
|
||||
|
||||
|
@ -12,19 +12,19 @@ import {
|
||||
import { BigNumber } from '@0x/utils';
|
||||
import { LogEntry } from 'ethereum-types';
|
||||
|
||||
import {
|
||||
artifacts,
|
||||
TestDelegatorRewardsContract,
|
||||
TestDelegatorRewardsEvents,
|
||||
TestDelegatorRewardsTransferEventArgs,
|
||||
} from '../../src';
|
||||
|
||||
import { artifacts } from '../artifacts';
|
||||
import {
|
||||
assertIntegerRoughlyEquals as assertRoughlyEquals,
|
||||
getRandomInteger,
|
||||
toBaseUnitAmount,
|
||||
} from '../utils/number_utils';
|
||||
|
||||
import {
|
||||
TestDelegatorRewardsContract,
|
||||
TestDelegatorRewardsEvents,
|
||||
TestDelegatorRewardsTransferEventArgs,
|
||||
} from '../wrappers';
|
||||
|
||||
blockchainTests.resets('Delegator rewards unit tests', env => {
|
||||
let testContract: TestDelegatorRewardsContract;
|
||||
|
||||
|
@ -3,12 +3,12 @@ import { StakingRevertErrors } from '@0x/order-utils';
|
||||
import { AuthorizableRevertErrors } from '@0x/utils';
|
||||
import { LogWithDecodedArgs, TransactionReceiptWithDecodedLogs } from 'ethereum-types';
|
||||
|
||||
import { artifacts } from '../artifacts';
|
||||
import {
|
||||
artifacts,
|
||||
TestExchangeManagerContract,
|
||||
TestExchangeManagerExchangeAddedEventArgs,
|
||||
TestExchangeManagerExchangeRemovedEventArgs,
|
||||
} from '../../src';
|
||||
} from '../wrappers';
|
||||
|
||||
blockchainTests.resets('Exchange Unit Tests', env => {
|
||||
// Addresses
|
||||
|
@ -12,8 +12,11 @@ import { BigNumber } from '@0x/utils';
|
||||
import { LogEntry } from 'ethereum-types';
|
||||
import * as _ from 'lodash';
|
||||
|
||||
import { artifacts } from '../artifacts';
|
||||
import { constants as stakingConstants } from '../utils/constants';
|
||||
import { assertIntegerRoughlyEquals, getRandomInteger, toBaseUnitAmount } from '../utils/number_utils';
|
||||
|
||||
import {
|
||||
artifacts,
|
||||
IStakingEventsEpochEndedEventArgs,
|
||||
IStakingEventsEpochFinalizedEventArgs,
|
||||
IStakingEventsEvents,
|
||||
@ -21,9 +24,7 @@ import {
|
||||
TestFinalizerContract,
|
||||
TestFinalizerDepositStakingPoolRewardsEventArgs as DepositStakingPoolRewardsEventArgs,
|
||||
TestFinalizerEvents,
|
||||
} from '../../src';
|
||||
import { constants as stakingConstants } from '../utils/constants';
|
||||
import { assertIntegerRoughlyEquals, getRandomInteger, toBaseUnitAmount } from '../utils/number_utils';
|
||||
} from '../wrappers';
|
||||
|
||||
blockchainTests.resets('Finalizer unit tests', env => {
|
||||
const { ZERO_AMOUNT } = constants;
|
||||
|
@ -2,10 +2,11 @@ import { blockchainTests, Numberish } from '@0x/contracts-test-utils';
|
||||
import { BigNumber } from '@0x/utils';
|
||||
import * as _ from 'lodash';
|
||||
|
||||
import { artifacts, TestCobbDouglasContract } from '../../src/';
|
||||
|
||||
import { assertRoughlyEquals, getRandomInteger, getRandomPortion, toDecimal } from '../utils/number_utils';
|
||||
|
||||
import { artifacts } from '../artifacts';
|
||||
import { TestCobbDouglasContract } from '../wrappers';
|
||||
|
||||
// tslint:disable: no-unnecessary-type-assertion
|
||||
blockchainTests('LibCobbDouglas unit tests', env => {
|
||||
const FUZZ_COUNT = 1024;
|
||||
|
@ -3,10 +3,11 @@ import { BigNumber, FixedMathRevertErrors } from '@0x/utils';
|
||||
import { Decimal } from 'decimal.js';
|
||||
import * as _ from 'lodash';
|
||||
|
||||
import { artifacts, TestLibFixedMathContract } from '../../src';
|
||||
|
||||
import { assertRoughlyEquals, fromFixed, toDecimal, toFixed } from '../utils/number_utils';
|
||||
|
||||
import { artifacts } from '../artifacts';
|
||||
import { TestLibFixedMathContract } from '../wrappers';
|
||||
|
||||
blockchainTests('LibFixedMath unit tests', env => {
|
||||
let testContract: TestLibFixedMathContract;
|
||||
|
||||
|
@ -1,7 +1,8 @@
|
||||
import { blockchainTests, expect, Numberish } from '@0x/contracts-test-utils';
|
||||
import { BigNumber, SafeMathRevertErrors } from '@0x/utils';
|
||||
|
||||
import { artifacts, TestLibSafeDowncastContract } from '../../src/';
|
||||
import { artifacts } from '../artifacts';
|
||||
import { TestLibSafeDowncastContract } from '../wrappers';
|
||||
|
||||
blockchainTests('LibSafeDowncast unit tests', env => {
|
||||
let testContract: TestLibSafeDowncastContract;
|
||||
|
@ -2,11 +2,12 @@ import { blockchainTests, expect } from '@0x/contracts-test-utils';
|
||||
import { BigNumber } from '@0x/utils';
|
||||
import * as _ from 'lodash';
|
||||
|
||||
import { artifacts, TestMixinCumulativeRewardsContract } from '../../src';
|
||||
|
||||
import { constants as stakingConstants } from '../utils/constants';
|
||||
import { toBaseUnitAmount } from '../utils/number_utils';
|
||||
|
||||
import { artifacts } from '../artifacts';
|
||||
import { TestMixinCumulativeRewardsContract } from '../wrappers';
|
||||
|
||||
blockchainTests.resets('MixinCumulativeRewards unit tests', env => {
|
||||
const ZERO = new BigNumber(0);
|
||||
const testRewards = [
|
||||
|
@ -3,14 +3,14 @@ import { StakingRevertErrors } from '@0x/order-utils';
|
||||
import { BigNumber } from '@0x/utils';
|
||||
import { LogWithDecodedArgs } from 'ethereum-types';
|
||||
|
||||
import { constants as stakingConstants } from '../utils/constants';
|
||||
|
||||
import { artifacts } from '../artifacts';
|
||||
import {
|
||||
artifacts,
|
||||
TestMixinSchedulerContract,
|
||||
TestMixinSchedulerEvents,
|
||||
TestMixinSchedulerGoToNextEpochTestInfoEventArgs,
|
||||
} from '../../src';
|
||||
|
||||
import { constants as stakingConstants } from '../utils/constants';
|
||||
} from '../wrappers';
|
||||
|
||||
blockchainTests.resets('MixinScheduler unit tests', env => {
|
||||
let testContract: TestMixinSchedulerContract;
|
||||
|
@ -2,10 +2,11 @@ import { blockchainTests, expect, Numberish } from '@0x/contracts-test-utils';
|
||||
import { StakingRevertErrors } from '@0x/order-utils';
|
||||
import { BigNumber } from '@0x/utils';
|
||||
|
||||
import { constants } from '../utils/constants';
|
||||
import { StoredBalance } from '../utils/types';
|
||||
|
||||
import { artifacts, TestMixinStakeStorageContract } from '../../src';
|
||||
import { constants } from '../utils/constants';
|
||||
import { artifacts } from '../artifacts';
|
||||
import { TestMixinStakeStorageContract } from '../wrappers';
|
||||
|
||||
blockchainTests.resets('MixinStakeStorage unit tests', env => {
|
||||
let testContract: TestMixinStakeStorageContract;
|
||||
|
@ -16,7 +16,8 @@ import { LogEntry, TransactionReceiptWithDecodedLogs } from 'ethereum-types';
|
||||
|
||||
import { StoredBalance } from '../utils/types';
|
||||
|
||||
import { artifacts, TestMixinStakingPoolRewardsContract, TestMixinStakingPoolRewardsEvents as Events } from '../../src';
|
||||
import { artifacts } from '../artifacts';
|
||||
import { TestMixinStakingPoolRewardsContract, TestMixinStakingPoolRewardsEvents as Events } from '../wrappers';
|
||||
|
||||
blockchainTests.resets('MixinStakingPoolRewards unit tests', env => {
|
||||
let testContract: TestMixinStakingPoolRewardsContract;
|
||||
|
@ -3,7 +3,8 @@ import { AuthorizableRevertErrors, BigNumber } from '@0x/utils';
|
||||
import { TransactionReceiptWithDecodedLogs } from 'ethereum-types';
|
||||
import * as _ from 'lodash';
|
||||
|
||||
import { artifacts, IStakingEventsParamsSetEventArgs, TestMixinParamsContract } from '../../src/';
|
||||
import { artifacts } from '../artifacts';
|
||||
import { IStakingEventsParamsSetEventArgs, TestMixinParamsContract } from '../wrappers';
|
||||
|
||||
import { constants as stakingConstants } from '../utils/constants';
|
||||
import { StakingParams } from '../utils/types';
|
||||
|
@ -12,14 +12,14 @@ import { BigNumber } from '@0x/utils';
|
||||
import { LogEntry } from 'ethereum-types';
|
||||
import * as _ from 'lodash';
|
||||
|
||||
import { artifacts } from '../artifacts';
|
||||
import {
|
||||
artifacts,
|
||||
IStakingEventsEvents,
|
||||
IStakingEventsStakingPoolEarnedRewardsInEpochEventArgs,
|
||||
TestProtocolFeesContract,
|
||||
TestProtocolFeesERC20ProxyTransferFromEventArgs,
|
||||
TestProtocolFeesEvents,
|
||||
} from '../../src';
|
||||
} from '../wrappers';
|
||||
|
||||
import { getRandomInteger } from '../utils/number_utils';
|
||||
|
||||
|
@ -8,7 +8,9 @@ import {
|
||||
} from '@0x/contracts-test-utils';
|
||||
import { BigNumber, SafeMathRevertErrors } from '@0x/utils';
|
||||
|
||||
import { artifacts, TestMixinStakeBalancesContract } from '../../src';
|
||||
import { artifacts } from '../artifacts';
|
||||
import { TestMixinStakeBalancesContract } from '../wrappers';
|
||||
|
||||
import { constants as stakingConstants } from '../utils/constants';
|
||||
import { StakeStatus, StoredBalance } from '../utils/types';
|
||||
|
||||
|
@ -15,8 +15,8 @@ import * as _ from 'lodash';
|
||||
|
||||
import { StakeStatus } from '../utils/types';
|
||||
|
||||
import { artifacts } from '../artifacts';
|
||||
import {
|
||||
artifacts,
|
||||
TestMixinStakeContract,
|
||||
TestMixinStakeDecreaseCurrentAndNextBalanceEventArgs as DecreaseCurrentAndNextBalanceEventArgs,
|
||||
TestMixinStakeDecreaseNextBalanceEventArgs as DecreaseNextBalanceEventArgs,
|
||||
@ -30,7 +30,7 @@ import {
|
||||
TestMixinStakeWithdrawAndSyncDelegatorRewardsEventArgs as WithdrawAndSyncDelegatorRewardsEventArgs,
|
||||
TestMixinStakeZrxVaultDepositFromEventArgs as ZrxVaultDepositFromEventArgs,
|
||||
TestMixinStakeZrxVaultWithdrawFromEventArgs as ZrxVaultWithdrawFromEventArgs,
|
||||
} from '../../src';
|
||||
} from '../wrappers';
|
||||
|
||||
blockchainTests.resets('MixinStake unit tests', env => {
|
||||
let testContract: TestMixinStakeContract;
|
||||
|
@ -12,12 +12,12 @@ import { StakingRevertErrors } from '@0x/order-utils';
|
||||
import { BigNumber, SafeMathRevertErrors } from '@0x/utils';
|
||||
import * as _ from 'lodash';
|
||||
|
||||
import { artifacts } from '../artifacts';
|
||||
import {
|
||||
artifacts,
|
||||
TestMixinStakingPoolContract,
|
||||
TestMixinStakingPoolEvents,
|
||||
TestMixinStakingPoolStakingPoolCreatedEventArgs as StakingPoolCreated,
|
||||
} from '../../src';
|
||||
} from '../wrappers';
|
||||
|
||||
blockchainTests.resets('MixinStakingPool unit tests', env => {
|
||||
let testContract: TestMixinStakingPoolContract;
|
||||
|
@ -3,13 +3,13 @@ import { StakingRevertErrors } from '@0x/order-utils';
|
||||
import { AuthorizableRevertErrors, BigNumber } from '@0x/utils';
|
||||
import * as _ from 'lodash';
|
||||
|
||||
import { artifacts } from '../artifacts';
|
||||
import {
|
||||
artifacts,
|
||||
StakingProxyEvents,
|
||||
TestProxyDestinationContract,
|
||||
TestProxyDestinationEvents,
|
||||
TestStakingProxyUnitContract,
|
||||
} from '../../src';
|
||||
} from '../wrappers';
|
||||
|
||||
import { constants as stakingConstants } from '../utils/constants';
|
||||
|
||||
|
@ -15,15 +15,15 @@ import { TransactionReceiptWithDecodedLogs } from 'ethereum-types';
|
||||
|
||||
import { constants as stakingConstants } from '../utils/constants';
|
||||
|
||||
import { artifacts } from '../artifacts';
|
||||
import {
|
||||
artifacts,
|
||||
ZrxVaultContract,
|
||||
ZrxVaultDepositEventArgs,
|
||||
ZrxVaultInCatastrophicFailureModeEventArgs,
|
||||
ZrxVaultStakingProxySetEventArgs,
|
||||
ZrxVaultWithdrawEventArgs,
|
||||
ZrxVaultZrxProxySetEventArgs,
|
||||
} from '../../src';
|
||||
} from '../wrappers';
|
||||
|
||||
blockchainTests.resets('ZrxVault unit tests', env => {
|
||||
let accounts: string[];
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user