aboutsummaryrefslogtreecommitdiffstats
path: root/packages/contracts/test/exchange/libs.ts
diff options
context:
space:
mode:
authorBrandon Millman <brandon.millman@gmail.com>2018-07-24 13:43:26 +0800
committerBrandon Millman <brandon.millman@gmail.com>2018-07-24 13:43:26 +0800
commite49d136b99cea375052c7278c0bca0df6524d2d8 (patch)
treed9ef67f50cfa860fd5da76b686aca2a7578f1d27 /packages/contracts/test/exchange/libs.ts
parent6ffa907f0ef3c94d3ea7d79d99a24939f62e0eb8 (diff)
parenta05b14e4d9659be1cc495ee33fd8962ce773f87f (diff)
downloaddexon-sol-tools-e49d136b99cea375052c7278c0bca0df6524d2d8.tar
dexon-sol-tools-e49d136b99cea375052c7278c0bca0df6524d2d8.tar.gz
dexon-sol-tools-e49d136b99cea375052c7278c0bca0df6524d2d8.tar.bz2
dexon-sol-tools-e49d136b99cea375052c7278c0bca0df6524d2d8.tar.lz
dexon-sol-tools-e49d136b99cea375052c7278c0bca0df6524d2d8.tar.xz
dexon-sol-tools-e49d136b99cea375052c7278c0bca0df6524d2d8.tar.zst
dexon-sol-tools-e49d136b99cea375052c7278c0bca0df6524d2d8.zip
Merge branch 'v2-prototype' into feature/website/jobs-page-part2
* v2-prototype: (38 commits) Revert "Publish" Publish Remove ERC721 callback functions Use != instead of > in loops, add sanity checks to market fill functions Add more tests and fixes Remove MConstants and MixinConstants for LibConstants Remove redundant external call by reimplementing fillOrderNoThrow Remove orders length check Add assertValidFillResults Update web3Wrapper CHANGELOG Get actual gasPrice from transaction instead of setting default Store orders length in varible before looping over orders Use transferFrom instead of safeTransferFrom Fix minimal tests Fix rounding error issues, use different logic when makerAsset is ZRX Rename marketSellEth => marketSellWeth Update percentage constants Update transferEthFeeAndRefund, add check to ERC721 transfer Refactor forwarding contract architecture, remove batch functions Updated CHANGELOGS ...
Diffstat (limited to 'packages/contracts/test/exchange/libs.ts')
-rw-r--r--packages/contracts/test/exchange/libs.ts16
1 files changed, 16 insertions, 0 deletions
diff --git a/packages/contracts/test/exchange/libs.ts b/packages/contracts/test/exchange/libs.ts
index 2e95fa96c..51794d8a3 100644
--- a/packages/contracts/test/exchange/libs.ts
+++ b/packages/contracts/test/exchange/libs.ts
@@ -4,6 +4,7 @@ import { SignedOrder } from '@0xproject/types';
import { BigNumber } from '@0xproject/utils';
import * as chai from 'chai';
+import { TestConstantsContract } from '../../generated_contract_wrappers/test_constants';
import { TestLibsContract } from '../../generated_contract_wrappers/test_libs';
import { addressUtils } from '../utils/address_utils';
import { artifacts } from '../utils/artifacts';
@@ -21,6 +22,7 @@ describe('Exchange libs', () => {
let signedOrder: SignedOrder;
let orderFactory: OrderFactory;
let libs: TestLibsContract;
+ let testConstants: TestConstantsContract;
before(async () => {
await blockchainLifecycle.startAsync();
@@ -32,6 +34,11 @@ describe('Exchange libs', () => {
const accounts = await web3Wrapper.getAvailableAddressesAsync();
const makerAddress = accounts[0];
libs = await TestLibsContract.deployFrom0xArtifactAsync(artifacts.TestLibs, provider, txDefaults);
+ testConstants = await TestConstantsContract.deployFrom0xArtifactAsync(
+ artifacts.TestConstants,
+ provider,
+ txDefaults,
+ );
const defaultOrderParams = {
...constants.STATIC_ORDER_PARAMS,
@@ -52,6 +59,15 @@ describe('Exchange libs', () => {
await blockchainLifecycle.revertAsync();
});
+ describe('LibConstants', () => {
+ describe('ZRX_ASSET_DATA', () => {
+ it('should have the correct ZRX_ASSET_DATA', async () => {
+ const isValid = await testConstants.assertValidZrxAssetData.callAsync();
+ expect(isValid).to.be.equal(true);
+ });
+ });
+ });
+
describe('LibOrder', () => {
describe('getOrderSchema', () => {
it('should output the correct order schema hash', async () => {