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!

1 Answer 1


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 or hardhat 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 via a = accounts[address]

  • Thanks for the info! I think this answers my question
    – josjunior
    Commented May 16, 2023 at 9:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.