Skip to content
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

sendSignedTransaction can't get which tx throws error #3082

Closed
xuzhitong opened this issue Sep 27, 2019 · 1 comment
Closed

sendSignedTransaction can't get which tx throws error #3082

xuzhitong opened this issue Sep 27, 2019 · 1 comment
Labels
2.x 2.0 related issues Needs Clarification Requires additional input Stale Has not received enough activity

Comments

@xuzhitong
Copy link

xuzhitong commented Sep 27, 2019

The web3js version is 1.0.0-beta.55.
I used "sendSignedTransaction" to send transaction and call my smart contract method.If one error occurred,I can't get which tx is failed in the concurrency pattern.

var tran = web3.eth.sendSignedTransaction('0x' + serializedTx.toString('hex'));
tran.on('confirmation', (confirmationNumber, receipt) => {
	console.log(' confirmation: ',confirmationNumber);
	//do something
});

tran.on('transactionHash', hash => {
	console.log(hash);
	//do something
});

tran.on('receipt',receipt => {
	console.log("receive receipt ",receipt);
	//do something
});
tran.on('error', error => {
	  console.log(error);
	  //I want to get which tx fired the error
});

If a out of gas error or other error occurred after got the transaction confirmation,I can get tx's information from the second parameter,but can't get when other errors occurred.

@nivida nivida added 2.x 2.0 related issues Needs Clarification Requires additional input labels Sep 29, 2019
@github-actions
Copy link

github-actions bot commented Jul 3, 2020

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment, otherwise this issue will be closed in 7 days

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2.x 2.0 related issues Needs Clarification Requires additional input Stale Has not received enough activity
Projects
None yet
Development

No branches or pull requests

2 participants