Skip to content

Can't send transaction without specifying gas limit #3491

Answered by zemse
dimmil123 asked this question in Q&A
Discussion options

You must be logged in to vote

Can you once try passing a from field to the estimateGas? Since you are directly using the provider.estimateGas, it has no context about the msg.sender.

const estimatedGas = await provider.estimateGas({
  to: targetContract,
  data: encodedPayload,
  value: txOptions.value,
+ from: wallet.address
});

Replies: 1 comment

Comment options

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