diff options
Diffstat (limited to 'packages/utils')
-rw-r--r-- | packages/utils/CHANGELOG.json | 13 | ||||
-rw-r--r-- | packages/utils/CHANGELOG.md | 8 | ||||
-rw-r--r-- | packages/utils/package.json | 12 | ||||
-rw-r--r-- | packages/utils/src/abi_utils.ts | 4 | ||||
-rw-r--r-- | packages/utils/test/abi_encoder/evm_data_types_test.ts | 4 |
5 files changed, 29 insertions, 12 deletions
diff --git a/packages/utils/CHANGELOG.json b/packages/utils/CHANGELOG.json index 08801a891..fe66d3f31 100644 --- a/packages/utils/CHANGELOG.json +++ b/packages/utils/CHANGELOG.json @@ -1,13 +1,22 @@ [ { - "timestamp": 1543448882, + "version": "2.0.8", + "changes": [ + { + "note": "Dependencies updated" + } + ], + "timestamp": 1544739608 + }, + { "version": "2.0.7", "changes": [ { "note": "Optimized ABI Encoder/Decoder. Generates compressed calldata to save gas. Generates human-readable calldata to aid development." } - ] + ], + "timestamp": 1544570656 }, { "timestamp": 1542821676, diff --git a/packages/utils/CHANGELOG.md b/packages/utils/CHANGELOG.md index c5c42161a..c0437392d 100644 --- a/packages/utils/CHANGELOG.md +++ b/packages/utils/CHANGELOG.md @@ -5,6 +5,14 @@ Edit the package's CHANGELOG.json file only. CHANGELOG +## v2.0.8 - _December 13, 2018_ + + * Dependencies updated + +## v2.0.7 - _December 11, 2018_ + + * Optimized ABI Encoder/Decoder. Generates compressed calldata to save gas. Generates human-readable calldata to aid development. + ## v2.0.6 - _November 21, 2018_ * Dependencies updated diff --git a/packages/utils/package.json b/packages/utils/package.json index 1f4d85843..a25dc9cff 100644 --- a/packages/utils/package.json +++ b/packages/utils/package.json @@ -1,6 +1,6 @@ { "name": "@0x/utils", - "version": "2.0.6", + "version": "2.0.8", "engines": { "node": ">=6.12" }, @@ -28,7 +28,7 @@ }, "homepage": "https://github.com/0xProject/0x-monorepo/packages/utils/README.md", "devDependencies": { - "@0x/tslint-config": "^1.0.10", + "@0x/tslint-config": "^2.0.0", "@types/detect-node": "2.0.0", "@types/lodash": "4.14.104", "@types/mocha": "^2.2.42", @@ -44,13 +44,13 @@ "typescript": "3.0.1" }, "dependencies": { - "@0x/types": "^1.3.0", - "@0x/typescript-typings": "^3.0.4", + "@0x/types": "^1.4.1", + "@0x/typescript-typings": "^3.0.6", "@types/node": "*", "abortcontroller-polyfill": "^1.1.9", "bignumber.js": "~4.1.0", "detect-node": "2.0.3", - "ethereum-types": "^1.1.2", + "ethereum-types": "^1.1.4", "ethereumjs-util": "^5.1.1", "ethers": "~4.0.4", "isomorphic-fetch": "^2.2.1", @@ -60,4 +60,4 @@ "publishConfig": { "access": "public" } -}
\ No newline at end of file +} diff --git a/packages/utils/src/abi_utils.ts b/packages/utils/src/abi_utils.ts index 598ea5fcc..3e6fc9665 100644 --- a/packages/utils/src/abi_utils.ts +++ b/packages/utils/src/abi_utils.ts @@ -26,7 +26,7 @@ function parseEthersParams(params: DataItem[]): { names: ParamName[]; types: str const result = parseEthersParams(param.components); names.push({ name: param.name || null, names: result.names }); - types.push('tuple(' + result.types.join(',') + ')' + suffix); + types.push(`tuple(${result.types.join(',')})${suffix}`); } else { names.push(param.name || null); types.push(param.type); @@ -120,7 +120,7 @@ function splitTupleTypes(type: string): string[] { if (_.endsWith(type, '[]')) { throw new Error('Internal error: array types are not supported'); } else if (!_.startsWith(type, 'tuple(')) { - throw new Error('Internal error: expected tuple type but got non-tuple type: ' + type); + throw new Error(`Internal error: expected tuple type but got non-tuple type: ${type}`); } // Trim the outtermost tuple(). const trimmedType = type.substring('tuple('.length, type.length - 1); diff --git a/packages/utils/test/abi_encoder/evm_data_types_test.ts b/packages/utils/test/abi_encoder/evm_data_types_test.ts index 9ef80a560..7185851a8 100644 --- a/packages/utils/test/abi_encoder/evm_data_types_test.ts +++ b/packages/utils/test/abi_encoder/evm_data_types_test.ts @@ -901,7 +901,7 @@ describe('ABI Encoder: EVM Data Type Encoding/Decoding', () => { // Construct args to be encoded // Note: There will be padding because this is a bytes32 but we are only passing in 4 bytes. const bytesLength = 40; - const args = '0x' + '61'.repeat(bytesLength); + const args = `0x${'61'.repeat(bytesLength)}`; // Encode Args and validate result const encodedArgs = dataType.encode(args, encodingRules); const expectedEncodedArgs = @@ -993,7 +993,7 @@ describe('ABI Encoder: EVM Data Type Encoding/Decoding', () => { // Construct args to be encoded // Note: There will be padding because this is a bytes32 but we are only passing in 4 bytes. const strLength = 40; - const args = '0x' + 'a'.repeat(strLength); + const args = `0x${'a'.repeat(strLength)}`; // Encode Args and validate result const encodedArgs = dataType.encode(args, encodingRules); const expectedEncodedArgs = |