diff --git a/CHANGELOG.md b/CHANGELOG.md index ab57f9b44f9..c16a9a31f9e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -144,6 +144,7 @@ Released with 1.0.0-beta.37 code base. - Add revert reason support to sendSignedTransaction - ENS module extended with the possibility to add a custom registry (#3301) - Missing ENS Registry methods and Resolver.supportsInterface method added (#3325) +- Add optional gas type to AbiItem typescript definitions (for ABIs generated by Vyper) ### Changed diff --git a/packages/web3-utils/types/index.d.ts b/packages/web3-utils/types/index.d.ts index da2f261daa8..fad6c39db85 100644 --- a/packages/web3-utils/types/index.d.ts +++ b/packages/web3-utils/types/index.d.ts @@ -220,6 +220,7 @@ export interface AbiItem { payable?: boolean; stateMutability?: StateMutabilityType; type: AbiType; + gas?: number; } export interface AbiInput { diff --git a/packages/web3-utils/types/tests/json-interface-method-to-string-test.ts b/packages/web3-utils/types/tests/json-interface-method-to-string-test.ts index 649b6609c6a..7db99e00a1b 100644 --- a/packages/web3-utils/types/tests/json-interface-method-to-string-test.ts +++ b/packages/web3-utils/types/tests/json-interface-method-to-string-test.ts @@ -101,7 +101,8 @@ const abiItem: AbiItem = { ], payable: false, stateMutability: "pure", - type: "function" + type: "function", + gas: 175875 }; // $ExpectType string jsonInterfaceMethodToString(abiItem); diff --git a/test/contract.encodeABI.js b/test/contract.encodeABI.js index 5d5172c078d..754483d4d8e 100644 --- a/test/contract.encodeABI.js +++ b/test/contract.encodeABI.js @@ -28,7 +28,8 @@ var abi = [ ], payable: false, type: "function", - stateMutability: "view" + stateMutability: "view", + gas: 175875 } ];