ethabi
ethabi copied to clipboard
Function Deprecated `constant` field
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.
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).