You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Which works for my local node but it won't work for a remote provider like Infura or Alchemy - right?
I get an error when executing this against Infura: InvalidResponseError: Returned error: The method eth_sendTransaction does not exist/is not available
This is because remote providers don't store private keys and so can't sign the Tx for us, we need to sign the tx locally and send with something like this:
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi, I just wanted to clarify something if someone can set me right -
This:
https://docs.web3js.org/guides/smart_contracts/deploying_and_interacting_with_smart_contracts#step-7-interact-with-the-smart-contract-using-web3js
shows sending a tx to invoke a contract method:
Which works for my local node but it won't work for a remote provider like Infura or Alchemy - right?
I get an error when executing this against Infura:
InvalidResponseError: Returned error: The method eth_sendTransaction does not exist/is not available
This is because remote providers don't store private keys and so can't sign the Tx for us, we need to sign the tx locally and send with something like this:
Am I right or can web3.js understand that it's not dealing with a local node and can the .send() do the signing for me?
Beta Was this translation helpful? Give feedback.
All reactions