Skip to content

Commit 6f18e11

Browse files
brockelmorevkgnosis
authored andcommitted
skip writing out of constant if none
1 parent c622438 commit 6f18e11

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ethabi/src/function.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ pub struct Function {
3131
#[deprecated(note = "The constant attribute was removed in Solidity 0.5.0 and has been \
3232
replaced with stateMutability.")]
3333
/// Constant function.
34-
#[cfg_attr(feature = "full-serde", serde(default))]
34+
#[cfg_attr(feature = "full-serde", serde(skip_serializing_if = "Option::is_none"))]
3535
pub constant: Option<bool>,
3636
/// Whether the function reads or modifies blockchain state
3737
#[cfg_attr(feature = "full-serde", serde(rename = "stateMutability", default))]

0 commit comments

Comments
 (0)