How do I add an account to Metamask?
This account was created using the following steps …Deploy your contracts to a public network
Don’t know why, the default account for development
is different to rinkeby
?
How do I add an account to Metamask?
This account was created using the following steps …Deploy your contracts to a public network
Don’t know why, the default account for development
is different to rinkeby
?
Hi @pkr,
You can import the development mnemonic into MetaMask. Unfortunately you can only have one mnemonic imported in MetaMask at a time.
You could run ganache-cli -m "your 12 word mnemonic"
and then copy the private keys for each account you want and import these into MetaMask.
networks: {
development: {
protocol: 'http',
host: 'localhost',
port: 8545,
gas: 5000000,
gasPrice: 5e9,
networkId: '*',
},
ropsten: {
provider: () => new HDWalletProvider(process.env.DEV_MNEMONIC, "https://ropsten.infura.io/v3/" + infuraProjectId),
networkId: 3, // Ropsten's id
},
},
With regards to the different accounts for development and a public testnet, the public testnet uses a mnemonic stored in your project e.g. in .env
, whilst ganache-cli
generates accounts based on the option you choose.
[ganache-cli
]
-m
uses a mnemonic you provide
-d
uses a deterministic mnemonic
otherwise ganache-cli
generates a mnemonic.
Hi @pkr,
Wanted to check if the above answered your question.