java.lang.Object
com.google.protobuf.AbstractMessageLite<FractionalFee,FractionalFee.Builder>
com.google.protobuf.GeneratedMessageLite<FractionalFee,FractionalFee.Builder>
com.hedera.hashgraph.sdk.proto.FractionalFee
- All Implemented Interfaces:
com.google.protobuf.MessageLite,com.google.protobuf.MessageLiteOrBuilder,FractionalFeeOrBuilder
@Generated
public final class FractionalFee
extends com.google.protobuf.GeneratedMessageLite<FractionalFee,FractionalFee.Builder>
implements FractionalFeeOrBuilder
* A descriptor for a fee based on a portion of the tokens transferred. This fee option describes fees as a fraction of the amount of fungible/common token(s) transferred. The fee also describes a minimum and maximum amount, both of which are OPTIONAL. This type of fee SHALL be assessed only for fungible/common tokens.<br/> This type of fee MUST NOT be defined for a non-fungible/unique token type.<br/> This fee SHALL be paid with the same type of tokens as those transferred.<br/> The fee MAY be subtracted from the transferred tokens, or MAY be assessed to the sender in addition to the tokens actually transferred, based on the `net_of_transfers` field. When a single transaction sends tokens from one sender to multiple recipients, and the `net_of_transfers` flag is false, the network SHALL attempt to evenly assess the total fee across all recipients proportionally. This may be inexact and, particularly when there are large differences between recipients, MAY result in small deviations from an ideal "fair" distribution.<br/> If the sender lacks sufficient tokens to pay fees, or the assessment of custom fees reduces the net amount transferred to or below zero, the transaction MAY fail due to insufficient funds to pay all fees.Protobuf type
proto.FractionalFee-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final class* A descriptor for a fee based on a portion of the tokens transferred.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
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final intstatic final intFields inherited from class com.google.protobuf.GeneratedMessageLite
unknownFieldsFields inherited from class com.google.protobuf.AbstractMessageLite
memoizedHashCode -
Method Summary
Modifier and TypeMethodDescriptionprotected final ObjectdynamicMethod(com.google.protobuf.GeneratedMessageLite.MethodToInvoke method, Object arg0, Object arg1) static FractionalFee* A Fraction of the transferred tokens to assess as a fee.<br/> This value MUST be less than or equal to one.<br/> This value MUST be greater than zero.long* A maximum fee to charge, in units of 10<sup>-decimals</sup> tokens.long* A minimum fee to charge, in units of 10<sup>-decimals</sup> tokens.boolean* Flag requesting to assess the calculated fee against the sender, without reducing the amount transferred.<br/> #### Effects of this flag <ol> <li>If this value is true <ul> <li>The receiver of a transfer SHALL receive the entire amount sent.</li> <li>The fee SHALL be charged to the sender as an additional amount, increasing the token transfer debit.</li> </ul> </li> <li>If this value is false <ul> <li>The receiver of a transfer SHALL receive the amount sent _after_ deduction of the calculated fee.</li> </ul> </li> </ol>boolean* A Fraction of the transferred tokens to assess as a fee.<br/> This value MUST be less than or equal to one.<br/> This value MUST be greater than zero.static FractionalFee.Builderstatic FractionalFee.BuildernewBuilder(FractionalFee prototype) static FractionalFeeparseDelimitedFrom(InputStream input) static FractionalFeeparseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static FractionalFeeparseFrom(byte[] data) static FractionalFeeparseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static FractionalFeeparseFrom(com.google.protobuf.ByteString data) static FractionalFeeparseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static FractionalFeeparseFrom(com.google.protobuf.CodedInputStream input) static FractionalFeeparseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static FractionalFeeparseFrom(InputStream input) static FractionalFeeparseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static FractionalFeeparseFrom(ByteBuffer data) static FractionalFeeparseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static com.google.protobuf.Parser<FractionalFee> parser()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, writeToMethods inherited from class com.google.protobuf.AbstractMessageLite
addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeToMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.google.protobuf.MessageLiteOrBuilder
getDefaultInstanceForType, isInitialized
-
Field Details
-
FRACTIONAL_AMOUNT_FIELD_NUMBER
public static final int FRACTIONAL_AMOUNT_FIELD_NUMBER- See Also:
-
MINIMUM_AMOUNT_FIELD_NUMBER
public static final int MINIMUM_AMOUNT_FIELD_NUMBER- See Also:
-
MAXIMUM_AMOUNT_FIELD_NUMBER
public static final int MAXIMUM_AMOUNT_FIELD_NUMBER- See Also:
-
NET_OF_TRANSFERS_FIELD_NUMBER
public static final int NET_OF_TRANSFERS_FIELD_NUMBER- See Also:
-
-
Method Details
-
hasFractionalAmount
public boolean hasFractionalAmount()* A Fraction of the transferred tokens to assess as a fee.<br/> This value MUST be less than or equal to one.<br/> This value MUST be greater than zero.
.proto.Fraction fractional_amount = 1;- Specified by:
hasFractionalAmountin interfaceFractionalFeeOrBuilder- Returns:
- Whether the fractionalAmount field is set.
-
getFractionalAmount
* A Fraction of the transferred tokens to assess as a fee.<br/> This value MUST be less than or equal to one.<br/> This value MUST be greater than zero.
.proto.Fraction fractional_amount = 1;- Specified by:
getFractionalAmountin interfaceFractionalFeeOrBuilder- Returns:
- The fractionalAmount.
-
getMinimumAmount
public long getMinimumAmount()* A minimum fee to charge, in units of 10<sup>-decimals</sup> tokens. <p> This value is OPTIONAL, with a default of `0` indicating no minimum.<br/> If set, this value MUST be greater than zero.<br/> If set, all transfers SHALL pay at least this amount.
int64 minimum_amount = 2;- Specified by:
getMinimumAmountin interfaceFractionalFeeOrBuilder- Returns:
- The minimumAmount.
-
getMaximumAmount
public long getMaximumAmount()* A maximum fee to charge, in units of 10<sup>-decimals</sup> tokens. <p> This value is OPTIONAL, with a default of `0` indicating no maximum.<br/> If set, this value MUST be greater than zero.<br/> If set, any fee charged SHALL NOT exceed this value.<br/> This value SHOULD be strictly greater than `minimum_amount`. If this amount is less than or equal to `minimum_amount`, then the fee charged SHALL always be equal to this value and `fractional_amount` SHALL NOT have any effect.
int64 maximum_amount = 3;- Specified by:
getMaximumAmountin interfaceFractionalFeeOrBuilder- Returns:
- The maximumAmount.
-
getNetOfTransfers
public boolean getNetOfTransfers()* Flag requesting to assess the calculated fee against the sender, without reducing the amount transferred.<br/> #### Effects of this flag <ol> <li>If this value is true <ul> <li>The receiver of a transfer SHALL receive the entire amount sent.</li> <li>The fee SHALL be charged to the sender as an additional amount, increasing the token transfer debit.</li> </ul> </li> <li>If this value is false <ul> <li>The receiver of a transfer SHALL receive the amount sent _after_ deduction of the calculated fee.</li> </ul> </li> </ol>
bool net_of_transfers = 4;- Specified by:
getNetOfTransfersin interfaceFractionalFeeOrBuilder- Returns:
- The netOfTransfers.
-
parseFrom
public static FractionalFee parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static FractionalFee parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static FractionalFee parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static FractionalFee parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static FractionalFee parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static FractionalFee parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
- Throws:
IOException
-
parseFrom
public static FractionalFee parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
parseDelimitedFrom
- Throws:
IOException
-
parseDelimitedFrom
public static FractionalFee parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
parseFrom
public static FractionalFee parseFrom(com.google.protobuf.CodedInputStream input) throws IOException - Throws:
IOException
-
parseFrom
public static FractionalFee parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
newBuilder
-
newBuilder
-
dynamicMethod
protected final Object dynamicMethod(com.google.protobuf.GeneratedMessageLite.MethodToInvoke method, Object arg0, Object arg1) - Specified by:
dynamicMethodin classcom.google.protobuf.GeneratedMessageLite<FractionalFee,FractionalFee.Builder>
-
getDefaultInstance
-
parser
-