Skip to content
This repository has been archived by the owner on Nov 10, 2023. It is now read-only.

Fix: gas estimation in 1.1.1 Safes #3985

Merged
merged 2 commits into from
Jun 21, 2022
Merged

Fix: gas estimation in 1.1.1 Safes #3985

merged 2 commits into from
Jun 21, 2022

Conversation

katspaugh
Copy link
Member

@katspaugh katspaugh commented Jun 20, 2022

What it solves

Resolves #3983

How this PR fixes it

Gas estimation in 1.1.1 Safes was broken in many ways since #3868 or possibly even before.

The variable safeTxGas was redefined after its first usage. I moved it up.

How to test it

  • Open a 1/X Safe v.1.1.1
  • Make a simple tx
  • Check that the gas limit and total gas depend on the safeTxGas

NB: editing the safeTxGas in the Advanced form will not automatically update the gas limit. This hasn't changed from prod.

Before (gas limit 60k):
Screenshot 2022-06-20 at 18 38 33

After (gas limit 100k):
Screenshot 2022-06-20 at 18 38 17

@github-actions
Copy link

CLA Assistant Lite All Contributors have signed the CLA.

@github-actions
Copy link

github-actions bot commented Jun 20, 2022

ESLint Summary View Full Report

Annotations are provided inline on the Files Changed tab. You can also see all annotations that were generated on the annotations page.

Type Occurrences Fixable
Errors 0 0
Warnings 0 0
Ignored 0 N/A
  • Result: ✅ success
  • Annotations: 0 total

Report generated by eslint-plus-action

@github-actions
Copy link

Deployment links

Mainnet     🟣 Polygon     🟠 Rinkeby

Copy link
Member

@iamacook iamacook left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me and works as intended.

@katspaugh katspaugh changed the title Fix: gas estimation Fix: gas estimation in 1.1.1 Safes Jun 20, 2022
@coveralls
Copy link

coveralls commented Jun 20, 2022

Pull Request Test Coverage Report for Build 2530364032

  • 3 of 3 (100.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 36.804%

Totals Coverage Status
Change from base Build 2514942154: 0.0%
Covered Lines: 3893
Relevant Lines: 9605

💛 - Coveralls

Copy link
Member

@usame-algan usame-algan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@francovenica
Copy link
Contributor

It seems that the fix is only for safes 1.1.1 and 1.0,0 with a 1/1 policy, for tx that are created and executed right away. (or at least I tried rejections, creating and queuing tx first and then executing and tx in safes 2/x, and those look the same in Dev)

The gas limit is being bumped up for tx that are created/executed right away.
image

I've checked that safes 1.3.0 are unaffected by this change

@katspaugh katspaugh merged commit b881db5 into dev Jun 21, 2022
@katspaugh katspaugh deleted the fix-gas-estimation branch June 21, 2022 10:53
@github-actions github-actions bot locked and limited conversation to collaborators Jun 21, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Gas limit too low in 1.1.1 Safes and 1/X policy
5 participants