java.lang.Object
com.hedera.hashgraph.sdk.FeeComponents
- All Implemented Interfaces:
Cloneable
Utility class used internally by the sdk.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclone()static FeeComponentsfromBytes(byte[] bytes) Create a fee component object from a byte array.(package private) static FeeComponentsfromProtobuf(FeeComponents feeComponents) Create a fee components object from a protobuf.longExtract the constant component.longExtract the of gas for computation.longgetMax()Extract the maximum component.longgetMin()Extract the minimum component.longExtract the for data retrieved from disk.longExtract the for data retrieved.longExtract the transaction bandwidth bytes.longExtract the of ram consumed in byte hours.longExtract the of storage in byte hours.longExtract the transaction verification price per signature.longExtract the per hbar transferred.setConstant(long constant) Assign the constant component.setContractTransactionGas(long contractTransactionGas) Assign the price of computation in gas.setMax(long max) Assign the maximum component.setMin(long min) Assign the minimum component.setResponseDiskByte(long responseDiskByte) Assign the price for data retrieved from disk.setResponseMemoryByte(long responseMemoryByte) Assign the price for data retrieved in bytes.setTransactionBandwidthByte(long transactionBandwidthByte) Assign the transaction bandwidth bytes.setTransactionRamByteHour(long transactionRamByteHour) Assign the price of ram consumed in byte hours.setTransactionStorageByteHour(long transactionStorageByteHour) Assign the price of storage consumed in byte hours.setTransactionVerification(long transactionVerification) Assign the transaction verification price per signature.setTransferVolumeHbar(long transferVolumeHbar) Assign the price per hbar transferred.byte[]toBytes()Convert fee component object to byte array.(package private) FeeComponentsConvert fee component object to protobuf.toString()
-
Constructor Details
-
FeeComponents
public FeeComponents()Constructor.
-
-
Method Details
-
fromProtobuf
Create a fee components object from a protobuf.- Parameters:
feeComponents- the protobuf- Returns:
- the fee component object
-
fromBytes
public static FeeComponents fromBytes(byte[] bytes) throws com.google.protobuf.InvalidProtocolBufferException Create a fee component object from a byte array.- Parameters:
bytes- the byte array- Returns:
- the fee component object
- Throws:
com.google.protobuf.InvalidProtocolBufferException- when there is an issue with the protobuf
-
getMin
public long getMin()Extract the minimum component.- Returns:
- the minimum component
-
setMin
Assign the minimum component.- Parameters:
min- the minimum component- Returns:
this
-
getMax
public long getMax()Extract the maximum component.- Returns:
- the maximum component
-
setMax
Assign the maximum component.- Parameters:
max- the maximum component- Returns:
this
-
getConstant
public long getConstant()Extract the constant component.- Returns:
- the constant component
-
setConstant
Assign the constant component.- Parameters:
constant- the constant component- Returns:
this
-
getTransactionBandwidthByte
public long getTransactionBandwidthByte()Extract the transaction bandwidth bytes.- Returns:
- the transaction bandwidth bytes
-
setTransactionBandwidthByte
Assign the transaction bandwidth bytes.- Parameters:
transactionBandwidthByte- the transaction bandwidth bytes- Returns:
this
-
getTransactionVerification
public long getTransactionVerification()Extract the transaction verification price per signature.- Returns:
- the transaction verification price per signature
-
setTransactionVerification
Assign the transaction verification price per signature.- Parameters:
transactionVerification- the transaction verification price per signature- Returns:
this
-
getTransactionRamByteHour
public long getTransactionRamByteHour()Extract the of ram consumed in byte hours.- Returns:
- price of ram consumed in byte hours
-
setTransactionRamByteHour
Assign the price of ram consumed in byte hours.- Parameters:
transactionRamByteHour- price of ram consumed in byte hours- Returns:
this
-
getTransactionStorageByteHour
public long getTransactionStorageByteHour()Extract the of storage in byte hours.- Returns:
- price of storage in byte hours
-
setTransactionStorageByteHour
Assign the price of storage consumed in byte hours.- Parameters:
transactionStorageByteHour- price of storage in byte hours- Returns:
this
-
getContractTransactionGas
public long getContractTransactionGas()Extract the of gas for computation.- Returns:
- price of gas for computation
-
setContractTransactionGas
Assign the price of computation in gas.- Parameters:
contractTransactionGas- price of gas for computation- Returns:
this
-
getTransferVolumeHbar
public long getTransferVolumeHbar()Extract the per hbar transferred.- Returns:
- price per hbar transferred
-
setTransferVolumeHbar
Assign the price per hbar transferred.- Parameters:
transferVolumeHbar- price per hbar transferred- Returns:
this
-
getResponseMemoryByte
public long getResponseMemoryByte()Extract the for data retrieved.- Returns:
- price for data retrieved
-
setResponseMemoryByte
Assign the price for data retrieved in bytes.- Parameters:
responseMemoryByte- price for data retrieved- Returns:
this
-
getResponseDiskByte
public long getResponseDiskByte()Extract the for data retrieved from disk.- Returns:
- price for data retrieved from disk
-
setResponseDiskByte
Assign the price for data retrieved from disk.- Parameters:
responseDiskByte- price for data retrieved from disk- Returns:
this
-
toProtobuf
FeeComponents toProtobuf()Convert fee component object to protobuf.- Returns:
- the protobuf
-
toString
-
toBytes
public byte[] toBytes()Convert fee component object to byte array.- Returns:
- the byte array
-
clone
-