What is the most recent web3py version that ApeWorX supports? I need to have support for unlocking random eth accounts on a local test network (ex: http localhost 8545) through something like hardhat (npx hardhat node) using a hardhat fork (infura, alchemy, quicknode, etc), WITHOUT actually having the private key of the account simply for testing purposes like you can with brownie when defining the unlock parameter in brownie-config.yaml? Is it possible to fork and unlock accounts without the private key in ApeWorX? This is to impersonate a given eth account without needing to posses the private key of the account. Any Information would be most helpful!
Web3.py – What Version of Web3.py Does ApeWorX Support and Does It Support Account Impersonation Without Private Key?
browniepythonweb3.py
Best Answer
Ape supports v6 of Web3py, so whatever the latest release is would be recommended (6.3.0)
Ape supports impersonation if the provider you're using does (
foundry
orhardhat
do)You can pass an address string or contract instance value as
sender=
in a transaction to send from an account (e.g.c.upgrade(sender=c.govnernance())
) or you can load an impersonated account in a test viaa = accounts[address]