aboutsummaryrefslogtreecommitdiffstats
path: root/contracts
diff options
context:
space:
mode:
Diffstat (limited to 'contracts')
-rw-r--r--contracts/interfaces/README.md2
-rw-r--r--contracts/protocol/test/exchange/signature_validator.ts6
-rw-r--r--contracts/protocol/test/utils/exchange_wrapper.ts2
-rw-r--r--contracts/test-utils/CHANGELOG.json11
-rw-r--r--contracts/test-utils/CHANGELOG.md10
-rw-r--r--contracts/test-utils/src/assertions.ts2
-rw-r--r--contracts/utils/test/lib_bytes.ts2
7 files changed, 28 insertions, 7 deletions
diff --git a/contracts/interfaces/README.md b/contracts/interfaces/README.md
index 7e1c42c7b..b7d519abb 100644
--- a/contracts/interfaces/README.md
+++ b/contracts/interfaces/README.md
@@ -1,4 +1,4 @@
-## Contracts interfaces
+## Contract interfaces
Smart contract interfaces of the 0x protocol.
diff --git a/contracts/protocol/test/exchange/signature_validator.ts b/contracts/protocol/test/exchange/signature_validator.ts
index 62579cdc7..3f1786b5b 100644
--- a/contracts/protocol/test/exchange/signature_validator.ts
+++ b/contracts/protocol/test/exchange/signature_validator.ts
@@ -135,7 +135,7 @@ describe('MixinSignatureValidator', () => {
it('should revert when signature type is unsupported', async () => {
const unsupportedSignatureType = SignatureType.NSignatureTypes;
- const unsupportedSignatureHex = '0x' + Buffer.from([unsupportedSignatureType]).toString('hex');
+ const unsupportedSignatureHex = `0x${Buffer.from([unsupportedSignatureType]).toString('hex')}`;
const orderHashHex = orderHashUtils.getOrderHashHex(signedOrder);
return expectContractCallFailedAsync(
signatureValidator.publicIsValidSignature.callAsync(
@@ -148,7 +148,7 @@ describe('MixinSignatureValidator', () => {
});
it('should revert when SignatureType=Illegal', async () => {
- const unsupportedSignatureHex = '0x' + Buffer.from([SignatureType.Illegal]).toString('hex');
+ const unsupportedSignatureHex = `0x${Buffer.from([SignatureType.Illegal]).toString('hex')}`;
const orderHashHex = orderHashUtils.getOrderHashHex(signedOrder);
return expectContractCallFailedAsync(
signatureValidator.publicIsValidSignature.callAsync(
@@ -161,7 +161,7 @@ describe('MixinSignatureValidator', () => {
});
it('should return false when SignatureType=Invalid and signature has a length of zero', async () => {
- const signatureHex = '0x' + Buffer.from([SignatureType.Invalid]).toString('hex');
+ const signatureHex = `0x${Buffer.from([SignatureType.Invalid]).toString('hex')}`;
const orderHashHex = orderHashUtils.getOrderHashHex(signedOrder);
const isValidSignature = await signatureValidator.publicIsValidSignature.callAsync(
orderHashHex,
diff --git a/contracts/protocol/test/utils/exchange_wrapper.ts b/contracts/protocol/test/utils/exchange_wrapper.ts
index 075d2cb96..cb6dce901 100644
--- a/contracts/protocol/test/utils/exchange_wrapper.ts
+++ b/contracts/protocol/test/utils/exchange_wrapper.ts
@@ -229,7 +229,7 @@ export class ExchangeWrapper {
return orderEpoch;
}
public async getOrderInfoAsync(signedOrder: SignedOrder): Promise<OrderInfo> {
- const orderInfo = (await this._exchange.getOrderInfo.callAsync(signedOrder)) as OrderInfo;
+ const orderInfo = await this._exchange.getOrderInfo.callAsync(signedOrder);
return orderInfo;
}
public async getOrdersInfoAsync(signedOrders: SignedOrder[]): Promise<OrderInfo[]> {
diff --git a/contracts/test-utils/CHANGELOG.json b/contracts/test-utils/CHANGELOG.json
new file mode 100644
index 000000000..83f9e6414
--- /dev/null
+++ b/contracts/test-utils/CHANGELOG.json
@@ -0,0 +1,11 @@
+[
+ {
+ "timestamp": 1544482891,
+ "version": "1.0.1",
+ "changes": [
+ {
+ "note": "Dependencies updated"
+ }
+ ]
+ }
+]
diff --git a/contracts/test-utils/CHANGELOG.md b/contracts/test-utils/CHANGELOG.md
new file mode 100644
index 000000000..9fd3862fb
--- /dev/null
+++ b/contracts/test-utils/CHANGELOG.md
@@ -0,0 +1,10 @@
+<!--
+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.1 - _December 10, 2018_
+
+ * Dependencies updated
diff --git a/contracts/test-utils/src/assertions.ts b/contracts/test-utils/src/assertions.ts
index 5b1cedfcc..b1dec1281 100644
--- a/contracts/test-utils/src/assertions.ts
+++ b/contracts/test-utils/src/assertions.ts
@@ -137,7 +137,7 @@ export async function expectTransactionFailedWithoutReasonAsync(p: sendTransacti
// directly.
txReceiptStatus = result.status;
} else {
- throw new Error('Unexpected result type: ' + typeof result);
+ throw new Error(`Unexpected result type: ${typeof result}`);
}
expect(_.toString(txReceiptStatus)).to.equal(
'0',
diff --git a/contracts/utils/test/lib_bytes.ts b/contracts/utils/test/lib_bytes.ts
index 985a98943..6fb859c67 100644
--- a/contracts/utils/test/lib_bytes.ts
+++ b/contracts/utils/test/lib_bytes.ts
@@ -25,7 +25,7 @@ const blockchainLifecycle = new BlockchainLifecycle(web3Wrapper);
// BUG: Ideally we would use Buffer.from(memory).toString('hex')
// https://github.com/Microsoft/TypeScript/issues/23155
-const toHex = (buf: Uint8Array): string => buf.reduce((a, v) => a + ('00' + v.toString(16)).slice(-2), '0x');
+const toHex = (buf: Uint8Array): string => buf.reduce((a, v) => a + `00${v.toString(16)}`.slice(-2), '0x');
const fromHex = (str: string): Uint8Array => Uint8Array.from(Buffer.from(str.slice(2), 'hex'));