😶🌫️ Mystery Factor in Gas Estimation Script
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 45/100
- Loại issue
- Tài liệu
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- typescript
- Lĩnh vực
- blockchain, documentation
Hướng nghiên cứu
Start with packages/gas-estimation/scripts/exec.ts, especially the gas formula documentation around lines 29–40 and the l1EstimatedPrice calculation near line 92. Trace the source and units of the factor of 16 before choosing a descriptive constant. Done means the constant and its purpose are documented in gasEstimator() and the tutorial remains understandable.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
📄 Summary
following refers to
arbitrum-tutorials/packages/gas-estimation/scripts/exec.ts
After a thorough review of the gas-estimation script tutorial, including an analysis of the commit history and an organization-wide search, I have been unable to locate a clear explanation for why the following variable is multiplied by a factor of 16:
const l1EstimatedPrice = gasEstimateComponents.l1BaseFeeEstimate.mul(16);
I have examined the detailed documentation (👏) related to the gas formula and the section titled How do we get all parts of that equation. However, the documentation repeatedly states, "and multiply by 16" without providing a precise explanation for this multiplication.
🔎 Interpretation
This factor likely pertains to unit conversion, such as converting from units of size to units of gas. However, neither the tutorial nor the repository offers a clear and specific explanation for this multiplication.
💊 Remedy
To improve clarity, I suggest the following steps:
- Define a constant with a descriptive name for this factor.
- Provide sufficient documentation explaining the purpose and usage of the new constant.
- Update the detailed documentation within
gasEstimator()to reference the factor of 16 and clearly explain its purpose.
- Ngôn ngữ chính
- JavaScript
- Star
- 508
- Fork
- 314
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của OffchainLabs/arbitrum-tutorials
-
destAddress in the eth-deposit-to-different-address could be an argument to pass to the script instead of being hardcodedCó thể đã có người làm @mahsamoosavi đã nhận 996 ngày trước. Đang mở
OffchainLabs/arbitrum-tutorials#115 · 1 người được giao ·
-
add typescript config and convert js scripts to typescriptCó thể làm lại được @mahsamoosavi đã nhận 1402 ngày trước và không có pull request nào đang mở. Đang mởenhancement
OffchainLabs/arbitrum-tutorials#88 · 1 bình luận · 1 người được giao ·
Tất cả issue của OffchainLabs/arbitrum-tutorials
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 73/100
microsoft/monaco-editor#5563 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Package downloads never retry: getUrlWithResuming's retry catch cannot see a rejected requestĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
Maintainer thường phản hồi trong vòng 1 ngày
-
account: profile bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 5 ngày
-
ai-driven-fuzzing bug claude Minor
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
linagora/cozy-client#1777 · 1 bình luận · 1 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày