Skip to content

contracts-bedrock: fix gas estimation for deposits#3589

Closed
tynes wants to merge 3 commits intodevelopfrom
fix/deposit-gas-estimation
Closed

contracts-bedrock: fix gas estimation for deposits#3589
tynes wants to merge 3 commits intodevelopfrom
fix/deposit-gas-estimation

Conversation

@tynes
Copy link
Contributor

@tynes tynes commented Sep 28, 2022

Description

Lets see if this fixes the gas estimation problems in l1ops hive

@changeset-bot
Copy link

changeset-bot bot commented Sep 28, 2022

⚠️ No Changeset found

Latest commit: b178f68

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@github-actions github-actions bot added 2-reviewers A-pkg-contracts-bedrock Area: packages/contracts-bedrock labels Sep 28, 2022
@mergify
Copy link
Contributor

mergify bot commented Sep 28, 2022

This PR changes implementation code, but doesn't include a changeset. Did you forget to add one?

// Give the user a refund based on the amount of gas they used to do all of the work up to
// this point. Since we're at the end of the modifier, this should be pretty accurate. Acts
// effectively like a dynamic stipend (with a minimum value).
uint256 usedGas = initialGas - gasleft();
Copy link
Contributor

Choose a reason for hiding this comment

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

Now the blockDiff > 0 code doesn't count toward the usedGas for the burn anymore, the burn should be after that

@tynes tynes closed this Sep 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-pkg-contracts-bedrock Area: packages/contracts-bedrock

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants