Struct contract_metadata::Source
source · pub struct Source {
pub hash: CodeHash,
pub language: SourceLanguage,
pub compiler: SourceCompiler,
pub wasm: Option<SourceWasm>,
pub build_info: Option<Map<String, Value>>,
}Expand description
Information about the contract’s Wasm code.
Fields§
§hash: CodeHashThe hash of the contract’s Wasm code.
language: SourceLanguageThe language used to write the contract.
compiler: SourceCompilerThe compiler used to compile the contract.
wasm: Option<SourceWasm>The actual Wasm code of the contract, for optionally bundling the code with the metadata.
build_info: Option<Map<String, Value>>Extra information about the environment in which the contract was built.
Useful for producing deterministic builds.
Implementations§
source§impl Source
impl Source
sourcepub fn new(
wasm: Option<SourceWasm>,
hash: CodeHash,
language: SourceLanguage,
compiler: SourceCompiler,
build_info: Option<Map<String, Value>>
) -> Self
pub fn new( wasm: Option<SourceWasm>, hash: CodeHash, language: SourceLanguage, compiler: SourceCompiler, build_info: Option<Map<String, Value>> ) -> Self
Constructs a new InkProjectSource.
Trait Implementations§
source§impl<'de> Deserialize<'de> for Source
impl<'de> Deserialize<'de> for Source
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more