diff options
author | Greg Hysen <greg.hysen@gmail.com> | 2019-01-12 08:13:52 +0800 |
---|---|---|
committer | Greg Hysen <greg.hysen@gmail.com> | 2019-01-15 02:49:44 +0800 |
commit | b0817854e81512ad95cca4d842a671304ae3b94a (patch) | |
tree | a0061749b4877a6b020b3db2cec62a277d26d875 /packages/abi-gen-wrappers/src/generated-wrappers/i_validator.ts | |
parent | 1907ecc02edc8fb362485800b58946913387fa7d (diff) | |
download | dexon-sol-tools-b0817854e81512ad95cca4d842a671304ae3b94a.tar dexon-sol-tools-b0817854e81512ad95cca4d842a671304ae3b94a.tar.gz dexon-sol-tools-b0817854e81512ad95cca4d842a671304ae3b94a.tar.bz2 dexon-sol-tools-b0817854e81512ad95cca4d842a671304ae3b94a.tar.lz dexon-sol-tools-b0817854e81512ad95cca4d842a671304ae3b94a.tar.xz dexon-sol-tools-b0817854e81512ad95cca4d842a671304ae3b94a.tar.zst dexon-sol-tools-b0817854e81512ad95cca4d842a671304ae3b94a.zip |
strict decoding of return values using generics
Diffstat (limited to 'packages/abi-gen-wrappers/src/generated-wrappers/i_validator.ts')
-rw-r--r-- | packages/abi-gen-wrappers/src/generated-wrappers/i_validator.ts | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/packages/abi-gen-wrappers/src/generated-wrappers/i_validator.ts b/packages/abi-gen-wrappers/src/generated-wrappers/i_validator.ts index 4735cecfa..6cb9f64fb 100644 --- a/packages/abi-gen-wrappers/src/generated-wrappers/i_validator.ts +++ b/packages/abi-gen-wrappers/src/generated-wrappers/i_validator.ts @@ -40,8 +40,11 @@ export class IValidatorContract extends BaseContract { const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock); BaseContract._throwIfRevertWithReasonCallResult(rawCallResult); const abiEncoder = self._lookupAbiEncoder('isValidSignature(bytes32,address,bytes)'); - const resultArray = abiEncoder.decodeReturnValuesAsArrayOrNull(rawCallResult); - return resultArray[0]; + // tslint:disable boolean-naming + const result = abiEncoder.strictDecodeReturnValue<boolean + >(rawCallResult); + // tslint:enable boolean-naming + return result; }, }; public static async deployFrom0xArtifactAsync( |