glueby 0.5.1 → 0.5.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +14 -0
- data/lib/glueby/configuration.rb +6 -0
- data/lib/glueby/contract/fee_estimator.rb +5 -1
- data/lib/glueby/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 70bc38595142acecb4510e2bae12054de9bf4d8da4ddacbe220be0dab7c76324
|
4
|
+
data.tar.gz: 87f1bc6a29b3aa38a35aa929c1cf8cc5190ec768265b873cdebc7c4b47481996
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
|
data/lib/glueby/configuration.rb
CHANGED
@@ -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
|
-
|
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
|
|
data/lib/glueby/version.rb
CHANGED
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.
|
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-
|
11
|
+
date: 2021-12-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: tapyrus
|