Skip to content

Force to send transaction ignoring failing status web3js 4.x.x #6403

Answered by mmo2112
mmo2112 asked this question in Q&A
Discussion options

You must be logged in to vote

I've missed the 2nd parameter:

public sendSignedTransaction<ReturnFormat extends DataFormat = typeof DEFAULT_RETURN_FORMAT>(
	transaction: Bytes,
	returnFormat: ReturnFormat = DEFAULT_RETURN_FORMAT as ReturnFormat,
	options?: SendTransactionOptions,
) {
	return rpcMethodsWrappers.sendSignedTransaction(this, transaction, returnFormat, options);
}

So, change to this will ignore the revert status:

const broadcastResult = await web3.eth.sendSignedTransaction(resMap.get(key), "hex",
{
	checkRevertBeforeSending: false
});

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by mmo2112
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant