fromAssets static method

Future<DeployedContract> fromAssets(
  1. String path,
  2. String contractAddress,
  3. String contractName
)

Implementation

static Future<DeployedContract> fromAssets(
    String path, String contractAddress, String contractName) async {
  final contractJson =
      jsonDecode(await rootBundle.loadString('assets/' + path));

  return DeployedContract(
      ContractAbi.fromJson(jsonEncode(contractJson["abi"]), contractName),
      EthereumAddress.fromHex(contractAddress));
}