I have been testing and simulating transactions for quite some time using tenderly.
However, for a specific smart contract that calls another contract which has a modifier that requires the caller to be the owner, simulating becomes tricky because the owner if equal to the gnosis-safe address can only be properly tested if the simulated call is originated from the actual safe contract using DELEGATECALL.
I would like to know:
- Is there an easy method to create a mock/test safe transaction and then plug it into tenderly?
- or should I create a testing contract that simply DELEGATECALLs arbitrarily to my desired contract like the GnosisSafeProxy does, bypassing the execTransaction?
ps: on tenderly it doesn't know the originating From address is a safe when doing a simulation. It assumes it's always an EOA.