Skip to content
This repository was archived by the owner on Mar 5, 2025. It is now read-only.

Commit bd9cf48

Browse files
authored
Merge pull request #3437 from maektwain/1.x
Gas Type Added in AbiItem
2 parents 2a5c5cb + 2e15ff4 commit bd9cf48

File tree

4 files changed

+6
-2
lines changed

4 files changed

+6
-2
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,7 @@ Released with 1.0.0-beta.37 code base.
144144
- Add revert reason support to sendSignedTransaction
145145
- ENS module extended with the possibility to add a custom registry (#3301)
146146
- Missing ENS Registry methods and Resolver.supportsInterface method added (#3325)
147+
- Add optional gas type to AbiItem typescript definitions (for ABIs generated by Vyper)
147148

148149
### Changed
149150

packages/web3-utils/types/index.d.ts

+1
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,7 @@ export interface AbiItem {
220220
payable?: boolean;
221221
stateMutability?: StateMutabilityType;
222222
type: AbiType;
223+
gas?: number;
223224
}
224225

225226
export interface AbiInput {

packages/web3-utils/types/tests/json-interface-method-to-string-test.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,8 @@ const abiItem: AbiItem = {
101101
],
102102
payable: false,
103103
stateMutability: "pure",
104-
type: "function"
104+
type: "function",
105+
gas: 175875
105106
};
106107
// $ExpectType string
107108
jsonInterfaceMethodToString(abiItem);

test/contract.encodeABI.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@ var abi = [
2828
],
2929
payable: false,
3030
type: "function",
31-
stateMutability: "view"
31+
stateMutability: "view",
32+
gas: 175875
3233
}
3334
];
3435

0 commit comments

Comments
 (0)