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

Function Deprecated constant field #279

Open
r0wdiggity opened this issue Sep 28, 2022 · 1 comment
Open

Function Deprecated constant field #279

r0wdiggity opened this issue Sep 28, 2022 · 1 comment

Comments

@r0wdiggity
Copy link

warning: use of deprecated field `ethabi::Function::constant`: The constant attribute was removed in Solidity 0.5.0 and has been replaced with stateMutability.
    |
    |         constant: None,
    |         ^^^^^^^^^^^^^^
    |
    = note: `#[warn(deprecated)]` on by default

the constant field has been marked deprecated in favor of state_mutability for the Function struct. However, the field is still required to instantiate the struct, so we have to use it.

@nlordell
Copy link
Contributor

Hmm, that is annoying... For now, you could #[allow(deprecated)], but I agree that the development ergonomics around this is not great.

I think the correct solution would be to remove it for the Function struct, but allow it at de-serialization time (converting it to the appropirate state_mutability value).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants