-
Notifications
You must be signed in to change notification settings - Fork 5k
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
Web3 options are not set in the submodules on initiating of the library. #2577
Comments
Did you configure the |
@nivida Thanks for your response.
If I check the transaction receipt using geth command eth.getTransactionReceipt('0x5ac7d8eec4bd18fcb85c68ffa33dc8f1731c043f361754d68911df61928b19e8'), Then I get a receipt. |
The correct configuration would be: const options = {
transactionConfirmationBlocks: 1,
transactionBlockTimeout: 5
} The |
@nivida I did the configuration suggested by you but it doesn't work for me.
do I need to do any configuration in my etherum (geth) node too? |
Thanks for additional information! I'll fix and release it asap. |
I've just seen that the documentation is inconsistent for the construction of a Web3 module. I will update the documentation to the following format: I've checked the code from the old architecture and it was not possible to pass options over the constructor because the second parameter was the I apologize for the confusion and the stolen time. |
@nivida okay no problem. Thanks for your response. |
You're able to set the options just change your code to: new Web3(web3.currentProvider, null, options); |
Thanks, @nivida. |
@nivida Now, .on('receipt') is working. But I am only getting the tree structure on calling .on('receipt) event, I doesn't get actual transaction receipt which consists of contractAddress, transactionHash, etc. Code Block
Log of transaction receipt |
I'm struggling with tx events using web3js beta 51 too.
Both cases the It might be related: the confirmation events were not received in beta36 with websocket on local ganache only when I issued an "empty" txs to ganache: |
@szerintedmi Did you configured the |
Yes, in provider options. I also crossed checked with I'm writing a quick test to reproduce the issue, will keep it posted |
test to demonstrate the issue: |
@princesinha19 @szerintedmi The missing emitted receipt event got fixed with #2616 and will be released this week. |
thanks, @nivida. |
@princesinha19 The documentation got updated: https://web3js.readthedocs.io/en/1.0/web3.html#transactionconfirmationblocks |
Thanks, @nivida. Yes, I can see the updated docs. |
Description
When I am deploying smart contract using web3 function deploy, it doesn't trigger the event .on('receipt', (receipt)).
Expected behavior
Should return contract address.
Actual behavior
Calling the above function doesn't return contractAddress and doesn't compile .on('receipt). It got stuck.
Steps to reproduce the behavior
Import web3 in nodejs code
Contract deploy using web3 (myContract.deploy())
Add an event .on('receipt') with web3.deploy.
Code Block:
Versions
The text was updated successfully, but these errors were encountered: