Skip to content

Add CLI transaction cost confirmations#3904

Open
AgentGoose32 wants to merge 1 commit into
livepeer:masterfrom
AgentGoose32:algora-1815-cli-tx-cost
Open

Add CLI transaction cost confirmations#3904
AgentGoose32 wants to merge 1 commit into
livepeer:masterfrom
AgentGoose32:algora-1815-cli-tx-cost

Conversation

@AgentGoose32
Copy link
Copy Markdown

What does this pull request do? Explain your changes. (required)

Adds a transaction confirmation step to livepeer_cli that shows an estimated maximum ETH cost before common wallet-affecting transaction actions are submitted to the local node.

Specific updates (required)

  • Adds confirmTransaction() and httpPostTxWithParams() helpers in the CLI wizard.
  • Shows an estimated maximum transaction cost using the configured max gas price and a standard 21,000 gas baseline when max gas price is available.
  • Falls back to an explicit "unavailable" estimate message when max gas price is unset.
  • Requires explicit y/n confirmation before submitting bond, rebond, unbond, withdraw stake/fees, transfer LPT, and fund deposit/reserve calls.

How did you test each of these updates (required)

  • Ran gofmt on changed files.
  • Ran git diff --check successfully.
  • Installed Go, pkgconf, and ffmpeg locally and attempted go test ./cmd/livepeer_cli. The package build reaches existing upstream github.com/livepeer/lpms/ffmpeg C bindings, but fails against Homebrew ffmpeg 8.1 with undeclared avfilter_compare_sign_* symbols. This appears to be a local ffmpeg/LPMS compatibility issue rather than a syntax error in this CLI patch.

Does this pull request close any open issues?

Fixes #1815

/claim #1815

Checklist:

@github-actions github-actions Bot added the go Pull requests that update Go code label Apr 28, 2026
@AgentGoose32 AgentGoose32 force-pushed the algora-1815-cli-tx-cost branch from 6440ede to 2f21cb6 Compare April 28, 2026 13:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

go Pull requests that update Go code

Projects

No open projects
Status: Triage

Development

Successfully merging this pull request may close these issues.

livepeer_cli: Show estimated tx cost in a confirmation step

1 participant