-
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
contract.deploy().send() not resolving in beta.48 #2506
Comments
Thanks for creating this issue! I've tested it with the version beta.48 and it works. I think you forgot to return the response in the async method. Code: const contract = new web3.eth.Contract(abi);
contract.transactionConfirmationBlocks = 1;
const deploy = async () => {
const gas = await contract.deploy({data: web3TokenBytecode}).estimateGas();
const response = await contract.deploy({data: web3TokenBytecode}).send({
from: '0xb414031Aa4838A69e27Cb2AE31E709Bcd674F0Cb',
gas: gas + 1
});
console.log('Contract deployed to:', response.address);
console.log('Contract deployed to:', response.options.address);
return response;
};
deploy().then((contractClone) => {
console.log('CLONED-CONTRACT: ', contractClone);
}).catch(console.log); Response:
|
Hi Samuel, Did you run my gist? Against which ethereum node? |
Oh wait - while I was writing my response it finally finished. It just takes a magnitude longer. Is there something new like "resolve after 24 confirmations" or so? |
Ok, we can close this issue.
|
Glad I saw this issue; I was using the latest version |
I'm having this issue in beta.55 using ganache or ganache-cli. Is possible to resolve after just 1 confirmation? |
Thanks for asking! @Pedro-vk |
Thank you 👍 Is gonna be really helpful for me! |
Description
I've got a little contract deployment script, which stopped working after upgrading web3 from beta.37 to beta.48. Downgrading helped.
The issue is, that the promise returned by
myContract.deploy(args).send(opts)
is never resolved.Issue may be related to #2500.
Expected behavior
The promise should either resolve or reject.
Actual behavior
Waiting for promise indefinitely.
Gists
https://gist.github.com/haggins/2213e5d1852c825869687672a9dff890
Versions
The text was updated successfully, but these errors were encountered: