mirror of
https://github.com/pezkuwichain/revive.git
synced 2026-06-14 21:31:05 +00:00
3389865af7
It helps external consumers working with the `revive-solc-json-interface` crate. Signed-off-by: Cyrill Leutwiler <bigcyrill@hotmail.com>
25 lines
664 B
Rust
25 lines
664 B
Rust
//! The `solc --standard-json` input settings metadata.
|
|
|
|
use serde::Deserialize;
|
|
use serde::Serialize;
|
|
|
|
use crate::standard_json::input::settings::metadata_hash::MetadataHash;
|
|
|
|
/// The `solc --standard-json` input settings metadata.
|
|
#[derive(Clone, Debug, Default, Serialize, Deserialize)]
|
|
#[serde(rename_all = "camelCase")]
|
|
pub struct Metadata {
|
|
/// The bytecode hash mode.
|
|
#[serde(skip_serializing_if = "Option::is_none")]
|
|
pub bytecode_hash: Option<MetadataHash>,
|
|
}
|
|
|
|
impl Metadata {
|
|
/// A shortcut constructor.
|
|
pub fn new(bytecode_hash: MetadataHash) -> Self {
|
|
Self {
|
|
bytecode_hash: Some(bytecode_hash),
|
|
}
|
|
}
|
|
}
|