aboutsummaryrefslogtreecommitdiffstats
path: root/packages/contracts
diff options
context:
space:
mode:
authorAlex Browne <stephenalexbrowne@gmail.com>2018-07-27 05:11:03 +0800
committerAlex Browne <stephenalexbrowne@gmail.com>2018-08-09 05:27:30 +0800
commit6a5965d73bb542634631d7af76c150795d899744 (patch)
treeaba6597779094b9738c0ad94fb2694a18d22cdc2 /packages/contracts
parent19cda0eb036b6876964d8074aea1295142d25027 (diff)
downloaddexon-sol-tools-6a5965d73bb542634631d7af76c150795d899744.tar
dexon-sol-tools-6a5965d73bb542634631d7af76c150795d899744.tar.gz
dexon-sol-tools-6a5965d73bb542634631d7af76c150795d899744.tar.bz2
dexon-sol-tools-6a5965d73bb542634631d7af76c150795d899744.tar.lz
dexon-sol-tools-6a5965d73bb542634631d7af76c150795d899744.tar.xz
dexon-sol-tools-6a5965d73bb542634631d7af76c150795d899744.tar.zst
dexon-sol-tools-6a5965d73bb542634631d7af76c150795d899744.zip
Add strictArgumentEncodingCheck to BaseContract and use it in contract templates
Diffstat (limited to 'packages/contracts')
-rw-r--r--packages/contracts/test/exchange/signature_validator.ts6
1 files changed, 3 insertions, 3 deletions
diff --git a/packages/contracts/test/exchange/signature_validator.ts b/packages/contracts/test/exchange/signature_validator.ts
index f2bb42c75..bef0547bd 100644
--- a/packages/contracts/test/exchange/signature_validator.ts
+++ b/packages/contracts/test/exchange/signature_validator.ts
@@ -113,7 +113,7 @@ describe('MixinSignatureValidator', () => {
it('should revert when signature type is unsupported', async () => {
const unsupportedSignatureType = SignatureType.NSignatureTypes;
- const unsupportedSignatureHex = `0x${unsupportedSignatureType}`;
+ const unsupportedSignatureHex = '0x' + Buffer.from([unsupportedSignatureType]).toString('hex');
const orderHashHex = orderHashUtils.getOrderHashHex(signedOrder);
return expectContractCallFailed(
signatureValidator.publicIsValidSignature.callAsync(
@@ -126,7 +126,7 @@ describe('MixinSignatureValidator', () => {
});
it('should revert when SignatureType=Illegal', async () => {
- const unsupportedSignatureHex = `0x${SignatureType.Illegal}`;
+ const unsupportedSignatureHex = '0x' + Buffer.from([SignatureType.Illegal]).toString('hex');
const orderHashHex = orderHashUtils.getOrderHashHex(signedOrder);
return expectContractCallFailed(
signatureValidator.publicIsValidSignature.callAsync(
@@ -139,7 +139,7 @@ describe('MixinSignatureValidator', () => {
});
it('should return false when SignatureType=Invalid and signature has a length of zero', async () => {
- const signatureHex = `0x${SignatureType.Invalid}`;
+ const signatureHex = '0x' + Buffer.from([SignatureType.Invalid]).toString('hex');
const orderHashHex = orderHashUtils.getOrderHashHex(signedOrder);
const isValidSignature = await signatureValidator.publicIsValidSignature.callAsync(
orderHashHex,