agent0
agent0 copied to clipboard
programmatic acquisition of anvil private keys
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