q9f / eth.rb

a straightforward library to build, sign, and broadcast ethereum transactions anywhere you can run ruby.
https://q9f.github.io/eth.rb
Apache License 2.0
200 stars 86 forks source link

eth/ens: actually resolve ens names instead of returning owner #192

Closed q9f closed 1 year ago

q9f commented 1 year ago

ens resolver only returned the owner, this does look up the resolver and resolves the ens record

infura = Eth::Client.create("https://mainnet.infura.io/v3/#{ENV['INFURA_TOKEN']}")
# => #<Eth::Client::Http:0x00005614b684fd70
infura.resolve_ens "ncwc6edqldzy6mlo.eth"
# => "0xde270e46d63b1816d1b798cff473c4ba238aca73"
codecov-commenter commented 1 year ago

Codecov Report

Merging #192 (0b57a71) into main (d9fda51) will increase coverage by 0.00%. The diff coverage is 100.00%.

@@           Coverage Diff           @@
##             main     #192   +/-   ##
=======================================
  Coverage   99.76%   99.76%           
=======================================
  Files          70       74    +4     
  Lines        4253     4321   +68     
=======================================
+ Hits         4243     4311   +68     
  Misses         10       10           
Impacted Files Coverage Δ
lib/eth.rb 100.00% <100.00%> (ø)
lib/eth/client.rb 100.00% <100.00%> (ø)
lib/eth/ens.rb 100.00% <100.00%> (ø)
lib/eth/ens/coin_type.rb 100.00% <100.00%> (ø)
lib/eth/ens/resolver.rb 100.00% <100.00%> (ø)
spec/eth/client_spec.rb 100.00% <100.00%> (ø)
spec/eth/ens/coin_type_spec.rb 100.00% <100.00%> (ø)
spec/eth/ens/resolver_spec.rb 100.00% <100.00%> (ø)
spec/eth/ens_spec.rb 100.00% <100.00%> (ø)

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more