diff options
author | Greg Hysen <greg.hysen@gmail.com> | 2018-11-28 09:11:15 +0800 |
---|---|---|
committer | Greg Hysen <greg.hysen@gmail.com> | 2018-11-29 08:38:11 +0800 |
commit | 029b8d59507df25aa9c7d1b096c8d873eb6ae4da (patch) | |
tree | e95e60341f55da870fee30e1fb9aa98d201125c4 /packages/utils/src/abi_encoder/calldata/blocks | |
parent | 14c094d050e7b2d0a4b31d02dbe58a54153be7bb (diff) | |
download | dexon-sol-tools-029b8d59507df25aa9c7d1b096c8d873eb6ae4da.tar dexon-sol-tools-029b8d59507df25aa9c7d1b096c8d873eb6ae4da.tar.gz dexon-sol-tools-029b8d59507df25aa9c7d1b096c8d873eb6ae4da.tar.bz2 dexon-sol-tools-029b8d59507df25aa9c7d1b096c8d873eb6ae4da.tar.lz dexon-sol-tools-029b8d59507df25aa9c7d1b096c8d873eb6ae4da.tar.xz dexon-sol-tools-029b8d59507df25aa9c7d1b096c8d873eb6ae4da.tar.zst dexon-sol-tools-029b8d59507df25aa9c7d1b096c8d873eb6ae4da.zip |
Changed constants to an exported enum; this is 0x convention
Diffstat (limited to 'packages/utils/src/abi_encoder/calldata/blocks')
-rw-r--r-- | packages/utils/src/abi_encoder/calldata/blocks/pointer.ts | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/packages/utils/src/abi_encoder/calldata/blocks/pointer.ts b/packages/utils/src/abi_encoder/calldata/blocks/pointer.ts index 654cbe26c..1daf33f7e 100644 --- a/packages/utils/src/abi_encoder/calldata/blocks/pointer.ts +++ b/packages/utils/src/abi_encoder/calldata/blocks/pointer.ts @@ -1,7 +1,7 @@ import * as ethUtil from 'ethereumjs-util'; import * as _ from 'lodash'; -import * as Constants from '../../utils/constants'; +import { constants } from '../../utils/constants'; import { CalldataBlock } from '../calldata_block'; @@ -29,9 +29,9 @@ export class Pointer extends CalldataBlock { const parentOffset = this._parent.getOffsetInBytes(); const parentHeaderSize = this._parent.getHeaderSizeInBytes(); const pointer: number = destinationOffset - (parentOffset + parentHeaderSize); - const pointerHex = `0x${pointer.toString(Constants.HEX_BASE)}`; + const pointerHex = `0x${pointer.toString(constants.HEX_BASE)}`; const pointerBuf = ethUtil.toBuffer(pointerHex); - const pointerBufPadded = ethUtil.setLengthLeft(pointerBuf, Constants.EVM_WORD_WIDTH_IN_BYTES); + const pointerBufPadded = ethUtil.setLengthLeft(pointerBuf, constants.EVM_WORD_WIDTH_IN_BYTES); return pointerBufPadded; } |