diff options
author | Greg Hysen <greg.hysen@gmail.com> | 2018-11-29 05:47:01 +0800 |
---|---|---|
committer | Greg Hysen <greg.hysen@gmail.com> | 2018-11-29 08:38:11 +0800 |
commit | 2da7cadefa877ff824da8fbaecd59dbff5028728 (patch) | |
tree | 18f74e4708b9f30cd9b8ca2774fdb8721dee39fe /packages/utils/src/abi_encoder/calldata/calldata.ts | |
parent | b8ea322541e291b84f261bffcc77baf85dae08c1 (diff) | |
download | dexon-0x-contracts-2da7cadefa877ff824da8fbaecd59dbff5028728.tar dexon-0x-contracts-2da7cadefa877ff824da8fbaecd59dbff5028728.tar.gz dexon-0x-contracts-2da7cadefa877ff824da8fbaecd59dbff5028728.tar.bz2 dexon-0x-contracts-2da7cadefa877ff824da8fbaecd59dbff5028728.tar.lz dexon-0x-contracts-2da7cadefa877ff824da8fbaecd59dbff5028728.tar.xz dexon-0x-contracts-2da7cadefa877ff824da8fbaecd59dbff5028728.tar.zst dexon-0x-contracts-2da7cadefa877ff824da8fbaecd59dbff5028728.zip |
Explicit imports for calldata
Diffstat (limited to 'packages/utils/src/abi_encoder/calldata/calldata.ts')
-rw-r--r-- | packages/utils/src/abi_encoder/calldata/calldata.ts | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/packages/utils/src/abi_encoder/calldata/calldata.ts b/packages/utils/src/abi_encoder/calldata/calldata.ts index e5858b524..5f3eee94a 100644 --- a/packages/utils/src/abi_encoder/calldata/calldata.ts +++ b/packages/utils/src/abi_encoder/calldata/calldata.ts @@ -4,7 +4,8 @@ import * as _ from 'lodash'; import { constants } from '../utils/constants'; import { EncodingRules } from '../utils/rules'; -import * as CalldataBlocks from './blocks'; +import { PointerCalldataBlock } from './blocks/pointer'; +import { SetCalldataBlock } from './blocks/set'; import { CalldataBlock } from './calldata_block'; import { CalldataIterator, ReverseCalldataIterator } from './iterator'; @@ -112,7 +113,7 @@ export class Calldata { for (const block of iterator) { // If a block is a pointer and its value has already been observed, then update // the pointer to resolve to the existing value. - if (block instanceof CalldataBlocks.Pointer) { + if (block instanceof PointerCalldataBlock) { const dependencyBlockHashBuf = block.getDependency().computeHash(); const dependencyBlockHash = ethUtil.bufferToHex(dependencyBlockHashBuf); if (dependencyBlockHash in blocksByHash) { @@ -214,7 +215,7 @@ export class Calldata { ), ) .padEnd(valuePadding); - if (block instanceof CalldataBlocks.Set) { + if (block instanceof SetCalldataBlock) { nameStr = `### ${prettyName.padEnd(namePadding)}`; lineStr = `\n${offsetStr}${valueStr}${nameStr}`; } else { |