diff options
author | Greg Hysen <greg.hysen@gmail.com> | 2018-12-24 11:49:08 +0800 |
---|---|---|
committer | Greg Hysen <greg.hysen@gmail.com> | 2019-01-15 02:49:44 +0800 |
commit | 0b6c9c84688b565a9000b2c4e889c682ccaa7e51 (patch) | |
tree | ae299ab0db6f182ed2ceafd729a63b3f713697e2 /packages/base-contract/src/index.ts | |
parent | d1fd4421be0a7639b99b374bf04e57fac4e8a486 (diff) | |
download | dexon-0x-contracts-0b6c9c84688b565a9000b2c4e889c682ccaa7e51.tar.gz dexon-0x-contracts-0b6c9c84688b565a9000b2c4e889c682ccaa7e51.tar.zst dexon-0x-contracts-0b6c9c84688b565a9000b2c4e889c682ccaa7e51.zip |
Ran prettier
Diffstat (limited to 'packages/base-contract/src/index.ts')
-rw-r--r-- | packages/base-contract/src/index.ts | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/packages/base-contract/src/index.ts b/packages/base-contract/src/index.ts index bb806c2e5..814b052b0 100644 --- a/packages/base-contract/src/index.ts +++ b/packages/base-contract/src/index.ts @@ -82,7 +82,9 @@ export class BaseContract { } protected static _throwIfRevertWithReasonCallResult(rawCallResult: string): void { if (rawCallResult.slice(REVERT_ERROR_SELECTOR_OFFSET, REVERT_ERROR_SELECTOR_END) === REVERT_ERROR_SELECTOR) { - const revertReason = AbiEncoder.create('(string)').decode(ethers.utils.hexDataSlice(rawCallResult, REVERT_ERROR_SELECTOR_BYTES_LENGTH)); + const revertReason = AbiEncoder.create('(string)').decode( + ethers.utils.hexDataSlice(rawCallResult, REVERT_ERROR_SELECTOR_BYTES_LENGTH), + ); throw new Error(revertReason); } } @@ -108,12 +110,12 @@ export class BaseContract { } return rawEncoded; } - protected static _lowercaseAddress(type: string, value: string): string { - return type === 'address' ? value.toLowerCase() : value; - } - protected static _bigNumberToString(_type: string, value: any): any { - return _.isObject(value) && value.isBigNumber ? value.toString() : value; - } + protected static _lowercaseAddress(type: string, value: string): string { + return type === 'address' ? value.toLowerCase() : value; + } + protected static _bigNumberToString(_type: string, value: any): any { + return _.isObject(value) && value.isBigNumber ? value.toString() : value; + } protected _lookupAbiEncoder(functionSignature: string): AbiEncoder.Method { const abiEncoder = this._abiEncoderByFunctionSignature[functionSignature]; if (_.isUndefined(abiEncoder)) { @@ -141,7 +143,7 @@ export class BaseContract { if (inputAbi === undefined) { throw new Error(`Undefined Method Input ABI`); } - const abiEncodedArguments = abiEncoder.encode(functionArguments);////BaseContract.strictArgumentEncodingCheck(inputAbi, functionArguments); + const abiEncodedArguments = abiEncoder.encode(functionArguments); ////BaseContract.strictArgumentEncodingCheck(inputAbi, functionArguments); return abiEncodedArguments; } constructor( |