'How does MetaMask confirm transactions?
We are trying to add the eth json rpc methods to our custom blockchain so we can use Metamask.
We are able to import accounts and send transactions to the blockchain but can not seem to get them to confirm.
getTransactionReceipt is being sent to our blockchain and we are returning the required response but the transaction always stays as "pending" in metamask?
Is there any documentation on this flow? Can anyone here explain what we are doing wrong? How can we get the transactions to show as complete?
Solution 1:[1]
Metamask does not confirm any transaction. It is just a bridge to connect to the blockchain. It allows connectivity to the Ethereum blockchain through the infrastructure available at Infura. more here: Is there some relation between window.ethereum injected by metamask and web3.js? Can we use both?
Metamask connects you to the blockchain. Blockchain consists of blocks of data and these blocks of data are stored on nodes. Without nodes, you cannot access blockchain data.
If you have ever worked with ganache in development environment, to connect to ganache with your metamask, you enter information about ganache local blockchain and metemask connects you the local ganache blockchain but at the end ganache blockchain deploys and confirms transactions.
Most likely you have either something wrong with contract code or you are passing wrong parameters from the front end.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Yilmaz |
