safe-react-apps icon indicating copy to clipboard operation
safe-react-apps copied to clipboard

[Tx-builder] Check simulation call trace for reversion

Open iamacook opened this issue 1 year ago • 0 comments

Description

Successful simulations can still revert. Not all errors from the call_trace are taken into account.

The changes included in web-core need to be added to the Transaction Builder as well.

Environment

  • Browser: Firefox
  • Wallet: MetaMask
  • Safe: gno:0x828cF988De33bf93527533852E95e2DA449Ec171
  • Environment:
    • prod/staging (Gnosis Chain)

Steps to reproduce

Open a 1.1.1 Safe on Gnosis Chain and create the following batch in the Transaction Builder:

  1. to of current Safe, changeMasterCopy to 0x3E5c63644E683549055b9Be8653de26E0B4CD36E
  2. to of Current Safe, setMasterCopy to 0xf48f2B2d2a534e402487b3ee7C18c33Aec0Fe5e4
  3. to of 0x7a48Dac683DA91e4faa5aB13D91AB5fd170875bd, swapOwner
  4. to of 0x7a48Dac683DA91e4faa5aB13D91AB5fd170875bd, swapOwner from to-be-added owner added in 3.

Simulate transaction and observe it succeeding, but upon execution failing.

Expected result

Simulation does not succeed.

Obtained result

Simulation succeeds.

Screenshots

https://user-images.githubusercontent.com/92332710/232790831-27f2ab78-1181-45dd-9d10-7fe40258b56c.mp4

iamacook avatar Apr 18 '23 14:04 iamacook