revive_solc_json_interface/standard_json/output/contract/evm/
bytecode.rs

1//! The `solc --standard-json` output contract EVM bytecode.
2
3use serde::Deserialize;
4use serde::Serialize;
5
6/// The `solc --standard-json` output contract EVM bytecode.
7#[derive(Debug, Serialize, Deserialize, Clone)]
8#[serde(rename_all = "camelCase")]
9pub struct Bytecode {
10    /// The bytecode object.
11    pub object: String,
12}
13
14impl Bytecode {
15    /// A shortcut constructor.
16    pub fn new(object: String) -> Self {
17        Self { object }
18    }
19}
20
21/// The `solc --standard-json` output contract EVM deployed bytecode.
22#[derive(Debug, Serialize, Deserialize, Clone)]
23#[serde(rename_all = "camelCase")]
24pub struct DeployedBytecode {
25    /// The bytecode object.
26    pub object: String,
27}
28
29impl DeployedBytecode {
30    /// A shortcut constructor.
31    pub fn new(object: String) -> Self {
32        Self { object }
33    }
34}