loadContractInfoForWasmId method
Loads contract source byte code for the given wasmId
and extracts
the information (Environment Meta, Contract Spec, Contract Meta).
Returns SorobanContractInfo
null if the contract was not found.
Throws SorobanContractParserFailed
if parsing of the byte code failed.
Implementation
Future<SorobanContractInfo?> loadContractInfoForWasmId(String wasmId) async {
var contractCodeEntry = await loadContractCodeForWasmId(wasmId);
if (contractCodeEntry == null) {
return null;
}
var byteCode = contractCodeEntry.code.dataValue;
return SorobanContractParser.parseContractByteCode(byteCode);
}