Sha256: 86f2b37d8d3a811cabbda9723b76fe653d81642f7c1fb7dc6d3997498e26a985

Contents?: true

Size: 603 Bytes

Versions: 14

Compression:

Stored size: 603 Bytes

Contents

module Glueby
  module Contract
    module FeeEstimator
      class Fixed
        include FeeEstimator

        # Default fee in tapyrus that is used if it is not configured
        DEFAULT_FEE = 10_000

        attr_reader :fixed_fee

        class << self
          attr_accessor :default_fixed_fee
        end

        def initialize(fixed_fee: Fixed.default_fixed_fee || DEFAULT_FEE)
          @fixed_fee = fixed_fee
        end

        private

        # @private
        # @return fee by tapyrus(not TPC).
        def estimate_fee(_tx)
          @fixed_fee
        end
      end
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
glueby-1.4.0 lib/glueby/contract/fee_estimator/fixed.rb
glueby-1.3.0 lib/glueby/contract/fee_estimator/fixed.rb
glueby-1.2.3 lib/glueby/contract/fee_estimator/fixed.rb
glueby-1.2.2 lib/glueby/contract/fee_estimator/fixed.rb
glueby-1.2.1 lib/glueby/contract/fee_estimator/fixed.rb
glueby-1.2.0 lib/glueby/contract/fee_estimator/fixed.rb
glueby-1.2.0.beta.3 lib/glueby/contract/fee_estimator/fixed.rb
glueby-1.2.0.beta.2 lib/glueby/contract/fee_estimator/fixed.rb
glueby-1.2.0.beta.1 lib/glueby/contract/fee_estimator/fixed.rb
glueby-1.1.2 lib/glueby/contract/fee_estimator/fixed.rb
glueby-1.1.1 lib/glueby/contract/fee_estimator/fixed.rb
glueby-1.1.0 lib/glueby/contract/fee_estimator/fixed.rb
glueby-1.0.0 lib/glueby/contract/fee_estimator/fixed.rb
glueby-0.12.0 lib/glueby/contract/fee_estimator/fixed.rb