diff --git a/ethers-solc/src/artifacts/ast.rs b/ethers-solc/src/artifacts/ast.rs index 91f3a6aa..236c3bdb 100644 --- a/ethers-solc/src/artifacts/ast.rs +++ b/ethers-solc/src/artifacts/ast.rs @@ -27,7 +27,8 @@ pub struct Ast { #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct Node { /// The node ID. - pub id: usize, + #[serde(default, skip_serializing_if = "Option::is_none")] + pub id: Option, /// The node type. #[serde(rename = "nodeType")]