Comments (8)
DEBUGGING UPDATE
Changed the endpoint to alchemy using the goerli testnet since ropsten is deprecating
hain = Eth::Client.create Endpoint::Provider.alchemy_goerli
This this I get an more interesting error:
Unsupported method: eth_coinbase. Alchemy does not support mining eth...
MacStudio:client tim$ rails c
Loading development environment (Rails 7.0.3)
irb(main):001:0> require "#{Rails.root}/lib/assets/eth.rb"
=> true
irb(main):002:0> EthGem::Core.contract("hello_world")
METAMASK_ETH_ADDRESS: 0xE179C056024150d56A4e94af9C5A36BCC0B4e502
HELLO DEF SEND
"{\"jsonrpc\":\"2.0\",\"id\":1,\"result\":\"0x853a0d2313c0000\"}"
Balance is 6.0e+17
FILE: /Users/tim/rails/eth/lib/assets/contracts/hello_world.sol
HELLO DEF SEND
"{\"jsonrpc\":\"2.0\",\"result\":\"0x5\",\"id\":2}"
HELLO DEF SEND
"{\"jsonrpc\":\"2.0\",\"error\":{\"code\":-32600,\"message\":\"Unsupported method: eth_coinbase. Alchemy does not support mining eth. See available methods at https://docs.alchemy.com/alchemy/documentation/apis\"},\"id\":3}"
/Users/tim/rails/eth/vendor/bundle/ruby/3.0.0/gems/eth-0.5.5/lib/eth/client.rb:453:in `send_command': Unsupported method: eth_coinbase. Alchemy does not support mining eth. See available methods at https://docs.alchemy.com/alchemy/documentation/apis (IOError)
irb(main):003:0>
So, seems I need to disable or nil chain.eth_coinbase
?
Any ideas how best to do this?
from eth.rb.
DEBUGGING. client.rb
def default_account
@default_account ||= Address.new eth_coinbase["result"]
end
It appears this is part of the problem?
For test networks which do not mine, this call returns an error, correct?
What is the best way around this issue with test chains which do not mine?
Thanks
from eth.rb.
Thank you, this is actually a bug. I partially fixed it in #85 but have not seen this. 👍
from eth.rb.
Testing all these various blockchain provider endpoints is useful it seems.
- Hope it helps!
See summary of first test results here:
from eth.rb.
Do you want to submit a PR?
from eth.rb.
Do you want to submit a PR?
I don't yet have the skills to debug the ETH protocol; but if I did, or if I ever do, I would be happy to help out anyway I can.
Not even sure where to start, to be honest. I've been focused on testing provider endpoints and not the underlying protocol; where would I start to debug / fix this issue?
My guess is it would be easier to just use the sender signing key?
# Deploys a contract. Uses `eth_coinbase` or external signer
# if no sender key is provided.
Is this documented on how to deploy a contract using a sender key? I'm happy to try that, if you think that is a good way forward @q9f
from eth.rb.
Oh, sure:
my_key = Eth::Key.new priv: "30137644b564785d01420f8043f043d74dcca64008e57c59f8ce713a0005a54b"
# ...
chain.deploy_and_wait(contract, sender_key: my_key)
from eth.rb.
This issue is resolved. Thanks for your help @q9f
from eth.rb.
Related Issues (20)
- Not only ethereum net supporting (Gas Limit validation problem) HOT 3
- Auto set working gas fee values? HOT 2
- Personal signatures differ from metamask signatures HOT 1
- Geth version question HOT 1
- Invalid value for negative int from eth_call HOT 2
- Unpatch Geth
- missing bech32 depedency HOT 4
- client.rb is_a? Address HOT 2
- Abi::Event.decode_log raised an error HOT 1
- I can't pass an array of addresses to the smart contract.
- Signature Mismatch Issue with bytes HOT 9
- How call a method via Contract Proxy? HOT 6
- Upgrade from 0.4.X to 0.5.X Eth.configure issue HOT 3
- Unable to make ERC20 Transfer or any other transfer on self-hosted GETH Blockchain/Node HOT 6
- unable to build with clang: ./warnp.c:39:9: error: call to undeclared function 'strdup' HOT 1
- Signature Mismatch in Ruby vs. JavaScrip HOT 1
- eth call contract function get error IOError: execution reverted HOT 2
- Problem with fetching archive data HOT 2
- Unable to parse tuple response HOT 1
- ci: incompatible solc and geth version
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 eth.rb.