Struct CombinedJson

Source
pub struct CombinedJson {
    pub contracts: BTreeMap<String, Contract>,
    pub source_list: Option<Vec<String>>,
    pub sources: Option<Value>,
    pub version: String,
    pub revive_version: Option<String>,
}
Expand description

The solc --combined-json output.

Fields§

§contracts: BTreeMap<String, Contract>

The contract entries.

§source_list: Option<Vec<String>>

The list of source files.

§sources: Option<Value>

The source code extra data, including the AST.

§version: String

The solc compiler version.

§revive_version: Option<String>

The resolc compiler version.

Implementations§

Source§

impl CombinedJson

Source

pub fn entry(&self, path: &str, entry: &str) -> u32

Returns the signature hash of the specified contract and entry.

Source

pub fn get_full_path(&self, name: &str) -> Option<String>

Returns the full contract path which can be found in combined-json output.

Source

pub fn remove_evm(&mut self)

Removes EVM artifacts to prevent their accidental usage.

Source

pub fn write_to_directory( self, output_directory: &Path, overwrite: bool, ) -> Result<()>

Writes the JSON to the specified directory.

Trait Implementations§

Source§

impl Debug for CombinedJson

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for CombinedJson

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Serialize for CombinedJson

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,