Search in sources :

Example 1 with TokenFeeScheduleUpdateTransactionBody

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);
}
Also used : TokenFeeScheduleUpdateTransactionBody(com.hederahashgraph.api.proto.java.TokenFeeScheduleUpdateTransactionBody)

Example 2 with TokenFeeScheduleUpdateTransactionBody

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);
    }
}
Also used : EntityId(com.hedera.mirror.common.domain.entity.EntityId) TokenFeeScheduleUpdateTransactionBody(com.hederahashgraph.api.proto.java.TokenFeeScheduleUpdateTransactionBody)

Aggregations

TokenFeeScheduleUpdateTransactionBody (com.hederahashgraph.api.proto.java.TokenFeeScheduleUpdateTransactionBody)2 EntityId (com.hedera.mirror.common.domain.entity.EntityId)1