Zero CELO gas balance is reported as a contract revert: "gas required exceeds allowance (0)"
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 50/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Ít trao đổi
- Công nghệ
- typescript
- Lĩnh vực
- cli
Hướng nghiên cứu
Bắt đầu với lệnh celocli multisig:approve và tái hiện lỗi bằng một sender đã được ủy quyền nhưng không có CELO, sau đó kiểm tra cách lỗi ước tính gas được bọc trước khi đến CLI. Công việc được xem là hoàn tất khi CLI xác định số dư gas không đủ thay vì báo cáo contract revert, đồng thời giữ lại lỗi lồng nhau để gỡ lỗi khi có thể.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Package
@celo/celocli9.0.1viem2.55.11 (dependency bundled by celocli)
Environment
- Celo Mainnet via
https://forno.celo.org - macOS on Apple Silicon
- Ledger signer (the issue appears to be independent of the signer type)
Command
celocli multisig:approve \
--for <multisig> \
--tx <transaction-id> \
--from <owner-with-zero-CELO-balance> \
--useLedger \
--node https://forno.celo.org
Describe the bug
When the sending account has a zero native CELO balance and therefore cannot pay gas, celocli reports the gas-estimation failure as a contract execution revert:
Sending Transaction: multisig: approving transaction ... failed:
Execution reverted with reason: gas required exceeds allowance (0).
ContractFunctionExecutionError: Execution reverted with reason:
gas required exceeds allowance (0).
This is misleading because the contract call itself does not revert. The account simply has no CELO with which to pay transaction fees.
In the observed case:
- the sender's native CELO balance was exactly
0; - all celocli multisig checks passed;
confirmations(transactionId, sender)remainedfalse, confirming that nothing was submitted;- a read-only trace of the same
confirmTransactioncall succeeded; - the trace estimated approximately 211,260 gas;
- funding the sender is the required remedy.
The message led us to investigate the multisig transaction and contract logic, even though neither was the source of the failure.
Expected behavior
celocli should identify this as an insufficient gas-funds error and provide an actionable message, for example:
The sender does not have enough CELO to pay transaction fees.
Sender balance: 0 CELO.
Fund the sender or select a supported --gasCurrency with sufficient balance.
It should not describe this condition as an execution revert.
Actual behavior
The underlying RPC text:
gas required exceeds allowance (0)
is wrapped as EstimateGasExecutionError, ExecutionRevertedError, TransactionExecutionError, and finally ContractFunctionExecutionError, resulting in the incorrect user-facing statement that contract execution reverted.
Suggested fix
Before sending or estimating a transaction, celocli could:
- retrieve the sender's native balance (or selected gas-currency balance);
- compare it with the estimated/upfront fee requirement where possible; and
- fail with a dedicated insufficient-gas-funds message.
Alternatively, the transaction error handler could recognize node errors matching gas required exceeds allowance (<amount>) during gas estimation and translate them into an insufficient-funds error rather than an execution revert.
The exact string may originate from the RPC client and the incorrect classification may occur in viem, but celocli should still present an actionable CLI error. Preserving the original nested error for debugging would be useful.
Reproduction outline
- Use an account that is authorized to perform a transaction but has
0CELO. - Run a celocli write command using that account as
--from. - Observe
Execution reverted with reason: gas required exceeds allowance (0)during gas estimation. - Simulate/trace the contract call independently and observe that it succeeds.
- Fund the sender with enough CELO for gas and retry.
- Ngôn ngữ chính
- TypeScript
- Star
- 43
- Fork
- 36
- 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
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
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 celo-org/developer-tooling
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
celo-org/developer-tooling#793 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
celo-org/developer-tooling#786 ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 55/100
celo-org/developer-tooling#800 · 1 bình luận ·
-
Bridge commands duplicate signer construction and miss new signer typesCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 68/100
celo-org/developer-tooling#794 ·
-
--ledgerLiveMode iterates the BIP-44 change index instead of the hardened account indexCó thể đã có người làm @Steve0x2a đã nhận 45 ngày trước. Đang mởbug celocli
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 78/100
celo-org/developer-tooling#789 ·
Tất cả issue của celo-org/developer-tooling
Issue tương tự
-
bug hacktoberfest help wanted
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
libredb/libredb-studio#1941 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
chore other
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
alastair-smith/card-games#308 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 86/100
paperclipai/paperclip#17379 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[good first issue, hacktoberfest] 🏯 Hacktoberfest Task - Add new Anime Quote 626 (good-first-issue)Đang mởcommunity first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 76/100
lingdojo/kana-dojo#33040 · 1 bình luận · 5 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug mobile ui
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
Maintainer thường phản hồi trong vòng 1 ngày