Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
skiv71 opened this issue Oct 6, 2023 · 2 comments
Closed

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

skiv71 opened this issue Oct 6, 2023 · 2 comments
Assignees
Labels
bug Verified to be an issue. fixed/complete This Bug is fixed or Enhancement is complete and published. v6 Issues regarding v6

Comments

@skiv71
Copy link

skiv71 commented Oct 6, 2023

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

@skiv71 skiv71 added investigate Under investigation and may be a bug. v6 Issues regarding v6 labels Oct 6, 2023
@skiv71 skiv71 changed the title Add Bug Title Here EE Error: unexpected tokens: <TokenString ID:nonpayable> Oct 6, 2023
@ricmoo ricmoo added bug Verified to be an issue. on-deck This Enhancement or Bug is currently being worked on. next-patch Issues scheduled for the next arch release. and removed investigate Under investigation and may be a bug. labels Nov 1, 2023
@ricmoo
Copy link
Member

ricmoo commented Nov 1, 2023

This is definitely a bug; "nonpayable" is the default (and is an invalid keyword for consumption) and should not be emitted in the Fragment's format.

I will get to this ASAP.

Thanks!

@ricmoo ricmoo added fixed/complete This Bug is fixed or Enhancement is complete and published. and removed on-deck This Enhancement or Bug is currently being worked on. next-patch Issues scheduled for the next arch release. labels Nov 1, 2023
@ricmoo
Copy link
Member

ricmoo commented Nov 1, 2023

This has been fixed in v6.8.1.

Thanks! :)

@ricmoo ricmoo closed this as completed Nov 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Verified to be an issue. fixed/complete This Bug is fixed or Enhancement is complete and published. v6 Issues regarding v6
Projects
None yet
Development

No branches or pull requests

2 participants