use of com.hederahashgraph.api.proto.java.ScheduleInfo in project hedera-services by hashgraph.
the class HapiScheduleSign method feeFor.
@Override
protected long feeFor(HapiApiSpec spec, Transaction txn, int numPayerKeys) throws Throwable {
try {
final ScheduleInfo info = ScheduleFeeUtils.lookupInfo(spec, schedule, loggingOff);
FeeCalculator.ActivityMetrics metricsCalc = (_txn, svo) -> scheduleOpsUsage.scheduleSignUsage(_txn, suFrom(svo), info.getExpirationTime().getSeconds());
return spec.fees().forActivityBasedOp(HederaFunctionality.ScheduleSign, metricsCalc, txn, numPayerKeys);
} catch (Throwable ignore) {
return HapiApiSuite.ONE_HBAR;
}
}
use of com.hederahashgraph.api.proto.java.ScheduleInfo in project hedera-services by hashgraph.
the class HapiScheduleDelete method feeFor.
@Override
protected long feeFor(HapiApiSpec spec, Transaction txn, int numPayerKeys) throws Throwable {
try {
final ScheduleInfo info = ScheduleFeeUtils.lookupInfo(spec, schedule, loggingOff);
FeeCalculator.ActivityMetrics metricsCalc = (_txn, svo) -> scheduleOpsUsage.scheduleDeleteUsage(_txn, suFrom(svo), info.getExpirationTime().getSeconds());
return spec.fees().forActivityBasedOp(HederaFunctionality.ScheduleDelete, metricsCalc, txn, numPayerKeys);
} catch (Throwable ignore) {
return HapiApiSuite.ONE_HBAR;
}
}
Aggregations