glueby 0.5.1 → 0.5.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 37c10a4359a509cd4f86c35726161717bde07bc1ce459e19b0ba4c053e8dba86
4
- data.tar.gz: 3cd0124ed69e0f34d1adf4ff5ed26005979689befc163c970b104245f267a479
3
+ metadata.gz: 70bc38595142acecb4510e2bae12054de9bf4d8da4ddacbe220be0dab7c76324
4
+ data.tar.gz: 87f1bc6a29b3aa38a35aa929c1cf8cc5190ec768265b873cdebc7c4b47481996
5
5
  SHA512:
6
- metadata.gz: 68729802e9bcb1a51148c12daa1e1565180c300d43cc811c2c512056804ad2fb8cd0bd8dd0e0d915e19da2177b3a47a941a4911ce7f6376a47f598edade087fe
7
- data.tar.gz: 902c5c0cf87cb940c9619e5f9af95367187a009ddc01d74a6604c22d8e9df9e50dec50df24455c6fb2f0a1a9020869e4d619bd879802739ba04118bf600fab6a
6
+ metadata.gz: c87104af19662964d241fbd132fa351b3919c7c4c3079fbb3a0b1f1a2275b24c400d07edc570f63875b3f5884a18bae2720519377ea17e6bda38bfd1717d0702
7
+ data.tar.gz: aeae4f6edae4081df4288ee2ac35188abefefd8e240b2536447890de547f5b4136ed95caf8142fd4dc85b57947253221d641fde1c0fcd8a8fae1d22ae09ae420
data/README.md CHANGED
@@ -443,6 +443,20 @@ Configuration:
443
443
 
444
444
  ```
445
445
 
446
+ ## Other configurations
447
+
448
+ ### Default fixed fee for the FixedFeeEstimator
449
+
450
+ The architecture of Glueby accepts any fee estimation strategies for paying transactions fee. However, we officially support only one strategy: the fixed fee strategy.
451
+ It just returns a fixed fee value without any estimation.
452
+ Here provides a configuration to modify the default fixed fee value it returns like this:
453
+
454
+ ```ruby
455
+ Glueby.configure do |config|
456
+ config.default_fixed_fee = 10_000
457
+ end
458
+ ```
459
+
446
460
 
447
461
  ## Development
448
462
 
@@ -82,5 +82,11 @@ module Glueby
82
82
  def utxo_provider_config=(config)
83
83
  UtxoProvider.configure(config)
84
84
  end
85
+
86
+ # Set default fixed fee to the FixedFeeEstimator
87
+ # @param [Integer] fee The default fee value in tapyrus to the FixedFeeEstimator
88
+ def default_fixed_fee=(fee)
89
+ Contract::FixedFeeEstimator.default_fixed_fee = fee
90
+ end
85
91
  end
86
92
  end
@@ -22,7 +22,11 @@ module Glueby
22
22
  class FixedFeeEstimator
23
23
  include FeeEstimator
24
24
 
25
- def initialize(fixed_fee: 10_000)
25
+ class << self
26
+ attr_accessor :default_fixed_fee
27
+ end
28
+
29
+ def initialize(fixed_fee: FixedFeeEstimator.default_fixed_fee || 10_000)
26
30
  @fixed_fee = fixed_fee
27
31
  end
28
32
 
@@ -1,3 +1,3 @@
1
1
  module Glueby
2
- VERSION = "0.5.1"
2
+ VERSION = "0.5.2"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: glueby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.1
4
+ version: 0.5.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - azuchi
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-12-01 00:00:00.000000000 Z
11
+ date: 2021-12-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: tapyrus