aboutsummaryrefslogtreecommitdiffstats
path: root/packages/utils/src
diff options
context:
space:
mode:
authorGreg Hysen <greg.hysen@gmail.com>2018-12-19 14:01:48 +0800
committerGreg Hysen <greg.hysen@gmail.com>2019-01-15 02:49:44 +0800
commite4551c8f6037302124cae4cda51b8f7624ade687 (patch)
tree7878caf2441e72bd5e8147db44bc0d3426407e34 /packages/utils/src
parent2f1454e90e5fd7d85c4deb3a8c674043e8a14564 (diff)
downloaddexon-sol-tools-e4551c8f6037302124cae4cda51b8f7624ade687.tar
dexon-sol-tools-e4551c8f6037302124cae4cda51b8f7624ade687.tar.gz
dexon-sol-tools-e4551c8f6037302124cae4cda51b8f7624ade687.tar.bz2
dexon-sol-tools-e4551c8f6037302124cae4cda51b8f7624ade687.tar.lz
dexon-sol-tools-e4551c8f6037302124cae4cda51b8f7624ade687.tar.xz
dexon-sol-tools-e4551c8f6037302124cae4cda51b8f7624ade687.tar.zst
dexon-sol-tools-e4551c8f6037302124cae4cda51b8f7624ade687.zip
Works for almost all tests
Diffstat (limited to 'packages/utils/src')
-rw-r--r--packages/utils/src/abi_encoder/evm_data_types/method.ts6
1 files changed, 6 insertions, 0 deletions
diff --git a/packages/utils/src/abi_encoder/evm_data_types/method.ts b/packages/utils/src/abi_encoder/evm_data_types/method.ts
index c777902e8..bae0fdb5d 100644
--- a/packages/utils/src/abi_encoder/evm_data_types/method.ts
+++ b/packages/utils/src/abi_encoder/evm_data_types/method.ts
@@ -51,6 +51,12 @@ export class MethodDataType extends AbstractSetDataType {
return returnValuesAsArray;
}
+ public decodeReturnValuesAsArrayOrNull(returndata: string, rules?: DecodingRules): any {
+ const returnValuesAsArray = this.decodeReturnValuesAsArray(returndata, rules);
+ const returnValue = _.isEmpty(returnValuesAsArray) ? [] : returnValuesAsArray;
+ return returnValue;
+ }
+
public getSignature(): string {
return this._methodSignature;
}