New answers tagged

2

MetaMask removes the "cancel" (as well as "speed up") button as soon as the node they are running (which is Infura) sees that the transaction has been mined.


1

The article you linked is more than two years old!! It made references to web3 previous version v0.20. With web3 v1.2 there were several changes. For signing you can choose between: web3.eth.sign(dataToSign, address [, callback]) leverages account managment on web3 provider, for example Metamask. web3.eth.accounts.sign(data, privateKey) in case you have ...


1

On web3.js v0.x: Function web3.eth.sendTransaction returns a transaction-hash (either in a Promise object, or via a callback function passed as input). You can take this transaction-hash and pass it to function web3.eth.getTransactionReceipt, which returns the receipt of that transaction (again, either in a Promise object, or via a callback function passed ...


1

It depends on what you do with this information. All information on Ethereum network is public. Any information coming from the client cannot be trusted unless it is signed with a private key If you use this to authenticate against a private server-side database it is not secure All transactions are signed by the wallet any case and then are authenticated ...


2

You need to programmatically refresh the page to get web3 injected by metamask. You can write a recurisve function which will not run indefinetly and will refresh if metamask was not installed and installed later: function checkWeb3ProviderRecursively(firstCall = true) { if (typeof window.ethereum !== 'undefined') { console.log("web3 provide ...


0

I ended up using the web3.eth.personal.sign function instead. I thought I needed to add a password but it turns out if I don't add a password to the function parameters, it will use metamask to sign.


0

MetaMask is not only kind of the wallet anymore. There is now more generic Web3modal solution that allows e.g. mobile wallets to connect with your dApp. It supports both web MetaMask and MetaMask mobile via WalletConnect protocol: https://ethereum.stackexchange.com/a/82532/620


2

Token transfers The challenge with token transfers is that you can't detect them by monitoring the "receiving" address. Tokens are not explicitly transferred to an address - they are only assigned to an address inside the token contract. So whenever someone transfers tokens to address A he actually sends a transaction to the token contract at ...


0

This is just a miner issue I guess. Check the Port of GANACHE running in your PC. METAMASK connects with the port number 8545. And if your GANACHE is not running in that PORT, you'll face the issue. (sometimes ganache runs on 7545 instead of 8545) This issue can be solved either changing the port number in the server configuration of your GANACHE setup. OR ...


2

Metamask is not a provider - they use Infura as their service provider. So whatever transactions Metamask creates it sends to Infura for adding to the blockchain. Otherwise you are quite correct - it creates transactions, manages accounts and relays transactions in a user-friendly manner. Most likely you will not want to implement the actual private key ->...


2

The transaction you linked has been replaced by transaction https://etherscan.io/tx/0x37302b3a3930b01ca940ffce9beb69bdaad6728204b46518a9b75cf2ff8eab3b . The old transaction had a gas price of 19 gWei while the new transaction had 28. As a miner can choose which transactions to include they had picked the one with the higher gas price. Once a transaction gets ...


4

What are the chances that 2 people get the same set of those 12 or 24-word mnemonic? Mnemonic phrases are generated from 128 bits (12 words) to 256 bits (24 words) of entropy. The probability to guess a mnemonic phrase is 2^-128 to 2^-256, which is very small. The longer the mnemonic phrase, the smaller the chance to guess it though. Is it possible to ...


0

Metamask extension loads the ethereum provider on window. The following code will throw a MetaMask prompt to enable connection: if(window.ethereum){ ethereum.enable().then(function(acc){ App.account = acc[0]; }); }


Top 50 recent answers are included