func (a AttestFees) GetFee() int {
	log.Infof("*Fees* Current fee value: %d\n", a.currentFee)
	return a.currentFee
}
Get current fee
package attestation
import (
	"encoding/json"
	"net/http"
	"mainstay/config"
	"mainstay/log"
)
const (
	DefaultMinFee       = 10
	DefaultMaxFee       = 100
	DefaultFeeIncrement = 5
)
const (
	WarningInvalidMinFeeArg       = "Invalid min fee config value"
	WarningInvalidMaxFeeArg       = "Invalid max fee config value"
	WarningInvalidFeeIncrementArg = "Invalid fee increment config value"
)
const (
	FeeApiUrl = "https://bitcoinfees.earn.com/api/v1/fees/recommended"
	DefaultBestFeeType = "hourFee"
)
type AttestFees struct {
	minFee int
	maxFee int
	feeIncrement int
	currentFee int
	prevFee int
}
func NewAttestFees(feesConfig config.FeesConfig) AttestFees {
	minFee := DefaultMinFee
	if feesConfig.MinFee > 0 && feesConfig.MinFee < DefaultMaxFee {
		minFee = feesConfig.MinFee
	} else {
		log.Warnf("%s (%d)\n", WarningInvalidMinFeeArg, feesConfig.MinFee)
	}
	log.Infof("*Fees* Min fee set to: %d\n", minFee)
	maxFee := DefaultMaxFee
	if feesConfig.MaxFee > 0 && feesConfig.MaxFee > minFee && feesConfig.MaxFee < DefaultMaxFee {
		maxFee = feesConfig.MaxFee
	} else {
		log.Warnf("%s (%d)\n", WarningInvalidMaxFeeArg, feesConfig.MaxFee)
	}
	log.Infof("*Fees* Max fee set to: %d\n", maxFee)
	feeIncrement := DefaultFeeIncrement
	if feesConfig.FeeIncrement > 0 {
		feeIncrement = feesConfig.FeeIncrement
	} else {
		log.Warnf("%s (%d)\n", WarningInvalidFeeIncrementArg, feesConfig.FeeIncrement)
	}
	log.Infof("*Fees* Fee increment set to: %d\n", feeIncrement)
	attestFees := AttestFees{
		minFee:       minFee,
		maxFee:       maxFee,
		feeIncrement: feeIncrement,
		prevFee:      0}
	attestFees.ResetFee()
	return attestFees
}