0

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.

Thanks

1 Answer 1

1

This is indeed tricky and not really possible with Tenderly right now. You can only simulate it as soon as you have all but the last confirmation. In this case the last confirmation can be simulated using the from.

We will be working on improving this with Tenderly until then you would have to use other tools.

Safe Ape is a python tool that allows you to do this written in Python and Safe Simulator a github action do to the simulation via on GitHub. (See https://github.com/safe-demo/safe-actions-demo-mainnet for an example).

1
  • Any updates so far?
    – MehmedB
    Apr 17, 2023 at 9:17

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.