Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🩹 gas: use L1 gas oracle #1262

Merged
merged 3 commits into from
Oct 30, 2023
Merged

🩹 gas: use L1 gas oracle #1262

merged 3 commits into from
Oct 30, 2023

Conversation

jgalat
Copy link
Contributor

@jgalat jgalat commented Oct 27, 2023

closes #1250

  • Introduce L1 Gas Oracle contract to get a better estimation of TXs

@jgalat jgalat requested a review from cruzdanilo as a code owner October 27, 2023 15:15
@vercel
Copy link

vercel bot commented Oct 27, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
app ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 30, 2023 2:49pm

@jgalat jgalat changed the title 🩹 gas: use l1 gas oracle 🩹 gas: use L1 gas oracle Oct 27, 2023
@jgalat jgalat force-pushed the fix/gas-estimations branch from b3192be to 5cabf4c Compare October 27, 2023 15:53
@jgalat jgalat temporarily deployed to Test October 27, 2023 15:59 — with GitHub Actions Inactive
@jgalat jgalat temporarily deployed to Test October 27, 2023 15:59 — with GitHub Actions Inactive
@jgalat jgalat temporarily deployed to Test October 27, 2023 15:59 — with GitHub Actions Inactive
sebipap
sebipap previously approved these changes Oct 27, 2023
args: [data],
});
} else {
l1Gas = 5_555_555_555_55n;
Copy link
Contributor

Choose a reason for hiding this comment

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

where does this come from?

Copy link
Member

Choose a reason for hiding this comment

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

the thousand separators are shifted

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The value is only used in case we don't have a request ready to do a gas estimation (for example, on initial render of the modal we don't have an input, so that's a missing argument). I ran some experiments and just ended up choosing this as a magic number.

@jgalat jgalat force-pushed the fix/gas-estimations branch from 5cabf4c to 5ddf563 Compare October 27, 2023 17:43
@jgalat jgalat temporarily deployed to Test October 27, 2023 17:51 — with GitHub Actions Inactive
@jgalat jgalat temporarily deployed to Test October 27, 2023 17:51 — with GitHub Actions Inactive
@jgalat jgalat temporarily deployed to Test October 27, 2023 17:51 — with GitHub Actions Inactive
@jgalat jgalat temporarily deployed to Test October 27, 2023 18:06 — with GitHub Actions Inactive
@jgalat jgalat temporarily deployed to Test October 27, 2023 18:06 — with GitHub Actions Inactive
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

fix tx cost estimation
4 participants