Class ContractCreateFeeCalculationModel
java.lang.Object
com.kryptokrauts.aeternity.sdk.service.transaction.fee.impl.ContractCreateFeeCalculationModel
- All Implemented Interfaces:
FeeCalculationModel
public class ContractCreateFeeCalculationModel extends java.lang.Object implements FeeCalculationModel
-
Constructor Summary
Constructors Constructor Description ContractCreateFeeCalculationModel()
-
Method Summary
Modifier and Type Method Description java.math.BigInteger
calculateFee(int tx_byte_size, long minimalGasPrice, AbstractTransaction<?> transaction)
The fee is calculated according to the following formulaMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
ContractCreateFeeCalculationModel
public ContractCreateFeeCalculationModel()
-
-
Method Details
-
calculateFee
public java.math.BigInteger calculateFee(int tx_byte_size, long minimalGasPrice, AbstractTransaction<?> transaction)The fee is calculated according to the following formula(BASE_GAS * 5 + (byte_size * GAS_PER_BYTE)) * MINIMAL_GAS_PRICE
- Specified by:
calculateFee
in interfaceFeeCalculationModel
- Parameters:
tx_byte_size
- transaction size in bytesminimalGasPrice
- minimal gas pricetransaction
- the tx-object- Returns:
- the actual fee
-