Class ContractCallFeeCalculationModel

java.lang.Object
com.kryptokrauts.aeternity.sdk.service.transaction.fee.impl.ContractCallFeeCalculationModel
All Implemented Interfaces:
FeeCalculationModel

public class ContractCallFeeCalculationModel
extends java.lang.Object
implements FeeCalculationModel
  • Constructor Summary

    Constructors
    Constructor Description
    ContractCallFeeCalculationModel()  
  • 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 formula

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ContractCallFeeCalculationModel

      public ContractCallFeeCalculationModel()
  • 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 * 30 + (byte_size * GAS_PER_BYTE)) * MINIMAL_GAS_PRICE

      Specified by:
      calculateFee in interface FeeCalculationModel
      Parameters:
      tx_byte_size - transaction size in bytes
      minimalGasPrice - minimal gas price
      transaction - the tx-object
      Returns:
      the actual fee