aboutsummaryrefslogtreecommitdiffstats
path: root/packages/utils
diff options
context:
space:
mode:
Diffstat (limited to 'packages/utils')
-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;
}