0

I am trying to test certain aspects of BSC chain. I need some system contracts, which I can't easily deploy to other addresses without breaking the whole existing system.

Is it possible to add contracts to the genesis block of a hardhat network, on a predefined address?

1 Answer 1

1

You could use the hardhat_setCode debug method to set your contract runtime bytecode to any address. Additionally, you could set or modify any state variables with hardhat_setStorageAt.

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.