Function ethers_etherscan::utils::deserialize_source_code
source · pub fn deserialize_source_code<'de, D: Deserializer<'de>>(
deserializer: D
) -> Result<SourceCodeMetadata, D::Error>
Expand description
Deserializes as JSON either:
- Object:
{ "SourceCode": { language: "Solidity", .. }, ..}
- Stringified JSON object:
{ "SourceCode": "{{\r\n \"language\": \"Solidity\", ..}}", ..}
{ "SourceCode": "{ \"file.sol\": \"...\" }", ... }
- Normal source code string:
{ "SourceCode": "// SPDX-License-Identifier: ...", .. }