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

Refactor of gas calculation #1752

@Agupane

Description

@Agupane

As discussed internally we would need to refactor our current gas calculation, currently, we have this approach:

image.png

After the discussion with Richard we decided to go this way:

image.png

The logic of estimating the gas should be independent of the current threshold value

After the refactor we should have something like:

1) estimateGasForTxCreation: 
When tx is created -> safe.requiredTxGas

2) estimateGasForTxExecution: 
When tx is executed -> web3.estimateGas

3) estimateGasForApproval: 
- For on chain approval -> web3.estimateGas 
- For off chain approval -> no need to estimate anything
- Note: as we don't know if an approval will be off or on chain we will assume it is on chain

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions