use of com.hederahashgraph.api.proto.java.TokenFeeScheduleUpdateTransactionBody in project hedera-services by hashgraph.
the class TokenFeeScheduleUpdateTransitionLogicTest method givenTxnCtx.
private void givenTxnCtx() {
final TokenFeeScheduleUpdateTransactionBody tokenFeeScheduleUpdateTxn = TokenFeeScheduleUpdateTransactionBody.newBuilder().setTokenId(target).addCustomFees(CustomFee.getDefaultInstance()).addCustomFees(CustomFee.getDefaultInstance()).build();
final var txn = TransactionBody.newBuilder().setTokenFeeScheduleUpdate(tokenFeeScheduleUpdateTxn).build();
given(txnCtx.accessor()).willReturn(accessor);
given(accessor.getTxn()).willReturn(txn);
given(tokenStore.loadToken(Id.fromGrpcToken(target))).willReturn(token);
}
use of com.hederahashgraph.api.proto.java.TokenFeeScheduleUpdateTransactionBody in project hedera-mirror-node by hashgraph.
the class EntityRecordItemListener method insertTokenFeeScheduleUpdate.
private void insertTokenFeeScheduleUpdate(RecordItem recordItem) {
if (entityProperties.getPersist().isTokens()) {
TokenFeeScheduleUpdateTransactionBody transactionBody = recordItem.getTransactionBody().getTokenFeeScheduleUpdate();
EntityId tokenId = EntityId.of(transactionBody.getTokenId());
long consensusTimestamp = recordItem.getConsensusTimestamp();
insertCustomFees(transactionBody.getCustomFeesList(), consensusTimestamp, false, tokenId);
}
}
Aggregations