Comments (2)
Same behaviour here.
This could have something to do with my own report #22
from ruby-eth.
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)
- version 0.4.9 missing from rubygems HOT 1
- Cannot transfer eth using testrpc (ganache) when using transaction body generated with ruby-eth HOT 2
- The spec failed when I trying to test the `personal_recover`, is there an update?
- Implement EIP712 support for signTypedData HOT 2
- example for personal_sign HOT 5
- Status of the gem
- Can not use this gem on new rails project on Mac OS Catalina HOT 22
- How do you verify personal_sign? HOT 3
- Why is Eth::OpenSsl.sign_compact non-idempotent? HOT 1
- require "eth" aborts irb / rails server on 2.7.2p137 HOT 3
- It always happen a error with openssl,my openssl is 1.0.2t. HOT 1
- Eth::Tx.new is incompatible with eip-155 HOT 4
- Support for ruby 3? HOT 9
- Unsafe loading of Libcrypto preventing Rails console+server development HOT 1
- `eth` 0.5 tracker
- Not compatible with Ruby 3.0.2? HOT 4
- ERROR: Could not find a valid gem 'money-tree' (~> 0.11) (required by 'eth' (>= 0)) in any repository HOT 3
- libsecp256k1.zip has wrong hash during Eth 0.5.0 gem installaton on OSX HOT 6
- Question: How to sign an array of arguments? HOT 1
- client.rb is_a? Address HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ruby-eth.