Skip to content

EE Error: unexpected tokens: <TokenString ID:nonpayable> #4412

@skiv71

Description

@skiv71

Ethers Version

6.7.1

Search Terms

No response

Describe the Problem

Problem

EE Error: unexpected tokens: <TokenString ID:nonpayable>

Scenario

I have a human readable abi, created from "iface.format(false)"

Been working fine, but today I added a constructor to my contract and started seeing the above error.

I've traced it to the line below: -

constructor(address _conversionContract) nonpayable"

If I modifiy the abi and remove the " nonpayable" it works fine.

Once again, this abi is generated by ethers, but it fails to parse it when creating an interface instance.

Code Snippet

No response

Contract ABI

No response

Errors

No response

Environment

No response

Environment (Other)

No response

Metadata

Metadata

Assignees

Labels

bugVerified to be an issue.fixed/completeThis Bug is fixed or Enhancement is complete and published.v6Issues regarding v6

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions