You can't get the private key from the embedded accounts in the "JavaScript VM" environment in Remix. What you need to do is download and run Ganache and switch the environment over to "Web3 Provider".
When you start Ganache, you'll see a summary of accounts and private keys like the following:
You can't get the private key from the embedded accounts in the "JavaScript VM" environment in Remix. What you need to do is download and run Ganache and switch the environment over to "Web3 Provider".
When you start Ganache, you'll see a summary of accounts and private keys like the following:
Use one of those private keys to sign your transaction.
The list of accounts and private keys change after every restart. If you need to have them persist, start Ganache with the
--accountsoption