estimateEnergy method
- TriggerSmartContract contract
Implementation
Future<int> estimateEnergy(TriggerSmartContract contract) async {
final json = await triggerConstantContract(
address: contract.ownerAddress.toUint8List.toHex,
contractAddress: contract.contractAddress.toUint8List.toHex,
visible: false,
data: contract.data.toUint8List.toHex,
);
final energy_used = json["energy_used"] as int;
return energy_used;
}