Skip to main content
OverflowAI is here! AI power for your Stack Overflow for Teams knowledge community. Learn more

Questions tagged [metamask]

Question about the Metamask chrome's plugin.

Filter by
Sorted by
Tagged with
55 votes
3 answers
115k views

how to remove unused test accounts from Metamask

i use metamask chrome extension with testRPC to do my testing now metamask have over 20 dead accounts just sitting there in the list my question how to you clear loose unused test accounts from ...
Nerdroid's user avatar
  • 817
30 votes
7 answers
46k views

How can I detect change in account in Metamask?

When a user changes to a different account in metamask, is there a way to detect it asynchronously in code? I currently use this.web3.eth.getAccounts((err, accs) => { this.account = accs[0]...
bbusdriver's user avatar
  • 1,154
24 votes
13 answers
24k views

TX doesn't have the correct nonce - Metamask

I'm trying to call the leafPicked() function in my contract from web3 which launches Metamask as intended. After pressing accept the transaction shows as failed along with the error message pictured ...
Charles's user avatar
  • 435
22 votes
9 answers
26k views

Trying to use window.ethereum.request in Typescript errors out with Property 'request' does not exist on type 'EthereumProvider'

Except for one unanswered question from last November, I cannot find anything . . . . I am revamping some typescript code (in Visual Studio) for the Metamask January change. Previously, I was using ...
Mark Waser's user avatar
21 votes
5 answers
35k views

Metamask: How to access/call deployed contract's functions using Metamask

I'm learning Solidity. I've set up Metamask, truffle and testrpc. I can send ether from one account to another via metamask. But I want to Metamask to access my deployed contract, and call my ...
Aydin's user avatar
  • 2,117
18 votes
3 answers
20k views

How can I get my accounts into metamask or vice versa?

I need my accounts in Metamask to match my local machine so I can deploy from the machine (using truffle), and test in a browser. How can I either: Upload my local geth accounts to Metamask Bring ...
ZMitton's user avatar
  • 2,760
17 votes
2 answers
9k views

To which remote ethereum nodes does Metamask plugin send signed transactions? and are they exposed to denial of service attacks?

So Metamask allows in it UI to connect to different ethereum nw (public/ testnet) right. Do who is maintaining these peers? Can I trust these peers?. If so, can I setup similar service on my machine ...
siddesh sangodkar's user avatar
17 votes
6 answers
13k views

Elegant way to detect current provider int web3.js

I want to know what provider the user is using (Metamaks, Mist...)so I can give better user experience. E.g. Give tips on how to unlock an account I'm currently doing this, but is far from elegant. ...
xavivives's user avatar
  • 171
17 votes
2 answers
27k views

Does metamask store private key on server or anywhere else?

I have created my private key using myetherwallet using offline option. Now Metamask allows us to import account by providing private key or Json File that has private key. Does metamask store ...
LP13's user avatar
  • 333
16 votes
6 answers
26k views

Better pattern to detect web3 default account when using metamask

Context: I want to use blockies to render an identicon on the page, i get the defaultAccount from web3, for this, the user has to be logged on to metamask with a selected address from his wallet. The ...
Jorge Alvarado's user avatar
16 votes
4 answers
21k views

How to obtain all transaction of a contract?

I'm trying to obtain all the transactions of a contract, but in all cases I only obtained [] or undefined. I'm following this posts: Common useful JavaScript snippets for geth web3 filter option not ...
Gawey's user avatar
  • 824
16 votes
2 answers
29k views

Difference between window.ethereum and window.web3?

If I log the two functions, I get two objects, that both contain for example selectedAddress, but the structure of the objects seem different. I couldn't find a comparison in the documentation. I ...
Marcellvs's user avatar
  • 423
16 votes
4 answers
16k views

How to automatically get user's wallet info if they are connected but NOT show the metamask pop up if they are not?

I don't want metamask to pop up on page load forcing a user to connect, so we only connect via a button - but after a user is connected if they refresh the page - they need to press the button again ...
Zach's user avatar
  • 581
15 votes
10 answers
35k views

Invalid Address Error when interacting with a smart contract with metamask

I want to call the methods with metamask of this simple contract: contract AssetPrices { mapping (uint => uint) public prices; uint public data; function EnterPrice(uint _time, uint _price){...
gpanterov's user avatar
  • 251
15 votes
9 answers
78k views

Error: [ethjs-query] while formatting outputs from RPC: "message":"invalid sender"

I'm using MetaMask with an app I'm developing, and previously working functions are now returning a quite ferocious error. This error has been duplicated on a number of functions in the platform, so I ...
The Renaissance's user avatar
15 votes
3 answers
47k views

Where does metamask store the wallet seed? (file path)

I have a Windows installation that cannot be booted anymore. I'd like to copy the file containing the Metamask wallet seed to another machine and have that Metamask installation use it. The same ...
Jesbus's user avatar
  • 10.5k
15 votes
4 answers
103k views

How To Transfer Tokens Out Of Metamask Wallet

I have some tokens in my Metamask wallet and want to transfer them to an exchange to trade but I don't know how to do. Metamask now allows you to see the tokens as per the recent upgrade but I don't ...
marcusxman's user avatar
14 votes
3 answers
15k views

What exactly is a proxy contract and why is there a security vulnerability involved in it?

I was looking at the recent FE badger DAO exploit and this Twitter thread in it https://twitter.com/CryptoCatVC/status/1466380960648380419?s=20 One piece of advice the author gives before signing a ...
Brutus123's user avatar
  • 243
14 votes
1 answer
13k views

How to automatically add a custom token to MetaMask with ethers.js

I was playing around with creating BEP-20 tokens on cointool.app and noticed that whenever you generate a new token and pay the gas fee to mint it, the website automatically prompts you to add this ...
exakoss's user avatar
  • 141
13 votes
5 answers
19k views

How to verify MetaMask account holder is the real owner of the address?

I'm making a dapp that will make calls to a Node.js server. I expect the user to have MetaMask installed and I want to verify that he is the real owner of the current address on MetaMask (i.e. ...
adrianmcli's user avatar
13 votes
1 answer
7k views

Is an Account in MetaMask the same as an Ethereum Account (EOA)?

First, my setup: I use the Azure Ethereum Consortium Template, which creates one transaction node and two mining nodes in my configuration. I use MetaMask Chrome plugin to accept transactions, which I ...
Kai Wähner's user avatar
13 votes
2 answers
47k views

How to get tokens out of a metamask account

I transferred tokens (GNT) from an exchange to a metamask account but I can't figure out how to get them out. They do not show up in metamask, but etherscan shows them. I tried to import the account ...
user7659's user avatar
  • 131
12 votes
2 answers
28k views

Sending an ethereum transaction with ethers.js and metamask

I've tried two different ways, and have looked through ethers.js documentation, and I just haven't been able to figure it out. Does anyone have any suggestions? This is in a browser. trans(web3,...
Jared Smith's user avatar
11 votes
7 answers
17k views

How to check whether MetaMask is installed?

How to check from client-side JavaScript whether MetaMask is installed?
porton's user avatar
  • 1,804
11 votes
1 answer
20k views

Web3: current best practice to connect Metamask to Chrome?

I am currently trying to connect my React front-end to Metamask on Chrome. When using the following method, I get that ethereum.enable() is deprecated: if (window.ethereum) { window.web3 = new ...
Thanh-Quy Nguyen's user avatar
11 votes
4 answers
22k views

How can I get the current user account selected in MetaMask with Web3 js?

I'm using the next function to get the first account from user's MetaMask: var account = web3.eth.getAccounts((error,result) => { if (error) { console.log(error); } ...
Veilkrand's user avatar
  • 213
11 votes
3 answers
1k views

TestRPC and Metamask: hanging on pending transactions

I'm using Remix and connecting to Testrpc via Metamask. I can successfully launch contracts to testrpc, but then it hangs on the subsequent calls that Remix makes to the public methods (Remix says "9 ...
will_durant's user avatar
  • 1,154
10 votes
2 answers
12k views

How to ask the metamask user to switch its network?

Some web3 enabled websites ask you to switch your network on metamask. How can I do so? Some other websites also allow you to add a network you don't have (for example https://chainlist.org/). I would ...
Th0rgal's user avatar
  • 245
10 votes
4 answers
24k views

Export Metamask account to JSON file

I'm trying to use ethers-ens which requires an ethereum account in JSON format. How can I export or generate an account.json from my metamask account? Is there another way to use ethers-ens without ...
ProGirlXOXO's user avatar
10 votes
1 answer
9k views

MetaMask - RPC Error: The requested account and/or method has not been authorized by the user

I'm following the tutorial on https://www.toptal.com/ethereum/one-click-login-flows-a-metamask-tutorial#how-the-login-flow-works. One of the sections show an example of prompting the user's Metamask ...
Stephen Fong's user avatar
10 votes
2 answers
2k views

Solidity Browser - Issue with every example => Error: Type "address" not supported for state variable

I am very new to blockchain and Ethereum. I want to get started with a BaaS cloud service and develop / execute some smart contracts. I successfully set up the Azure Ethereum template (https://github....
Kai Wähner's user avatar
9 votes
4 answers
18k views

Using Ganache with an existing MetaMask account

I am attempting the Truffle "Ethereum pet-shop tutorial": http://truffleframework.com/tutorials/pet-shop I am in the stage where I am attempting to implement the smart contract on the local Ganache ...
Marius Kuyler's user avatar
9 votes
5 answers
28k views

Metamask - "Params specify an EIP-1559 transaction but the current network does not support EIP-1559"

I'm working on a little erc 721 project. We have a frontend that allows users to mint a couple of our nfts with a button. contract.methods.mint(tokensNumber).send({from: accounts[0], value: ...
Pepe Silvia's user avatar
9 votes
2 answers
15k views

Approve contract to withdraw funds from users's wallet

I want to achieve the following flow: A user clicks a button allowing my contract to spend funds on the user's behalf A user clicks a second button whereupon funds are transferred from the user's ...
Conviley's user avatar
  • 390
9 votes
3 answers
26k views

How to import web3 into a React project

I apologize preemptively for the very basic question. I have added and installed web3 using yarn in my react project. Inside my index.js file in /scr and based on the web3 docs I have tried both (...
Bryan Campbell's user avatar
9 votes
2 answers
10k views

Sign a raw transaction with Metamask or Mist

Is there a way to use the private key from my Metamask or Mist account to sign a raw transaction? I cannot use ethereumjs-tx without the private key, but I want to be able to use injected Web3 and ...
simonDos's user avatar
  • 366
9 votes
1 answer
9k views

How to programatically change the current network with MetaMask

I would like to have a button that switches between main net and ropsten on my app, in order to do so I need to programatically change the current network with MetaMask. But I cannot find aby ...
Victor Ribeiro da Silva Eloy's user avatar
9 votes
3 answers
14k views

How to connect Remix desktop to connect to MetaMask?

I downloaded the desktop version of Remix, and am trying to connect it to the main network. I can do this in the web version of Remix easily, opening up MetaMask on my browser. However, in the desktop ...
Eric Falkenstein's user avatar
9 votes
2 answers
653 views

Parity-like Solution for using Ledger Nano Anywhere

I'm looking for a "Parity-like" solution so that I'm able to use my Ledger Nano on any Ethereum-powered website that doesn't support a Nano natively (something like Radar Relay). I know I can do this ...
RBizzle's user avatar
  • 145
9 votes
2 answers
395 views

Error importing transaction: Transaction(InvalidChainId) in Private POA

Problem I am trying to send some transactions to my private chain, and all transactions are getting failed. I am receiving this error: Error importing transaction: Transaction(InvalidChainId) ...
Ayushya's user avatar
  • 1,698
8 votes
3 answers
12k views

How to check the current MetaMask network?

How to check the current MetaMask network? For example, if the current network is Rinkeby, I need the string "rinkeby".
porton's user avatar
  • 1,804
8 votes
1 answer
12k views

Connecting the wallet of to your dApp and different Ethereum wallet types

How users can use connect their different wallets, like MetaMask, mobile wallets and hardware wallets with a dApp? What wallets are supported?
Mikko Ohtamaa's user avatar
8 votes
2 answers
2k views

Are tools like metamask putting decentralization in danger?

Does a tool like metamask, which connects your browser to a public ethereum node to simplify running DApps, put the basic idea of decentralization and trustless blockchain verification in danger? Is ...
q9f's user avatar
  • 32.9k
8 votes
2 answers
8k views

Why does my smart contract tokens not show up in MyEtherWallet or MetaMask?

I have deployed a very basic smart contract to the Rinkeby test network. The contract's address is 0xb145b6d8757b40ac80b5fe2a98ab6c8450a54585. I have made transactions to it using MetaMask, and they ...
karianneberg's user avatar
8 votes
4 answers
12k views

web3.js can I call a smart contract function without knowing the ABI?

In a web3 JS dApp (eg.with Metamask), If I know just the address of a contract and the method name, how can I call that method ? I don't know the ABI.
Kris Randall's user avatar
8 votes
2 answers
6k views

How to decrypt an encrypted message using metamask?

I have a message encrypted with the public key. Metamask has its corresponding private key (account). How can I decrypt it with the metamask? Does metamask provide such feature? What I meant is just ...
biplavo's user avatar
  • 934
8 votes
1 answer
6k views

Reset MetaMask nonce

I am testing stuff on Ganache and am using Metamask to send transactions to simulate user behavior with the app. Now here's the issue. If I restart Ganache it resets all accounts (no problem with that)...
JBrouwer's user avatar
  • 1,062
8 votes
6 answers
13k views

Balance may be outdated, Metamask

Metamask is showing an asterisk near the account balance, and the message "Balance may be outdated". Indeed the balance is outdated. This is true on all networks (Main, Ropsten, etc.) and ...
Rexcirus's user avatar
  • 436
8 votes
2 answers
6k views

how to hook up web3 injected by metamask in angular 2

As described in metamask github, one can bootstrap metamask like this: window.addEventListener('load', function() { // Checking if Web3 has been injected by the browser (Mist/MetaMask) if (typeof ...
Leean's user avatar
  • 101
8 votes
4 answers
10k views

Error: Error: [ethjs-rpc] rpc error with payload {"id":6223335088050,"jsonrpc":"2.0","params":

I have deployed a smart contract in Remix IDE using MetaMask and test rpc. I got the below error: Error: Error: [ethjs-rpc] rpc error with payload {"id":6223335088050,"jsonrpc":"2.0","params":["...
user avatar

1
2 3 4 5
45