Module com.hedera.hashgraph.sdk
Package com.hedera.hashgraph.sdk
Class TokenFeeScheduleUpdateTransaction
java.lang.Object
com.hedera.hashgraph.sdk.Executable<TokenFeeScheduleUpdateTransaction,Transaction,TransactionResponse,TransactionResponse>
com.hedera.hashgraph.sdk.Transaction<TokenFeeScheduleUpdateTransaction>
com.hedera.hashgraph.sdk.TokenFeeScheduleUpdateTransaction
public class TokenFeeScheduleUpdateTransaction
extends Transaction<TokenFeeScheduleUpdateTransaction>
Update the custom fees for a given token. If the token does not have a
fee schedule, the network response returned will be
CUSTOM_SCHEDULE_ALREADY_HAS_NO_FEES. You will need to sign the transaction
with the fee schedule key to update the fee schedule for the token. If you
do not have a fee schedule key set for the token, you will not be able to
update the fee schedule.
See Hedera Documentation
-
Nested Class Summary
Nested classes/interfaces inherited from class com.hedera.hashgraph.sdk.Transaction
Transaction.SignableNodeTransactionBodyBytesNested classes/interfaces inherited from class com.hedera.hashgraph.sdk.Executable
Executable.GrpcRequest -
Field Summary
Fields inherited from class com.hedera.hashgraph.sdk.Transaction
customFeeLimits, DEFAULT_AUTO_RENEW_PERIOD, defaultMaxTransactionFee, DUMMY_ACCOUNT_ID, DUMMY_TRANSACTION_ID, frozenBodyBuilder, innerSignedTransactions, outerTransactions, publicKeys, regenerateTransactionId, signers, sigPairLists, sourceTransactionBody, transactionIdsFields inherited from class com.hedera.hashgraph.sdk.Executable
attemptedAllNodes, blockingUnaryCall, grpcDeadline, logger, maxAttempts, maxBackoff, minBackoff, nodeAccountIds, nodes, random, RST_STREAM -
Constructor Summary
ConstructorsConstructorDescriptionConstructor.Constructor.TokenFeeScheduleUpdateTransaction(LinkedHashMap<TransactionId, LinkedHashMap<AccountId, Transaction>> txs) Constructor. -
Method Summary
Modifier and TypeMethodDescription(package private) TokenFeeScheduleUpdateTransactionBody.Builderbuild()Build the transaction body.Extract the list of custom fees.(package private) io.grpc.MethodDescriptor<Transaction, TransactionResponse> Called to direct the invocation of the query to the appropriate gRPC service.Extract the token id.(package private) voidInitialize from the transaction body.(package private) voidonFreeze(TransactionBody.Builder bodyBuilder) Called inTransaction.freezeWith(Client)just before the transaction body is built.(package private) voidonScheduled(SchedulableTransactionBody.Builder scheduled) Called inTransaction.schedule()when converting transaction into a scheduled version.setCustomFees(List<CustomFee> customFees) A list of custom fees representing a fee schedule.setTokenId(TokenId tokenId) A token identifier.(package private) voidvalidateChecksums(Client client) Methods inherited from class com.hedera.hashgraph.sdk.Transaction
addSignature, addSignature, batchify, buildAllTransactions, buildTransaction, doSchedule, estimateFee, freeze, freezeWith, fromBytes, fromScheduledTransaction, generateTransactionIds, getBatchKey, getDefaultMaxTransactionFee, getExecutionState, getHighVolume, getMaxTransactionFee, getRegenerateTransactionId, getRequiredChunks, getSignableNodeBodyBytesList, getSignatures, getSignaturesAtOffset, getTransactionBodySize, getTransactionHash, getTransactionHashPerNode, getTransactionId, getTransactionIdInternal, getTransactionMemo, getTransactionSize, getTransactionValidDuration, hash, isBatchedAndNotBatchTransaction, isFrozen, keyAlreadySigned, makeRequest, mapResponse, mapResponseStatus, onExecute, onExecuteAsync, regenerateTransactionId, requireNotFrozen, requireOneNodeAccountId, schedule, setBatchKey, setHighVolume, setMaxTransactionFee, setNodeAccountIds, setRegenerateTransactionId, setTransactionId, setTransactionMemo, setTransactionValidDuration, sign, signTransaction, signWith, signWithOperator, spawnBodyBuilder, toBytes, toString, wipeTransactionListsMethods inherited from class com.hedera.hashgraph.sdk.Executable
advanceRequest, checkNodeAccountIds, execute, execute, executeAsync, executeAsync, executeAsync, executeAsync, executeAsync, executeAsync, getGrpcRequest, getMaxAttempts, getMaxBackoff, getMaxRetry, getMinBackoff, getNodeAccountIds, getNodeForExecute, grpcDeadline, logTransaction, mergeFromClient, setGrpcDeadline, setLogger, setMaxAttempts, setMaxBackoff, setMaxRetry, setMinBackoff, setNodesFromNodeAccountIds, setRequestListener, setResponseListener, shouldRetryExceptionally
-
Constructor Details
-
TokenFeeScheduleUpdateTransaction
public TokenFeeScheduleUpdateTransaction()Constructor. -
TokenFeeScheduleUpdateTransaction
TokenFeeScheduleUpdateTransaction(LinkedHashMap<TransactionId, LinkedHashMap<AccountId, throws com.google.protobuf.InvalidProtocolBufferExceptionTransaction>> txs) Constructor.- Parameters:
txs- Compound list of transaction id's list of (AccountId, Transaction) records- Throws:
com.google.protobuf.InvalidProtocolBufferException- when there is an issue with the protobuf
-
TokenFeeScheduleUpdateTransaction
TokenFeeScheduleUpdateTransaction(TransactionBody txBody) Constructor.- Parameters:
txBody- protobuf TransactionBody
-
-
Method Details
-
getTokenId
Extract the token id.- Returns:
- the token id
-
setTokenId
A token identifier.This SHALL identify the token type to modify with an updated custom fee schedule.
The identified token MUST exist, and MUST NOT be deleted.- Parameters:
tokenId- the token id- Returns:
this
-
getCustomFees
Extract the list of custom fees.- Returns:
- the list of custom fees
-
setCustomFees
A list of custom fees representing a fee schedule.This list MAY be empty to remove custom fees from a token.
If the identified token is a non-fungible/unique type, the entries in this list MUST NOT declare a `fractional_fee`.
If the identified token is a fungible/common type, the entries in this list MUST NOT declare a `royalty_fee`.
Any token type MAY include entries that declare a `fixed_fee`.- Parameters:
customFees- the list of custom fees- Returns:
this
-
initFromTransactionBody
void initFromTransactionBody()Initialize from the transaction body. -
build
Build the transaction body. -
validateChecksums
- Specified by:
validateChecksumsin classTransaction<TokenFeeScheduleUpdateTransaction>- Throws:
BadEntityIdException
-
getMethodDescriptor
io.grpc.MethodDescriptor<Transaction,TransactionResponse> getMethodDescriptor()Description copied from class:ExecutableCalled to direct the invocation of the query to the appropriate gRPC service.- Specified by:
getMethodDescriptorin classExecutable<TokenFeeScheduleUpdateTransaction,Transaction, TransactionResponse, TransactionResponse>
-
onFreeze
Description copied from class:TransactionCalled inTransaction.freezeWith(Client)just before the transaction body is built. The intent is for the derived class to assign their data variant to the transaction body.- Specified by:
onFreezein classTransaction<TokenFeeScheduleUpdateTransaction>
-
onScheduled
Description copied from class:TransactionCalled inTransaction.schedule()when converting transaction into a scheduled version.- Specified by:
onScheduledin classTransaction<TokenFeeScheduleUpdateTransaction>
-