Skip to content
This repository has been archived by the owner on Jul 9, 2021. It is now read-only.

Commit

Permalink
Ran prettier + linter
Browse files Browse the repository at this point in the history
  • Loading branch information
hysz committed Feb 6, 2019
1 parent 2ad6bd3 commit 6181f18
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@ export abstract class DataType {
const hasSelector = !_.isUndefined(selector);
const rawCalldata = new RawCalldata(calldata, hasSelector);
const rules_ = _.isUndefined(rules) ? constants.DEFAULT_DECODING_RULES : rules;
const value = rawCalldata.getSizeInBytes() > 0 ? this.generateValue(rawCalldata, rules_) : this.getDefaultValue(rules_);
const value =
rawCalldata.getSizeInBytes() > 0 ? this.generateValue(rawCalldata, rules_) : this.getDefaultValue(rules_);
return value;
}

Expand Down
2 changes: 1 addition & 1 deletion packages/utils/src/abi_encoder/evm_data_types/bool.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { constants } from '../utils/constants';

export class BoolDataType extends AbstractBlobDataType {
private static readonly _SIZE_KNOWN_AT_COMPILE_TIME: boolean = true;
private static readonly _DEFAULT_VALUE: boolean =false;
private static readonly _DEFAULT_VALUE: boolean = false;

public static matchType(type: string): boolean {
return type === SolidityTypes.Bool;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { constants } from '../utils/constants';

export class DynamicBytesDataType extends AbstractBlobDataType {
private static readonly _SIZE_KNOWN_AT_COMPILE_TIME: boolean = false;
private static readonly _DEFAULT_VALUE = "0x";
private static readonly _DEFAULT_VALUE = '0x';

public static matchType(type: string): boolean {
return type === SolidityTypes.Bytes;
Expand Down
2 changes: 1 addition & 1 deletion packages/utils/src/abi_encoder/evm_data_types/string.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { constants } from '../utils/constants';

export class StringDataType extends AbstractBlobDataType {
private static readonly _SIZE_KNOWN_AT_COMPILE_TIME: boolean = false;
private static readonly _DEFAULT_VALUE = "";
private static readonly _DEFAULT_VALUE = '';

public static matchType(type: string): boolean {
return type === SolidityTypes.String;
Expand Down
5 changes: 3 additions & 2 deletions packages/utils/src/abi_encoder/utils/constants.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { DecodingRules, EncodingRules } from './rules';
import * as ethUtil from 'ethereumjs-util';

import { DecodingRules, EncodingRules } from './rules';

export const constants = {
EVM_WORD_WIDTH_IN_BYTES: 32,
EVM_WORD_WIDTH_IN_BITS: 256,
Expand All @@ -19,4 +20,4 @@ export const constants = {
EMPTY_EVM_WORD_BUFFER: ethUtil.toBuffer('0x0000000000000000000000000000000000000000000000000000000000000000'),
NUMBER_OF_BYTES_IN_UINT8: 8,
NUMBER_OF_BYTES_IN_INT8: 8,
}
};

0 comments on commit 6181f18

Please sign in to comment.