-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
How to fetch created address from transaction hash #3515
Comments
Hi @yehia67 web3.eth.getTransactionReceipt fetches the receipt for a transaction hash. The receipt has a Closing because addressed by existing documentation. |
@cgewecke I tried to use it but it return null. |
1 similar comment
@cgewecke I tried to use it but it return null. |
Are you waiting until after the transaction is mined to fetch the receipt? |
I use await |
It works! Is it possible to use event? I use hyperledger BESU. They don't accept |
@yehia67 web3.eth.sendSignedTransaction resolves the receipt when the tx is mined. There are usage examples in the integration tests, here. |
It works! |
Hello,
I am creating a private blockchain and use ethereum-lite-explorer to see the transactions. I need to deploy a smart contract and get his address. The deployment is done successfully but I get the address manually from ethereum-lite-explorer. I tried to use
web3.eth.getTransaction
but it didn't return the newly created address.My code:
The output:
The info I need is the address created for the deployed smart contract. How can I get it from the following output? (in my case the contract address was: 0x720ecB9f06F5563b70Acf6EAB8CfB2e03cE4670E from etherum-lite-exploere)
Any idea in how to get the same result using web3? Thanks in advance.
The text was updated successfully, but these errors were encountered: