Class GaMetaFeeCalculationModel

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

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

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

    • GaMetaFeeCalculationModel

      public GaMetaFeeCalculationModel()
  • 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

      (5 * BASE_GAS + byte_size(GAMetaTx) - byte_size(InnerTx)) * GasPerByte

      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