calculateFee method

BigInt calculateFee(
  1. int size
)

Fees are constructed around two constants (a and b). The formula for calculating minimal fees for a transaction (tx) is a * size(tx) + b, where: a/b are protocol parameters size(tx) is the transaction size in bytes https://docs.cardano.org/explore-cardano/fee-structure/#:~:text=Fees%20are%20constructed%20around%20two,the%20transaction%20size%20in%20bytes

Implementation

BigInt calculateFee(int size) {
  return BigInt.from((minFeeA * size) + minFeeB);
}