Zero CELO gas balance is reported as a contract revert: "gas required exceeds allowance (0)"
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 50/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 静か
- 技術スタック
- typescript
- 領域
- cli
調査の方向性
celocli multisig:approve コマンドから始め、CELO がゼロの認証済み送信者を使って失敗を再現し、その後、CLI に到達する前に gas-estimation error がどのようにラップされるかを調べます。CLI が contract revert を報告するのではなく、gas funds の不足を特定し、可能な場合はデバッグ用にネストされたエラーを保持できれば完了です。
索引モデルが issue の本文から書いたものです。
説明
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.
- 主要言語
- TypeScript
- スター
- 43
- フォーク
- 36
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
celo-org/developer-tooling のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
celo-org/developer-tooling#793 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
celo-org/developer-tooling#786 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 55/100
celo-org/developer-tooling#800 · コメント 1 件 ·
-
Bridge commands duplicate signer construction and miss new signer types対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープン
難易度 4/5 3〜5日 初心者へのやさしさ 68/100
celo-org/developer-tooling#794 ·
-
--ledgerLiveMode iterates the BIP-44 change index instead of the hardened account index対応中かも @Steve0x2a が 46 日前に担当しました。 オープンbug celocli
難易度 3/5 1〜2日 初心者へのやさしさ 78/100
celo-org/developer-tooling#789 ·
celo-org/developer-tooling の issue をすべて見る
似ている issue
-
clawsweeper:fix-shape-clear clawsweeper:queueable-fix clawsweeper:source-repro impact:ux-friction issue-rating: 🦞 diamond lobster no-stale P3
難易度 2/5 1〜3時間 初心者へのやさしさ 73/100
openclaw/openclaw#182077 · コメント 1 件 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
-
aikido high security
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
dequelabs/axe-linter-action#161 ·
-
[Feature Request] Update the DimCode agent icon to the 45:32 brand mark対応中かも @eric8810 が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
lyswhut/lx-music-desktop#3026 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
abhigyanpatwari/GitNexus#3704 ·
メンテナーはふだん 1 日以内に返信