Skip to content

Commit

Permalink
Merge pull request #3437 from maektwain/1.x
Browse files Browse the repository at this point in the history
Gas Type Added in AbiItem
  • Loading branch information
holgerd77 committed Apr 9, 2020
2 parents 2a5c5cb + 2e15ff4 commit bd9cf48
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
1 change: 1 addition & 0 deletions packages/web3-utils/types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,7 @@ export interface AbiItem {
payable?: boolean;
stateMutability?: StateMutabilityType;
type: AbiType;
gas?: number;
}

export interface AbiInput {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,8 @@ const abiItem: AbiItem = {
],
payable: false,
stateMutability: "pure",
type: "function"
type: "function",
gas: 175875
};
// $ExpectType string
jsonInterfaceMethodToString(abiItem);
Expand Down
3 changes: 2 additions & 1 deletion test/contract.encodeABI.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ var abi = [
],
payable: false,
type: "function",
stateMutability: "view"
stateMutability: "view",
gas: 175875
}
];

Expand Down

0 comments on commit bd9cf48

Please sign in to comment.