diff options
author | Alex Browne <stephenalexbrowne@gmail.com> | 2018-10-18 07:44:07 +0800 |
---|---|---|
committer | Fred Carlsen <fred@sjelfull.no> | 2018-12-13 01:12:30 +0800 |
commit | c52ab47185f3d3a808e0490440d01e21fef61e06 (patch) | |
tree | 75635b4ea599b7a46acf4cdc8ca9f394285a473d /packages/pipeline/test | |
parent | f082a3f7685b643b6b957cca95a48c5d213328de (diff) | |
download | dexon-sol-tools-c52ab47185f3d3a808e0490440d01e21fef61e06.tar dexon-sol-tools-c52ab47185f3d3a808e0490440d01e21fef61e06.tar.gz dexon-sol-tools-c52ab47185f3d3a808e0490440d01e21fef61e06.tar.bz2 dexon-sol-tools-c52ab47185f3d3a808e0490440d01e21fef61e06.tar.lz dexon-sol-tools-c52ab47185f3d3a808e0490440d01e21fef61e06.tar.xz dexon-sol-tools-c52ab47185f3d3a808e0490440d01e21fef61e06.tar.zst dexon-sol-tools-c52ab47185f3d3a808e0490440d01e21fef61e06.zip |
Update to use ContractWrappers + Infura instead of Etherscan
Diffstat (limited to 'packages/pipeline/test')
5 files changed, 24 insertions, 265 deletions
diff --git a/packages/pipeline/test/data_types/events/event_utils_test.ts b/packages/pipeline/test/data_types/events/event_utils_test.ts deleted file mode 100644 index 731819106..000000000 --- a/packages/pipeline/test/data_types/events/event_utils_test.ts +++ /dev/null @@ -1,86 +0,0 @@ -import { Exchange } from '@0xproject/contract-artifacts'; -import { BigNumber } from '@0xproject/utils'; -import * as chai from 'chai'; -import { DecodedLogArgs, LogEntry, LogWithDecodedArgs } from 'ethereum-types'; -import 'mocha'; - -import { EventsResponseResult } from '../../../src/data_sources/etherscan'; -import { convertResponseToLogEntry, decodeLogEntry } from '../../../src/data_types/events/event_utils'; -import { chaiSetup } from '../../utils/chai_setup'; - -chaiSetup.configure(); -const expect = chai.expect; - -describe('event_utils', () => { - describe('convertResponseToLogEntry', () => { - it('converts EventsResponseResult to LogEntry', () => { - const input: EventsResponseResult = { - address: '0x4f833a24e1f95d70f028921e27040ca56e09ab0b', - topics: [ - '0x82af639571738f4ebd4268fb0363d8957ebe1bbb9e78dba5ebd69eed39b154f0', - '0x00000000000000000000000067032ef7be8fa07c4335d0134099db0f3875e930', - '0x0000000000000000000000000000000000000000000000000000000000000000', - ], - data: '0x00000000000000000000000000000000000000000000000000000165f2d3f94d', - blockNumber: '0x61127b', - timeStamp: '0x5ba2878e', - gasPrice: '0x1a13b8600', - gasUsed: '0xd9dc', - logIndex: '0x63', - transactionHash: '0xa3f71931ddab6e758b9d1755b2715b376759f49f23fff60755f7e073367d61b5', - transactionIndex: '0x35', - }; - const expected: LogEntry = { - logIndex: 99, - transactionIndex: 53, - transactionHash: input.transactionHash, - blockHash: '', - blockNumber: 6361723, - address: input.address, - data: input.data, - topics: input.topics, - }; - const actual = convertResponseToLogEntry(input); - expect(actual).deep.equal(expected); - }); - }); - describe('decodeLogEntry', () => { - it('decodes LogEntry into LogWithDecodedArgs', () => { - const input: LogEntry = { - logIndex: 96, - transactionIndex: 52, - transactionHash: '0x02b59043e9b38b430c8c66abe67ab4a9e5509def8f8552b54231e88db1839831', - blockHash: '', - blockNumber: 6361723, - address: '0x4f833a24e1f95d70f028921e27040ca56e09ab0b', - data: - '0x00000000000000000000000067032ef7be8fa07c4335d0134099db0f3875e93000000000000000000000000067032ef7be8fa07c4335d0134099db0f3875e930000000000000000000000000000000000000000000000000000000174876e8000000000000000000000000000000000000000000000000000000000013ab668000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000001600000000000000000000000000000000000000000000000000000000000000024f47261b0000000000000000000000000e41d2489571d322189246dafa5ebde1f4699f498000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000024f47261b0000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc200000000000000000000000000000000000000000000000000000000', - topics: [ - '0x0bcc4c97732e47d9946f229edb95f5b6323f601300e4690de719993f3c371129', - '0x0000000000000000000000003f7f832abb3be28442c0e48b7222e02b322c78f3', - '0x000000000000000000000000a258b39954cef5cb142fd567a46cddb31a670124', - '0x523404b4e6f847d9aefcf5be024be396449b4635590291fd7a28a8c940843858', - ], - }; - const expected: LogWithDecodedArgs<DecodedLogArgs> = { - ...input, - event: 'Fill', - args: { - makerAddress: '0x3f7f832abb3be28442c0e48b7222e02b322c78f3', - feeRecipientAddress: '0xa258b39954cef5cb142fd567a46cddb31a670124', - takerAddress: '0x67032ef7be8fa07c4335d0134099db0f3875e930', - senderAddress: '0x67032ef7be8fa07c4335d0134099db0f3875e930', - makerAssetFilledAmount: new BigNumber('100000000000'), - takerAssetFilledAmount: new BigNumber('330000000'), - makerFeePaid: new BigNumber('0'), - takerFeePaid: new BigNumber('0'), - orderHash: '0x523404b4e6f847d9aefcf5be024be396449b4635590291fd7a28a8c940843858', - makerAssetData: '0xf47261b0000000000000000000000000e41d2489571d322189246dafa5ebde1f4699f498', - takerAssetData: '0xf47261b0000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2', - }, - }; - const actual = decodeLogEntry(Exchange.compilerOutput.abi, input); - expect(actual).deep.equal(expected); - }); - }); -}); diff --git a/packages/pipeline/test/data_types/events/exchange_events_test.ts b/packages/pipeline/test/data_types/events/exchange_events_test.ts deleted file mode 100644 index f1432892d..000000000 --- a/packages/pipeline/test/data_types/events/exchange_events_test.ts +++ /dev/null @@ -1,77 +0,0 @@ -import { ExchangeFillEventArgs } from '@0xproject/contract-wrappers'; -import { BigNumber } from '@0xproject/utils'; -import * as chai from 'chai'; -import { LogWithDecodedArgs } from 'ethereum-types'; -import 'mocha'; - -import { _convertToEntity } from '../../../src/data_types/events/exchange_events'; -import { ExchangeFillEvent } from '../../../src/entities/ExchangeFillEvent'; -import { chaiSetup } from '../../utils/chai_setup'; - -chaiSetup.configure(); -const expect = chai.expect; - -// tslint:disable:custom-no-magic-numbers -describe('exchange_events', () => { - describe('_convertToEntity', () => { - it('converts LogWithDecodedArgs to ExchangeFillEvent entity', () => { - const input: LogWithDecodedArgs<ExchangeFillEventArgs> = { - logIndex: 102, - transactionIndex: 38, - transactionHash: '0x6dd106d002873746072fc5e496dd0fb2541b68c77bcf9184ae19a42fd33657fe', - blockHash: '', - blockNumber: 6276262, - address: '0x4f833a24e1f95d70f028921e27040ca56e09ab0b', - data: - '0x000000000000000000000000f6da68519f78b0d0bc93c701e86affcb75c92428000000000000000000000000f6da68519f78b0d0bc93c701e86affcb75c92428000000000000000000000000000000000000000000000000002386f26fc10000000000000000000000000000000000000000000000000000016345785d8a000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000001600000000000000000000000000000000000000000000000000000000000000024f47261b0000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000024f47261b0000000000000000000000000e41d2489571d322189246dafa5ebde1f4699f49800000000000000000000000000000000000000000000000000000000', - topics: [ - '0x0bcc4c97732e47d9946f229edb95f5b6323f601300e4690de719993f3c371129', - '0x000000000000000000000000f6da68519f78b0d0bc93c701e86affcb75c92428', - '0x000000000000000000000000c370d2a5920344aa6b7d8d11250e3e861434cbdd', - '0xab12ed2cbaa5615ab690b9da75a46e53ddfcf3f1a68655b5fe0d94c75a1aac4a', - ], - event: 'Fill', - args: { - makerAddress: '0xf6da68519f78b0d0bc93c701e86affcb75c92428', - feeRecipientAddress: '0xc370d2a5920344aa6b7d8d11250e3e861434cbdd', - takerAddress: '0xf6da68519f78b0d0bc93c701e86affcb75c92428', - senderAddress: '0xf6da68519f78b0d0bc93c701e86affcb75c92428', - makerAssetFilledAmount: new BigNumber('10000000000000000'), - takerAssetFilledAmount: new BigNumber('100000000000000000'), - makerFeePaid: new BigNumber('0'), - takerFeePaid: new BigNumber('0'), - orderHash: '0xab12ed2cbaa5615ab690b9da75a46e53ddfcf3f1a68655b5fe0d94c75a1aac4a', - makerAssetData: '0xf47261b0000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2', - takerAssetData: '0xf47261b0000000000000000000000000e41d2489571d322189246dafa5ebde1f4699f498', - }, - }; - const expected = new ExchangeFillEvent(); - expected.contractAddress = '0x4f833a24e1f95d70f028921e27040ca56e09ab0b'; - expected.blockNumber = 6276262; - expected.logIndex = 102; - expected.rawData = - '0x000000000000000000000000f6da68519f78b0d0bc93c701e86affcb75c92428000000000000000000000000f6da68519f78b0d0bc93c701e86affcb75c92428000000000000000000000000000000000000000000000000002386f26fc10000000000000000000000000000000000000000000000000000016345785d8a000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000001600000000000000000000000000000000000000000000000000000000000000024f47261b0000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000024f47261b0000000000000000000000000e41d2489571d322189246dafa5ebde1f4699f49800000000000000000000000000000000000000000000000000000000'; - expected.makerAddress = '0xf6da68519f78b0d0bc93c701e86affcb75c92428'; - expected.takerAddress = '0xf6da68519f78b0d0bc93c701e86affcb75c92428'; - expected.feeRecepientAddress = '0xc370d2a5920344aa6b7d8d11250e3e861434cbdd'; - expected.senderAddress = '0xf6da68519f78b0d0bc93c701e86affcb75c92428'; - expected.makerAssetFilledAmount = '10000000000000000'; - expected.takerAssetFilledAmount = '100000000000000000'; - expected.makerFeePaid = '0'; - expected.takerFeePaid = '0'; - expected.orderHash = '0xab12ed2cbaa5615ab690b9da75a46e53ddfcf3f1a68655b5fe0d94c75a1aac4a'; - expected.rawMakerAssetData = '0xf47261b0000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2'; - expected.makerAssetType = 'erc20'; - expected.makerAssetProxyId = '0xf47261b0'; - expected.makerTokenAddress = '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2'; - expected.makerTokenId = null; - expected.rawTakerAssetData = '0xf47261b0000000000000000000000000e41d2489571d322189246dafa5ebde1f4699f498'; - expected.takerAssetType = 'erc20'; - expected.takerAssetProxyId = '0xf47261b0'; - expected.takerTokenAddress = '0xe41d2489571d322189246dafa5ebde1f4699f498'; - expected.takerTokenId = null; - const actual = _convertToEntity(input); - expect(actual).deep.equal(expected); - }); - }); -}); diff --git a/packages/pipeline/test/data_types/sra_orders/index_test.ts b/packages/pipeline/test/data_types/sra_orders/index_test.ts deleted file mode 100644 index 174f89b4f..000000000 --- a/packages/pipeline/test/data_types/sra_orders/index_test.ts +++ /dev/null @@ -1,79 +0,0 @@ -import { APIOrder } from '@0xproject/types'; -import { BigNumber } from '@0xproject/utils'; -import * as chai from 'chai'; -import 'mocha'; -import { Connection, createConnection } from 'typeorm'; - -import { _convertToEntity } from '../../../src/data_types/sra_orders'; -import { SraOrder } from '../../../src/entities/SraOrder'; -import { chaiSetup } from '../../utils/chai_setup'; - -import { config } from '../../../src/ormconfig'; - -chaiSetup.configure(); -const expect = chai.expect; - -// tslint:disable:custom-no-magic-numbers -describe('sra_orders', () => { - describe('_convertToEntity', () => { - before(async () => { - // HACK(albrow): We don't actually use this connection but it seems - // to be required because chai calls the inspect method of the - // entity and that method requires a "default" connection. - await createConnection(config); - }); - it('converts ApiOrder to SraOrder entity', () => { - const input: APIOrder = { - order: { - makerAddress: '0xb45df06e38540a675fdb5b598abf2c0dbe9d6b81', - takerAddress: '0x0000000000000000000000000000000000000000', - feeRecipientAddress: '0xa258b39954cef5cb142fd567a46cddb31a670124', - senderAddress: '0x0000000000000000000000000000000000000000', - makerAssetAmount: new BigNumber('1619310371000000000'), - takerAssetAmount: new BigNumber('8178335207070707070707'), - makerFee: new BigNumber('0'), - takerFee: new BigNumber('0'), - exchangeAddress: '0x4f833a24e1f95d70f028921e27040ca56e09ab0b', - expirationTimeSeconds: new BigNumber('1538529488'), - signature: - '0x1b5a5d672b0d647b5797387ccbb89d822d5d2e873346b014f4ff816ff0783f2a7a0d2824d2d7042ec8ea375bc7f870963e1cb8248f1db03ddf125e27b5963aa11f03', - salt: new BigNumber('1537924688891'), - makerAssetData: '0xf47261b0000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2', - takerAssetData: '0xf47261b000000000000000000000000042d6622dece394b54999fbd73d108123806f6a18', - }, - metaData: { isThisArbitraryData: true, powerLevel: 9001 }, - }; - const expected = new SraOrder(); - expected.exchangeAddress = '0x4f833a24e1f95d70f028921e27040ca56e09ab0b'; - expected.orderHashHex = '0x1bdbeb0d088a33da28b9ee6d94e8771452f90f4a69107da2fa75195d61b9a1c9'; - expected.lastUpdatedTimestamp = 0; - expected.firstSeenTimestamp = 0; - expected.makerAddress = '0xb45df06e38540a675fdb5b598abf2c0dbe9d6b81'; - expected.takerAddress = '0x0000000000000000000000000000000000000000'; - expected.feeRecipientAddress = '0xa258b39954cef5cb142fd567a46cddb31a670124'; - expected.senderAddress = '0x0000000000000000000000000000000000000000'; - expected.makerAssetAmount = '1619310371000000000'; - expected.takerAssetAmount = '8178335207070707070707'; - expected.makerFee = '0'; - expected.takerFee = '0'; - expected.expirationTimeSeconds = '1538529488'; - expected.salt = '1537924688891'; - expected.signature = - '0x1b5a5d672b0d647b5797387ccbb89d822d5d2e873346b014f4ff816ff0783f2a7a0d2824d2d7042ec8ea375bc7f870963e1cb8248f1db03ddf125e27b5963aa11f03'; - expected.rawMakerAssetData = '0xf47261b0000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2'; - expected.makerAssetType = 'erc20'; - expected.makerAssetProxyId = '0xf47261b0'; - expected.makerTokenAddress = '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2'; - expected.makerTokenId = null; - expected.rawTakerAssetData = '0xf47261b000000000000000000000000042d6622dece394b54999fbd73d108123806f6a18'; - expected.takerAssetType = 'erc20'; - expected.takerAssetProxyId = '0xf47261b0'; - expected.takerTokenAddress = '0x42d6622dece394b54999fbd73d108123806f6a18'; - expected.takerTokenId = null; - expected.metaDataJson = '{"isThisArbitraryData":true,"powerLevel":9001}'; - - const actual = _convertToEntity(input); - expect(actual).deep.equal(expected); - }); - }); -}); diff --git a/packages/pipeline/test/parsers/events/index_test.ts b/packages/pipeline/test/parsers/events/index_test.ts index 7e439ce39..2a2db1a94 100644 --- a/packages/pipeline/test/parsers/events/index_test.ts +++ b/packages/pipeline/test/parsers/events/index_test.ts @@ -1,11 +1,11 @@ -import { ExchangeFillEventArgs } from '@0x/contract-wrappers'; -import { BigNumber } from '@0x/utils'; +import { ExchangeFillEventArgs } from '@0xproject/contract-wrappers'; +import { BigNumber } from '@0xproject/utils'; import * as chai from 'chai'; import { LogWithDecodedArgs } from 'ethereum-types'; import 'mocha'; -import { ExchangeFillEvent } from '../../../src/entities'; -import { _convertToExchangeFillEvent } from '../../../src/parsers/events'; +import { ExchangeFillEvent } from '../../../src/entities/ExchangeFillEvent'; +import { _convertToEntity } from '../../../src/parsers/events'; import { chaiSetup } from '../../utils/chai_setup'; chaiSetup.configure(); @@ -13,7 +13,7 @@ const expect = chai.expect; // tslint:disable:custom-no-magic-numbers describe('exchange_events', () => { - describe('_convertToExchangeFillEvent', () => { + describe('_convertToEntity', () => { it('converts LogWithDecodedArgs to ExchangeFillEvent entity', () => { const input: LogWithDecodedArgs<ExchangeFillEventArgs> = { logIndex: 102, @@ -39,7 +39,7 @@ describe('exchange_events', () => { makerAssetFilledAmount: new BigNumber('10000000000000000'), takerAssetFilledAmount: new BigNumber('100000000000000000'), makerFeePaid: new BigNumber('0'), - takerFeePaid: new BigNumber('12345'), + takerFeePaid: new BigNumber('0'), orderHash: '0xab12ed2cbaa5615ab690b9da75a46e53ddfcf3f1a68655b5fe0d94c75a1aac4a', makerAssetData: '0xf47261b0000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2', takerAssetData: '0xf47261b0000000000000000000000000e41d2489571d322189246dafa5ebde1f4699f498', @@ -51,15 +51,14 @@ describe('exchange_events', () => { expected.logIndex = 102; expected.rawData = '0x000000000000000000000000f6da68519f78b0d0bc93c701e86affcb75c92428000000000000000000000000f6da68519f78b0d0bc93c701e86affcb75c92428000000000000000000000000000000000000000000000000002386f26fc10000000000000000000000000000000000000000000000000000016345785d8a000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000001600000000000000000000000000000000000000000000000000000000000000024f47261b0000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000024f47261b0000000000000000000000000e41d2489571d322189246dafa5ebde1f4699f49800000000000000000000000000000000000000000000000000000000'; - expected.transactionHash = '0x6dd106d002873746072fc5e496dd0fb2541b68c77bcf9184ae19a42fd33657fe'; expected.makerAddress = '0xf6da68519f78b0d0bc93c701e86affcb75c92428'; expected.takerAddress = '0xf6da68519f78b0d0bc93c701e86affcb75c92428'; - expected.feeRecipientAddress = '0xc370d2a5920344aa6b7d8d11250e3e861434cbdd'; + expected.feeRecepientAddress = '0xc370d2a5920344aa6b7d8d11250e3e861434cbdd'; expected.senderAddress = '0xf6da68519f78b0d0bc93c701e86affcb75c92428'; - expected.makerAssetFilledAmount = new BigNumber('10000000000000000'); - expected.takerAssetFilledAmount = new BigNumber('100000000000000000'); - expected.makerFeePaid = new BigNumber('0'); - expected.takerFeePaid = new BigNumber('12345'); + expected.makerAssetFilledAmount = '10000000000000000'; + expected.takerAssetFilledAmount = '100000000000000000'; + expected.makerFeePaid = '0'; + expected.takerFeePaid = '0'; expected.orderHash = '0xab12ed2cbaa5615ab690b9da75a46e53ddfcf3f1a68655b5fe0d94c75a1aac4a'; expected.rawMakerAssetData = '0xf47261b0000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2'; expected.makerAssetType = 'erc20'; @@ -71,7 +70,7 @@ describe('exchange_events', () => { expected.takerAssetProxyId = '0xf47261b0'; expected.takerTokenAddress = '0xe41d2489571d322189246dafa5ebde1f4699f498'; expected.takerTokenId = null; - const actual = _convertToExchangeFillEvent(input); + const actual = _convertToEntity(input); expect(actual).deep.equal(expected); }); }); diff --git a/packages/pipeline/test/parsers/sra_orders/index_test.ts b/packages/pipeline/test/parsers/sra_orders/index_test.ts index ee2842ef3..952a6f3c6 100644 --- a/packages/pipeline/test/parsers/sra_orders/index_test.ts +++ b/packages/pipeline/test/parsers/sra_orders/index_test.ts @@ -1,9 +1,9 @@ -import { APIOrder } from '@0x/types'; -import { BigNumber } from '@0x/utils'; +import { APIOrder } from '@0xproject/types'; +import { BigNumber } from '@0xproject/utils'; import * as chai from 'chai'; import 'mocha'; -import { SraOrder } from '../../../src/entities'; +import { SraOrder } from '../../../src/entities/SraOrder'; import { _convertToEntity } from '../../../src/parsers/sra_orders'; import { chaiSetup } from '../../utils/chai_setup'; @@ -37,16 +37,18 @@ describe('sra_orders', () => { const expected = new SraOrder(); expected.exchangeAddress = '0x4f833a24e1f95d70f028921e27040ca56e09ab0b'; expected.orderHashHex = '0x1bdbeb0d088a33da28b9ee6d94e8771452f90f4a69107da2fa75195d61b9a1c9'; + expected.lastUpdatedTimestamp = 0; + expected.firstSeenTimestamp = 0; expected.makerAddress = '0xb45df06e38540a675fdb5b598abf2c0dbe9d6b81'; expected.takerAddress = '0x0000000000000000000000000000000000000000'; expected.feeRecipientAddress = '0xa258b39954cef5cb142fd567a46cddb31a670124'; expected.senderAddress = '0x0000000000000000000000000000000000000000'; - expected.makerAssetAmount = new BigNumber('1619310371000000000'); - expected.takerAssetAmount = new BigNumber('8178335207070707070707'); - expected.makerFee = new BigNumber('0'); - expected.takerFee = new BigNumber('0'); - expected.expirationTimeSeconds = new BigNumber('1538529488'); - expected.salt = new BigNumber('1537924688891'); + expected.makerAssetAmount = '1619310371000000000'; + expected.takerAssetAmount = '8178335207070707070707'; + expected.makerFee = '0'; + expected.takerFee = '0'; + expected.expirationTimeSeconds = '1538529488'; + expected.salt = '1537924688891'; expected.signature = '0x1b5a5d672b0d647b5797387ccbb89d822d5d2e873346b014f4ff816ff0783f2a7a0d2824d2d7042ec8ea375bc7f870963e1cb8248f1db03ddf125e27b5963aa11f03'; expected.rawMakerAssetData = '0xf47261b0000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2'; @@ -59,7 +61,7 @@ describe('sra_orders', () => { expected.takerAssetProxyId = '0xf47261b0'; expected.takerTokenAddress = '0x42d6622dece394b54999fbd73d108123806f6a18'; expected.takerTokenId = null; - expected.metadataJson = '{"isThisArbitraryData":true,"powerLevel":9001}'; + expected.metaDataJson = '{"isThisArbitraryData":true,"powerLevel":9001}'; const actual = _convertToEntity(input); expect(actual).deep.equal(expected); |