Class FixedPricingMode
- java.lang.Object
-
- com.casper.sdk.model.transaction.pricing.FixedPricingMode
-
- All Implemented Interfaces:
CasperSerializableObject,Tag,PricingMode,SerializableObject
public class FixedPricingMode extends java.lang.Object implements PricingMode
The cost of the transaction is determined by the cost table, per the transaction category.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classFixedPricingMode.FixedPricingModeBuilder
-
Field Summary
-
Fields inherited from interface com.casper.sdk.model.transaction.pricing.PricingMode
FIXED_TAG, PAYMENT_LIMITED_TAG, PREPAID_TAG, TAG_FIELD_INDEX
-
-
Constructor Summary
Constructors Constructor Description FixedPricingMode()FixedPricingMode(int additionalComputationFactor, int gasPriceTolerance)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static FixedPricingMode.FixedPricingModeBuilderbuilder()intgetAdditionalComputationFactor()User-specified additional computation factor (minimum 0).bytegetByteTag()intgetGasPriceTolerance()User-specified gas_price tolerance (minimum 1).voidserialize(SerializerBuffer ser, Target target)Called when the object's values must be serializedvoidsetAdditionalComputationFactor(int additionalComputationFactor)User-specified additional computation factor (minimum 0).voidsetGasPriceTolerance(int gasPriceTolerance)User-specified gas_price tolerance (minimum 1).-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.casper.sdk.model.clvalue.serde.CasperSerializableObject
serialize
-
-
-
-
Method Detail
-
serialize
public void serialize(SerializerBuffer ser, Target target) throws ValueSerializationException, NoSuchTypeException
Description copied from interface:CasperSerializableObjectCalled when the object's values must be serialized- Specified by:
serializein interfaceCasperSerializableObject- Parameters:
ser- the serializer to be usedtarget- target serialization standard- Throws:
ValueSerializationException- exception holding information of failure to serialize a valueNoSuchTypeException
-
getByteTag
public byte getByteTag()
- Specified by:
getByteTagin interfaceTag
-
builder
public static FixedPricingMode.FixedPricingModeBuilder builder()
-
getAdditionalComputationFactor
public int getAdditionalComputationFactor()
User-specified additional computation factor (minimum 0). If "0" is provided, no additional logic is applied to the computation limit. Each value above "0" tells the node that it needs to treat the transaction as if it uses more gas than it's serialized size indicates. Each "1" will increase the "wasm lane" size bucket for this transaction by 1. So if the size of the transaction indicates bucket "0" and "additional_computation_factor = 2", the transaction will be treated as a "2".
-
getGasPriceTolerance
public int getGasPriceTolerance()
User-specified gas_price tolerance (minimum 1). This is interpreted to mean "do not include this transaction in a block if the current gas price is greater than this number"
-
setAdditionalComputationFactor
public void setAdditionalComputationFactor(int additionalComputationFactor)
User-specified additional computation factor (minimum 0). If "0" is provided, no additional logic is applied to the computation limit. Each value above "0" tells the node that it needs to treat the transaction as if it uses more gas than it's serialized size indicates. Each "1" will increase the "wasm lane" size bucket for this transaction by 1. So if the size of the transaction indicates bucket "0" and "additional_computation_factor = 2", the transaction will be treated as a "2".
-
setGasPriceTolerance
public void setGasPriceTolerance(int gasPriceTolerance)
User-specified gas_price tolerance (minimum 1). This is interpreted to mean "do not include this transaction in a block if the current gas price is greater than this number"
-
-