agent0 icon indicating copy to clipboard operation
agent0 copied to clipboard

programmatic acquisition of anvil private keys

Open dpaiton opened this issue 2 years ago • 0 comments

I don't a clean version of this this is possible, unfortunately.

However, I think one solution is to force the mnemonic when you spin up anvil, and then you can use web3 to generate a private key from that mnemonic (account = w3.eth.account.from_mnemonic("some dumb list of words"). This should be the same private key as the one anvil is using. The mnemonic can be set in a .env file.

Related to #809

dpaiton avatar Aug 12 '23 00:08 dpaiton