0

For a Dapp that is using its own node provider such as Infura or Alchemy, all read operations can go through this node, but any state-changing operations will require a signer. These node providers do not have a signer because they don't store private keys.

Is it better to use MetaMask for all write operations, or should that still go to your Infura/Alchemy node?

If the latter, would the user have to sign a transaction using MetaMask, and that gets sent to your node provider? Will MetaMask pick up those transactions and display it under activity?

1 Answer 1

0

Is it better to use MetaMask for all write operations, or should that still go to your Infura/Alchemy node?

You can use any wallet you want, but in the end the transaction must be forwarded to a node (e.g., Infura, Alchemy, local node) so that it can broadcast it to the blockchain.

It's just about signing the tx locally to then forward it to a node, which in the case of Metamask is Infura by default anyway.

If the latter, would the user have to sign a transaction using MetaMask, and that gets sent to your node provider? Will MetaMask pick up those transactions and display it under activity?

Yes and yes. Metamask will watch for your transactions and give you status update on your tx as well as provide you with a history of past transactions involving your account, both sent and received.

4
  • Thanks @hroussille.Is the latter actually possible? I read ethereum.stackexchange.com/a/90011/99637 and it seems it's not possible or good practice to get metamask to sign a transaction, and send that to your own node. It's slightly different, but same concept that I am trying to use metamask to sign a transaction for me, that I can use to broadcast to my infura node (not metamask's default node).
    – Reginal
    May 2, 2022 at 18:48
  • No what they are saying is that Metamask will not hold a signed transaction, it will be forwarded to the node immediately. You are free to configure a network in Metamask using your own provider node. Your tx will be signed with Metamask and instantly sent to your node for broadcasting.
    – hroussille
    May 2, 2022 at 20:13
  • I see, but that would only apply to my browser, but other users on my Dapp would have to use what node they have configured or the MetaMask's default provider.
    – Reginal
    May 2, 2022 at 21:37
  • yes, and chances are they won't change it for just one app :/
    – hroussille
    May 2, 2022 at 21:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.