diff options
author | Amir Bandeali <abandeali1@gmail.com> | 2018-07-23 08:10:07 +0800 |
---|---|---|
committer | Amir Bandeali <abandeali1@gmail.com> | 2018-07-23 22:34:47 +0800 |
commit | c2ae9f62a41466c714a5e2232782d08261464b9c (patch) | |
tree | 54ae38ad5def1d47bb51fe7af417d3f82c57bf9f /packages/contracts/test | |
parent | 4159a8fe6e621fa01ccac6b97778374be658d984 (diff) | |
download | dexon-sol-tools-c2ae9f62a41466c714a5e2232782d08261464b9c.tar dexon-sol-tools-c2ae9f62a41466c714a5e2232782d08261464b9c.tar.gz dexon-sol-tools-c2ae9f62a41466c714a5e2232782d08261464b9c.tar.bz2 dexon-sol-tools-c2ae9f62a41466c714a5e2232782d08261464b9c.tar.lz dexon-sol-tools-c2ae9f62a41466c714a5e2232782d08261464b9c.tar.xz dexon-sol-tools-c2ae9f62a41466c714a5e2232782d08261464b9c.tar.zst dexon-sol-tools-c2ae9f62a41466c714a5e2232782d08261464b9c.zip |
Add tests to verify ZRX_ASSET_DATA
Diffstat (limited to 'packages/contracts/test')
-rw-r--r-- | packages/contracts/test/exchange/libs.ts | 16 | ||||
-rw-r--r-- | packages/contracts/test/utils/artifacts.ts | 2 |
2 files changed, 18 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 () => { diff --git a/packages/contracts/test/utils/artifacts.ts b/packages/contracts/test/utils/artifacts.ts index 854c1cd06..63bd555a4 100644 --- a/packages/contracts/test/utils/artifacts.ts +++ b/packages/contracts/test/utils/artifacts.ts @@ -15,6 +15,7 @@ import * as MultiSigWallet from '../../artifacts/MultiSigWallet.json'; import * as MultiSigWalletWithTimeLock from '../../artifacts/MultiSigWalletWithTimeLock.json'; import * as TestAssetProxyDispatcher from '../../artifacts/TestAssetProxyDispatcher.json'; import * as TestAssetProxyOwner from '../../artifacts/TestAssetProxyOwner.json'; +import * as TestConstants from '../../artifacts/TestConstants.json'; import * as TestLibBytes from '../../artifacts/TestLibBytes.json'; import * as TestLibs from '../../artifacts/TestLibs.json'; import * as TestSignatureValidator from '../../artifacts/TestSignatureValidator.json'; @@ -42,6 +43,7 @@ export const artifacts = { MultiSigWalletWithTimeLock: (MultiSigWalletWithTimeLock as any) as ContractArtifact, TestAssetProxyOwner: (TestAssetProxyOwner as any) as ContractArtifact, TestAssetProxyDispatcher: (TestAssetProxyDispatcher as any) as ContractArtifact, + TestConstants: (TestConstants as any) as ContractArtifact, TestLibBytes: (TestLibBytes as any) as ContractArtifact, TestLibs: (TestLibs as any) as ContractArtifact, TestSignatureValidator: (TestSignatureValidator as any) as ContractArtifact, |