Class: Glueby::Contract::FeeEstimator::Auto
- Inherits:
-
Object
- Object
- Glueby::Contract::FeeEstimator::Auto
- Includes:
- Glueby::Contract::FeeEstimator
- Defined in:
- lib/glueby/contract/fee_estimator/auto.rb
Overview
It calculates actual minimum fee to broadcast txs.
Constant Summary collapse
- DEFAULT_FEE_RATE =
This is same with Tapyrus Core’s default min_relay_fee value.(tapyrus/kB)
1_000
Class Attribute Summary collapse
-
.default_fee_rate ⇒ Integer
The global fee rate configuration.
Instance Attribute Summary collapse
-
#fee_rate ⇒ Object
readonly
Returns the value of attribute fee_rate.
Instance Method Summary collapse
-
#initialize(fee_rate: Auto.default_fee_rate || DEFAULT_FEE_RATE) ⇒ Auto
constructor
A new instance of Auto.
Methods included from Glueby::Contract::FeeEstimator
Constructor Details
#initialize(fee_rate: Auto.default_fee_rate || DEFAULT_FEE_RATE) ⇒ Auto
Returns a new instance of Auto.
22 23 24 |
# File 'lib/glueby/contract/fee_estimator/auto.rb', line 22 def initialize(fee_rate: Auto.default_fee_rate || DEFAULT_FEE_RATE) @fee_rate = fee_rate end |
Class Attribute Details
.default_fee_rate ⇒ Integer
Returns The global fee rate configuration. All instances use this value as the default.
18 19 20 |
# File 'lib/glueby/contract/fee_estimator/auto.rb', line 18 def default_fee_rate @default_fee_rate end |
Instance Attribute Details
#fee_rate ⇒ Object (readonly)
Returns the value of attribute fee_rate.
13 14 15 |
# File 'lib/glueby/contract/fee_estimator/auto.rb', line 13 def fee_rate @fee_rate end |