Giter VIP home page Giter VIP logo

Comments (2)

juanfer avatar juanfer commented on August 24, 2024

Same behaviour here.

This could have something to do with my own report #22

from ruby-eth.

se3000 avatar se3000 commented on August 24, 2024

You need to set the chain ID(aka network ID):

Eth.configure {|config| config.chain_id = 1}
hex = "0xf8a90285012a05f2008292da94809826cceab68c387726af962713b64cb5cb3cca80b844a9059cbb0000000000000000000000001111db021688b8bb7923caca9e941df7ade5059900000000000000000000000000000000000000000000000ad78ebc5ac620000026a02f28bcd3eb0c98e488df30fdad478d222a9936ad6e04bc6b88bc97febbcfc02ea059cd01219feb6d777c86757c1d893bcc9fc90607d6e86e95fb886fd231558a35"
tx = Eth::Tx.decode hex
tx.hash #=> "0x18d2b9638253b6ab4627d9d9203dbec07a9233dae97c0cb2aaf01e7c62bd285e"
tx.from #=> "0x37020b9384692BE78a4f180992d4f3F3Bd85f478"

By default the gem is configured to 0, which means it will work for writing to any chain, but it means that to parse a sender you may need to check ID 0 and the ID of the chain you're on. We could probably make that automatic, but you'd still need to configure your chain ID.

You can find more chain ID details and list of networks here.

from ruby-eth.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.