foundry-rs / compilers

Utilities for working with native solc and compiling projects.
Apache License 2.0
58 stars 34 forks source link

Solidity 0.4.x does not produce YulBlock for InlineAssembly Node #156

Open ZhangZhuoSJTU opened 1 week ago

ZhangZhuoSJTU commented 1 week ago

https://github.com/foundry-rs/compilers/blob/8ffdd72e9febd2c9a72d9363f439ce50b59a0db1/crates/artifacts/solc/src/ast/mod.rs#L865-L874

Hi all, I observe that Solidity 0.4.x would not produce YulBlock for InlineAssembly AST Node. I was wondering whether it is possible to change it as an Option? Specifically,

 struct InlineAssembly { 
     documentation: Option<String>, 
     #[serde(rename = "AST")] 
     ast: Option<YulBlock>, 
     // TODO: We need this camel case for the AST, but pascal case other places in ethers-solc 
     //evm_version: EvmVersion, 
     external_references: Vec<ExternalInlineAssemblyReference>, 
     #[serde(default, deserialize_with = "serde_helpers::default_for_null")] 
     flags: Vec<InlineAssemblyFlag>, 
 } 

I am more concern about such an update would break downstream applications.