You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix: pool close/reclaim gas-estimation revert drops its reason and says on-chain #2426
In close_and_forget and reclaim_and_forget (crates/cli/src/commands/pool.rs), the arm for a send error with revert data drops the error:
Err(e)if e.as_revert_data().is_some() => {
anyhow::bail!("closePool reverted on-chain for pool {pool_id}")}
The revert reason is lost.closePool can revert PoolNotOpen or NotPoolOwner. reclaim can revert PoolNotClosing, GraceWindowActive, or a USDC transfer revert. So reclaim_reverted has to guess ("most likely a concurrent reclaim; the USDC refund transfer to the owner can also revert"). The selector would answer it.
The text is wrong. This arm runs at gas estimation. Nothing was broadcast or mined, but the message says "reverted on-chain". Only the receipt arms are on-chain.
The close arm leaves out the receipt arm's "may have raced a concurrent close" hint.
Fix
Keep e as the source with anyhow::Error::new(e).context(..).
Say that the call was rejected at gas estimation and nothing was sent.
Decode the known selectors (decdn_incentive::is_pool_not_open exists) into a specific hint where one applies.
Checks
A mocked-provider test per site: an ErrorResp with revert data for a known selector gives the specific message and no "may have broadcast" note.
No test reaches these arms today. Deleting the guard would route the error into send_failed unnoticed.
Activity