aboutsummaryrefslogtreecommitdiffstats
path: root/packages/order-utils
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/order-utils
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/order-utils')
-rw-r--r--packages/order-utils/CHANGELOG.json10
-rw-r--r--packages/order-utils/CHANGELOG.md12
-rw-r--r--packages/order-utils/package.json2
-rw-r--r--packages/order-utils/src/asset_data_utils.ts11
4 files changed, 25 insertions, 10 deletions
diff --git a/packages/order-utils/CHANGELOG.json b/packages/order-utils/CHANGELOG.json
index d74ba90ea..8d689b3da 100644
--- a/packages/order-utils/CHANGELOG.json
+++ b/packages/order-utils/CHANGELOG.json
@@ -1,5 +1,15 @@
[
{
+ "version": "1.0.0-rc.2",
+ "changes": [
+ {
+ "note":
+ "Upgrade ethereumjs-abi dep including a fix so that addresses starting with 0 are properly decoded by `decodeERC20AssetData`"
+ }
+ ],
+ "timestamp": 1532357734
+ },
+ {
"timestamp": 1532043000,
"version": "1.0.0-rc.1",
"changes": [
diff --git a/packages/order-utils/CHANGELOG.md b/packages/order-utils/CHANGELOG.md
index 17464a966..c8d1093e8 100644
--- a/packages/order-utils/CHANGELOG.md
+++ b/packages/order-utils/CHANGELOG.md
@@ -1,10 +1,20 @@
<!--
-This file is auto-generated using the monorepo-scripts package. Don't edit directly.
+changelogUtils.file is auto-generated using the monorepo-scripts package. Don't edit directly.
Edit the package's CHANGELOG.json file only.
-->
CHANGELOG
+## v1.0.0-rc.2 - _July 23, 2018_
+
+ * Upgrade ethereumjs-abi dep including a fix so that addresses starting with 0 are properly decoded by `decodeERC20AssetData`
+
+## v1.0.0-rc.1 - _July 20, 2018_
+
+ * Refactor to work with V2 of 0x protocol (#636)
+ * Export parseECSignature method (#684)
+ * Handle Typed Arrays when hashing data (#894)
+
## v0.0.9 - _July 18, 2018_
* Dependencies updated
diff --git a/packages/order-utils/package.json b/packages/order-utils/package.json
index b87ae5223..0df8a3f6c 100644
--- a/packages/order-utils/package.json
+++ b/packages/order-utils/package.json
@@ -82,7 +82,7 @@
"@types/node": "^8.0.53",
"bn.js": "^4.11.8",
"ethereum-types": "^1.0.0",
- "ethereumjs-abi": "^0.6.4",
+ "ethereumjs-abi": "0.6.5",
"ethereumjs-util": "^5.1.1",
"ethers": "3.0.22",
"lodash": "^4.17.4"
diff --git a/packages/order-utils/src/asset_data_utils.ts b/packages/order-utils/src/asset_data_utils.ts
index a9601e9ea..0c0b59548 100644
--- a/packages/order-utils/src/asset_data_utils.ts
+++ b/packages/order-utils/src/asset_data_utils.ts
@@ -50,14 +50,13 @@ export const assetDataUtils = {
* @param tokenId The ERC721 tokenId to encode
* @return The hex encoded assetData string
*/
- encodeERC721AssetData(tokenAddress: string, tokenId: BigNumber, receiverData?: string): string {
+ encodeERC721AssetData(tokenAddress: string, tokenId: BigNumber): string {
// TODO: Pass `tokendId` as a BigNumber.
return ethUtil.bufferToHex(
ethAbi.simpleEncode(
- 'ERC721Token(address,uint256,bytes)',
+ 'ERC721Token(address,uint256)',
tokenAddress,
`0x${tokenId.toString(constants.BASE_16)}`,
- ethUtil.toBuffer(receiverData || '0x'),
),
);
},
@@ -83,15 +82,11 @@ export const assetDataUtils = {
}), but got ${assetProxyId}`,
);
}
- const [tokenAddress, tokenId, receiverData] = ethAbi.rawDecode(
- ['address', 'uint256', 'bytes'],
- data.slice(constants.SELECTOR_LENGTH),
- );
+ const [tokenAddress, tokenId] = ethAbi.rawDecode(['address', 'uint256'], data.slice(constants.SELECTOR_LENGTH));
return {
assetProxyId,
tokenAddress: ethUtil.addHexPrefix(tokenAddress),
tokenId: new BigNumber(tokenId.toString()),
- receiverData: ethUtil.bufferToHex(receiverData),
};
},
/**