Class CustomFee

java.lang.Object
com.google.protobuf.AbstractMessageLite<CustomFee,CustomFee.Builder>
com.google.protobuf.GeneratedMessageLite<CustomFee,CustomFee.Builder>
com.hedera.hashgraph.sdk.proto.CustomFee
All Implemented Interfaces:
com.google.protobuf.MessageLite, com.google.protobuf.MessageLiteOrBuilder, CustomFeeOrBuilder

@Generated public final class CustomFee extends com.google.protobuf.GeneratedMessageLite<CustomFee,CustomFee.Builder> implements CustomFeeOrBuilder
 *
 A transfer fee to assess during a CryptoTransfer.<br/>
 This fee applies to transactions that transfer units of the token to
 which the fee is attached. A custom fee may be either fixed or fractional,
 and must specify a fee collector account to receive the assessed fees.

 Custom fees MUST be greater than zero (0).
 
Protobuf type proto.CustomFee
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static final class 
    * A transfer fee to assess during a CryptoTransfer.<br/> This fee applies to transactions that transfer units of the token to which the fee is attached.
    static enum 
     

    Nested classes/interfaces inherited from class com.google.protobuf.GeneratedMessageLite

    com.google.protobuf.GeneratedMessageLite.DefaultInstanceBasedParser<T extends com.google.protobuf.GeneratedMessageLite<T,?>>, com.google.protobuf.GeneratedMessageLite.ExtendableBuilder<MessageType extends com.google.protobuf.GeneratedMessageLite.ExtendableMessage<MessageType,BuilderType>,BuilderType extends com.google.protobuf.GeneratedMessageLite.ExtendableBuilder<MessageType,BuilderType>>, com.google.protobuf.GeneratedMessageLite.ExtendableMessage<MessageType extends com.google.protobuf.GeneratedMessageLite.ExtendableMessage<MessageType,BuilderType>,BuilderType extends com.google.protobuf.GeneratedMessageLite.ExtendableBuilder<MessageType,BuilderType>>, com.google.protobuf.GeneratedMessageLite.ExtendableMessageOrBuilder<MessageType extends com.google.protobuf.GeneratedMessageLite.ExtendableMessage<MessageType,BuilderType>,BuilderType extends com.google.protobuf.GeneratedMessageLite.ExtendableBuilder<MessageType,BuilderType>>, com.google.protobuf.GeneratedMessageLite.GeneratedExtension<ContainingType extends com.google.protobuf.MessageLite,Type>, com.google.protobuf.GeneratedMessageLite.MethodToInvoke, com.google.protobuf.GeneratedMessageLite.SerializedForm

    Nested classes/interfaces inherited from class com.google.protobuf.AbstractMessageLite

    com.google.protobuf.AbstractMessageLite.InternalOneOfEnum
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
     
    static final int
     
    static final int
     
    static final int
     
    static final int
     

    Fields inherited from class com.google.protobuf.GeneratedMessageLite

    unknownFields

    Fields inherited from class com.google.protobuf.AbstractMessageLite

    memoizedHashCode
  • Method Summary

    Modifier and Type
    Method
    Description
    protected final Object
    dynamicMethod(com.google.protobuf.GeneratedMessageLite.MethodToInvoke method, Object arg0, Object arg1)
     
    boolean
    * Flag indicating to exempt all custom fee collector accounts for this token type from paying this custom fee when sending tokens.
    static CustomFee
     
     
    * The account to receive the custom fee.
    * A fixed fee to be charged to the `sender` for every token transfer.
    * A fee defined as a fraction of the tokens transferred.
    * A fee charged as royalty for any transfer of a non-fungible/unique token.
    boolean
    * The account to receive the custom fee.
    boolean
    * A fixed fee to be charged to the `sender` for every token transfer.
    boolean
    * A fee defined as a fraction of the tokens transferred.
    boolean
    * A fee charged as royalty for any transfer of a non-fungible/unique token.
     
    newBuilder(CustomFee prototype)
     
    static CustomFee
     
    static CustomFee
    parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
    static CustomFee
    parseFrom(byte[] data)
     
    static CustomFee
    parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
    static CustomFee
    parseFrom(com.google.protobuf.ByteString data)
     
    static CustomFee
    parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
    static CustomFee
    parseFrom(com.google.protobuf.CodedInputStream input)
     
    static CustomFee
    parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
    static CustomFee
     
    static CustomFee
    parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
    static CustomFee
     
    static CustomFee
    parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
    static com.google.protobuf.Parser<CustomFee>
     

    Methods inherited from class com.google.protobuf.GeneratedMessageLite

    createBuilder, createBuilder, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyLongList, emptyProtobufList, equals, getDefaultInstanceForType, getParserForType, getSerializedSize, hashCode, isInitialized, makeImmutable, mergeLengthDelimitedField, mergeUnknownFields, mergeVarintField, mutableCopy, mutableCopy, mutableCopy, mutableCopy, mutableCopy, mutableCopy, newBuilderForType, newMessageInfo, newRepeatedGeneratedExtension, newSingularGeneratedExtension, parseDelimitedFrom, parseDelimitedFrom, parseFrom, parseFrom, parseFrom, parseFrom, parseFrom, parseFrom, parseFrom, parseFrom, parseFrom, parseFrom, parsePartialFrom, parseUnknownField, registerDefaultInstance, toBuilder, toString, writeTo

    Methods inherited from class com.google.protobuf.AbstractMessageLite

    addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeTo

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait

    Methods inherited from interface com.google.protobuf.MessageLiteOrBuilder

    getDefaultInstanceForType, isInitialized
  • Field Details

    • FIXED_FEE_FIELD_NUMBER

      public static final int FIXED_FEE_FIELD_NUMBER
      See Also:
    • FRACTIONAL_FEE_FIELD_NUMBER

      public static final int FRACTIONAL_FEE_FIELD_NUMBER
      See Also:
    • ROYALTY_FEE_FIELD_NUMBER

      public static final int ROYALTY_FEE_FIELD_NUMBER
      See Also:
    • FEE_COLLECTOR_ACCOUNT_ID_FIELD_NUMBER

      public static final int FEE_COLLECTOR_ACCOUNT_ID_FIELD_NUMBER
      See Also:
    • ALL_COLLECTORS_ARE_EXEMPT_FIELD_NUMBER

      public static final int ALL_COLLECTORS_ARE_EXEMPT_FIELD_NUMBER
      See Also:
  • Method Details

    • getFeeCase

      public CustomFee.FeeCase getFeeCase()
      Specified by:
      getFeeCase in interface CustomFeeOrBuilder
    • hasFixedFee

      public boolean hasFixedFee()
       *
       A fixed fee to be charged to the `sender` for every token transfer.
       <p>
       This type of fee MAY be defined for any token type.<br/>
       This type of fee MAY be more consistent and reliable than
       other types.
       
      .proto.FixedFee fixed_fee = 1;
      Specified by:
      hasFixedFee in interface CustomFeeOrBuilder
      Returns:
      Whether the fixedFee field is set.
    • getFixedFee

      public FixedFee getFixedFee()
       *
       A fixed fee to be charged to the `sender` for every token transfer.
       <p>
       This type of fee MAY be defined for any token type.<br/>
       This type of fee MAY be more consistent and reliable than
       other types.
       
      .proto.FixedFee fixed_fee = 1;
      Specified by:
      getFixedFee in interface CustomFeeOrBuilder
      Returns:
      The fixedFee.
    • hasFractionalFee

      public boolean hasFractionalFee()
       *
       A fee defined as a fraction of the tokens transferred.
       <p>
       This type of fee MUST NOT be defined for a non-fungible/unique
       token type.<br/>
       This fee MAY be charged to either sender, as an increase to the
       amount sent, or receiver, as a reduction to the amount received.
       
      .proto.FractionalFee fractional_fee = 2;
      Specified by:
      hasFractionalFee in interface CustomFeeOrBuilder
      Returns:
      Whether the fractionalFee field is set.
    • getFractionalFee

      public FractionalFee getFractionalFee()
       *
       A fee defined as a fraction of the tokens transferred.
       <p>
       This type of fee MUST NOT be defined for a non-fungible/unique
       token type.<br/>
       This fee MAY be charged to either sender, as an increase to the
       amount sent, or receiver, as a reduction to the amount received.
       
      .proto.FractionalFee fractional_fee = 2;
      Specified by:
      getFractionalFee in interface CustomFeeOrBuilder
      Returns:
      The fractionalFee.
    • hasRoyaltyFee

      public boolean hasRoyaltyFee()
       *
       A fee charged as royalty for any transfer of a
       non-fungible/unique token.
       <p>
       This type of fee MUST NOT be defined for a
       fungible/common token type.
       
      .proto.RoyaltyFee royalty_fee = 4;
      Specified by:
      hasRoyaltyFee in interface CustomFeeOrBuilder
      Returns:
      Whether the royaltyFee field is set.
    • getRoyaltyFee

      public RoyaltyFee getRoyaltyFee()
       *
       A fee charged as royalty for any transfer of a
       non-fungible/unique token.
       <p>
       This type of fee MUST NOT be defined for a
       fungible/common token type.
       
      .proto.RoyaltyFee royalty_fee = 4;
      Specified by:
      getRoyaltyFee in interface CustomFeeOrBuilder
      Returns:
      The royaltyFee.
    • hasFeeCollectorAccountId

      public boolean hasFeeCollectorAccountId()
       *
       The account to receive the custom fee.
       
      .proto.AccountID fee_collector_account_id = 3;
      Specified by:
      hasFeeCollectorAccountId in interface CustomFeeOrBuilder
      Returns:
      Whether the feeCollectorAccountId field is set.
    • getFeeCollectorAccountId

      public AccountID getFeeCollectorAccountId()
       *
       The account to receive the custom fee.
       
      .proto.AccountID fee_collector_account_id = 3;
      Specified by:
      getFeeCollectorAccountId in interface CustomFeeOrBuilder
      Returns:
      The feeCollectorAccountId.
    • getAllCollectorsAreExempt

      public boolean getAllCollectorsAreExempt()
       *
       Flag indicating to exempt all custom fee collector accounts for this
       token type from paying this custom fee when sending tokens.
       <p>
       The treasury account for a token, and the account identified by the
       `fee_collector_account_id` field of this `CustomFee` are always exempt
       from this custom fee to avoid redundant and unnecessary transfers.
       If this value is `true` then the account(s) identified in
       `fee_collector_account_id` for _all_ custom fee definitions for this
       token type SHALL also be exempt from this custom fee.
       This behavior is specified in HIP-573.
       
      bool all_collectors_are_exempt = 5;
      Specified by:
      getAllCollectorsAreExempt in interface CustomFeeOrBuilder
      Returns:
      The allCollectorsAreExempt.
    • parseFrom

      public static CustomFee parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static CustomFee parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static CustomFee parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static CustomFee parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static CustomFee parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static CustomFee parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static CustomFee parseFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static CustomFee parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static CustomFee parseDelimitedFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static CustomFee parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseFrom

      public static CustomFee parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static CustomFee parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • newBuilder

      public static CustomFee.Builder newBuilder()
    • newBuilder

      public static CustomFee.Builder newBuilder(CustomFee prototype)
    • dynamicMethod

      protected final Object dynamicMethod(com.google.protobuf.GeneratedMessageLite.MethodToInvoke method, Object arg0, Object arg1)
      Specified by:
      dynamicMethod in class com.google.protobuf.GeneratedMessageLite<CustomFee,CustomFee.Builder>
    • getDefaultInstance

      public static CustomFee getDefaultInstance()
    • parser

      public static com.google.protobuf.Parser<CustomFee> parser()