aboutsummaryrefslogtreecommitdiffstats
path: root/packages/utils/src
diff options
context:
space:
mode:
authorGreg Hysen <greg.hysen@gmail.com>2019-02-06 10:01:38 +0800
committerGreg Hysen <greg.hysen@gmail.com>2019-02-06 10:01:38 +0800
commit2ad6bd394504fe8d89ce6189aef18bb705ad7625 (patch)
tree8d14edeb79be7103e25ad1b74e01566b01a51ce7 /packages/utils/src
parent2326dcdb129674677674690b300fec1245149a48 (diff)
downloaddexon-0x-contracts-2ad6bd394504fe8d89ce6189aef18bb705ad7625.tar
dexon-0x-contracts-2ad6bd394504fe8d89ce6189aef18bb705ad7625.tar.gz
dexon-0x-contracts-2ad6bd394504fe8d89ce6189aef18bb705ad7625.tar.bz2
dexon-0x-contracts-2ad6bd394504fe8d89ce6189aef18bb705ad7625.tar.lz
dexon-0x-contracts-2ad6bd394504fe8d89ce6189aef18bb705ad7625.tar.xz
dexon-0x-contracts-2ad6bd394504fe8d89ce6189aef18bb705ad7625.tar.zst
dexon-0x-contracts-2ad6bd394504fe8d89ce6189aef18bb705ad7625.zip
Test cases for handling NULL input for all data types
Diffstat (limited to 'packages/utils/src')
-rw-r--r--packages/utils/src/abi_encoder/utils/constants.ts3
1 files changed, 2 insertions, 1 deletions
diff --git a/packages/utils/src/abi_encoder/utils/constants.ts b/packages/utils/src/abi_encoder/utils/constants.ts
index e14814e2e..db190c3a6 100644
--- a/packages/utils/src/abi_encoder/utils/constants.ts
+++ b/packages/utils/src/abi_encoder/utils/constants.ts
@@ -1,4 +1,5 @@
import { DecodingRules, EncodingRules } from './rules';
+import * as ethUtil from 'ethereumjs-util';
export const constants = {
EVM_WORD_WIDTH_IN_BYTES: 32,
@@ -15,7 +16,7 @@ export const constants = {
DEFAULT_ENCODING_RULES: { shouldOptimize: true, shouldAnnotate: false } as EncodingRules,
/* tslint:enable no-object-literal-type-assertion */
EMPTY_EVM_WORD_STRING: '0x0000000000000000000000000000000000000000000000000000000000000000',
- EMPTY_EVM_WORD_BUFFER: new Buffer('0x0000000000000000000000000000000000000000000000000000000000000000'),
+ EMPTY_EVM_WORD_BUFFER: ethUtil.toBuffer('0x0000000000000000000000000000000000000000000000000000000000000000'),
NUMBER_OF_BYTES_IN_UINT8: 8,
NUMBER_OF_BYTES_IN_INT8: 8,
}