fees

package
v0.0.1-alpha-7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 13, 2021 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	InvalidTransferAmount = errors.New("INVALID_TRANSFER_AMOUNT")
	InvalidTransferFee    = errors.New("INVALID_TRANSFER_FEE")
	InvalidGasPrice       = errors.New("INVALID_GAS_PRICE")
	InsufficientFee       = errors.New("INSUFFICIENT_FEE")
	RateProviderFailure   = errors.New("RATE_PROVIDER_FAILURE")
)

Functions

This section is empty.

Types

type Calculator

type Calculator struct {
	// contains filtered or unexported fields
}

func NewCalculator

func NewCalculator(rateProvider client.ExchangeRate, configuration config.Hedera, bridge service.Contracts) *Calculator

func (Calculator) GetEstimatedTxFeeFromGWei

func (fc Calculator) GetEstimatedTxFeeFromGWei(gasPriceGWei string) (string, error)

func (Calculator) ValidateExecutionFee

func (fc Calculator) ValidateExecutionFee(transferFee string, transferAmount string, gasPriceWei string) (bool, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL