You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Bitcoin :: Script.parse_from_addr ("tb1qft3tvl3nu7zzggg5unpvwzyg7y6tnwhpm546xt") works fine in Ruby 3.0.1. but, in Ruby 3.0.2 it causes an error
home/yamasaki/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/bitcoinrb-0.8.0/lib/bitcoin/script/script.rb:96:in rescue in rescue in parse_from_addr': Invalid address. (ArgumentError) from /home/yamasaki/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/bitcoinrb-0.8.0/lib/bitcoin/script/script.rb:93:in rescue in parse_from_addr'
from /home/yamasaki/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/bitcoinrb-0.8.0/lib/bitcoin/script/script.rb:87:in parse_from_addr' from (irb):43:in
'
from /home/yamasaki/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/irb-1.3.7/exe/irb:11:in <top (required)>' from /home/yamasaki/.rbenv/versions/3.0.2/bin/irb:25:in load'
from /home/yamasaki/.rbenv/versions/3.0.2/bin/irb:25:in <main>' /home/yamasaki/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/bitcoinrb-0.8.0/lib/bitcoin/base58.rb:27:in block in decode': Value passed not a valid Base58 String. (ArgumentError)
from /home/yamasaki/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/bitcoinrb-0.8.0/lib/bitcoin/base58.rb:26:in each' from /home/yamasaki/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/bitcoinrb-0.8.0/lib/bitcoin/base58.rb:26:in each_with_index'
from /home/yamasaki/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/bitcoinrb-0.8.0/lib/bitcoin/base58.rb:26:in decode' from /home/yamasaki/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/bitcoinrb-0.8.0/lib/bitcoin/util.rb:121:in decode_base58_address'
from /home/yamasaki/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/bitcoinrb-0.8.0/lib/bitcoin/script/script.rb:94:in rescue in parse_from_addr' from /home/yamasaki/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/bitcoinrb-0.8.0/lib/bitcoin/script/script.rb:87:in parse_from_addr'
from (irb):43:in <main>' from /home/yamasaki/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/irb-1.3.7/exe/irb:11:in <top (required)>'
from /home/yamasaki/.rbenv/versions/3.0.2/bin/irb:25:in load' from /home/yamasaki/.rbenv/versions/3.0.2/bin/irb:25:in '
/home/yamasaki/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/psych-4.0.1/lib/psych/class_loader.rb:99:in find': Tried to load unspecified class: Bitcoin::ChainParams (Psych::DisallowedClass) from /home/yamasaki/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/psych-4.0.1/lib/psych/class_loader.rb:28:in load'
from /home/yamasaki/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/psych-4.0.1/lib/psych/visitors/to_ruby.rb:424:in resolve_class' from /home/yamasaki/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/psych-4.0.1/lib/psych/visitors/to_ruby.rb:213:in visit_Psych_Nodes_Mapping'
from /home/yamasaki/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/psych-4.0.1/lib/psych/visitors/visitor.rb:30:in visit' from /home/yamasaki/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/psych-4.0.1/lib/psych/visitors/visitor.rb:6:in accept'
from /home/yamasaki/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/psych-4.0.1/lib/psych/visitors/to_ruby.rb:35:in accept' from /home/yamasaki/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/psych-4.0.1/lib/psych/visitors/to_ruby.rb:318:in visit_Psych_Nodes_Document'
from /home/yamasaki/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/psych-4.0.1/lib/psych/visitors/visitor.rb:30:in visit' from /home/yamasaki/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/psych-4.0.1/lib/psych/visitors/visitor.rb:6:in accept'
from /home/yamasaki/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/psych-4.0.1/lib/psych/visitors/to_ruby.rb:35:in accept' from /home/yamasaki/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/psych-4.0.1/lib/psych.rb:335:in safe_load'
from /home/yamasaki/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/psych-4.0.1/lib/psych.rb:370:in load' from /home/yamasaki/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/bitcoinrb-0.8.0/lib/bitcoin/chain_params.rb:83:in init'
from /home/yamasaki/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/bitcoinrb-0.8.0/lib/bitcoin/chain_params.rb:56:in signet' from /home/yamasaki/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/bitcoinrb-0.8.0/lib/bitcoin.rb:91:in chain_params'
from /home/yamasaki/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/bitcoinrb-0.8.0/lib/bitcoin/script/script.rb:90:in `parse_from_addr'
... 4 levels...
i
The text was updated successfully, but these errors were encountered:
2021/10/19 9:48、shigeyuki azuchi ***@***.*** ***@***.***>>のメール:
It seems to work with Ruby 3.0.2 in my environment. Is the network specified as mainnet?
I think it works if you do the following.
Bitcoin.chain_params = :testnet
s = Bitcoin::Script.parse_from_addr('tb1qft3tvl3nu7zzggg5unpvwzyg7y6tnwhpm546xt')
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub <#61 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AA6FYIYMAVCLLSUYY5OBWO3UHS57LANCNFSM5GGWSMEA>.
Bitcoin :: Script.parse_from_addr ("tb1qft3tvl3nu7zzggg5unpvwzyg7y6tnwhpm546xt") works fine in Ruby 3.0.1. but, in Ruby 3.0.2 it causes an error
home/yamasaki/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/bitcoinrb-0.8.0/lib/bitcoin/script/script.rb:96:in
'rescue in rescue in parse_from_addr': Invalid address. (ArgumentError) from /home/yamasaki/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/bitcoinrb-0.8.0/lib/bitcoin/script/script.rb:93:in
rescue in parse_from_addr'from /home/yamasaki/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/bitcoinrb-0.8.0/lib/bitcoin/script/script.rb:87:in
parse_from_addr' from (irb):43:in
from /home/yamasaki/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/irb-1.3.7/exe/irb:11:in
<top (required)>' from /home/yamasaki/.rbenv/versions/3.0.2/bin/irb:25:in
load'from /home/yamasaki/.rbenv/versions/3.0.2/bin/irb:25:in
<main>' /home/yamasaki/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/bitcoinrb-0.8.0/lib/bitcoin/base58.rb:27:in
block in decode': Value passed not a valid Base58 String. (ArgumentError)from /home/yamasaki/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/bitcoinrb-0.8.0/lib/bitcoin/base58.rb:26:in
each' from /home/yamasaki/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/bitcoinrb-0.8.0/lib/bitcoin/base58.rb:26:in
each_with_index'from /home/yamasaki/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/bitcoinrb-0.8.0/lib/bitcoin/base58.rb:26:in
decode' from /home/yamasaki/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/bitcoinrb-0.8.0/lib/bitcoin/util.rb:121:in
decode_base58_address'from /home/yamasaki/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/bitcoinrb-0.8.0/lib/bitcoin/script/script.rb:94:in
rescue in parse_from_addr' from /home/yamasaki/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/bitcoinrb-0.8.0/lib/bitcoin/script/script.rb:87:in
parse_from_addr'from (irb):43:in
<main>' from /home/yamasaki/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/irb-1.3.7/exe/irb:11:in
<top (required)>'from /home/yamasaki/.rbenv/versions/3.0.2/bin/irb:25:in
load' from /home/yamasaki/.rbenv/versions/3.0.2/bin/irb:25:in
'/home/yamasaki/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/psych-4.0.1/lib/psych/class_loader.rb:99:in
find': Tried to load unspecified class: Bitcoin::ChainParams (Psych::DisallowedClass) from /home/yamasaki/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/psych-4.0.1/lib/psych/class_loader.rb:28:in
load'from /home/yamasaki/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/psych-4.0.1/lib/psych/visitors/to_ruby.rb:424:in
resolve_class' from /home/yamasaki/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/psych-4.0.1/lib/psych/visitors/to_ruby.rb:213:in
visit_Psych_Nodes_Mapping'from /home/yamasaki/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/psych-4.0.1/lib/psych/visitors/visitor.rb:30:in
visit' from /home/yamasaki/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/psych-4.0.1/lib/psych/visitors/visitor.rb:6:in
accept'from /home/yamasaki/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/psych-4.0.1/lib/psych/visitors/to_ruby.rb:35:in
accept' from /home/yamasaki/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/psych-4.0.1/lib/psych/visitors/to_ruby.rb:318:in
visit_Psych_Nodes_Document'from /home/yamasaki/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/psych-4.0.1/lib/psych/visitors/visitor.rb:30:in
visit' from /home/yamasaki/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/psych-4.0.1/lib/psych/visitors/visitor.rb:6:in
accept'from /home/yamasaki/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/psych-4.0.1/lib/psych/visitors/to_ruby.rb:35:in
accept' from /home/yamasaki/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/psych-4.0.1/lib/psych.rb:335:in
safe_load'from /home/yamasaki/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/psych-4.0.1/lib/psych.rb:370:in
load' from /home/yamasaki/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/bitcoinrb-0.8.0/lib/bitcoin/chain_params.rb:83:in
init'from /home/yamasaki/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/bitcoinrb-0.8.0/lib/bitcoin/chain_params.rb:56:in
signet' from /home/yamasaki/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/bitcoinrb-0.8.0/lib/bitcoin.rb:91:in
chain_params'from /home/yamasaki/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/bitcoinrb-0.8.0/lib/bitcoin/script/script.rb:90:in `parse_from_addr'
... 4 levels...
i
The text was updated successfully, but these errors were encountered: