diff options
author | Greg Hysen <greg.hysen@gmail.com> | 2018-04-12 01:21:37 +0800 |
---|---|---|
committer | Amir Bandeali <abandeali1@gmail.com> | 2018-04-21 04:56:17 +0800 |
commit | bc7672652ecbb39c57955d47cb96a8b9d558ba70 (patch) | |
tree | 0c3b623a3c7453ffe6643b40f03f9582d30af22c /packages/contracts | |
parent | cc77f8489e5a176406d4871772fcbae58703bafc (diff) | |
download | dexon-sol-tools-bc7672652ecbb39c57955d47cb96a8b9d558ba70.tar dexon-sol-tools-bc7672652ecbb39c57955d47cb96a8b9d558ba70.tar.gz dexon-sol-tools-bc7672652ecbb39c57955d47cb96a8b9d558ba70.tar.bz2 dexon-sol-tools-bc7672652ecbb39c57955d47cb96a8b9d558ba70.tar.lz dexon-sol-tools-bc7672652ecbb39c57955d47cb96a8b9d558ba70.tar.xz dexon-sol-tools-bc7672652ecbb39c57955d47cb96a8b9d558ba70.tar.zst dexon-sol-tools-bc7672652ecbb39c57955d47cb96a8b9d558ba70.zip |
makerAssetProxyData/takerAssetProxyData -> makerAssetData/takerAssetData
Diffstat (limited to 'packages/contracts')
7 files changed, 46 insertions, 46 deletions
diff --git a/packages/contracts/src/contracts/current/protocol/Exchange/LibOrder.sol b/packages/contracts/src/contracts/current/protocol/Exchange/LibOrder.sol index 759619fc4..862a8cfb5 100644 --- a/packages/contracts/src/contracts/current/protocol/Exchange/LibOrder.sol +++ b/packages/contracts/src/contracts/current/protocol/Exchange/LibOrder.sol @@ -34,8 +34,8 @@ contract LibOrder { "uint256 takerFee", "uint256 expirationTimeSeconds", "uint256 salt", - "bytes makerAssetProxyData", - "bytes takerAssetProxyData" + "bytes makerAssetData", + "bytes takerAssetData" ); struct Order { @@ -50,8 +50,8 @@ contract LibOrder { uint256 takerFee; uint256 expirationTimeSeconds; uint256 salt; - bytes makerAssetProxyData; - bytes takerAssetProxyData; + bytes makerAssetData; + bytes takerAssetData; } /// @dev Calculates Keccak-256 hash of the order. @@ -78,8 +78,8 @@ contract LibOrder { order.takerFee, order.expirationTimeSeconds, order.salt, - order.makerAssetProxyData, - order.takerAssetProxyData + order.makerAssetData, + order.takerAssetData ) ); return orderHash; diff --git a/packages/contracts/src/contracts/current/protocol/Exchange/MixinSettlementProxy.sol b/packages/contracts/src/contracts/current/protocol/Exchange/MixinSettlementProxy.sol index 9e2d8bfb9..8ffbbf434 100644 --- a/packages/contracts/src/contracts/current/protocol/Exchange/MixinSettlementProxy.sol +++ b/packages/contracts/src/contracts/current/protocol/Exchange/MixinSettlementProxy.sol @@ -78,13 +78,13 @@ contract MixinSettlementProxy is { makerTokenFilledAmount = getPartialAmount(takerTokenFilledAmount, order.takerTokenAmount, order.makerTokenAmount); TRANSFER_PROXY.transferFrom( - order.makerAssetProxyData, + order.makerAssetData, order.makerAddress, takerAddress, makerTokenFilledAmount ); TRANSFER_PROXY.transferFrom( - order.takerAssetProxyData, + order.takerAssetData, takerAddress, order.makerAddress, takerTokenFilledAmount diff --git a/packages/contracts/src/utils/order_utils.ts b/packages/contracts/src/utils/order_utils.ts index 8eb4da35a..052ae89d6 100644 --- a/packages/contracts/src/utils/order_utils.ts +++ b/packages/contracts/src/utils/order_utils.ts @@ -35,8 +35,8 @@ export const orderUtils = { takerFee: signedOrder.takerFee, expirationTimeSeconds: signedOrder.expirationTimeSeconds, salt: signedOrder.salt, - makerAssetProxyData: signedOrder.makerAssetProxyData, - takerAssetProxyData: signedOrder.takerAssetProxyData, + makerAssetData: signedOrder.makerAssetData, + takerAssetData: signedOrder.takerAssetData, }; return orderStruct; }, @@ -54,8 +54,8 @@ export const orderUtils = { 'uint256 takerFee', 'uint256 expirationTimeSeconds', 'uint256 salt', - 'bytes makerAssetProxyData', - 'bytes takerAssetProxyData', + 'bytes makerAssetData', + 'bytes takerAssetData', ]); const orderParamsHashBuff = crypto.solSHA3([ order.exchangeAddress, @@ -70,8 +70,8 @@ export const orderUtils = { order.takerFee, order.expirationTimeSeconds, order.salt, - ethUtil.toBuffer(order.makerAssetProxyData), - ethUtil.toBuffer(order.takerAssetProxyData), + ethUtil.toBuffer(order.makerAssetData), + ethUtil.toBuffer(order.takerAssetData), ]); const orderSchemaHashHex = `0x${orderSchemaHashBuff.toString('hex')}`; const orderParamsHashHex = `0x${orderParamsHashBuff.toString('hex')}`; diff --git a/packages/contracts/src/utils/types.ts b/packages/contracts/src/utils/types.ts index dc12e927a..8cfde8a07 100644 --- a/packages/contracts/src/utils/types.ts +++ b/packages/contracts/src/utils/types.ts @@ -54,8 +54,8 @@ export interface DefaultOrderParams { takerTokenAmount: BigNumber; makerFeeAmount: BigNumber; takerFeeAmount: BigNumber; - makerAssetProxyData: string; - takerAssetProxyData: string; + makerAssetData: string; + takerAssetData: string; } export interface TransactionDataParams { @@ -148,8 +148,8 @@ export interface OrderStruct { takerFee: BigNumber; expirationTimeSeconds: BigNumber; salt: BigNumber; - makerAssetProxyData: string; - takerAssetProxyData: string; + makerAssetData: string; + takerAssetData: string; } export interface UnsignedOrder extends OrderStruct { diff --git a/packages/contracts/test/exchange/core.ts b/packages/contracts/test/exchange/core.ts index d95dbea35..2f357be57 100644 --- a/packages/contracts/test/exchange/core.ts +++ b/packages/contracts/test/exchange/core.ts @@ -183,8 +183,8 @@ describe('Exchange', () => { takerTokenAmount: ZeroEx.toBaseUnitAmount(new BigNumber(200), 18), makerFee: ZeroEx.toBaseUnitAmount(new BigNumber(1), 18), takerFee: ZeroEx.toBaseUnitAmount(new BigNumber(1), 18), - makerAssetProxyData: encodeERC20ProxyMetadata(rep.address), - takerAssetProxyData: encodeERC20ProxyMetadata(dgd.address), + makerAssetData: encodeERC20ProxyMetadata(rep.address), + takerAssetData: encodeERC20ProxyMetadata(dgd.address), }; const privateKey = constants.TESTRPC_PRIVATE_KEYS[0]; orderFactory = new OrderFactory(privateKey, defaultOrderParams); @@ -966,8 +966,8 @@ describe('Exchange', () => { takerTokenAddress: ck.address, makerTokenAmount: new BigNumber(1), takerTokenAmount: new BigNumber(1), - makerAssetProxyData: encodeERC721ProxyMetadata(ck.address, makerTokenId), - takerAssetProxyData: encodeERC721ProxyMetadata(ck.address, takerTokenId), + makerAssetData: encodeERC721ProxyMetadata(ck.address, makerTokenId), + takerAssetData: encodeERC721ProxyMetadata(ck.address, takerTokenId), }); // Verify pre-conditions @@ -996,8 +996,8 @@ describe('Exchange', () => { takerTokenAddress: ck.address, makerTokenAmount: new BigNumber(1), takerTokenAmount: new BigNumber(1), - makerAssetProxyData: encodeERC721ProxyMetadata(ck.address, makerTokenId), - takerAssetProxyData: encodeERC721ProxyMetadata(ck.address, takerTokenId), + makerAssetData: encodeERC721ProxyMetadata(ck.address, makerTokenId), + takerAssetData: encodeERC721ProxyMetadata(ck.address, takerTokenId), }); // Verify pre-conditions @@ -1026,8 +1026,8 @@ describe('Exchange', () => { takerTokenAddress: ck.address, makerTokenAmount: new BigNumber(1), takerTokenAmount: new BigNumber(1), - makerAssetProxyData: encodeERC721ProxyMetadata(ck.address, makerTokenId), - takerAssetProxyData: encodeERC721ProxyMetadata(ck.address, takerTokenId), + makerAssetData: encodeERC721ProxyMetadata(ck.address, makerTokenId), + takerAssetData: encodeERC721ProxyMetadata(ck.address, takerTokenId), }); // Verify pre-conditions @@ -1052,8 +1052,8 @@ describe('Exchange', () => { takerTokenAddress: ck.address, makerTokenAmount: new BigNumber(1), takerTokenAmount: new BigNumber(1), - makerAssetProxyData: encodeERC721ProxyMetadata(ck.address, makerTokenId), - takerAssetProxyData: encodeERC721ProxyMetadata(ck.address, takerTokenId), + makerAssetData: encodeERC721ProxyMetadata(ck.address, makerTokenId), + takerAssetData: encodeERC721ProxyMetadata(ck.address, takerTokenId), }); // Verify pre-conditions @@ -1078,8 +1078,8 @@ describe('Exchange', () => { takerTokenAddress: ck.address, makerTokenAmount: new BigNumber(2), takerTokenAmount: new BigNumber(1), - makerAssetProxyData: encodeERC721ProxyMetadata(ck.address, makerTokenId), - takerAssetProxyData: encodeERC721ProxyMetadata(ck.address, takerTokenId), + makerAssetData: encodeERC721ProxyMetadata(ck.address, makerTokenId), + takerAssetData: encodeERC721ProxyMetadata(ck.address, takerTokenId), }); // Verify pre-conditions @@ -1104,8 +1104,8 @@ describe('Exchange', () => { takerTokenAddress: ck.address, makerTokenAmount: new BigNumber(1), takerTokenAmount: new BigNumber(500), - makerAssetProxyData: encodeERC721ProxyMetadata(ck.address, makerTokenId), - takerAssetProxyData: encodeERC721ProxyMetadata(ck.address, takerTokenId), + makerAssetData: encodeERC721ProxyMetadata(ck.address, makerTokenId), + takerAssetData: encodeERC721ProxyMetadata(ck.address, takerTokenId), }); // Verify pre-conditions @@ -1130,8 +1130,8 @@ describe('Exchange', () => { takerTokenAddress: ck.address, makerTokenAmount: new BigNumber(1), takerTokenAmount: new BigNumber(0), - makerAssetProxyData: encodeERC721ProxyMetadata(ck.address, makerTokenId), - takerAssetProxyData: encodeERC721ProxyMetadata(ck.address, takerTokenId), + makerAssetData: encodeERC721ProxyMetadata(ck.address, makerTokenId), + takerAssetData: encodeERC721ProxyMetadata(ck.address, takerTokenId), }); // Verify pre-conditions @@ -1155,8 +1155,8 @@ describe('Exchange', () => { takerTokenAddress: dgd.address, makerTokenAmount: new BigNumber(1), takerTokenAmount: ZeroEx.toBaseUnitAmount(new BigNumber(100), 18), - makerAssetProxyData: encodeERC721ProxyMetadata(ck.address, makerTokenId), - takerAssetProxyData: encodeERC20ProxyMetadata(dgd.address), + makerAssetData: encodeERC721ProxyMetadata(ck.address, makerTokenId), + takerAssetData: encodeERC20ProxyMetadata(dgd.address), }); // Verify pre-conditions @@ -1199,8 +1199,8 @@ describe('Exchange', () => { makerTokenAddress: dgd.address, takerTokenAmount: new BigNumber(1), makerTokenAmount: ZeroEx.toBaseUnitAmount(new BigNumber(100), 18), - takerAssetProxyData: encodeERC721ProxyMetadata(ck.address, takerTokenId), - makerAssetProxyData: encodeERC20ProxyMetadata(dgd.address), + takerAssetData: encodeERC721ProxyMetadata(ck.address, takerTokenId), + makerAssetData: encodeERC20ProxyMetadata(dgd.address), }); // Verify pre-conditions diff --git a/packages/contracts/test/exchange/helpers.ts b/packages/contracts/test/exchange/helpers.ts index ab5419e4f..6990ac88b 100644 --- a/packages/contracts/test/exchange/helpers.ts +++ b/packages/contracts/test/exchange/helpers.ts @@ -88,8 +88,8 @@ describe('Exchange', () => { takerTokenAmount: ZeroEx.toBaseUnitAmount(new BigNumber(200), 18), makerFee: ZeroEx.toBaseUnitAmount(new BigNumber(1), 18), takerFee: ZeroEx.toBaseUnitAmount(new BigNumber(1), 18), - makerAssetProxyData: encodeERC20ProxyMetadata(rep.address), - takerAssetProxyData: encodeERC20ProxyMetadata(dgd.address), + makerAssetData: encodeERC20ProxyMetadata(rep.address), + takerAssetData: encodeERC20ProxyMetadata(dgd.address), }; const privateKey = constants.TESTRPC_PRIVATE_KEYS[0]; orderFactory = new OrderFactory(privateKey, defaultOrderParams); diff --git a/packages/contracts/test/exchange/wrapper.ts b/packages/contracts/test/exchange/wrapper.ts index 5b0564fd2..8c55dfe19 100644 --- a/packages/contracts/test/exchange/wrapper.ts +++ b/packages/contracts/test/exchange/wrapper.ts @@ -139,8 +139,8 @@ describe('Exchange', () => { takerTokenAmount: ZeroEx.toBaseUnitAmount(new BigNumber(200), 18), makerFee: ZeroEx.toBaseUnitAmount(new BigNumber(1), 18), takerFee: ZeroEx.toBaseUnitAmount(new BigNumber(1), 18), - makerAssetProxyData: encodeERC20ProxyMetadata(rep.address), - takerAssetProxyData: encodeERC20ProxyMetadata(dgd.address), + makerAssetData: encodeERC20ProxyMetadata(rep.address), + takerAssetData: encodeERC20ProxyMetadata(dgd.address), }; const privateKey = constants.TESTRPC_PRIVATE_KEYS[0]; @@ -341,7 +341,7 @@ describe('Exchange', () => { makerTokenAddress: zrx.address, makerTokenAmount: makerZRXBalance, makerFee: new BigNumber(1), - makerAssetProxyData: encodeERC20ProxyMetadata(zrx.address), + makerAssetData: encodeERC20ProxyMetadata(zrx.address), }); await exWrapper.fillOrderNoThrowAsync(signedOrder, takerAddress); const newBalances = await dmyBalances.getAsync(); @@ -354,7 +354,7 @@ describe('Exchange', () => { makerTokenAddress: zrx.address, makerTokenAmount: new BigNumber(makerZRXAllowance), makerFee: new BigNumber(1), - makerAssetProxyData: encodeERC20ProxyMetadata(zrx.address), + makerAssetData: encodeERC20ProxyMetadata(zrx.address), }); await exWrapper.fillOrderNoThrowAsync(signedOrder, takerAddress); const newBalances = await dmyBalances.getAsync(); @@ -367,7 +367,7 @@ describe('Exchange', () => { takerTokenAddress: zrx.address, takerTokenAmount: takerZRXBalance, takerFee: new BigNumber(1), - takerAssetProxyData: encodeERC20ProxyMetadata(zrx.address), + takerAssetData: encodeERC20ProxyMetadata(zrx.address), }); await exWrapper.fillOrderNoThrowAsync(signedOrder, takerAddress); const newBalances = await dmyBalances.getAsync(); @@ -380,7 +380,7 @@ describe('Exchange', () => { takerTokenAddress: zrx.address, takerTokenAmount: new BigNumber(takerZRXAllowance), takerFee: new BigNumber(1), - takerAssetProxyData: encodeERC20ProxyMetadata(zrx.address), + takerAssetData: encodeERC20ProxyMetadata(zrx.address), }); await exWrapper.fillOrderNoThrowAsync(signedOrder, takerAddress); const newBalances = await dmyBalances.getAsync(); |