use of com.hedera.services.usage.token.TokenOpsUsage in project hedera-services by hashgraph.
the class HapiTokenPause method usageEstimate.
private FeeData usageEstimate(TransactionBody txn, SigValueObj svo) {
UsageAccumulator accumulator = new UsageAccumulator();
final var tokenPauseMeta = TOKEN_OPS_USAGE_UTILS.tokenPauseUsageFrom();
final var baseTransactionMeta = new BaseTransactionMeta(txn.getMemoBytes().size(), 0);
TokenOpsUsage tokenOpsUsage = new TokenOpsUsage();
tokenOpsUsage.tokenPauseUsage(suFrom(svo), baseTransactionMeta, tokenPauseMeta, accumulator);
return AdapterUtils.feeDataFrom(accumulator);
}
use of com.hedera.services.usage.token.TokenOpsUsage in project hedera-services by hashgraph.
the class HapiTokenUnfreeze method usageEstimate.
private FeeData usageEstimate(TransactionBody txn, SigValueObj svo) {
UsageAccumulator accumulator = new UsageAccumulator();
final var tokenUnfreezeMeta = TOKEN_OPS_USAGE_UTILS.tokenUnfreezeUsageFrom();
final var baseTransactionMeta = new BaseTransactionMeta(txn.getMemoBytes().size(), 0);
TokenOpsUsage tokenOpsUsage = new TokenOpsUsage();
tokenOpsUsage.tokenUnfreezeUsage(suFrom(svo), baseTransactionMeta, tokenUnfreezeMeta, accumulator);
return AdapterUtils.feeDataFrom(accumulator);
}
use of com.hedera.services.usage.token.TokenOpsUsage in project hedera-services by hashgraph.
the class HapiTokenUnpause method usageEstimate.
private FeeData usageEstimate(TransactionBody txn, SigValueObj svo) {
UsageAccumulator accumulator = new UsageAccumulator();
final var tokenUnpauseMeta = TOKEN_OPS_USAGE_UTILS.tokenUnpauseUsageFrom();
final var baseTransactionMeta = new BaseTransactionMeta(txn.getMemoBytes().size(), 0);
TokenOpsUsage tokenOpsUsage = new TokenOpsUsage();
tokenOpsUsage.tokenUnpauseUsage(suFrom(svo), baseTransactionMeta, tokenUnpauseMeta, accumulator);
return AdapterUtils.feeDataFrom(accumulator);
}
Aggregations