Writing true unit tests requires code to be tested in isolation from its dependencies. One way of achieving this is to use a mocking tool, that provides programmable replacements for this dependencies.
What it does
How I built it
Doppelganger started out as a remix IDE project. By using the building debugger I was able to iterate quickly on the Proof-of-Concept, and get the necessary assembler right.
Challenges I ran into
I had to go down to the assembler/bytecode level of the EVM to achieve the desired effect. Documentation for this part of Ethereum is very sparse and fragmented.
Accomplishments that I'm proud of
I managed to hack together a working tool that has potential to change the way we test our smart contracts.
What I learned
Bytecode. Lot's of bytecode.
What's next for Doppelganger
More programmable behaviours (e.g. revert). Call tracing.