aboutsummaryrefslogtreecommitdiffstats
path: root/packages/order-utils
diff options
context:
space:
mode:
authorfragosti <francesco.agosti93@gmail.com>2018-07-26 01:33:13 +0800
committerfragosti <francesco.agosti93@gmail.com>2018-07-26 01:33:13 +0800
commitda4b70fcae1da2c35905a30b79707b3f27b9fa3a (patch)
tree65dbdb8f75c8e93cd788149610522f5bf5ada643 /packages/order-utils
parentad4c2b95e4722e6d227c26f436bedf7b06f5356a (diff)
parent05b35c0fdcbca7980d4195e96ec791c1c2d13398 (diff)
downloaddexon-sol-tools-da4b70fcae1da2c35905a30b79707b3f27b9fa3a.tar
dexon-sol-tools-da4b70fcae1da2c35905a30b79707b3f27b9fa3a.tar.gz
dexon-sol-tools-da4b70fcae1da2c35905a30b79707b3f27b9fa3a.tar.bz2
dexon-sol-tools-da4b70fcae1da2c35905a30b79707b3f27b9fa3a.tar.lz
dexon-sol-tools-da4b70fcae1da2c35905a30b79707b3f27b9fa3a.tar.xz
dexon-sol-tools-da4b70fcae1da2c35905a30b79707b3f27b9fa3a.tar.zst
dexon-sol-tools-da4b70fcae1da2c35905a30b79707b3f27b9fa3a.zip
Merge branch 'v2-prototype' of https://github.com/0xProject/0x-monorepo into feature/web3-wrapper/unexport-marshaller
Diffstat (limited to 'packages/order-utils')
-rw-r--r--packages/order-utils/CHANGELOG.json28
-rw-r--r--packages/order-utils/CHANGELOG.md12
-rw-r--r--packages/order-utils/package.json28
-rw-r--r--packages/order-utils/src/asset_data_utils.ts11
4 files changed, 56 insertions, 23 deletions
diff --git a/packages/order-utils/CHANGELOG.json b/packages/order-utils/CHANGELOG.json
index 5d92cb318..443f8c77e 100644
--- a/packages/order-utils/CHANGELOG.json
+++ b/packages/order-utils/CHANGELOG.json
@@ -1,5 +1,33 @@
[
{
+ "version": "1.0.1-rc.1",
+ "changes": [
+ {
+ "note": "Dependencies updated"
+ }
+ ]
+ },
+ {
+ "version": "1.0.0",
+ "changes": [
+ {
+ "note": "Dependencies updated"
+ }
+ ],
+ "timestamp": 1532357734
+ },
+ {
+ "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..34d14b00f 100644
--- a/packages/order-utils/package.json
+++ b/packages/order-utils/package.json
@@ -1,6 +1,6 @@
{
"name": "@0xproject/order-utils",
- "version": "1.0.0-rc.1",
+ "version": "1.0.0",
"engines": {
"node": ">=6.12"
},
@@ -51,9 +51,9 @@
},
"homepage": "https://github.com/0xProject/0x-monorepo/packages/order-utils/README.md",
"devDependencies": {
- "@0xproject/dev-utils": "^1.0.0",
- "@0xproject/monorepo-scripts": "^1.0.0",
- "@0xproject/tslint-config": "^1.0.0",
+ "@0xproject/dev-utils": "^1.0.1",
+ "@0xproject/monorepo-scripts": "^1.0.1",
+ "@0xproject/tslint-config": "^1.0.1",
"@types/bn.js": "^4.11.0",
"@types/lodash": "4.14.104",
"chai": "^4.0.1",
@@ -71,18 +71,18 @@
"typescript": "2.7.1"
},
"dependencies": {
- "@0xproject/assert": "^1.0.0",
- "@0xproject/base-contract": "^1.0.0",
- "@0xproject/json-schemas": "^1.0.0-rc.1",
- "@0xproject/sol-compiler": "^1.0.0",
- "@0xproject/types": "^1.0.0-rc.1",
- "@0xproject/typescript-typings": "^1.0.0",
- "@0xproject/utils": "^1.0.0",
- "@0xproject/web3-wrapper": "^1.0.0",
+ "@0xproject/assert": "^1.0.1",
+ "@0xproject/base-contract": "^1.0.1",
+ "@0xproject/json-schemas": "^1.0.0",
+ "@0xproject/sol-compiler": "^1.0.1",
+ "@0xproject/types": "^1.0.0",
+ "@0xproject/typescript-typings": "^1.0.1",
+ "@0xproject/utils": "^1.0.1",
+ "@0xproject/web3-wrapper": "^1.0.1",
"@types/node": "^8.0.53",
"bn.js": "^4.11.8",
- "ethereum-types": "^1.0.0",
- "ethereumjs-abi": "^0.6.4",
+ "ethereum-types": "^1.0.1",
+ "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),
};
},
/**