From 748ed403215b685c6aa3da36ab89ad02e2550c71 Mon Sep 17 00:00:00 2001 From: Leonid Logvinov Date: Mon, 26 Feb 2018 16:35:44 -0800 Subject: Add to context data --- packages/abi-gen/CHANGELOG.md | 1 + packages/abi-gen/src/index.ts | 1 + packages/abi-gen/src/types.ts | 1 + 3 files changed, 3 insertions(+) (limited to 'packages/abi-gen') diff --git a/packages/abi-gen/CHANGELOG.md b/packages/abi-gen/CHANGELOG.md index c6f1ad37f..f04eb93cf 100644 --- a/packages/abi-gen/CHANGELOG.md +++ b/packages/abi-gen/CHANGELOG.md @@ -4,6 +4,7 @@ * Add a `backend` parameter that allows you to specify your backend (web3 or ethers). Ethers auto-converts small ints to numbers (#413) * Add support for ABIv2 (#413) + * Add `hasReturnValue` to context data (#413) ## v0.2.1 - _February 9, 2018_ diff --git a/packages/abi-gen/src/index.ts b/packages/abi-gen/src/index.ts index d34d74cdf..49ff0fe20 100644 --- a/packages/abi-gen/src/index.ts +++ b/packages/abi-gen/src/index.ts @@ -136,6 +136,7 @@ for (const abiFileName of abiFileNames) { const methodData = { ...methodAbi, singleReturnValue: methodAbi.outputs.length === 1, + hasReturnValue: methodAbi.outputs.length !== 0, }; return methodData; }); diff --git a/packages/abi-gen/src/types.ts b/packages/abi-gen/src/types.ts index 402e0105e..deddb1857 100644 --- a/packages/abi-gen/src/types.ts +++ b/packages/abi-gen/src/types.ts @@ -19,6 +19,7 @@ export enum ContractsBackend { export interface Method extends Web3.MethodAbi { singleReturnValue: boolean; + hasReturnValue: boolean; } export interface ContextData { -- cgit v1.2.3