revive_solc_json_interface/standard_json/input/settings/
metadata.rs1use serde::Deserialize;
4use serde::Serialize;
5
6use crate::standard_json::input::settings::metadata_hash::MetadataHash;
7
8#[derive(Clone, Debug, Default, Serialize, Deserialize)]
10#[serde(rename_all = "camelCase")]
11pub struct Metadata {
12 #[serde(skip_serializing_if = "Option::is_none")]
14 pub bytecode_hash: Option<MetadataHash>,
15}
16
17impl Metadata {
18 pub fn new(bytecode_hash: MetadataHash) -> Self {
20 Self {
21 bytecode_hash: Some(bytecode_hash),
22 }
23 }
24}