[Tx-builder] Check simulation call trace for reversion

Open
#692 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
typescript
Domain
frontend

Research direction

Start in the Transaction Builder simulation flow and compare its call_trace error handling with the changes in web-core pull request 1861. Reproduce the four-step batch on Gnosis Chain, then verify that a simulation containing the described reversion is reported as unsuccessful rather than executable.

Written by the indexing model from the issue text.

Description

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

Dominant language
TypeScript
Stars
116
Forks
84
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from safe-global/safe-react-apps

All issues in safe-global/safe-react-apps

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.