Skip to content

passing abi types to an object through a class #140

Closed Answered by Raiden1411
glitch-txs asked this question in Q&A
Discussion options

You must be logged in to vote

The abi that you are using is missing the stateMutability property and that's why you are not getting that autocomplete. The abi that you are using seems like it's from a old solidity version where constants were used to represent the mutability of a contract. That property is now considered deprecated and it was replaced by the stateMutability.

Abitype stills supports the constants properties but the stateMutability must always be present on the abi. You can use the provided erc20Abi from abitype/test for a generic erc20 abi.

Made a pr on that repo to fix the problem.

Replies: 1 comment 6 replies

Comment options

You must be logged in to vote
6 replies
@Raiden1411
Comment options

@glitch-txs
Comment options

@glitch-txs
Comment options

@Raiden1411
Comment options

Answer selected by glitch-txs
@glitch-txs
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants