Skip to content

Add recipient and deposit options to TicketBroker funding - #83

Merged
j0sh merged 1 commit into
mainfrom
ja-codex/ticketbroker-funding
Nov 12, 2026
Merged

j0sh merged 1 commit into
mainfrom
ja-codex/ticketbroker-funding

Conversation

@j0sh

@j0sh j0sh commented Nov 12, 2026

Copy link
Copy Markdown
Collaborator

Allow livepeer chain ticketbroker fund --recipient ADDRESS to fund another account's TicketBroker deposit and reserve using the configured wallet's ETH.

Use --deposit and --reserve separately or together in one transaction. Omitted amounts default to zero, and a zero total is rejected before RPC access. Existing scripts can continue using --amount as a silent alias for --deposit; its removal is tracked as C15 in #72. Help and documentation use the canonical flags.

Validation:

  • go test ./chain ./cmd/livepeer -short
  • go test ./cmd/livepeer -run '^TestRealBinaryOffchainFlow$' -count=1

Coverage includes recipient/sender separation, signed transaction value and calldata, omitted and zero amounts, alias ordering, and CLI help/completion.

Allow funding a separate account with --recipient. Use --deposit and --reserve with zero defaults, reject zero totals, and retain --amount as a silent compatibility alias tracked for removal in #72.
Copilot AI balanced review requested due to automatic review settings November 12, 2026 08:07

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The review identifies no active issues with the recipient-aware funding change.

No open issues 🎉

What changed in this PR

Extends the chain CLI’s TicketBroker funding command so the configured wallet can fund its own account or another recipient.

Changes:

  • Supports independent --deposit and --reserve amounts, defaulting omitted values to zero and rejecting a zero total before RPC access.
  • Preserves --amount as a silent alias for --deposit, while help and documentation use canonical flags.
  • Expands coverage for recipient funding, transaction encoding and signing, validation, help, and completion.
File Description
go.mod Promotes pflag to a direct dependency for flag alias normalization.
docs/​chain.md Documents optional funding amounts and recipient selection.
configs/​chain/​config.example.toml Updates the commented example to use --deposit.
chain/​transactions_test.go Adds signed recipient-funding transaction coverage.
chain/​params.go Defines deposit/reserve defaults and the optional recipient.
chain/​management_test.go Tests calldata, alias ordering, and single-sided funding.
chain/​cli.go Registers the funding command with the silent --amount alias.
chain/​cli_test.go Updates validation, help/completion, and input-source tests.
chain/​actions.go Builds recipient-aware funding actions and validates amounts.

Review effort: Balanced

@j0sh
j0sh deployed to docker-publish November 12, 2026 08:10 — with GitHub Actions Active
@j0sh
j0sh deployed to docker-publish November 12, 2026 08:11 — with GitHub Actions Active
@j0sh
j0sh deployed to docker-publish November 12, 2026 08:11 — with GitHub Actions Active
@j0sh
j0sh deployed to docker-publish November 12, 2026 08:11 — with GitHub Actions Active
@j0sh
j0sh merged commit c4e2e5d into main Nov 12, 2026
14 checks passed
@j0sh
j0sh deleted the ja-codex/ticketbroker-funding branch November 12, 2026 08:17

This branch was successfully deployed

1 active deployment
docker-publish — 00f77d9f Deployed Nov 12, 2026 by j0sh via docker-pr / promote #168
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants