-
Notifications
You must be signed in to change notification settings - Fork 93
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
eth/contract Testing ETH Contract Deployment using the eth
Ruby gem against provider endpoints
#116
Comments
Update: Tried this, using `sender_key' key = Eth::Key.new priv: ENV['ETH_CONTRACT_SENDERS_PRIVATE_KEY']
chain.deploy_and_wait(contract,sender_key:key) Results: Waiting / stuck here:
not sure how long this should take, being new at this; but it just hangs. However, if I try it on the mainnet, looks OK ( I have no ETH on mainnet, only on test nets)
Not sure why I hangs on test net since I have more than enough ETH on all testnets. |
It waits for the contract to be deployed. You will get either a transaction ID or a TimeoutError. |
OK, I am trying again.. and waiting... will let you know the results on "alchemy_goerli" Thanks |
Update: Twice, it times out, as follows:
|
In that case, you need to increase gas fees. |
OK. Thanks. Waiting again, after:
|
not the limit, the fee (price) |
Thanks. This one, correct?
Increase this? |
I tried again on "chainstack_ropsten", and it worked, finally (with default settings)
Yea! :) |
Also, I just tested another endpoint "infura_ropstend" and the results with
But the scanner shows it failed out of gas. https://ropsten.etherscan.io/tx/0x4af02dd71e31f9e05405b2afb5f335504717f5668f824a6031e302187cefeffb Shouldn't What am I missing? Thanks. |
Yes, I have... The problem I am having is that when I read up on these topics on the net, and also in stackexchange and other sites and in other docs, the methods often do not match the methods in the Sorry you are getting frustrated with my questions. but I am only trying to understand how this The best way so far today is for me to just edit the gem and start printing. For example, you told me that "the gas fees were too low" and that is why I keep getting timeout errors. However, I checked the client code, and the timeout was hard coded to 300 seconds. It is typical for low gas fee transactions to take a lot longer than 5 minutes, but this timeout value of 300 seconds is hardcoded into the client. Again, sorry you are getting frustrated with my questions. Honestly, I am simply trying to get this gem to submit a "hello world" contract on Ropsten, Goerli, and Rinkeby test networks and it has been days and I have not got a single simple "hello world" transaction to work. I don't think it's my fault and it is not for a lack of trying. I'm not doing anything complex and I have plenty of ETH for all these test networks. Again, sorry you are frustrated with my questions. |
I'm not frustrated :) |
That's nice to hear. I am worried that my testing and debugging is annoying you :) So, today I added some debug prints to the gem and have increased gas prices like so: chain = Eth::Client.create Endpoint::Provider.get(network_provider)
gas_pump = 1.2
chain.gas_limit=70000
gas_price = chain.max_fee_per_gas
chain.max_fee_per_gas = gas_price * gas_pump
gas_limit=chain.gas_limit
chain.gas_limit = gas_limit * gas_pump
puts "PUMPED UP GAS: chain.max_fee_per_gas=#{chain.max_fee_per_gas} & chain.gas_limit=#{chain.gas_limit}" However, this results in the "replacement underpriced" error:
So, I increased gas like this: gas_pump = 1.25 and that results in the "already known" error (which I think is nonce related?), as follows:
Maybe you can help me out and explain to me how to fix this and move past this (nonce related?) issue so I can actually deploy Hello World ? Thanks! |
I'll try to give you a more elaborate answer within the next days, please don't give up yet :) |
Thank you @q9f Today I took a detour and tried to get this Looking forward to your next code / explanation to get me past "Hello World" on normal eth test chains! No hurry, I'm hand sanding a very hard teak wood floor with a 5" random orbital sander; so I generally alternate between sanding very hard teak wood and doing Hello World with FYI only using BSC
|
Here is a quick public version of the code to test this Hello World contract: https://github.com/unixneo/ethtest.git Hope this helps. |
Update: Now I get this error:
And when I look for an answer via google, nothing I change helps to get past this roadblock. The account I am using has over 300 rETH (not GWEI, ETH) and the signing key for the transactions is the same private key as the address. Is there a method to simply read what the EVM wants so we can give it want it wants? Also, I read this, as folks advise, but I cannot find the solution in this document only more confusion: https://github.com/ethereum/EIPs/blob/master/EIPS/eip-1559.md |
Trying yet another way, the error changes again:
Seems like the protocol and / or the gem should have methods to deal with this, right? These seems to be standard errors and the solution would come from information in the EVM, so it seems when these errors occur, either:
Or, three, what is a method to do this because searching the net has not yielded any fruit. |
Chainstack and Infura provided "working" gas params. Thanks. |
hi, How did you solve it in the end? |
This comment was marked as outdated.
This comment was marked as outdated.
Sorry to see you gave up. Responded to all your questions here: https://community.unix.com/t/creating-a-hello-world-contract-with-ruby-ethereum/388145 Edit: neo decided to delete my response, so I will lock this thread to avoid further distractions. |
Hope this helps.
I summarized some
eth
issues found when testing with four different blockchain endpoint providers here:https://community.unix.com/t/testing-eth-contract-deployment-using-the-eth-ruby-gem-against-provider-endpoints/387004
Not sure the best was to continue reporting these issues, as I do not wish to be a pain and inundate anyone with these various issues encountered with testing various endpoints.
Kindly let me know how to proceed without being annoying. Thanks.
The text was updated successfully, but these errors were encountered: