github.com/ava-labs/avalanchego@v1.11.11/vms/platformvm/txs/fee/calculator.go (about)

     1  // Copyright (C) 2019-2024, Ava Labs, Inc. All rights reserved.
     2  // See the file LICENSE for licensing terms.
     3  
     4  package fee
     5  
     6  import (
     7  	"errors"
     8  
     9  	"github.com/ava-labs/avalanchego/vms/platformvm/txs"
    10  )
    11  
    12  var ErrUnsupportedTx = errors.New("unsupported transaction type")
    13  
    14  // Calculator calculates the minimum required fee, in nAVAX, that an unsigned
    15  // transaction must pay for valid inclusion into a block.
    16  type Calculator interface {
    17  	CalculateFee(tx txs.UnsignedTx) (uint64, error)
    18  }