5

I fixed it. Add this code in app.js: // MetaMask injects its own web3 instance in all pages, override it // as it might be not compatible with the one used here if (window.web3) window.web3 = web3;


4

The seed phrase definitely is enough to recover your account. When installing MetaMask it prompts you to input a seed phrase or generate a new account. Then choose the seed phrase and copy it. As you mentioned it isn't working for you. Make sure you spelled everything correctly. The mnemonic phrase is 12 words. Are you sure you got all of them right? ...


4

The answer is: I need to reset metamask between sessions: Settings > advanced > Reset Account Not sure why this is needed for ganache gui but not ganache cli!


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 ...


3

Think of your VM like a completely different machine. It has another IP for example. 127.0.0.1 accesses localhost and therefore your host machine. So how do you fix this? You need to connect to your VM with the correct IP. Go into your VM and run the command ifconfig. A lot of stuff gets returned. You will surely recognice the correct IP when you see it. ...


3

They could possibly be one. Although in their current state they don't steal any data. (at least from my knowledge)


3

The Metamask interface has changed to enable privacy and consent from the user before allowing any access to the account information contained within Metamask. This is done by injecting an "ethereum" object to the browser window. You must now wait for the ethereum.enable() function to return true after prompting the user. More details here: https://...


3

You can get the balance of a single account via: web3.eth.getBalance(address); By default you will get all accounts of metamask. (this code uses await and therefore has to be placed within an async function) const accounts = await web3.eth.getAccounts(); What you get is an array with all the accounts. Now it is up to you to loop through them and sum up ...


3

Don't make it so hard for you. Just use a working faucet. None of us can fix a problem with the faucet you mentioned. Here is a working Ropsten Testnet Faucet: https://faucet.ropsten.be/


3

You're right, the contract can't call itself the "approve" method. Instead you can write a script. An exemple with web3js 1.2 could be : var erc20Instance = new web3.eth.Contract(abi,Token_address); erc20Instance.methods.approve(contractAddress, amount).send({from: userAddress}, function(err, transactionHash) { //some code }); with : abi : the abi of ...


3

There are five categories of Ethereum wallets that can interact with dApps Browser built-in (Opera, Brave, ...) Browser extension (MetaMask, ...) Mobile wallets (Trust, Walleth, Pillar, ...) Account-based web wallets (Fortmatic, 3box, ...) Hardware wallets (Ledger, Trezor, ...) Then there is a larger category of wallets that cannot integrate with dApps ...


3

I added a window.location.reload() after successful transaction (my web3 await function). This works on local test net but will have to do some more digging due to the longer wait times on the Main Net and other Test Nets. ** EDIT ** Thanks @JaxCoder, This helped me find the solution. window.location.reload() was part of it. To make sure the loader / ...


2

I have come across the same error. After removing and re-installing the meta mask has been fixed this problem for me.


2

[ethjs-rpc] rpc error with payload in Solidity 0.5.0 happens if the passed parameters to the contract is empty, hence from DApp console log all parameters and see if any values are being passed as empty or null. Once you address the empty values to some concrete values rpc error will go way and transaction will be success.


2

Metamask is not correctly estimating the gas because this is not your fallback function. A fallback function is of the format (notice there is no function name): function() external payable {} If you are not providing data to the transaction in Metamask, it will assume you are sending a normal transaction and will estimate 21000 gas. In order to correctly ...


2

You declared you function as async but never used the async/await pattern. I added the await at the correct position for you. Try this: export const loadExchange = async (web3, networkId, dispatch) => { try { const exchange = await web3.eth.Contract(Exchange.abi, Exchange.networks[networkId].address) dispatch(await exchangeLoaded(exchange)) ...


2

When calling associatedToken.transfer(address(this), _ammount) the caller of this transaction is your contract, so it tries to transfer contract's 82 DAI to itself. To transfer DAI you should be the caller of the transaction with transfer() function call. You should upload DAI's code to Remix and use "At address" button and then call transfer() function at ...


2

The MEW browser extension isn't a web3 provider, so you can't use it to send transactions directly on your website, like with MetaMask. Besides that, most web3 providers inject a global web3 object. If you have multiple browser extensions (or other software) injecting web3 providers, they will override each other.


2

To "speed up a transaction" there's only one possible option: to send a new transaction with higher gas price but with the same nonce. This way if nodes see both of the transactions they will most likely pick up the one with the higher gas price and once that is mined the other transaction becomes invalid (a tx with that nonce has already been mined) and is ...


2

As of December 2019 at least, it doesn't seem possible to do this. Read this discussion on Twitter for more details. The best option is to chain the promises, as Ismael suggested in the comment above. createTokenApprovalTx().then(() => createFooTx());


2

No she can't access your account 1. Because account 1 and account 2 have different pk(private key), but u only gave her account 2 pk so she can't use it to access acount 1. The reason you still have account 2, because she can't change the pk it is link to the account, but u gave her the pk so that mean u already own it in metamask. So unless you delete the ...


2

Short answer: You can't. That's it. Better answer: The async flow has two steps. You have a transaction receipt which is a unique identifier for what you sent. It hasn't been mined, only accepted. It gets mined, and something happens. You're outputting the response from step 1. For step 2, you have a few options and they are documented all over so ...


2

I'm struggling with the same exact issue myself. In the past, I've managed to achieve this by creating an instance of web3 on the react-native application. Doing so, I was able to perform and sign transactions locally on the phone, making use of a Keystore file on a static location of the phone. From my experience, this eventually became really slow and ...


2

Metamask doesn't know that your contract only exists in Ropsten. When you log into metamask, you select the network that you want to work with in the dropdown in the picture below. This is the network that web3 will be interacting with. You can check the network that you are using by looking at the network id of the web3 object. You can do this with the ...


2

There is typo in your code. Replace: window.web3 = new Web3(window.etheruem) With: window.web3 = new Web3(window.ethereum) Also if your connection between metamask and the local project is set properly you should be able to access the current account by using ethereum.selectedAddress.


2

In addition, there are some curated lists of tokens that you can submit your token to. Applications, such as wallets, pull tokens from these curated lists. Token Curated List of Tokens https://tokens.kleros.io (https://uniswap.ninja/ pulls token list from here, for example. This one is a decentralized list, meaning everyone maintains it, not just a curator.)...


2

In your code: window.web3 = new Web3(ethereum); window.web3 = new Web3(web3.currentProvider); window.web3 = ethers; // ethersjs provided library Since web3.js and ethers.js are obviously two different modules (most likely implemented by two different groups), they have no reason to share the exact same API. The fact that you can set your window.web3 to ...


2

You can also download the metamask application from the play store.. https://play.google.com/store/apps/details?id=io.metamask&hl=en


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 ...


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 ->...


Only top voted, non community-wiki answers of a minimum length are eligible