loadContractInfoForContractId method

Future<SorobanContractInfo?> loadContractInfoForContractId(
  1. String contractId
)
inherited

Loads contract source byte code for the given contractId and extracts the information (Environment Meta, Contract Spec, Contract Meta). Returns SorobanContractInfo or null if the contract was not found. Throws SorobanContractParserFailed if parsing of the byte code failed.

Implementation

Future<SorobanContractInfo?> loadContractInfoForContractId(
    String contractId) async {
  var contractCodeEntry = await loadContractCodeForContractId(contractId);
  if (contractCodeEntry == null) {
    return null;
  }
  var byteCode = contractCodeEntry.code.dataValue;
  return SorobanContractParser.parseContractByteCode(byteCode);
}