echidna icon indicating copy to clipboard operation
echidna copied to clipboard

Add support for `etch` cheatcode (from Foundry)

Open rappie opened this issue 2 years ago • 6 comments

https://book.getfoundry.sh/cheatcodes/etch "Sets the bytecode of an address who to code."

This could be useful in multiple ways.

The main reason I'd like this is to be able to turn an EOA into a Contract to test how the target contract deals with this.

Another use is to debug/alter deployed contract onchain like this: https://twitter.com/apoorvlathey/status/1621986610068996096

rappie avatar Jul 17 '23 15:07 rappie

is this really need with the deployBytecode option? :thinking:

gustavo-grieco avatar May 08 '24 17:05 gustavo-grieco

Does deployBytecode support overwriting code on onchain addresses?

rappie avatar May 08 '24 19:05 rappie

I don't know, this should be tested.

gustavo-grieco avatar May 08 '24 19:05 gustavo-grieco